Prev: 6F98 Up: Map Next: 6FBF
6F99: 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 69 7F < 6F
Right 80 96 > 90
Handler_Ice 6F99 LD A,($7822) A=*Speed.
6F9C CP $90 Jump to Initialise_CrashIce if A is higher than 90.
6F9E JR NC,Initialise_CrashIce
6FA0 CP $6F Jump to Initialise_CrashIce if A is lower than 6F.
6FA2 JR C,Initialise_CrashIce
6FA4 LD A,($7828) A=*7828.
6FA7 AND %00000011 Keep only bits 0-1.
6FA9 RET Z Return if the result is zero.
Initialise_CrashIce 6FAA LD A,$06 Write 06 to *Action.
6FAC LD ($782A),A
6FAF LD HL,$BDB8 HL=BDB8.
6FB2 LD A,($7822) Jump to CrashIceMovingRight if *Speed is higher than 80 (i.e. moving right).
6FB5 BIT 7,A
6FB7 JR NZ,CrashIceMovingRight
6FB9 LD L,$C7 L=C7.
CrashIceMovingRight 6FBB LD ($783A),HL Write HL to *783A.
6FBE RET Return.
Prev: 6F98 Up: Map Next: 6FBF