Routines |
Prev: 54098 | Up: Map | Next: 54486 |
Used by the routine at Game_Loop.
|
||||
StartGame | 54377 | LD A,2 | Write 2 to: | |
54379 | LD (55344),A | |||
54382 | LD (55345),A | |||
54385 | LD (55342),A | |||
54388 | LD (55343),A | |||
54391 | LD A,9 | Write 9 to *55348. | ||
54393 | LD (55348),A | |||
See Infinite Lives and Infinite Lives (alternative).
Spend a life to play the game.
|
||||
54396 | LD HL,55335 | HL=Lives. | ||
54399 | DEC (HL) | Decrease *HL by one. | ||
54400 | JP Z,GameOver | Jump to GameOver if the player is out of lives. | ||
54403 | LD HL,55354 | Write 0 to *Time. | ||
54406 | LD (HL),0 | |||
54408 | CALL 62238 | Call 62238. | ||
54411 | LD HL,(55410) | HL=*55410. | ||
54414 | LD (HL),45 | Write 45 to *HL. | ||
54416 | INC HL | Increment HL by one. | ||
54417 | LD (HL),45 | Write 45 to *HL. | ||
54419 | INC HL | Increment HL by one. | ||
54420 | LD (55410),HL | Write HL to *55410. | ||
54423 | LD DE,30 | HL+=0030. | ||
54426 | ADD HL,DE | |||
54427 | LD (HL),45 | Write 45 to *HL. | ||
54429 | INC HL | Increment HL by one. | ||
54430 | LD (HL),45 | Write 45 to *HL. | ||
54432 | LD HL,55354 | HL=Time. | ||
54435 | SET 0,(HL) | Set bit 0 of *HL. | ||
This entry point is used by the routine at 54098.
|
||||
StartGame_0 | 54437 | LD A,(55354) | A=*Time. | |
54440 | AND %11110001 | Keep only bits 0, 4-7. | ||
54442 | LD (55354),A | Write A to *Time. | ||
54445 | LD A,(55344) | Write *55344 to *55340. | ||
54448 | LD (55340),A | |||
54451 | LD A,(55345) | Write *55345 to *55341. | ||
54454 | LD (55341),A | |||
54457 | LD A,(55332) | Write *Timer_Crack_13 to *55346. | ||
54460 | LD (55346),A | |||
54463 | LD A,(55349) | Jump to StartGame_1 if *PlayerCursor_Flag is not equal to 0. | ||
54466 | CP 0 | |||
54468 | JR NZ,StartGame_1 | |||
54470 | LD A,(55348) | Jump to StartGame_1 if *55348 is equal to 9. | ||
54473 | CP 9 | |||
54475 | JR Z,StartGame_1 | |||
54477 | CALL Display_PlayerCursor | Call Display_PlayerCursor. | ||
StartGame_1 | 54480 | CALL 55678 | Call 55678. | |
54483 | JP 54098 | Jump to 54098. |
Prev: 54098 | Up: Map | Next: 54486 |