![]() |
Routines |
| Prev: B83A | Up: Map | Next: B856 |
|
The fire block (fire). It stays put and flickers: every other frame it flips between types 176 and 177 and, at random, mirrors itself.
The every-other-frame test uses $5BBC, which the object loop sets to the frame counter and then increments before each object. Its bit 0 therefore alternates from frame to frame and from one record to the next, so neighbouring fires take turns.
|
||||
| upd_176_177 | B83F | CALL upd_12_to_15 | pixel offsets | |
| B842 | LD A,($5BBC) | not this frame: no change, no redraw | ||
| B845 | AND $01 | |||
| B847 | RET Z | |||
| B848 | LD A,($5BA5) | flip the mirroring bit if a random bit is set; flip the type | ||
| B84B | AND $40 | |||
| B84D | XOR (IX+$07) | |||
| B850 | LD (IX+$07),A | |||
| B853 | CALL toggle_next_prev_sprite | |||
| Prev: B83A | Up: Map | Next: B856 |