Prev: 45510 Up: Map Next: 45552
45522: Insert current time and score into "time left" and "percentage completion" texts
Used by the routines at 42638 and 64582.
Input
HL Points to percentage completion text (52311 or 50779)
DE Points to time left text (52323 or 50791)
45522 PUSH DE Store DE (address of time left text)
45523 PUSH HL Store HL (address of percentage completion text)
45524 LD HL,23488 Point HL at visited rooms table
45527 LD BC,13312 Set B=52, C=0
45530 LD A,(HL) Load A with value at HL
45531 ADD A,C Add this to C...
45532 LD C,A ...
45533 INC HL Advance to next byte
45534 DJNZ 45530 Loop back to 45530 (adding together 52 values from 23488 onwards to get score for exploring rooms)
45536 DEC C Decrease exploration score by one (due to no score for The Sword in the Concrete)
45537 LD A,(23446) Add bonus score to total...
45540 ADD A,C ...
45541 POP HL Restore HL (address of percentage completion text)
45542 CALL 46837 Splice numeric data A as a string into a string at HL
45545 LD A,(23457) Load A with number of hours left
45548 POP HL Restore HL (originally DE, address of time left text)
45549 JP 46837 Splice numeric data A as a string into a string at HL and return
Prev: 45510 Up: Map Next: 45552