Prev: 687D Up: Map Next: 6893
6880: Display Speedometer
Used by the routine at Handler_PlayerMovement.
Input
A The speed value
DE Points to 5A45 (the attribute buffer location of the speedometer)
DisplaySpeedometer 6880 BIT 7,A Jump to ProcessSpeedValue if the speed value is negative.
6882 JR NZ,ProcessSpeedValue
6884 CPL Make the position speed value into a negative.
Strip off the signed bit.
ProcessSpeedValue 6885 AND %01111111 Keep only bits 0-6.
6887 RRA Divide the speed value by two and store the result in L (scaled speed value).
6888 LD L,A
6889 LD A,$A7 Set the base offset value in A of A7.
688B NOP No operation.
688C NOP
688D NOP
688E NOP
688F SUB L Update L to A7 - the scaled speed value.
6890 LD L,A
6891 LD H,$B4 Set H to the high byte of the display data table.
Continue on to CopyTwelveBytes.
Prev: 687D Up: Map Next: 6893