Prev: 28607 Up: Map Next: 28668
28608: Handler: Jumps
If you hit a jump too fast or too slow the bike will crash.
Handler_Jumps 28608 LD DE,0 DE=0000.
28611 LD A,(30754) A=*Speed.
Check if the speed was too fast.
The parameters are quite wide;
Direction Bike Range Crash Point
Lowest Highest
Left 105 127 < 106
Right 128 150 > 150
28614 CP 150 Jump to Initialise_CrashJumpTooFast if A is higher than 150.
28616 JR NC,Initialise_CrashJumpTooFast
28618 LD E,66 E=66.
28620 CP 106 Jump to Initialise_CrashJumpTooFast if A is lower than 106.
28622 JR C,Initialise_CrashJumpTooFast
28624 LD E,35 E=35.
Check if the speed was too slow.
The parameters are again, quite wide;
Direction Bike Range Crash Point
Lowest Highest
Left 105 127 > 112
Right 128 150 < 144
28626 CP 144 Return if A is higher than 144.
28628 RET NC
28629 CP 112 Return if A is lower than 112.
28631 RET C
28632 BIT 7,A Jump to Initialise_CrashJumpTooFast if *Speed is higher than 128 (i.e. moving right).
28634 JR NZ,Initialise_CrashJumpTooFast
28636 LD E,101 E=101.
Initialise_CrashJumpTooFast 28638 RLCA RLCA.
28639 LD HL,(30766) HL=*30766.
28642 JR C,Handler_Jumps_0 Jump to Handler_Jumps_0 if {} is lower.
28644 DEC L Decrease L by two.
28645 DEC L
Handler_Jumps_0 28646 INC L Increment L by one.
28647 LD A,(HL) A=*HL.
28648 LD HL,48436 HL=48436.
28651 CP 67 Jump to Handler_Jumps_1 if A is lower than 67.
28653 JR C,Handler_Jumps_1
28655 LD HL,50176 HL=50176.
Handler_Jumps_1 28658 ADD HL,DE HL+=DE.
28659 LD (30778),HL Write HL to *30778.
28662 LD A,4 Write 4 to *Action.
28664 LD (30762),A
28667 RET Return.
Prev: 28607 Up: Map Next: 28668