![]() |
Routines |
| Prev: 39408 | Up: Map | Next: 39484 |
|
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 | 39453 | LD HL,(38547) | Fetch the game timer from GameTimer. | |
| 39456 | INC HL | Increment the game timer and write it back to GameTimer. | ||
| 39457 | LD (38547),HL | |||
| 39460 | LD A,(38549) | Fetch the random seed from RandomNumber. | ||
| 39463 | ADD A,L | Add the low byte of the game timer to the random seed. | ||
| 39464 | LD L,A | |||
| 39465 | LD A,(23672) | Fetch the frame counter from FRAMES. | ||
| 39468 | ADD A,L | Mix the frame counter into the random seed. | ||
| 39469 | LD (38549),A | Store the new random seed in RandomNumber. | ||
| 39472 | CALL PauseGame | Check if the game is paused. | ||
| 39475 | CALL SpawnNastie | Try to spawn a nastie. | ||
| 39478 | CALL SpawnFlame | Try to spawn a flame. | ||
| 39481 | JP MainLoop | Jump back to the start of the main loop. | ||
| Prev: 39408 | Up: Map | Next: 39484 |