Prev: 47468 Up: Map Next: 47589
47499: Update scores and display
Used by the routine at 34438.
47499 LD HL,34208 Set show-score flag...
47502 SET 7,(HL) ...
47504 LD HL,0 Set HL to zero
47507 LD A,(34210) If no time / lives remain...
47510 OR A ...
47511 JR Z,47526 ...then skip ahead to 47526
47513 LD B,A Load HL with 1000 × current remaining time / lives...
47514 LD DE,1000 ...
47517 ADD HL,DE ...
47518 DJNZ 47517 ...
47520 LD DE,(34211) Subtract value of timer tick counter (i.e. score penalty) from current level's score...
47524 SBC HL,DE ...
47526 LD (34213),HL Set score for current level
47529 LD DE,(34215) Load DE with current total score
47533 ADD HL,DE Add score for current level to total score...
47534 LD (34215),HL ...and store
47537 LD DE,(34299) Load current high score into DE
47541 SBC HL,DE Subtract high score from current total score...
47543 JR C,47551 ...and if this is less than zero (i.e. high score is higher than current total score) then skip ahead to 47551
47545 LD HL,(34215) Load current total score into HL...
47548 LD (34299),HL ...and store as new high score
47551 LD A,16 Set time / lives to 16...
47553 LD (34210),A ...
47556 LD IY,47596 Point IY at "numeric (score)" part of string at 47589
47560 LD HL,(34213) Load HL with current score...
47563 CALL 47741 ...and convert to string at IY
47566 LD IY,47609 Point IY at "numeric (total)" part of string at 47589
47570 LD HL,(34215) Load HL with current total score...
47573 CALL 47741 ...and convert to string at IY
47576 LD IY,47622 Point IY at "numeric (high score)" part of string at 47589
47580 LD HL,(34299) Load HL with current high score...
47583 CALL 47741 ...and convert to string at IY
47586 JP 47628 Print SCORE / TOTAL / HI-SC string in current character's colours and return
Prev: 47468 Up: Map Next: 47589