Prev: 29010 Up: Map Next: 29062
29024: Frame Update
Used by the routine at MainLoop_NewPass.
Called by MainLoop when the frame counter has changed since the last frame update. Runs an extra pass over only the first four actor slots, which include Charlie and the sound effect actor, before carrying on with the pass which was in progress.
FrameUpdate 29024 DI Disable interrupts.
29025 LD A,(23672) Store FRAMES at LastFrame.
29028 LD (24354),A
29031 LD A,1 Set FrameUpdated to 1 (frame has updated).
29033 LD (24355),A
29036 PUSH IX Save the pointer to the current actor on the stack.
29038 LD HL,24405 Write ActorSpawnSlots to 29100.
29041 LD (29100),HL
Self modifying code; this changes the command at 29118 to JP FrameUpdateEnd, so that the extra pass ends there.
29044 LD A,195 Write 195 to 29118 and FrameUpdateEnd to 29119, i.e. JP FrameUpdateEnd.
29046 LD (29118),A
29049 LD HL,29080
29052 LD (29119),HL
29055 LD IX,24373 Point IX at ActorCharlie.
29059 JP MainLoop Jump to MainLoop.
View the equivalent code in;
Prev: 29010 Up: Map Next: 29062