Prev: 33195 Up: Map Next: 33289
33211: Start Game
Queues the start-game tune, clears planet RAM and then walks every actor through JumpTable.
Queue the start-game tune and clear planet RAM.
StartGame 33211 LD DE,47669 Set the tune pointer to Tune_Start_Game.
33214 CALL QueueTune Queue the start-game tune.
Reset the planet and player state.
33217 LD HL,24144 Set the start address to PlanetData.
33220 LD BC,24576 Set the end address to Laser_Parameter_1.
33223 CALL ResetScreen_Fill Call ResetScreen_Fill.
33226 CALL ResetPlanet Call ResetPlanet.
33229 CALL NewGame Call NewGame.
33232 CALL ResetModifiedCode Call ResetModifiedCode.
33235 CALL LevelNew Call LevelNew.
Ready the stack and restore Jetman after a teleport.
StartGame_ReadyStack 33238 LD SP,24064 Set the stack pointer to GameOptions.
33241 LD A,(24168) Call FinishTeleport if TeleportRestore is set.
33244 AND A
33245 CALL NZ,FinishTeleport
33248 EI Enable interrupts.
Dispatch the current actor through the jump table.
StartGame_DispatchActor 33249 XOR A Write 0 to AlienCount.
33250 LD (24158),A
33253 LD IX,24696 Point IX at Jetman_Slot.
This entry point is used by the routines at FrameUpdate and NextObjectSlot.
StartGame_NextActor 33257 LD A,(23672) C=FRAMES.
33260 LD C,A
33261 LD A,(24147) Call FrameUpdate if LastFrame does not match.
33264 CP C
33265 CALL NZ,FrameUpdate
33268 LD HL,33369 Push NextObjectSlot as the return address.
33271 PUSH HL
33272 LD BC,33477 Set the jump-table pointer to JumpTable.
33275 LD L,(IX+0) Fetch the actor type from *IX+0.
This entry point is used by the routine at DispatchObjectState.
StartGame_AfterActor 33278 LD H,0 Fetch the handler address from JumpTable.
33280 ADD HL,HL
33281 ADD HL,BC
33282 LD A,(HL)
33283 INC HL
33284 LD H,(HL)
33285 LD L,A
33286 JP IndirectJump Jump to IndirectJump.
View the equivalent code in;
Prev: 33195 Up: Map Next: 33289