Prev: A4E7 Up: Map Next: A53A
A522: Clamp Object To Ground
Tick the object timer and stop it at Y=AF.
Input
IX Actor slot
Tick the object timer and clamp Y to the ground line.
ClampObjectToGround A522 CALL TickObjectTimer Call TickObjectTimer.
A525 CALL MoveBySpeed Call MoveBySpeed.
A528 CP $AF Jump to ClampObjectToGround_WriteY if the object is still above the ground line.
A52A JR C,ClampObjectToGround_WriteY
A52C LD (IX+$06),$00 Write 00 to the thrust and the speed.
A530 LD (IX+$05),$00
A534 LD A,$AF A=AF.
ClampObjectToGround_WriteY A536 LD (IX+$04),A Write it as the object Y.
A539 RET Return.
Prev: A4E7 Up: Map Next: A53A