Prev: 99F0 Up: Map Next: 9A3C
9A1D: Update Counters And Housekeeping
Used by the routine at NextActor.
Runs once every time all of the actors have been processed. It updates the counter and the random number seed and then calls the pause check and the other per-pass routines before going back to the main loop.
UpdateCounters 9A1D LD HL,($9693) Fetch the game timer from GameTimer.
9A20 INC HL Increment the game timer and write it back to GameTimer.
9A21 LD ($9693),HL
9A24 LD A,($9695) Fetch the random seed from RandomNumber.
9A27 ADD A,L Add the low byte of the game timer to the random seed.
9A28 LD L,A
9A29 LD A,($5C78) Fetch the frame counter from FRAMES.
9A2C ADD A,L Mix the frame counter into the random seed.
9A2D LD ($9695),A Store the new random seed in RandomNumber.
9A30 CALL PauseGame Check if the game is paused.
9A33 CALL SpawnNastie Try to spawn a nastie.
9A36 CALL SpawnFlame Try to spawn a flame.
9A39 JP MainLoop Jump back to the start of the main loop.
Prev: 99F0 Up: Map Next: 9A3C