Prev: ADC9 Up: Map Next: ADF3
ADE5: Roll Counter Digits
Used by the routine at UpdateLightYears.
Reduces the animation steps of the digits of LightYearsRemaining that are rolling, starting with the last digit. It stops at the first digit which is not rolling.
Roll from the last digit upwards.
RollCounterDigits ADE5 LD HL,$5B39 Point HL at LightYearsRemaining_LastDigit.
ADE8 LD B,$04 Set a counter of four digits.
RollCounterDigits_RollDigit ADEA LD A,(HL) Fetch the digit and its animation step.
ADEB AND %00000111 Keep bits 0 to 2.
ADED RET Z Return if the digit is not rolling.
ADEE DEC (HL) Reduce the animation step.
ADEF DEC HL Move on to the next digit up.
ADF0 DJNZ RollCounterDigits_RollDigit Jump to RollCounterDigits_RollDigit until all four digits have been done.
ADF2 RET Return.
Prev: ADC9 Up: Map Next: ADF3