Prev: 29622 Up: Map Next: 29681
29623: Demo Mode Input
Input method; used by the routine at GetControls.
In demo mode, we never let the game run out of fuel or lives.
DemoModeInput 29623 LD A,4 Write 4 to *Lives.
29625 LD (30777),A
29628 LD HL,13312 Write 13312 to *Fuel.
29631 LD (30780),HL
29634 CALL KeyboardInput Call KeyboardInput.
29637 AND A Jump to DemoModeControls if no keys are being pressed.
29638 JR Z,DemoModeControls
29640 NOP No operation.
29641 NOP
29642 NOP
29643 NOP
29644 NOP
29645 NOP
Any input jumps back to the start screen.
29646 JP StartScreen Jump to StartScreen.
Randomly send controls for the game.
DemoModeControls 29649 CALL GetRandomNumber Call GetRandomNumber.
29652 AND %00001100 Ensure the random number is either 4, 8 or 12.
29654 JR Z,DemoModeControls
29656 XOR %00001100 Flip bits 2-3 so 4 becomes 8, 8 becomes 4 and 12 becomes 0.
29658 LD HL,(30769) HL=*30769.
29661 INC L Increment L by three.
29662 INC L
29663 INC L
29664 LD D,A D=A.
29665 LD A,(30754) A=*Speed.
29668 CP (HL) Compare A with *HL.
29669 LD A,0 A=0.
29671 JR Z,DemoModeInput_1 Jump to DemoModeInput_1 if A was equal to *HL on line 29668.
29673 JR C,DemoModeInput_0 Jump to DemoModeInput_0 if A was lower than *HL on line 29668.
29675 LD A,3 A=3.
DemoModeInput_0 29677 XOR %00000001 Flip bits 0.
DemoModeInput_1 29679 OR D Set the bits from D.
29680 RET Return.
Prev: 29622 Up: Map Next: 29681