Prev: 47987 Up: Map Next: 48311
48278: Handler: Bonus Messaging
Used by the routine at 47987.
Input
HL Pointer to bonus messaging
Fetch the message string from *HL.
Handler_BonusMessaging 48278 LD E,(HL) E=*HL.
48279 INC HL Increment HL by one.
48280 LD D,(HL) D=*HL.
48281 INC HL Increment HL by one.
48282 LD (50058),HL Write HL to *BonusMessaging.
48285 EX DE,HL Exchange the DE register with the shadow HL register.
This entry point is used by the routines at 46264, 47987, Handler_BittenByDog and Handler_HitByBike.
Print_BonusMessaging 48286 LD DE,20672 DE=20672 (screen buffer location).
48289 LD A,0 Write 0 to *50056.
48291 LD (50056),A
48294 CALL PrintString Call PrintString.
48297 EX DE,HL Switch the DE and HL registers back to normal.
The messaging appears right at the bottom of the screen. This code blanks out the rest of the two lines to overwrite any existing messaging.
Print_BonusMessaging_Blank 48298 LD B,8 B=8 (eight lines in a character block).
48300 PUSH HL Remember where we are on the screen.
Clearing the character block.
Print_BonusMessaging_Loop 48301 LD (HL),0 Write 0 to *HL.
48303 INC H Move down one line.
48304 DJNZ Print_BonusMessaging_Loop Decrease counter by one and loop back to Print_BonusMessaging_Loop until counter is zero.
48306 POP HL Restore the screen location where we started for this pass (the top of this character block).
48307 INC L Move right one character block.
Keep going until the end of the screen is reached.
48308 JR NZ,Print_BonusMessaging_Blank Jump to Print_BonusMessaging_Blank if L is not zero.
48310 RET Return.
Prev: 47987 Up: Map Next: 48311