Prev: 28568 Up: Map Next: 28607
28569: Handler: Ice
If you hit ice too fast the bike will slide (crash) and you fall off.
The parameters are;
Direction Bike Range Crash Point
Lowest Highest
Left 105 127 < 111
Right 128 150 > 144
Handler_Ice 28569 LD A,(30754) A=*Speed.
28572 CP 144 Jump to Initialise_CrashIce if A is higher than 144.
28574 JR NC,Initialise_CrashIce
28576 CP 111 Jump to Initialise_CrashIce if A is lower than 111.
28578 JR C,Initialise_CrashIce
28580 LD A,(30760) A=*30760.
28583 AND %00000011 Keep only bits 0-1.
28585 RET Z Return if the result is zero.
Initialise_CrashIce 28586 LD A,6 Write 6 to *Action.
28588 LD (30762),A
28591 LD HL,48568 HL=48568.
28594 LD A,(30754) Jump to CrashIceMovingRight if *Speed is higher than 128 (i.e. moving right).
28597 BIT 7,A
28599 JR NZ,CrashIceMovingRight
28601 LD L,199 L=199.
CrashIceMovingRight 28603 LD (30778),HL Write HL to *30778.
28606 RET Return.
Prev: 28568 Up: Map Next: 28607