![]() |
Routines |
| Prev: CFF6 | Up: Map | Next: D08A |
|
Used by the routine at GoldfishGame.
|
||||
|
Fill the air gauge back up to maximum.
|
||||
| GoldfishGame_RefillOxygen | D05B | LD A,$13 | Write 13 to *GoldfishGame_OxygenLevel. | |
| D05D | LD ($D33E),A | |||
| D060 | CALL GoldfishGame_PrintAirBar | Call GoldfishGame_PrintAirBar. | ||
| D063 | LD B,$0A | B=0A (outer tone repeats). | ||
| GoldfishGame_RefillOxygen_ToneLoop | D065 | PUSH BC | Stash the remaining tone count on the stack. | |
| D066 | LD A,$15 | Point BC at the speaker and load a long delay. | ||
| D068 | LD C,$FE | |||
| D06A | LD B,$FF | |||
|
|
||||
| D06C | OUT (C),A | Click the speaker. | ||
| D06E | CALL UpdateAnimationCounter | Use the animation seed as an inner delay count. | ||
| D071 | LD B,A | |||
| GoldfishGame_RefillOxygen_InnerDelay | D072 | DJNZ GoldfishGame_RefillOxygen_InnerDelay | Spin until that delay count is zero. | |
| D074 | CALL UpdateAnimationCounter | Use the animation seed as a pause count. | ||
| D077 | LD B,A | |||
| GoldfishGame_RefillOxygen_PauseLoop | D078 | LD A,$05 | A=05 (quieter click). | |
| D07A | PUSH BC | Stash the pause count on the stack. | ||
| D07B | LD C,$FE | Point BC at the speaker. | ||
| D07D | LD B,$FF | |||
| D07F | OUT (C),A | Click the speaker. | ||
| D081 | POP BC | Restore the pause count from the stack. | ||
| D082 | DJNZ GoldfishGame_RefillOxygen_PauseLoop | Decrease the pause count and loop back to GoldfishGame_RefillOxygen_PauseLoop. | ||
| D084 | POP BC | Restore the tone count from the stack. | ||
| D085 | DJNZ GoldfishGame_RefillOxygen_ToneLoop | Decrease the tone count and loop back to GoldfishGame_RefillOxygen_ToneLoop until every tone is played. | ||
| D087 | JP GoldfishGame_GameLoop | Jump to GoldfishGame_GameLoop. | ||
| Prev: CFF6 | Up: Map | Next: D08A |