![]() |
Routines |
| Prev: 31874 | Up: Map | Next: 32327 |
|
Used by the routine at TitleScreen.
|
||||
|
First collect the control method.
|
||||
| StartGame | 32217 | CALL Print_ControlMenu | Call Print_ControlMenu. | |
|
This is a game the player started, so disable the demo mode and unset the game-over flag.
|
||||
| 32220 | XOR A | Write 0 to; | ||
| 32221 | LD (26357),A | |||
| 32224 | LD (26355),A | |||
| 32227 | INC A | Write 1 to *Flag_ExtraLife. | ||
| 32228 | LD (26351),A | |||
| 32231 | LD A,4 | Write 4 to *26353. | ||
| 32233 | LD (26353),A | |||
|
Set the players starting life count.
|
||||
| 32236 | INC A | Write 5 to *Player_Lives. | ||
| 32237 | LD (26352),A | |||
| 32240 | CALL 29708 | Call 29708. | ||
| StartGame_0 | 32243 | CALL 27886 | Call 27886. | |
| 32246 | CALL 30230 | Call 30230. | ||
| 32249 | CALL Handler_Aliens | Call Handler_Aliens. | ||
| 32252 | CALL 31154 | Call 31154. | ||
| 32255 | CALL 29268 | Call 29268. | ||
| 32258 | CALL 26768 | Call 26768. | ||
| 32261 | LD A,(26357) | Jump to StartGame_0 if *Flag_GameOver is zero. | ||
| 32264 | OR A | |||
| 32265 | JR Z,StartGame_0 | |||
| 32267 | LD D,8 | D=8. | ||
| StartGame_1 | 32269 | LD BC,0 | BC=0000. | |
| StartGame_2 | 32272 | DJNZ StartGame_2 | Decrease counter by one and loop back to StartGame_2 until counter is zero. | |
| 32274 | DEC C | Decrease C by one. | ||
| 32275 | JR NZ,StartGame_2 | Jump to StartGame_2 until C is zero. | ||
| 32277 | DEC D | Decrease D by one. | ||
| 32278 | JR NZ,StartGame_1 | Jump to StartGame_1 if D is not equal to A. | ||
| 32280 | LD HL,25876 | HL=Messaging_Score. | ||
| 32283 | LD DE,25887 | DE=Messaging_HighScore. | ||
| 32286 | LD B,6 | B=6. | ||
| 32288 | PUSH HL | Stash HL and DE on the stack. | ||
| 32289 | PUSH DE | |||
| StartGame_3 | 32290 | LD A,(DE) | Jump to StartGame_4 if *DE is equal to *HL. | |
| 32291 | CP (HL) | |||
| 32292 | JR Z,StartGame_4 | |||
| 32294 | JR C,StartGame_6 | Jump to StartGame_6 if *DE is less than *HL. | ||
| 32296 | JR StartGame_5 | Jump to StartGame_5. | ||
| StartGame_4 | 32298 | INC DE | Increment DE by one. | |
| 32299 | INC HL | Increment HL by one. | ||
| 32300 | DJNZ StartGame_3 | Decrease counter by one and loop back to StartGame_3 until counter is zero. | ||
| StartGame_5 | 32302 | POP DE | Restore DE from the stack. | |
| 32303 | JR StartGame_7 | Jump to StartGame_7. | ||
| StartGame_6 | 32305 | POP DE | Restore DE and HL from the stack. | |
| 32306 | POP HL | |||
| 32307 | PUSH HL | Stash HL on the stack. | ||
| 32308 | LD BC,6 | BC=0006. | ||
| 32311 | LDIR | LDIR. | ||
| StartGame_7 | 32313 | POP HL | Restore HL from the stack. | |
| 32314 | LD DE,25877 | DE=25877. | ||
| 32317 | LD (HL),48 | Write ASCII 48 ("0") to *HL. | ||
| 32319 | LD BC,5 | BC=0005. | ||
| 32322 | LDIR | LDIR. | ||
| 32324 | JP TitleScreen | Jump to TitleScreen. | ||
| Prev: 31874 | Up: Map | Next: 32327 |