| Chase H.Q. | Routines |
| Prev: E42E | Up: Map | Next: E4A9 |
|
Two thin wrappers over one tail: es_handler_glyph_fade_c gates on $5C6D and es_handler_glyph_fade_b on $5C6C. The tail rotates the gate byte and returns unless the bit rotated out was set, so each gate runs the fade on alternate calls. When it does run it sweeps the same 512 attribute cells es_attribute_fade_in covers, taking one off each cell's ink and one unit off its paper, both stopping at zero.
The bytes are masked down to their ink and paper fields and re-combined, so BRIGHT and FLASH are dropped from every cell the fade touches.
|
||||
| es_handler_glyph_fade_c | E46D | LD HL,$5C6D | Gate on $5C6D | |
| E470 | JR es_attribute_fade_out | Jump to es_attribute_fade_out | ||
| es_handler_glyph_fade_b | E472 | LD HL,$5C6C | Gate on $5C6C | |
| es_attribute_fade_out | E475 | RLC (HL) | Rotate the gate byte | |
| E477 | RET NC | |||
| E478 | LD HL,$5900 | |||
| E47B | LD D,$02 | |||
| es_handler_glyph_fade_c_0 | E47D | LD A,(HL) | ||
| E47E | AND A | |||
| E47F | JR Z,es_handler_glyph_fade_c_3 | |||
| E481 | LD C,A | |||
| E482 | AND $07 | |||
| E484 | JR Z,es_handler_glyph_fade_c_1 | |||
| E486 | DEC A | |||
| es_handler_glyph_fade_c_1 | E487 | LD B,A | ||
| E488 | LD A,C | |||
| E489 | AND $38 | |||
| E48B | JR Z,es_handler_glyph_fade_c_2 | |||
| E48D | SUB $08 | |||
| es_handler_glyph_fade_c_2 | E48F | OR B | ||
| E490 | LD (HL),A | |||
| es_handler_glyph_fade_c_3 | E491 | INC L | ||
| E492 | JR NZ,es_handler_glyph_fade_c_0 | |||
| E494 | INC H | |||
| E495 | DEC D | |||
| E496 | JR NZ,es_handler_glyph_fade_c_0 | |||
| E498 | RET | |||
| es_clear | E499 | CALL $88E2 | Call clear_playfield | |
| E49C | LD HL,$F000 | Zero first 512 bytes of the (backbuffer) | ||
| E49F | LD DE,$F001 | |||
| E4A2 | LD (HL),L | |||
| E4A3 | LD BC,$01FF | |||
| E4A6 | LDIR | |||
| E4A8 | RET | Return | ||
| Prev: E42E | Up: Map | Next: E4A9 |