![]() |
Routines |
| Prev: 915F | Up: Map | Next: 91BC |
|
Made by CHOOSE_TIMED_DOORS; reached through ACTOR_HANDLERS entries $C2 and $C4 for types $20 and $22. On passes where TICKS is even it counts the shared DOOR_WAIT ($5E2E) down; the door that finds it at zero runs TOGGLE_TIMED_DOOR, which opens it. Otherwise it only draws itself.
|
||||
| TIMED_DOOR_SHUT | 917D | LD A,($5E12) | ||
| 9180 | AND $01 | |||
| 9182 | JP NZ,DRAW_DOOR | |||
| 9185 | LD A,($5E2E) | |||
| 9188 | AND A | |||
| 9189 | JP Z,TOGGLE_TIMED_DOOR | |||
| 918C | DEC A | |||
| 918D | LD ($5E2E),A | |||
| 9190 | JP DRAW_DOOR | |||
|
This entry point is used by the routine at TIMED_DOOR_OPEN.
|
||||
| TOGGLE_TIMED_DOOR | 9193 | LD A,$5E | TOGGLE_TIMED_DOOR: reload the shared countdown, then swap this door between shut and open on both halves and rasp. | |
| 9195 | LD ($5E2E),A | |||
| 9198 | LD A,(IX+$05) | |||
| 919B | PUSH AF | |||
| 919C | OR $03 | |||
| 919E | LD (IX+$05),A | |||
| 91A1 | CALL DRAW_RECORD | |||
| 91A4 | LD A,(IX+$00) | |||
| 91A7 | XOR $01 | |||
| 91A9 | CALL SET_BOTH_HALVES | |||
| 91AC | CALL DRAW_RECORD | |||
| 91AF | POP AF | |||
| 91B0 | LD (IX+$05),A | |||
| 91B3 | CALL DOOR_OPEN_OR_SHUT | |||
| 91B6 | CALL DRAW_DOOR | |||
| 91B9 | JP SOUND_NOISE_BURST | |||
| Prev: 915F | Up: Map | Next: 91BC |