File tree Expand file tree Collapse file tree 26 files changed +130
-26
lines changed Expand file tree Collapse file tree 26 files changed +130
-26
lines changed Original file line number Diff line number Diff line change @@ -2303,6 +2303,10 @@ static int action_restore(void)
2303
2303
static void moveitem (uint8_t i , uint8_t l )
2304
2304
{
2305
2305
uint8_t * p = game .objloc + i ;
2306
+ if (* p == 255 )
2307
+ game .carried -- ;
2308
+ if (l == 255 )
2309
+ game .carried ++ ;
2306
2310
if (* p == game .location )
2307
2311
redraw |= REDRAW_MAYBE ;
2308
2312
if (l == game .location )
@@ -2607,7 +2611,7 @@ void process_light(void)
2607
2611
return ;
2608
2612
}
2609
2613
}
2610
- if (game .lighttime > 25 )
2614
+ if (game .lighttime > 25 || ( l != 255 && l != game . location ) )
2611
2615
return ;
2612
2616
strout_lower (lightoutin );
2613
2617
decout_lower (game .lighttime );
Original file line number Diff line number Diff line change @@ -2358,6 +2358,10 @@ static int action_restore(void)
2358
2358
static void moveitem (uint8_t i , uint8_t l )
2359
2359
{
2360
2360
uint8_t * p = game .objloc + i ;
2361
+ if (* p == 255 )
2362
+ game .carried -- ;
2363
+ if (l == 255 )
2364
+ game .carried ++ ;
2361
2365
if (* p == game .location )
2362
2366
redraw |= REDRAW_MAYBE ;
2363
2367
if (l == game .location )
@@ -2662,7 +2666,7 @@ void process_light(void)
2662
2666
return ;
2663
2667
}
2664
2668
}
2665
- if (game .lighttime > 25 )
2669
+ if (game .lighttime > 25 || ( l != 255 && l != game . location ) )
2666
2670
return ;
2667
2671
strout_lower (lightoutin );
2668
2672
decout_lower (game .lighttime );
Original file line number Diff line number Diff line change @@ -2189,6 +2189,10 @@ static int action_restore(void)
2189
2189
static void moveitem (uint8_t i , uint8_t l )
2190
2190
{
2191
2191
uint8_t * p = game .objloc + i ;
2192
+ if (* p == 255 )
2193
+ game .carried -- ;
2194
+ if (l == 255 )
2195
+ game .carried ++ ;
2192
2196
if (* p == game .location )
2193
2197
redraw |= REDRAW_MAYBE ;
2194
2198
if (l == game .location )
@@ -2493,7 +2497,7 @@ void process_light(void)
2493
2497
return ;
2494
2498
}
2495
2499
}
2496
- if (game .lighttime > 25 )
2500
+ if (game .lighttime > 25 || ( l != 255 && l != game . location ) )
2497
2501
return ;
2498
2502
strout_lower (lightoutin );
2499
2503
decout_lower (game .lighttime );
Original file line number Diff line number Diff line change @@ -2403,6 +2403,10 @@ static int action_restore(void)
2403
2403
static void moveitem (uint8_t i , uint8_t l )
2404
2404
{
2405
2405
uint8_t * p = game .objloc + i ;
2406
+ if (* p == 255 )
2407
+ game .carried -- ;
2408
+ if (l == 255 )
2409
+ game .carried ++ ;
2406
2410
if (* p == game .location )
2407
2411
redraw |= REDRAW_MAYBE ;
2408
2412
if (l == game .location )
@@ -2707,7 +2711,7 @@ void process_light(void)
2707
2711
return ;
2708
2712
}
2709
2713
}
2710
- if (game .lighttime > 25 )
2714
+ if (game .lighttime > 25 || ( l != 255 && l != game . location ) )
2711
2715
return ;
2712
2716
strout_lower (lightoutin );
2713
2717
decout_lower (game .lighttime );
Original file line number Diff line number Diff line change @@ -2480,6 +2480,10 @@ static int action_restore(void)
2480
2480
static void moveitem (uint8_t i , uint8_t l )
2481
2481
{
2482
2482
uint8_t * p = game .objloc + i ;
2483
+ if (* p == 255 )
2484
+ game .carried -- ;
2485
+ if (l == 255 )
2486
+ game .carried ++ ;
2483
2487
if (* p == game .location )
2484
2488
redraw |= REDRAW_MAYBE ;
2485
2489
if (l == game .location )
@@ -2784,7 +2788,7 @@ void process_light(void)
2784
2788
return ;
2785
2789
}
2786
2790
}
2787
- if (game .lighttime > 25 )
2791
+ if (game .lighttime > 25 || ( l != 255 && l != game . location ) )
2788
2792
return ;
2789
2793
strout_lower (lightoutin );
2790
2794
decout_lower (game .lighttime );
Original file line number Diff line number Diff line change @@ -2462,6 +2462,10 @@ static int action_restore(void)
2462
2462
static void moveitem (uint8_t i , uint8_t l )
2463
2463
{
2464
2464
uint8_t * p = game .objloc + i ;
2465
+ if (* p == 255 )
2466
+ game .carried -- ;
2467
+ if (l == 255 )
2468
+ game .carried ++ ;
2465
2469
if (* p == game .location )
2466
2470
redraw |= REDRAW_MAYBE ;
2467
2471
if (l == game .location )
@@ -2766,7 +2770,7 @@ void process_light(void)
2766
2770
return ;
2767
2771
}
2768
2772
}
2769
- if (game .lighttime > 25 )
2773
+ if (game .lighttime > 25 || ( l != 255 && l != game . location ) )
2770
2774
return ;
2771
2775
strout_lower (lightoutin );
2772
2776
decout_lower (game .lighttime );
Original file line number Diff line number Diff line change @@ -2489,6 +2489,10 @@ static int action_restore(void)
2489
2489
static void moveitem (uint8_t i , uint8_t l )
2490
2490
{
2491
2491
uint8_t * p = game .objloc + i ;
2492
+ if (* p == 255 )
2493
+ game .carried -- ;
2494
+ if (l == 255 )
2495
+ game .carried ++ ;
2492
2496
if (* p == game .location )
2493
2497
redraw |= REDRAW_MAYBE ;
2494
2498
if (l == game .location )
@@ -2793,7 +2797,7 @@ void process_light(void)
2793
2797
return ;
2794
2798
}
2795
2799
}
2796
- if (game .lighttime > 25 )
2800
+ if (game .lighttime > 25 || ( l != 255 && l != game . location ) )
2797
2801
return ;
2798
2802
strout_lower (lightoutin );
2799
2803
decout_lower (game .lighttime );
Original file line number Diff line number Diff line change @@ -2607,6 +2607,10 @@ static int action_restore(void)
2607
2607
static void moveitem (uint8_t i , uint8_t l )
2608
2608
{
2609
2609
uint8_t * p = game .objloc + i ;
2610
+ if (* p == 255 )
2611
+ game .carried -- ;
2612
+ if (l == 255 )
2613
+ game .carried ++ ;
2610
2614
if (* p == game .location )
2611
2615
redraw |= REDRAW_MAYBE ;
2612
2616
if (l == game .location )
@@ -2911,7 +2915,7 @@ void process_light(void)
2911
2915
return ;
2912
2916
}
2913
2917
}
2914
- if (game .lighttime > 25 )
2918
+ if (game .lighttime > 25 || ( l != 255 && l != game . location ) )
2915
2919
return ;
2916
2920
strout_lower (lightoutin );
2917
2921
decout_lower (game .lighttime );
Original file line number Diff line number Diff line change @@ -2671,6 +2671,10 @@ static int action_restore(void)
2671
2671
static void moveitem (uint8_t i , uint8_t l )
2672
2672
{
2673
2673
uint8_t * p = game .objloc + i ;
2674
+ if (* p == 255 )
2675
+ game .carried -- ;
2676
+ if (l == 255 )
2677
+ game .carried ++ ;
2674
2678
if (* p == game .location )
2675
2679
redraw |= REDRAW_MAYBE ;
2676
2680
if (l == game .location )
@@ -2975,7 +2979,7 @@ void process_light(void)
2975
2979
return ;
2976
2980
}
2977
2981
}
2978
- if (game .lighttime > 25 )
2982
+ if (game .lighttime > 25 || ( l != 255 && l != game . location ) )
2979
2983
return ;
2980
2984
strout_lower (lightoutin );
2981
2985
decout_lower (game .lighttime );
Original file line number Diff line number Diff line change @@ -2589,6 +2589,10 @@ static int action_restore(void)
2589
2589
static void moveitem (uint8_t i , uint8_t l )
2590
2590
{
2591
2591
uint8_t * p = game .objloc + i ;
2592
+ if (* p == 255 )
2593
+ game .carried -- ;
2594
+ if (l == 255 )
2595
+ game .carried ++ ;
2592
2596
if (* p == game .location )
2593
2597
redraw |= REDRAW_MAYBE ;
2594
2598
if (l == game .location )
@@ -2893,7 +2897,7 @@ void process_light(void)
2893
2897
return ;
2894
2898
}
2895
2899
}
2896
- if (game .lighttime > 25 )
2900
+ if (game .lighttime > 25 || ( l != 255 && l != game . location ) )
2897
2901
return ;
2898
2902
strout_lower (lightoutin );
2899
2903
decout_lower (game .lighttime );
You can’t perform that action at this time.
0 commit comments