- this avoids the issue that _frameTime is set to 0 if a consecutive
luaUpdate() happens in the same millisecond and so getPerSecond()
would return 0 for any given rate
- this fixes the issue that Guybrush would walk erratically
when residualvm is built with optimization
This needs to be separate from the other videos, since the logo
is encoded as QuickTime. This solution replicates logic from
mainLoop to avoid adding any further special cases in engine code.
Explanation: luaUpdate destroys shadow mask buffers which in turn makes the program crash, this was the only solution I could come up with but I'm not sure if it has any side effects.
This adds math classes for doing frustum culling in software. These could be used for optimizing performance in many other places as well. For example, if an actor is outside the view frustum, it may not be necessary to do expensive keyframe animation and vertex skinning calculations for that actor.
Some sets (e.g. the big monkey's engine room) set Guybrush's sort order
to a large value, causing him to become invisible in other places. This
patch resets the sort order for all actors when switching to a new set.
Both EMI and Grim call RenderModeUser when entering the menus or dialogs,
but EMI does not use special "blast" commands to display text or images,
so we cannot suspend regular screen updates. The current implementation
does not switch engine modes in RenderModeUser, which has the drawback
that the frame time is not stopped during pause or menu.
With this patch, EMI handles draw mode like normal mode with frozen frame
time.
Otherwise the scripts that start after a movie start prematurely, in the
case of the dock intro, this means that the dialogue on the docks starts
playing at the same time as the arrival video starts playing. With this
fix we avoid that issue, resuming operation as normal only when the movie
is finished.
Catch the ESC-key event manually for the PS2 version,
to allow skipping movies. (This also eats up the ESC-key event,
to avoid passing it on to lua afterwards).
The highlighted menu entry is sometimes not correctly colored.
There are multiple textObjects per string (one for each color) and
residualvm draws them in an unspecified order.
To ensure that the correct textObject is drawn on top, each
object gets a layer attribute assigned by the lua code.
The patch adds the layer attribute to the runtime engine and orders the
textObjects by layer before drawing them.