Prev: B963 Up: Map Next: B99B
B979: Fall, and move
Used by the routines at TAKE_OR_LEAVE, BOLT, HOMER, PUSHABLE, BOBBER, SPIDER, WELL, ROAMER and SKY_WALKER.
Takes one off dZ -- the pull of gravity -- then lets ADJ_FOR_OUT_OF_BOUNDS cut the step down to what fits, and adds what is left to the position. Most update routines come in at CLIP_AND_MOVE, to move without falling; the player's legs come in at ADD_DUVZ, having cut the move themselves (MOVE_PLAYER).
Input
IX the object
DEC_DZ_AND_UPDATE_UVZ B979 DEC (IX+$0B) gravity
CLIP_AND_MOVE B97C CALL ADJ_FOR_OUT_OF_BOUNDS cut the move short where it has to be
This entry point is used by the routine at MOVE_PLAYER.
ADD_DUVZ B97F LD A,(IX+$01) U, V and Z (+$01 to +$03) plus the step in each (+$09 to +$0B)
B982 ADD A,(IX+$09)
B985 LD (IX+$01),A
B988 LD A,(IX+$02)
B98B ADD A,(IX+$0A)
B98E LD (IX+$02),A
B991 LD A,(IX+$03)
B994 ADD A,(IX+$0B)
B997 LD (IX+$03),A
B99A RET
Prev: B963 Up: Map Next: B99B