![]() |
Routines |
| Prev: C2E7 | Up: Map | Next: C2FF |
|
Used by the routines at UpdateGhost, UpdateCreature, HitOutcome_Destroy, HitOutcome_Change, HitOutcome_Split, HitOutcome_Spore, BurstSporeAndShot and UpdateThrownItem.
Adds points to the score, which is held as BCD in the three bytes from Score, and then prints it.
The score is printed with two zeroes added to the end, so the points are in hundreds.
|
||||||||
| AddToScore | C2ED | LD HL,$BBCB | Point at the last (lowest) byte of the score. | |||||
| C2F0 | LD A,(HL) | Add the lowest two digits of the points to the lowest two digits of the score. | ||||||
| C2F1 | ADD A,C | |||||||
| C2F2 | DAA | |||||||
| C2F3 | LD (HL),A | |||||||
| C2F4 | DEC HL | Move on to the middle byte of the score. | ||||||
| C2F5 | LD A,(HL) | Add the next two digits of the points to the next two digits of the score, with any carry. | ||||||
| C2F6 | ADC A,B | |||||||
| C2F7 | DAA | |||||||
| C2F8 | LD (HL),A | |||||||
| C2F9 | DEC HL | Move on to the highest byte of the score. | ||||||
| C2FA | LD A,(HL) | Add any carry to the highest two digits of the score. | ||||||
| C2FB | ADC A,$00 | |||||||
| C2FD | DAA | |||||||
| C2FE | LD (HL),A | |||||||
|
View the equivalent code in;
|
||||||||
| Prev: C2E7 | Up: Map | Next: C2FF |