Prev: 6E19 Up: Map Next: 6E43
6E32: Subtract X Movement
Used by the routine at HandlerAccelerate.
Moves the car to a lower X position. If it would go below the start of the map then it bounces off the edge instead.
SubtractX 6E32 EX DE,HL HL=X position.
6E33 AND A Subtract the result of the multiplication from the X position.
6E34 SBC HL,DE
6E36 SBC A,$00 Borrow from the top byte.
6E38 JR NZ,HandlerAccelerate_StoreX Jump to HandlerAccelerate_StoreX if the top byte is not zero.
6E3A EX AF,AF' Switch to the shadow flags.
6E3B LD A,H A=H.
6E3C CP $80 Jump to BounceX if the position is below 80 in the second byte.
6E3E JR C,BounceX
6E40 EX AF,AF' Switch back.
6E41 JR HandlerAccelerate_StoreX Jump to HandlerAccelerate_StoreX.
Prev: 6E19 Up: Map Next: 6E43