![]() |
Routines |
| Prev: 63695 | Up: Map | Next: 63873 |
|
Used by the routine at GameEntryPoint.
|
||||
|
This routine builds the game selection screen.
|
||||
| SelectionScreen | 63766 | XOR A | Set border colour to BLACK. | |
| 63767 | OUT (254),A | |||
| 63769 | CALL UpdateXXXXXBuffer | Call UpdateXXXXXBuffer. | ||
|
The admin screens show the right-hand side of level 2.
|
||||
| 63772 | LD A,2 | A=level 2. | ||
| 63774 | CALL FindScene | Call FindScene. | ||
| 63777 | CALL WriteSceneToShadowBuffer | Call WriteSceneToShadowBuffer. | ||
| 63780 | CALL CreateAdminPageTemplate | Call CreateAdminPageTemplate. | ||
| 63783 | CALL Print_SelectionScreen | Call Print_SelectionScreen. | ||
|
The selection page displays for a period of time, and then the game cycles through playareas.
|
||||
| 63786 | LD B,255 | B=255 (counter). | ||
| SelectionScreen_0 | 63788 | HALT | Halt operation (suspend CPU until the next interrupt). | |
| 63789 | PUSH BC | Stash BC on the stack. | ||
| 63790 | CALL ChooseControlType | Call ChooseControlType. | ||
| 63793 | POP BC | Restore BC from the stack. | ||
| 63794 | JR NZ,SelectionScreen_1 | Jump to SelectionScreen_1 if {} is not zero. | ||
| 63796 | LD A,D | Jump to SelectionScreen_1 if D is equal to 255. | ||
| 63797 | CP 255 | |||
| 63799 | JR Z,SelectionScreen_1 | |||
| 63801 | CP 30 | Return if A is equal to 30. | ||
| 63803 | RET Z | |||
| 63804 | CP 15 | Jump to SelectionScreen_0 if A is not equal to 15. | ||
| 63806 | JR NZ,SelectionScreen_0 | |||
|
Removes the print termination bit from the entire table at Table_ASCII.
|
||||
| 63808 | LD HL,64498 | HL=Table_ASCII. | ||
| 63811 | LD B,40 | B=40 (length). | ||
| StripPrintTerminationBit_Loop | 63813 | LD A,(HL) | A=*HL. | |
| 63814 | AND %01111111 | Keep only bits 0-6. | ||
| 63816 | LD (HL),A | Write A to *HL. | ||
| 63817 | INC HL | Increment HL by one. | ||
| 63818 | DJNZ StripPrintTerminationBit_Loop | Decrease counter by one and loop back to StripPrintTerminationBit_Loop until counter is zero. | ||
| 63820 | CALL CreateAdminPageTemplate | Call CreateAdminPageTemplate. | ||
| 63823 | CALL ChangeControls | Call ChangeControls. | ||
| 63826 | JR SelectionScreen | Jump to SelectionScreen. | ||
| SelectionScreen_1 | 63828 | DJNZ SelectionScreen_0 | Decrease counter by one and loop back to SelectionScreen_0 until counter is zero. | |
| 63830 | CALL PressAnyKey_Pause | Call PressAnyKey_Pause. | ||
| 63833 | JR NZ,SelectionScreen | Jump to SelectionScreen if {} is not zero. | ||
|
This loops over some level playareas until a key is pressed or we reach level 11.
|
||||
| 63835 | LD B,1 | B=level 1. | ||
| DisplayLevels_Loop | 63837 | PUSH BC | Stash the current level on the stack twice. | |
| 63838 | PUSH BC | |||
| 63839 | CALL UpdateXXXXXBuffer | Call UpdateXXXXXBuffer. | ||
| 63842 | POP BC | Restore current level from the stack. | ||
| 63843 | LD A,B | A=current level to display. | ||
| 63844 | CALL FindScene | Call FindScene. | ||
| 63847 | CALL WriteSceneToShadowBuffer | Call WriteSceneToShadowBuffer. | ||
| 63850 | CALL Scene_DisplayCarpet | Call Scene_DisplayCarpet. | ||
| 63853 | CALL ScreenBuffer_Update | Call ScreenBuffer_Update. | ||
| 63856 | CALL AttributeBuffer_Update | Call AttributeBuffer_Update. | ||
| 63859 | CALL PressAnyKey_Pause | Call PressAnyKey_Pause. | ||
| 63862 | POP BC | Restore current level from the stack. | ||
| 63863 | JR NZ,SelectionScreen | Jump to SelectionScreen if any key has been pressed. | ||
| 63865 | INC B | Increment current level by one. | ||
|
Only display levels 0-10.
|
||||
| 63866 | LD A,B | Loop back to DisplayLevels_Loop until B is equal to 11. | ||
| 63867 | CP 11 | |||
| 63869 | JR NZ,DisplayLevels_Loop | |||
|
Display the selection screen options.
|
||||
| 63871 | JR SelectionScreen | Jump to SelectionScreen. | ||
| Prev: 63695 | Up: Map | Next: 63873 |