![]() |
Routines |
| Prev: 43882 | Up: Map | Next: 44067 |
|
Used by the routine at InitialiseGame.
Shows the title screen, which has three revolvers on the left and the game name at the top. A bullet shoots out of each revolver and leaves a line of text behind it: the number of players, the controls, and "START GAME". Keys 1 and 2 change the first two and fire their bullet again, and key 3 starts the game. It returns when the bullet for key 3 has been fired.
|
|||||
|
Clear the screen.
|
|||||
| GameMenu | 43895 | XOR A | Write 0 to TunePlayedFlag to allow the title tune to play. | ||
| 43896 | LD (41538),A | ||||
| 43899 | CALL ClearScreen | Clear the screen. | |||
| 43902 | LD E,69 | Set the attribute to INK:CYAN, PAPER:BLACK (BRIGHT). | |||
| 43904 | CALL SetAttributes | Set all the attributes. | |||
| 43907 | LD HL,35440 | Point HL at TitleTiles. | |||
| 43910 | LD (41487),HL | Set the tiles to use. | |||
|
Draw the first revolver.
|
|||||
| 43913 | LD HL,16482 | Point HL at 16482 (in the screen buffer). | |||
| 43916 | LD A,71 | Set the attribute to INK:WHITE, PAPER:BLACK (BRIGHT). | |||
| 43918 | CALL DrawRevolver | Draw the revolver. | |||
| 43921 | LD BC,36528 | Point BC at Font_Digits. | |||
|
Draw its digit.
|
|||||
| 43924 | LD HL,16583 | Point HL at 16583 (in the screen buffer). | |||
| 43927 | LD A,1 | Set the digit to one. | |||
| 43929 | CALL DrawCharacter | Draw the digit. | |||
|
Draw the second revolver.
|
|||||
| 43932 | LD HL,18498 | Point HL at 18498 (in the screen buffer). | |||
| 43935 | LD A,70 | Set the attribute to INK:YELLOW, PAPER:BLACK (BRIGHT). | |||
| 43937 | CALL DrawRevolver | Draw the revolver. | |||
| 43940 | LD BC,36528 | Point BC at Font_Digits. | |||
|
Draw its digit.
|
|||||
| 43943 | LD HL,18599 | Point HL at 18599 (in the screen buffer). | |||
| 43946 | LD A,2 | Set the digit to two. | |||
| 43948 | CALL DrawCharacter | Draw the digit. | |||
|
Draw the third revolver.
|
|||||
| 43951 | LD HL,20514 | Point HL at 20514 (in the screen buffer). | |||
| 43954 | LD A,68 | Set the attribute to INK:GREEN, PAPER:BLACK (BRIGHT). | |||
| 43956 | CALL DrawRevolver | Draw the revolver. | |||
| 43959 | LD BC,36528 | Point BC at Font_Digits. | |||
|
Draw its digit.
|
|||||
| 43962 | LD HL,20615 | Point HL at 20615 (in the screen buffer). | |||
| 43965 | LD A,3 | Set the digit to three. | |||
| 43967 | CALL DrawCharacter | Draw the digit. | |||
|
Colour the first column black.
|
|||||
| 43970 | LD C,0 | Set the attribute to INK:BLACK, PAPER:BLACK. | |||
| 43972 | LD HL,22528 | Point HL at 22528 (in the attribute buffer). | |||
| 43975 | CALL FillAttributeColumn | Colour the column. | |||
|
Colour the last column black.
|
|||||
| 43978 | LD HL,22559 | Point HL at 22559 (in the attribute buffer). | |||
| 43981 | CALL FillAttributeColumn | Colour the column. | |||
|
Colour the tenth column red.
|
|||||
| 43984 | LD C,66 | Set the attribute to INK:RED, PAPER:BLACK (BRIGHT). | |||
| 43986 | LD HL,22537 | Point HL at 22537 (in the attribute buffer). | |||
| 43989 | CALL FillAttributeColumn | Colour the column. | |||
|
Colour the eleventh column red.
|
|||||
| 43992 | LD HL,22538 | Point HL at 22538 (in the attribute buffer). | |||
| 43995 | CALL FillAttributeColumn | Colour the column. | |||
|
Print the game name.
|
|||||
| 43998 | LD HL,16390 | Point HL at 16390 (in the screen buffer). | |||
| 44001 | LD DE,44082 | Point DE at TitleTexts_GameName. | |||
| 44004 | CALL PrintLargeText | Print the game name in large letters. | |||
|
Print the copyright message.
|
|||||
| 44007 | LD HL,20714 | Point HL at 20714 (in the screen buffer). | |||
| 44010 | LD DE,44067 | Point DE at TitleTexts. | |||
| 44013 | CALL PrintText | Print the copyright message. | |||
|
Set up the four menu entries.
|
|||||
| 44016 | LD HL,44094 | Point HL at InitialMenuEntries. | |||
| 44019 | LD DE,44110 | Point DE at MenuEntries. | |||
| 44022 | LD BC,16 | Set the number of bytes to copy. | |||
| 44025 | LDIR | Copy the entries. | |||
|
Run each of the menu entries once per frame.
|
|||||
| GameMenu_Loop | 44027 | LD IX,44110 | Point IX at the first menu entry. | ||
| 44031 | XOR A | Write 0 to MenuEntryNumber, the number of the menu entry. | |||
| 44032 | LD (41486),A | ||||
| GameMenu_Entry | 44035 | LD A,(IX+0) | Fetch the state of the entry. | ||
| 44038 | LD BC,44126 | Point BC at MenuHandlers. | |||
| 44041 | CALL RunTableRoutine | Run the handler for the state. | |||
| 44044 | LD HL,41486 | Point HL at MenuEntryNumber. | |||
| 44047 | INC (HL) | Move on to the next entry. | |||
| 44048 | LD BC,4 | Set the size of an entry. | |||
| 44051 | ADD IX,BC | Move on to the next entry. | |||
| 44053 | PUSH IX | Copy IX to HL (using the stack). | |||
| 44055 | POP HL | ||||
| 44056 | LD BC,44126 | Point BC at the end of the entries. | |||
| 44059 | AND A | Subtract the address of the end of the entries. | |||
| 44060 | SBC HL,BC | ||||
| 44062 | JR C,GameMenu_Entry | Loop back until all four entries have been run. | |||
| 44064 | JP GameMenu_Loop | Start the next frame. | |||
| Prev: 43882 | Up: Map | Next: 44067 |