![]() |
Routines |
| Prev: AB61 | Up: Map | Next: AC21 |
|
The handler for the alarm (object 50) in the game over scene. Every eight frames it changes colour between black and bright yellow and beeps. After 10 changes it retires itself and starts the attacks on the robot by setting GameOverSceneStage.
|
||||||||
|
Flash the alarm every eight frames.
|
||||||||
| HandleAlarm | ABF5 | LD A,($5B02) | Fetch FrameCounter. | |||||
| ABF8 | LD C,A | Keep it in C. | ||||||
| ABF9 | AND %00000111 | Keep bits 0 to 2. | ||||||
| ABFB | JR NZ,ColourCells | Jump to ColourCells if this is not the eighth frame. | ||||||
| ABFD | BIT 3,C | Jump to HandleAlarm_SetColour if bit 3 of the frame counter is clear. | ||||||
| ABFF | JR Z,HandleAlarm_SetColour | |||||||
| AC01 | ADD A,$46 | Add 46. | ||||||
| HandleAlarm_SetColour | AC03 | LD (IX+$10),A | Set the colour of the alarm. | |||||
| AC06 | CALL PlayLowBeep | Call PlayLowBeep. | ||||||
| AC09 | INC (IX+$11) | Increment the colour-change count. | ||||||
| AC0C | LD A,(IX+$11) | Jump to ColourCells unless there have been 10 changes. | ||||||
| AC0F | CP $10 | |||||||
| AC11 | JR NZ,ColourCells | |||||||
| AC13 | LD A,$01 | Write 01 to GameOverSceneStage. | ||||||
| AC15 | LD ($5B41),A | |||||||
| AC18 | LD (IX+$00),A | Set the sprite number to 01. | ||||||
| AC1B | CALL ColourCells | Call ColourCells. | ||||||
| AC1E | JP SetWipeAndDrawFlags | Jump to SetWipeAndDrawFlags. | ||||||
| Prev: AB61 | Up: Map | Next: AC21 |