Prev: B2B0 Up: Map Next: B2D9
B2B6: The update routine for a block that sinks while something stands on it (graphic 44)
Object template 5. Each turn something is on it -- bit 3 of +D, set by the collision code on what the robot or another mover of graphics 16 to 47 lands on (ADJ_DZ_FOR_OBJ_INTERSECT), and cleared here -- it sinks one unit, with a grinding note, until it lands on what is under it. As Knight Lore's dropping block (upd_91).
Measured in the simulator in room $82: with him on it, it went down one unit a turn from Z 100. On the floor, as in room $12, it cannot sink and stays put. The sessions of the build had never stood on one (the coverage report).
Input
IX the block
DROPPING_BLOCK B2B6 CALL DRAW_AT_L16_D9 the drawing nudge
B2B9 BIT 3,(IX+$0D) nothing on it: nothing to do, not even a redraw
B2BD RES 3,(IX+$0D)
B2C1 RET Z
B2C2 LD (IX+$0B),$00 a Z step of 0, which the fall makes -1: down one
B2C6 CALL DEC_DZ_AND_UPDATE_UVZ
B2C9 LD (IX+$0B),$00 no Z step kept
B2CD BIT 2,(IX+$0C) still moving down: a grinding note pitched by Z
B2D1 JR NZ,DROPPING_BLOCK_0
B2D3 CALL BEEP_BY_Z
DROPPING_BLOCK_0 B2D6 JP SET_WIPE_AND_DRAW_FLAGS redraw it
Prev: B2B0 Up: Map Next: B2D9