Prev: 29184 Up: Map Next: 29385
29268: Routine at 7254
Used by the routines at TitleScreen and StartGame.
29268 LD A,(26276) Jump to 29453 if *26276 is not equal to 2.
29271 CP 2
29273 JP NZ,29453
29276 LD A,(26353) Jump to 29303 if *26353 is not equal to 4.
29279 CP 4
29281 JR NZ,29303
29283 LD HL,26077 HL=26077.
29286 LD B,8 B=8.
29288 PUSH BC Stash BC on the stack.
29289 LD E,(HL) E=*HL.
29290 INC HL Increment HL by one.
29291 LD D,(HL) D=*HL.
29292 INC HL Increment HL by one.
29293 PUSH HL Stash HL on the stack.
29294 BIT 6,D Call 30052 if bit 6 of D is set.
29296 CALL NZ,30052
29299 POP HL Restore HL and BC from the stack.
29300 POP BC
29301 DJNZ 29288 Decrease counter by one and loop back to 29288 until counter is zero.
29303 LD HL,26240 HL=26240.
29306 LD DE,26241 DE=26241.
29309 LD BC,108 BC=0108.
29312 LD (HL),B Write B to *HL.
29313 LDIR LDIR.
29315 LD HL,26077 HL=26077.
29318 LD DE,26078 DE=26078.
29321 PUSH HL Stash HL on the stack.
29322 LD C,29 C=29.
29324 LD (HL),B Write B to *HL.
29325 LDIR LDIR.
29327 LD HL,26167 HL=26167.
29330 LD A,(26353) Jump to 29341 if *26353 is not zero.
29333 OR A
29334 JR NZ,29341
29336 LD HL,26107 HL=26107.
29339 JR 29357 Jump to 29357.
29341 CP 1 Jump to 29350 if A is not equal to 1.
29343 JR NZ,29350
29345 LD HL,26137 HL=26137.
29348 JR 29357 Jump to 29357.
29350 CP 4 Jump to 29357 if A is not equal to 4.
29352 JR NZ,29357
29354 LD HL,26183 HL=26183.
29357 POP DE Restore DE from the stack.
29358 LD A,(26239) A=*26239.
29361 ADD A,A Multiply A by 2.
29362 JR Z,29367 Jump to 29367 if A is zero.
29364 LD C,A C=A.
29365 LDIR LDIR.
29367 LD HL,26349 Write 206 to *26349.
29370 LD (HL),206
29372 LD HL,26352 HL=Player_Lives.
29375 DEC (HL) Decrease Player_Lives by one.
29376 LD A,(HL) Jump to 29385 if *Player_Lives indicates the player still has lives left.
29377 OR A
29378 JR NZ,29385
Player has lost all their lives, set the *Flag_GameOver flag.
29380 INC A Write 1 to *Flag_GameOver.
29381 LD (26357),A
29384 RET Return.
Prev: 29184 Up: Map Next: 29385