![]() |
Routines |
| Prev: 917D | Up: Map | Next: 91F2 |
|
On a pass when TICKS' low byte is zero it swaps the picture: XOR the current one off (mode bits forced to XOR), flip bit 0 of the type -- $18 closed to $19 open -- XOR the new one on, restore the mode, draw the colours, and rasp. The open trapdoor's handler, TRAPDOOR, enters the same tail at TRAPDOOR_CLOSED_0 to close again, when the byte RUNNING_SUM happens to be zero. An earlier reading, "what a thing being destroyed looks and sounds like", was wrong.
|
||||
| TRAPDOOR_CLOSED | 91BC | LD A,($5E12) | Only when TICKS' low byte is zero: every 256 passes. | |
| 91BF | AND A | |||
| 91C0 | JP NZ,DRAW_DOOR | |||
| 91C3 | JR TRAPDOOR_CLOSED_0 | |||
| TRAPDOOR | 91C5 | LD A,($5E05) | ||
| 91C8 | AND A | |||
| 91C9 | JP NZ,TRAPDOOR_FALL | |||
| TRAPDOOR_CLOSED_0 | 91CC | LD A,(IX+$05) | XOR the current picture off. | |
| 91CF | PUSH AF | |||
| 91D0 | OR $03 | |||
| 91D2 | LD (IX+$05),A | |||
| 91D5 | CALL DRAW_RECORD | |||
| 91D8 | LD A,(IX+$00) | The other state's picture -- the type's bit 0 flipped -- XORed on. | ||
| 91DB | XOR $01 | |||
| 91DD | LD (IX+$00),A | |||
| 91E0 | CALL DRAW_RECORD | |||
| 91E3 | POP AF | Put the mode back and draw the colours. | ||
| 91E4 | LD (IX+$05),A | |||
| 91E7 | CALL DRAW_DOOR | |||
| 91EA | JP SOUND_NOISE_BURST | And the rasp. | ||
| BIG_DOOR | 91ED | LD BC,$2020 | ||
| 91F0 | JR DOORWAY | |||
| Prev: 917D | Up: Map | Next: 91F2 |