![]() |
Routines |
| Prev: 42405 | Up: Map | Next: 42531 |
|
Used by the routine at RunGame.
Counts the target of the first gauge down to zero, adding to the score and clicking as it goes, one frame at a time.
|
||||
| CountDownTime | 42484 | LD IY,(23793) | Bring back IY from SavedIY. | |
| 42488 | LD IX,42397 | Point IX at Gauges. | ||
| CountDownTime_Loop | 42492 | EI | Enable interrupts... | |
| 42493 | HALT | ...and wait for the next frame. | ||
| 42494 | DI | Disable interrupts. | ||
| 42495 | LD A,(IX+3) | Fetch the target length of the gauge. | ||
| 42498 | AND A | Test it. | ||
| 42499 | JR Z,CountDownTime_Update | Jump to CountDownTime_Update if it is zero. | ||
| 42501 | LD BC,48 | Set the amount to add to the score. | ||
| 42504 | CALL AddScore | Add it to the score. | ||
| 42507 | DEC (IX+3) | Decrease the target length of the gauge. | ||
| 42510 | LD A,(IX+3) | Fetch the target length again. | ||
| 42513 | INC A | Add one. | ||
| 42514 | ADD A,A | Double it. | ||
| 42515 | LD B,A | Use it as the length of the click. | ||
| 42516 | CALL PlayClick | Play a click. | ||
| CountDownTime_Update | 42519 | CALL UpdateGauge | Update the gauge. | |
| 42522 | LD A,(IX+0) | Fetch the length of the bar. | ||
| 42525 | OR (IX+3) | Combine it with the target length. | ||
| 42528 | JR NZ,CountDownTime_Loop | Jump back unless both are zero. | ||
| 42530 | RET | Return. | ||
| Prev: 42405 | Up: Map | Next: 42531 |