Prev: F4A8 Up: Map Next: F4F0
F4BE: Add Score
Adds *TemporaryPair into the score digits at 64BA.
Draw_StatusIcons_Target2 F4BE LD A,($6417) Return if *TemporaryPair is zero.
F4C1 OR A
F4C2 RET Z
F4C3 LD BC,($6417) Point at the digit that matches the place value.
F4C7 XOR A
F4C8 LD D,A
F4C9 LD E,B
F4CA LD HL,$64BF
F4CD SBC HL,DE
F4CF LD DE,$64BA
F4D2 XOR A
F4D3 EX DE,HL
F4D4 SBC HL,DE
F4D6 EX DE,HL
F4D7 JR NC,Draw_StatusIcons_Branch Jump to Draw_StatusIcons_Branch if that digit is already in range.
F4D9 LD A,C Add the low byte into the digit, wrapping at 0A.
F4DA ADD A,(HL)
F4DB CP $0A
F4DD LD (HL),A
F4DE JR C,Draw_StatusIcons_Branch
F4E0 SUB $0A Carry into the next place.
F4E2 LD (HL),A
F4E3 LD BC,($6417)
F4E7 LD C,$01
F4E9 INC B
F4EA LD ($6417),BC
F4EE JR Draw_StatusIcons_Target2 Jump to Draw_StatusIcons_Target2.
Prev: F4A8 Up: Map Next: F4F0