![]() |
Routines |
| Prev: B7A3 | Up: Map | Next: B7CD |
|
The spike_ball_fall block (spike_ball_fall). Deadly to touch. It hangs where the room put it until it is let go, then falls under gravity to whatever is below and stays there.
Only one spiked ball in a room falls at a time: $5BBF is set while one is on its way down, and a waiting ball lets go with a chance of 1 in 16 each frame when it is clear. None falls at all while $5BC0 is non-zero. That byte is set on entering a room to bit 0 of the room number and is cleared when the player picks something up, so in odd-numbered rooms the balls wait until then.
|
||||
| upd_63 | B7A9 | CALL set_both_deadly_flags | deadly both ways; pixel offsets | |
| B7AC | CALL upd_6_7 | |||
| B7AF | LD A,($5BC0) | held in this room | ||
| B7B2 | AND A | |||
| B7B3 | RET NZ | |||
| B7B4 | BIT 2,(IX+$0D) | already falling | ||
| B7B8 | JR NZ,spiked_ball_drop | |||
| B7BA | LD HL,$5BBF | another ball is falling | ||
| B7BD | LD A,(HL) | |||
| B7BE | AND A | |||
| B7BF | RET NZ | |||
| B7C0 | LD A,($5BA5) | 1 in 16: let go | ||
| B7C3 | CP $10 | |||
| B7C5 | RET NC | |||
| B7C6 | SET 2,(IX+$0D) | falling, and claim the one-at-a-time flag | ||
| B7CA | LD (HL),$01 | |||
| B7CC | RET | |||
| Prev: B7A3 | Up: Map | Next: B7CD |