Prev: 40406 Up: Map Next: 40522
40470: Print Status Panel
Used by the routine at Run_Game.
Prints the depth, the GEMS label and the gem counter. The entry at 40487 only prints the gem counter, and the entry at 40498 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 40470 CALL Print_Depth Call Print_Depth.
40473 LD A,69 Set the attribute to cyan (69).
40475 LD (36584),A Store it in Current_MenuAttribute.
40478 LD DE,40599 Point at the text GEMS (Status_Panel_Text_Gems).
40481 LD HL,2048 Set the position to x=0 y=8.
40484 CALL MenuWriteText Call MenuWriteText.
This entry point is used by the routines at Finish_Object_Pass and Handle_Collectable.
Print_Status_Panel_Gem_Timer 40487 LD HL,2088 Set the screen position to x=40 y=8.
40490 CALL ScreenAddress Convert the position into a screen address.
40493 LD DE,36590 Point at the gem counter (Gem_Timer).
40496 LD B,1 Set the number of digits to print to 1.
This entry point is used by the routines at Print_Depth, Print_Completion_Percentage, Draw_Lives and AddPointsToScore.
Print_Status_Panel_Digits 40498 LD A,(DE) Fetch a BCD byte.
40499 RRCA Move the high digit down.
40500 RRCA
40501 RRCA
40502 RRCA
40503 AND 15 Keep only the digit.
40505 ADD A,48 Convert it into a character code.
40507 CALL PrintScreen Print the digit.
40510 LD A,(DE) Fetch the BCD byte again.
40511 AND 15 Keep only the low digit.
40513 ADD A,48 Convert it into a character code.
40515 CALL PrintScreen Print the digit.
40518 INC DE Move on to the next byte.
40519 DJNZ Print_Status_Panel_Digits Repeat for each of the bytes.
40521 RET Return.
Prev: 40406 Up: Map Next: 40522