Prev: 44489 Up: Map Next: 44531
44517: 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 44517 LD HL,23353 Point HL at LightYearsRemaining_LastDigit.
44520 LD B,4 Set a counter of four digits.
RollCounterDigits_RollDigit 44522 LD A,(HL) Fetch the digit and its animation step.
44523 AND %00000111 Keep bits 0 to 2.
44525 RET Z Return if the digit is not rolling.
44526 DEC (HL) Reduce the animation step.
44527 DEC HL Move on to the next digit up.
44528 DJNZ RollCounterDigits_RollDigit Jump to RollCounterDigits_RollDigit until all four digits have been done.
44530 RET Return.
Prev: 44489 Up: Map Next: 44531