![]() |
Routines |
| Prev: D251 | Up: Map | Next: D2DE |
|
Graphics 136 to 139: a block that crumbles a stage for each turn he stands on it, and vanishes after the fourth. It needs both bit 7 of +17, which the collision code sets when he (or the heavy block, HEAVY_BLOCK) lands on it (MARK_STOOD_ON), and bit 3 of +D, set for anything landing on it (ADJ_DZ_FOR_OBJ_INTERSECT); it clears both, then moves up a graphic, or from 139 becomes graphic 1, which DRAW_OBJECT rubs out and turns into an empty record.
Measured in the simulator in room 4: he landed on it and it went 136, 137, 138, 139, gone, a turn each, and he fell.
|
||||||||
| CRUMBLING_BLOCK | D2AD | CALL DRAW_AT_L16_D8 | the drawing nudge; no fall; move | |||||
| D2B0 | LD (IX+$0B),$00 | |||||||
| D2B4 | CALL CLIP_AND_MOVE | |||||||
| D2B7 | BIT 7,(IX+$17) | he has landed on it this turn? | ||||||
| D2BB | RET Z | |||||||
| D2BC | RES 7,(IX+$17) | |||||||
| D2C0 | BIT 3,(IX+$0D) | |||||||
| D2C4 | RET Z | |||||||
| D2C5 | RES 3,(IX+$0D) | |||||||
| D2C9 | LD A,(IX+$00) | the next stage; redraw | ||||||
| D2CC | CP $8B | |||||||
| D2CE | JR Z,CRUMBLING_BLOCK_0 | |||||||
| D2D0 | INC A | |||||||
| D2D1 | LD (IX+$00),A | |||||||
| D2D4 | JP SET_WIPE_AND_DRAW_FLAGS | |||||||
| CRUMBLING_BLOCK_0 | D2D7 | LD (IX+$00),$01 | after the last: vanish | |||||
| D2DB | JP SET_WIPE_AND_DRAW_FLAGS | |||||||
| Prev: D251 | Up: Map | Next: D2DE |