Prev: 6D73 Up: Map Next: 6E00
6DEF: Subtract Y Movement
Used by the routine at HandlerAccelerate.
Moves the car to a lower Y position. If it would go below the start of the map then it bounces off the edge instead.
SubtractY 6DEF EX DE,HL HL=Y position.
6DF0 AND A Subtract the result of the multiplication from the Y position.
6DF1 SBC HL,DE
6DF3 SBC A,$00 Borrow from the top byte.
6DF5 JR NZ,HandlerAccelerate_StoreY Jump to HandlerAccelerate_StoreY if the top byte is not zero.
6DF7 EX AF,AF' Switch to the shadow flags.
6DF8 LD A,H A=H.
6DF9 CP $80 Jump to BounceY if the position is below 80 in the second byte.
6DFB JR C,BounceY
6DFD EX AF,AF' Switch back.
6DFE JR HandlerAccelerate_StoreY Jump to HandlerAccelerate_StoreY.
Prev: 6D73 Up: Map Next: 6E00