Routines |
Prev: 56832 | Up: Map | Next: 56951 |
|
||||
GameEntryPoint | 56857 | CALL SelectionScreen | Call SelectionScreen. | |
56860 | CALL PlayTelecastIntro | Call PlayTelecastIntro. | ||
56863 | XOR A | Set the border colour to BLACK. | ||
56864 | OUT (254),A | |||
56866 | CALL MonsterDefaults | Call MonsterDefaults. | ||
56869 | CALL InitialiseNewGame | Call InitialiseNewGame. | ||
GameStartLevel | 56872 | CALL 57030 | Call 57030. | |
56875 | LD A,(57156) | A=*CurrentLevel. | ||
56878 | CALL FindScene | Call FindScene. | ||
Game loop.
|
||||
GameLoop | 56881 | CALL Controls_PauseQuit | Call Controls_PauseQuit. | |
Is the game still in-play?
|
||||
56884 | LD A,(54269) | Jump to GameEntryPoint if *Game_State is not zero. | ||
56887 | AND A | |||
56888 | JR NZ,GameEntryPoint | |||
56890 | XOR A | Write 0 to FRAMES. | ||
56891 | LD (23672),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?
|
||||
56894 | LD A,(53202) | Jump to Game_InPlay if *George_State is not equal to 255 (in-play). | ||
56897 | CP 255 | |||
56899 | JR NZ,Game_InPlay | |||
Is Lizzy still in-play?
|
||||
56901 | LD A,(53249) | Jump to Game_InPlay if *Lizzy_State is not equal to 255 (in-play). | ||
56904 | CP 255 | |||
56906 | JR NZ,Game_InPlay | |||
Is Ralph still in-play?
|
||||
56908 | LD A,(53296) | Jump to GameEntryPoint if *Ralph_State is equal to 255 (in-play). | ||
56911 | CP 255 | |||
56913 | JR Z,GameEntryPoint | |||
The game is in-play so run the handlers until the level is completed.
|
||||
Game_InPlay | 56915 | LD A,(54259) | Jump to RunHandlers until *BuildingsRemainingCount is zero - until all the buildings have collapsed. | |
56918 | AND A | |||
56919 | 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
|
||||
56921 | LD A,(53782) | A=*LevelFinishedCountdown. | ||
56924 | DEC A | Decrease *LevelFinishedCountdown by one. | ||
56925 | LD (53782),A | |||
56928 | JR NZ,RunHandlers | Jump to RunHandlers until A is zero. | ||
Level complete! Move onto the next level.
|
||||
56930 | LD A,(57156) | A=*CurrentLevel. | ||
56933 | INC A | Increment level number by one. | ||
Check to see if all levels (40 in total) have been played, if so loop back to level 1.
|
||||
56934 | CP 41 | Jump to WriteLevelNumber if A is not equal to 41. | ||
56936 | JR NZ,WriteLevelNumber | |||
Else cycle back to level 1 again.
|
||||
56938 | LD A,1 | A=level 1. | ||
WriteLevelNumber | 56940 | LD (57156),A | Write level number to *CurrentLevel. | |
56943 | CALL PlayTelecastIntro | Call PlayTelecastIntro. | ||
56946 | CALL MonsterDefaults | Call MonsterDefaults. | ||
56949 | JR GameStartLevel | Jump to GameStartLevel. |
Prev: 56832 | Up: Map | Next: 56951 |