Prev: 9DD6 Up: Map Next: 9E4A
9E16: Print Status Panel
Used by the routine at Run_Game.
Prints the depth, the GEMS label and the gem counter. The entry at 9E27 only prints the gem counter, and the entry at 9E32 prints a number of BCD digits.
Before After Print_Status_Panel
status-panel-before status-panel-after
Input
IX Object record of Sabreman
Print_Status_Panel 9E16 CALL Print_Depth Call Print_Depth.
9E19 LD A,$45 Set the attribute to cyan (45).
9E1B LD ($8EE8),A Store it in Current_MenuAttribute.
9E1E LD DE,$9E97 Point at the text GEMS (Status_Panel_Text_Gems).
9E21 LD HL,$0800 Set the position to x=00 y=08.
9E24 CALL MenuWriteText Call MenuWriteText.
This entry point is used by the routines at Finish_Object_Pass and Handle_Collectable.
Print_Status_Panel_Gem_Timer 9E27 LD HL,$0828 Set the screen position to x=28 y=08.
9E2A CALL ScreenAddress Convert the position into a screen address.
9E2D LD DE,$8EEE Point at the gem counter (Gem_Timer).
9E30 LD B,$01 Set the number of digits to print to 01.
This entry point is used by the routines at Print_Depth, Print_Completion_Percentage, Draw_Lives and AddPointsToScore.
Print_Status_Panel_Digits 9E32 LD A,(DE) Fetch a BCD byte.
9E33 RRCA Move the high digit down.
9E34 RRCA
9E35 RRCA
9E36 RRCA
9E37 AND $0F Keep only the digit.
9E39 ADD A,$30 Convert it into a character code.
9E3B CALL PrintScreen Print the digit.
9E3E LD A,(DE) Fetch the BCD byte again.
9E3F AND $0F Keep only the low digit.
9E41 ADD A,$30 Convert it into a character code.
9E43 CALL PrintScreen Print the digit.
9E46 INC DE Move on to the next byte.
9E47 DJNZ Print_Status_Panel_Digits Repeat for each of the bytes.
9E49 RET Return.
Prev: 9DD6 Up: Map Next: 9E4A