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. | ||
GoldfishGame_RefillOxygen_0 | D065 | PUSH BC | Stash BC on the stack. | |
D066 | LD A,$15 | A=15. | ||
D068 | LD C,$FE | C=FE. | ||
D06A | LD B,$FF | B=FF. | ||
D06C | OUT (C),A | |||
D06E | CALL UpdateAnimationCounter | Call UpdateAnimationCounter. | ||
D071 | LD B,A | B=A. | ||
GoldfishGame_RefillOxygen_1 | D072 | DJNZ GoldfishGame_RefillOxygen_1 | Decrease counter by one and loop back to GoldfishGame_RefillOxygen_1 until counter is zero. | |
D074 | CALL UpdateAnimationCounter | Call UpdateAnimationCounter. | ||
D077 | LD B,A | B=A. | ||
GoldfishGame_RefillOxygen_2 | D078 | LD A,$05 | A=05. | |
D07A | PUSH BC | Stash BC on the stack. | ||
D07B | LD C,$FE | C=FE. | ||
D07D | LD B,$FF | B=FF. | ||
D07F | OUT (C),A | |||
D081 | POP BC | Restore BC from the stack. | ||
D082 | DJNZ GoldfishGame_RefillOxygen_2 | Decrease counter by one and loop back to GoldfishGame_RefillOxygen_2 until counter is zero. | ||
D084 | POP BC | Restore BC from the stack. | ||
D085 | DJNZ GoldfishGame_RefillOxygen_0 | Decrease counter by one and loop back to GoldfishGame_RefillOxygen_0 until counter is zero. | ||
D087 | JP GoldfishGame_GameLoop | Jump to GoldfishGame_GameLoop. |
Prev: CFF6 | Up: Map | Next: D08A |