| ← B0DF | Map | B269 → |
B20D: Detonate the bomb prize: clear the eight slots around the hit slot
|
The bomb prize's blast, fired at frame 8 of the detonation. It empties the eight slots around the hit brick, whatever their durability.
|
|||
| bomb_cell_offsets | B20D | DEFB $00,$02 | The blast neighborhood: eight pairs of tile offset and brick-index step |
| B20F | DEFB $02,$02 | ||
| B211 | DEFB $04,$0E | ||
| B213 | DEFB $40,$04 | ||
| B215 | DEFB $44,$0E | ||
| B217 | DEFB $80,$02 | ||
| B219 | DEFB $82,$02 | ||
| B21B | DEFB $84,$00 | ||
| detonate_bomb | B21D | LD HL,(cluster_center_addr) | Step the ground-zero tile address up-left to the top-left slot of the block. It goes back one row and one column, at a 64-byte row stride and 2 bytes per column. |
| B220 | LD DE,$0042 | ||
| B223 | AND A | ||
| B224 | SBC HL,DE | ||
| B226 | LD (cluster_center_addr),HL | ||
| B229 | LD A,(cluster_brick_index) | Step the brick index back to its top-left slot. | |
| B22C | SUB $14 | ||
| B22E | LD (cluster_brick_index),A | ||
| B231 | LD B,$08 | Walk the eight slots around it that the table names. | |
| B233 | LD HL,bomb_cell_offsets | ||
| bomb_cell_offsets_0 | B236 | PUSH BC | Hold the loop counter and the table pointer across each slot. |
| B237 | PUSH HL | ||
| B238 | LD L,(HL) | Each entry's first byte is a tile offset from the block's top-left slot. | |
| B239 | LD H,$00 | ||
| B23B | LD DE,(cluster_center_addr) | ||
| B23F | ADD HL,DE | ||
| B240 | LD A,(HL) | ||
|
The guard admits every brick tile, prizes included.
|
|||
| B241 | CP $59 | Act only on slots that hold a brick tile. | |
| B243 | JR C,bomb_cell_offsets_1 | ||
| B245 | CP $E4 | ||
| B247 | JR NC,bomb_cell_offsets_1 | ||
| B249 | LD HL,brick_state_map | Force this brick to the destroyed state regardless of durability, whatever its brick state map entry held. | |
| B24C | LD A,(cluster_brick_index) | ||
| B24F | LD D,$00 | ||
| B251 | LD E,A | ||
| B252 | ADD HL,DE | ||
| B253 | LD (HL),$01 | ||
| B255 | INC HL | ||
| B256 | LD (HL),$00 | ||
|
The blast goes straight to the scorer and skips two calls the brick-hit path makes. One is the glyph filter, so a prize glyph scores when the blast takes it. The other is the prize dispatcher, so the player loses the prize, and a bomb glyph in the block never goes off.
Each call overwrites the same pending points with the raised combo. The score fold runs once a frame, so the whole block scores only the last value, as a single add.
|
|||
| B258 | CALL score_brick | Score the destroyed brick. | |
| bomb_cell_offsets_1 | B25B | POP HL | A slot with no brick rejoins the walk here. |
| B25C | INC HL | The entry's second byte steps the brick index to the next slot around the hit brick. | |
| B25D | LD A,(cluster_brick_index) | ||
| B260 | ADD A,(HL) | ||
| B261 | LD (cluster_brick_index),A | ||
| B264 | INC HL | ||
| B265 | POP BC | ||
| B266 | DJNZ bomb_cell_offsets_0 | ||
| B268 | RET | ||
| ← B0DF | Map | B269 → |
