Prev: 62956 Up: Map Next: 63074
63041: Active Player Level
Used by the routine at PrintPlayerLevels.
Input
BC Player level as two digits
Calculate_ActivePlayer_Level 63041 LD A,(24224) If ActivePlayer_Level is not 255 jump to Calculate_Player_Level.
63044 CP 255
63046 JR NZ,Calculate_Player_Level
63048 XOR A A=0.
This reads A into BC as two nibbles, e.g. level 21 would be 00010101 which returns 8449.
Calculate_Player_Level 63049 CALL Convert_Base10 Call Convert_Base10.
63052 LD B,A B=A.
63053 AND %00001111 Keep only bits 0-3.
63055 LD C,A C=A.
63056 LD A,B A=B.
63057 RRA Rotate the bits of A right four times.
63058 RRA
63059 RRA
63060 RRA
63061 AND %00001111 Keep only bits 0-3.
63063 RET Return.
This entry point is used by the routine at PrintPlayerLevels.
Calculate_InactivePlayer_Level 63064 LD A,(24228) If InactivePlayer_Level is not 255 jump to Calculate_Player_Level.
63067 CP 255
63069 JR NZ,Calculate_Player_Level
63071 XOR A A=0.
63072 JR Calculate_Player_Level Jump to Calculate_Player_Level.
Prev: 62956 Up: Map Next: 63074