Prev: A5A5 Up: Map Next: A623
A5F4: Count Down Time
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 A5F4 LD IY,($5CF1) Bring back IY from SavedIY.
A5F8 LD IX,$A59D Point IX at Gauges.
CountDownTime_Loop A5FC EI Enable interrupts...
A5FD HALT ...and wait for the next frame.
A5FE DI Disable interrupts.
A5FF LD A,(IX+$03) Fetch the target length of the gauge.
A602 AND A Test it.
A603 JR Z,CountDownTime_Update Jump to CountDownTime_Update if it is zero.
A605 LD BC,$0030 Set the amount to add to the score.
A608 CALL AddScore Add it to the score.
A60B DEC (IX+$03) Decrease the target length of the gauge.
A60E LD A,(IX+$03) Fetch the target length again.
A611 INC A Add one.
A612 ADD A,A Double it.
A613 LD B,A Use it as the length of the click.
A614 CALL PlayClick Play a click.
CountDownTime_Update A617 CALL UpdateGauge Update the gauge.
A61A LD A,(IX+$00) Fetch the length of the bar.
A61D OR (IX+$03) Combine it with the target length.
A620 JR NZ,CountDownTime_Loop Jump back unless both are zero.
A622 RET Return.
Prev: A5A5 Up: Map Next: A623