![]() |
Routines |
| Prev: 53238 | Up: Map | Next: 53386 |
|
Used by the routine at GoldfishGame.
|
||||
|
Fill the air gauge back up to maximum.
|
||||
| GoldfishGame_RefillOxygen | 53339 | LD A,19 | Write 19 to *GoldfishGame_OxygenLevel. | |
| 53341 | LD (54078),A | |||
| 53344 | CALL GoldfishGame_PrintAirBar | Call GoldfishGame_PrintAirBar. | ||
| 53347 | LD B,10 | B=10 (outer tone repeats). | ||
| GoldfishGame_RefillOxygen_ToneLoop | 53349 | PUSH BC | Stash the remaining tone count on the stack. | |
| 53350 | LD A,21 | Point BC at the speaker and load a long delay. | ||
| 53352 | LD C,254 | |||
| 53354 | LD B,255 | |||
|
|
||||
| 53356 | OUT (C),A | Click the speaker. | ||
| 53358 | CALL UpdateAnimationCounter | Use the animation seed as an inner delay count. | ||
| 53361 | LD B,A | |||
| GoldfishGame_RefillOxygen_InnerDelay | 53362 | DJNZ GoldfishGame_RefillOxygen_InnerDelay | Spin until that delay count is zero. | |
| 53364 | CALL UpdateAnimationCounter | Use the animation seed as a pause count. | ||
| 53367 | LD B,A | |||
| GoldfishGame_RefillOxygen_PauseLoop | 53368 | LD A,5 | A=5 (quieter click). | |
| 53370 | PUSH BC | Stash the pause count on the stack. | ||
| 53371 | LD C,254 | Point BC at the speaker. | ||
| 53373 | LD B,255 | |||
| 53375 | OUT (C),A | Click the speaker. | ||
| 53377 | POP BC | Restore the pause count from the stack. | ||
| 53378 | DJNZ GoldfishGame_RefillOxygen_PauseLoop | Decrease the pause count and loop back to GoldfishGame_RefillOxygen_PauseLoop. | ||
| 53380 | POP BC | Restore the tone count from the stack. | ||
| 53381 | DJNZ GoldfishGame_RefillOxygen_ToneLoop | Decrease the tone count and loop back to GoldfishGame_RefillOxygen_ToneLoop until every tone is played. | ||
| 53383 | JP GoldfishGame_GameLoop | Jump to GoldfishGame_GameLoop. | ||
| Prev: 53238 | Up: Map | Next: 53386 |