Prev: B286 Up: Map Next: B29F
B28C: The update routine for a block that collapses when landed on (graphic 45)
Object template 6. It sits still until the robot, or something else of graphics 16 to 47 that moves, lands on it -- bit 3 of +D, which the collision code sets on what such a thing lands on (ADJ_DZ_FOR_OBJ_INTERSECT) -- and then it vanishes in the sparkle (SPARKLE_STEP, SPARKLE_END_PLACE): graphic 64 is set and stepped to 65 in the same turn, so what is seen is 45, 65, gone (measured). Rebuilding the room brings it back. As Knight Lore's collapsing block (upd_143).
Graphic 65's routine empties the place the record's +10 and +11 point to, which for a block is address 0 in the ROM: the write does nothing.
Measured in the simulator in room $12: dropped on it, he stood on it for a turn; it became 65, then 1, then an empty record, and he fell.
Input
IX the block
COLLAPSING_BLOCK B28C CALL DRAW_AT_L16_D9 the drawing nudge
B28F BIT 3,(IX+$0D) landed on? (and ready for the next time)
B293 RES 3,(IX+$0D)
B297 RET Z
B298 LD (IX+$00),$40 yes: graphic 64, and on into the sparkle's next frame
B29C JP SPARKLE_STEP
Prev: B286 Up: Map Next: B29F