![]() |
Routines |
| Prev: 43873 | Up: Map | Next: 44065 |
|
The handler for the alarm (object 80) in the game over scene. Every eight frames it changes colour between black and bright yellow and beeps. After 16 changes it retires itself and starts the attacks on the robot by setting GameOverSceneStage.
|
||||||||
|
Flash the alarm every eight frames.
|
||||||||
| HandleAlarm | 44021 | LD A,(23298) | Fetch FrameCounter. | |||||
| 44024 | LD C,A | Keep it in C. | ||||||
| 44025 | AND %00000111 | Keep bits 0 to 2. | ||||||
| 44027 | JR NZ,ColourCells | Jump to ColourCells if this is not the eighth frame. | ||||||
| 44029 | BIT 3,C | Jump to HandleAlarm_SetColour if bit 3 of the frame counter is clear. | ||||||
| 44031 | JR Z,HandleAlarm_SetColour | |||||||
| 44033 | ADD A,70 | Add 70. | ||||||
| HandleAlarm_SetColour | 44035 | LD (IX+16),A | Set the colour of the alarm. | |||||
| 44038 | CALL PlayLowBeep | Call PlayLowBeep. | ||||||
| 44041 | INC (IX+17) | Increment the colour-change count. | ||||||
| 44044 | LD A,(IX+17) | Jump to ColourCells unless there have been 16 changes. | ||||||
| 44047 | CP 16 | |||||||
| 44049 | JR NZ,ColourCells | |||||||
| 44051 | LD A,1 | Write 1 to GameOverSceneStage. | ||||||
| 44053 | LD (23361),A | |||||||
| 44056 | LD (IX+0),A | Set the sprite number to 1. | ||||||
| 44059 | CALL ColourCells | Call ColourCells. | ||||||
| 44062 | JP SetWipeAndDrawFlags | Jump to SetWipeAndDrawFlags. | ||||||
| Prev: 43873 | Up: Map | Next: 44065 |