Prev: 28886 Up: Map Next: 28909
28895: Limit Frame Rate
The update routine for the objects which do nothing (type 0 and types 11 to 15). This also slows down the main loop in the slow pass when there are not many objects, by making a short pause.
LimitFrameRate 28895 LD A,(24096) Return if the fast pass is being done (FrameUpdated is marked as being updated), so there is no pause.
28898 AND A
28899 RET NZ
28900 LD HL,192 Set the delay counter for a slight pause (so that the game does not run too fast).
LimitFrameRate_Loop 28903 DEC HL Decrease the delay counter by one.
28904 LD A,L Keep looping back to LimitFrameRate_Loop until the delay is over.
28905 OR H
28906 JR NZ,LimitFrameRate_Loop
28908 RET Return.
View the equivalent code in;
Prev: 28886 Up: Map Next: 28909