Prev: 8258 Up: Map Next: 8298
8259: Next Object Slot
Return address pushed by 81F4. Moves IX onto the next 18-byte actor and either dispatches it or runs the rest of the game loop once the list is finished.
Input
IX Actor slot
Advance IX onto the next 18-byte actor slot.
NextObjectSlot 8259 LD DE,$0018 IX+=0018.
825C ADD IX,DE
825E PUSH IX Copy IX to HL (using the stack).
8260 POP HL
8261 LD BC,$6240 Jump to StartGame_NextActor if HL is still below Actor_List_End.
8264 AND A
8265 SBC HL,BC
8267 JP C,StartGame_NextActor
826A DEFB $00 Patched to JP ResetModifiedInFrame while a frame update is running.
826B DEFB $00
826C DEFB $00
Update timers, then handle pause, spawning, pickups and bombs.
826D LD HL,($5E42) Increment GameTimer by one.
8270 INC HL
8271 LD ($5E42),HL
Stir the random number with a byte from the ROM, picked by the low byte of the timer.
8274 LD H,$00 H=00 so HL is a ROM address from 0000 to 00FF, set by the low byte of GameTimer.
8276 LD A,($5E40) A=*RandomNumber.
8279 ADD A,(HL) Add the ROM byte at *HL to A.
827A LD ($5E40),A Write A back to RandomNumber.
827D CALL ControlsPause Call ControlsPause.
Restart the game loop early if Jetman is not in play.
8280 LD A,($5E6C) Jump to StartGame_ReadyStack if PlayerInactive is set.
8283 AND A
8284 JP NZ,StartGame_ReadyStack
Spawn an alien if there are too few, then run the remaining handlers for this frame.
8287 LD A,($5E5E) Call SpawnAlien if AlienCount is less than 07.
828A CP $07
828C CALL C,SpawnAlien
828F CALL Handler_Pickups Call Handler_Pickups.
8292 CALL Handler_Bombs Call Handler_Bombs.
8295 JP StartGame_ReadyStack Jump to StartGame_ReadyStack.
Prev: 8258 Up: Map Next: 8298