![]() |
Routines |
| Prev: 55250 | Up: Map | Next: 55334 |
|
Used by the routine at Dispatch_Handlers.
Marks the game complete when the combination is 9 in every CollectionSlots slot, then ticks ActionTimer.
|
||||
| Handler_Housekeeping | 55295 | LD HL,25793 | Test whether the combination is complete (every digit is 9). | |
| 55298 | LD B,4 | |||
| 55300 | LD A,9 | |||
|
Compare each combination digit with 9.
|
||||
| Handler_Housekeeping_SlotLoop | 55302 | CP (HL) | Jump to Handler_Housekeeping_Timer if this slot differs. | |
| 55303 | JR NZ,Handler_Housekeeping_Timer | |||
| 55305 | INC HL | Advance to the next slot. | ||
| 55306 | DJNZ Handler_Housekeeping_SlotLoop | Decrease the slot count and loop back to Handler_Housekeeping_SlotLoop. | ||
| 55308 | LD A,(25761) | Jump to Handler_Housekeeping_Timer unless *CollectedKeys is 16. | ||
| 55311 | CP 16 | |||
| 55313 | JR NZ,Handler_Housekeeping_Timer | |||
| 55315 | LD A,255 | Write 255 to *GameCompleteFlag. | ||
| 55317 | LD (25725),A | |||
|
Tick the action timer.
|
||||
| Handler_Housekeeping_Timer | 55320 | LD A,(25737) | Return if *ActionTimer is zero. | |
| 55323 | OR A | |||
| 55324 | RET Z | |||
| 55325 | DEC A | Decrease *ActionTimer by one. | ||
| 55326 | LD (25737),A | |||
| 55329 | OR A | Return if the timer is still running. | ||
| 55330 | RET NZ | |||
| 55331 | JP Lose_Life | Jump to Lose_Life. | ||
| Prev: 55250 | Up: Map | Next: 55334 |