![]() |
Routines |
| Prev: DE00 | Up: Map | Next: DE77 |
|
|
||||
| GameEntryPoint | DE19 | CALL SelectionScreen | Call SelectionScreen. | |
| DE1C | CALL PlayTelecastIntro | Call PlayTelecastIntro. | ||
| DE1F | XOR A | Set the border colour to BLACK. | ||
| DE20 | OUT ($FE),A | |||
| DE22 | CALL MonsterDefaults | Call MonsterDefaults. | ||
| DE25 | CALL InitialiseNewGame | Call InitialiseNewGame. | ||
| GameStartLevel | DE28 | CALL $DEC6 | Call DEC6. | |
| DE2B | LD A,($DF44) | A=*CurrentLevel. | ||
| DE2E | CALL FindScene | Call FindScene. | ||
|
Game loop.
|
||||
| GameLoop | DE31 | CALL Controls_PauseQuit | Call Controls_PauseQuit. | |
|
Is the game still in-play?
|
||||
| DE34 | LD A,($D3FD) | Jump to GameEntryPoint if *Game_State is not zero. | ||
| DE37 | AND A | |||
| DE38 | JR NZ,GameEntryPoint | |||
| DE3A | XOR A | Write 00 to FRAMES. | ||
| DE3B | LD ($5C78),A | |||
|
Check each monster state. If any are "in-play" then jump to Game_InPlay. If not, we cycle back round to GameEntryPoint.
Is George still in-play?
|
||||
| DE3E | LD A,($CFD2) | Jump to Game_InPlay if *George_State is not equal to FF (in-play). | ||
| DE41 | CP $FF | |||
| DE43 | JR NZ,Game_InPlay | |||
|
Is Lizzy still in-play?
|
||||
| DE45 | LD A,($D001) | Jump to Game_InPlay if *Lizzy_State is not equal to FF (in-play). | ||
| DE48 | CP $FF | |||
| DE4A | JR NZ,Game_InPlay | |||
|
Is Ralph still in-play?
|
||||
| DE4C | LD A,($D030) | Jump to GameEntryPoint if *Ralph_State is equal to FF (in-play). | ||
| DE4F | CP $FF | |||
| DE51 | JR Z,GameEntryPoint | |||
|
The game is in-play so run the handlers until the level is completed.
|
||||
| Game_InPlay | DE53 | LD A,($D3F3) | Jump to RunHandlers until *BuildingsRemainingCount is zero - until all the buildings have collapsed. | |
| DE56 | AND A | |||
| DE57 | JR NZ,RunHandlers | |||
|
Keep running the handlers for a short while even though all the buildings have collapsed. It would be a bit jarring if the level stopped instantly after the last building rubble cleared.s
|
||||
| DE59 | LD A,($D216) | A=*LevelFinishedCountdown. | ||
| DE5C | DEC A | Decrease *LevelFinishedCountdown by one. | ||
| DE5D | LD ($D216),A | |||
| DE60 | JR NZ,RunHandlers | Jump to RunHandlers until A is zero. | ||
|
Level complete! Move onto the next level.
|
||||
| DE62 | LD A,($DF44) | A=*CurrentLevel. | ||
| DE65 | INC A | Increment level number by one. | ||
|
Check to see if all levels (28 in total) have been played, if so loop back to level 01.
|
||||
| DE66 | CP $29 | Jump to WriteLevelNumber if A is not equal to 29. | ||
| DE68 | JR NZ,WriteLevelNumber | |||
|
Else cycle back to level 1 again.
|
||||
| DE6A | LD A,$01 | A=level 01. | ||
| WriteLevelNumber | DE6C | LD ($DF44),A | Write level number to *CurrentLevel. | |
| DE6F | CALL PlayTelecastIntro | Call PlayTelecastIntro. | ||
| DE72 | CALL MonsterDefaults | Call MonsterDefaults. | ||
| DE75 | JR GameStartLevel | Jump to GameStartLevel. | ||
| Prev: DE00 | Up: Map | Next: DE77 |