Prev: B699 Up: Map Next: B6CF
B6AE: Move By Speed
Add the actor's horizontal speed to its world X and return the Y plus thrust in A.
Input
IX Actor slot
Add the actor's horizontal speed to its world X.
MoveBySpeed B6AE LD A,(IX+$05) Copy the actor speed into C.
B6B1 LD C,A
B6B2 LD B,$00 Clear B.
B6B4 AND A Jump to MoveBySpeed_AddWorldX if the speed is positive.
B6B5 JP P,MoveBySpeed_AddWorldX
B6B8 DEC B Sign-extend the speed into BC.
Add the sign-extended speed to the world X and wrap it.
MoveBySpeed_AddWorldX B6B9 LD L,(IX+$02) Fetch the actor world X.
B6BC LD H,(IX+$03) Fetch the high byte.
B6BF CALL MaskWorldX Call MaskWorldX.
B6C2 LD (IX+$02),L Write the wrapped low byte back.
B6C5 LD (IX+$03),H Write the wrapped high byte back.
Return the actor Y plus its thrust.
B6C8 LD A,(IX+$04) Fetch the actor Y.
B6CB ADD A,(IX+$06) Add the actor thrust.
B6CE RET Return.
Prev: B699 Up: Map Next: B6CF