Routines |
Prev: F5EC | Up: Map | Next: F662 |
Used by the routine at PrintPlayerLevels.
|
||||||||
Calculate_ActivePlayer_Level | F641 | LD A,($5EA0) | If ActivePlayer_Level is not FF jump to Calculate_Player_Level. | |||||
F644 | CP $FF | |||||||
F646 | JR NZ,Calculate_Player_Level | |||||||
F648 | XOR A | A=00. | ||||||
This reads A into BC as two nibbles, e.g. level 21 would be 00010101 which returns 2101.
|
||||||||
Calculate_Player_Level | F649 | CALL Convert_Base10 | Call Convert_Base10. | |||||
F64C | LD B,A | B=A. | ||||||
F64D | AND %00001111 | Keep only bits 0-3. | ||||||
F64F | LD C,A | C=A. | ||||||
F650 | LD A,B | A=B. | ||||||
F651 | RRA | Rotate the bits of A right four times. | ||||||
F652 | RRA | |||||||
F653 | RRA | |||||||
F654 | RRA | |||||||
F655 | AND %00001111 | Keep only bits 0-3. | ||||||
F657 | RET | Return. | ||||||
This entry point is used by the routine at PrintPlayerLevels.
|
||||||||
Calculate_InactivePlayer_Level | F658 | LD A,($5EA4) | If InactivePlayer_Level is not FF jump to Calculate_Player_Level. | |||||
F65B | CP $FF | |||||||
F65D | JR NZ,Calculate_Player_Level | |||||||
F65F | XOR A | A=00. | ||||||
F660 | JR Calculate_Player_Level | Jump to Calculate_Player_Level. |
Prev: F5EC | Up: Map | Next: F662 |