Prev: 33343 Up: Map Next: 33368
33354: Limit Frame Rate
Handler for an empty actor slot (type 0). Waits for a short delay unless a frame update is running. A larger counter here slows the game down.
Return if the frame is marked as updated, otherwise pause.
LimitFrameRate 33354 LD A,(24146) Return if FrameUpdated is marked as being updated.
33357 AND A
33358 RET NZ
33359 LD HL,192 Introduce a counter (0192) for a slight pause.
LimitFrameRate_Loop 33362 DEC HL Decrease counter by one.
33363 LD A,L Keep jumping back to LimitFrameRate_Loop until the counter is zero.
33364 OR H
33365 JR NZ,LimitFrameRate_Loop
33367 RET Return.
View the equivalent code in;
Prev: 33343 Up: Map Next: 33368