![]() |
Routines |
| Prev: B2EB | Up: Map | Next: B31A |
|
Object template 2. Its flags have bit 2 set, and the collision code gives a thing with that bit the step of whatever pushes into it (ADJ_DU_FOR_OBJ_INTERSECT, ADJ_DV_FOR_OBJ_INTERSECT). Each turn it falls and moves by its steps; if it moved, its steps in U and V are cleared, so that a push moves it once and not on and on (the end of MOVE_PLAYER does the clearing), and it sounds a note pitched by its position and is redrawn. As Knight Lore's chest (upd_85) and table.
The position is kept before the move and compared after it, for the case where it has no step left but has moved. By the reading that cannot happen -- with every step zero the move adds nothing -- and the sessions never ran it.
|
||||||||
| PUSHABLE | B2FF | CALL DRAW_AT_L16_D9 | the drawing nudge | |||||
|
This entry point is used by the routine at PUSHABLE_INVERTED.
|
||||||||
| PUSHABLE_MOVE | B302 | CALL SAVE_UVZ | keep its place | |||||
| B305 | CALL DEC_DZ_AND_UPDATE_UVZ | fall, and move | ||||||
| B308 | CALL IS_OBJ_MOVING | any step left in U, V or Z? | ||||||
| B30B | JR NZ,PUSHABLE_0 | |||||||
| B30D | CALL SAME_UVZ | none: redraw it only if it has moved (never, see above) | ||||||
| B310 | RET Z | |||||||
| B311 | JP SET_WIPE_AND_DRAW_FLAGS | |||||||
| PUSHABLE_0 | B314 | CALL CLEAR_DUV | moving: one step per push; a note pitched by U, V and Z, and redraw it | |||||
| B317 | JP SOUND_AND_DRAW | |||||||
| Prev: B2EB | Up: Map | Next: B31A |