Prev: CD81 Up: Map Next: CDBB
CDA0: The update routine for a block that sinks under him
Graphic 78, a block that stays where it is until he stands on it, and then sinks a unit a turn for as long as he does. It never falls by itself: its Z step is only ever set by what lands on it, since the player's flags (bit 2) make the collision code pass his Z step to what he lands on (ADJ_DZ_FOR_OBJ_INTERSECT). Any Z step at all becomes one unit down.
Measured in the simulator in room 15: stood on, it went from Z 152 down one a turn, and he with it.
Input
IX the object record
SINKING_BLOCK CDA0 CALL DRAW_AT_L16_D8 the drawing nudge
CDA3 LD (IX+$09),$00 no sideways step
CDA7 LD (IX+$0A),$00
CDAB LD A,(IX+$0B) pressed on from above: down one unit
CDAE AND A
CDAF JR Z,SINKING_BLOCK_0
CDB1 LD A,$FF
CDB3 LD (IX+$0B),A
SINKING_BLOCK_0 CDB6 CALL CLIP_AND_MOVE move without falling, then stop
CDB9 JR STOP_MOVING
Prev: CD81 Up: Map Next: CDBB