- currently, the cache of local.m4b will cause that all contained files
have the highest priority
- any file from a different archive which should have a higher priority
(e.g. patch.m4b) is completley ignored
- this patch removes the additional cache of local.m4b so that the
priority handling of SearchMan works
- additionally the concrete Lab object for local.m4b will now keep
the file open
- 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
- don't delete the common LuaFile objects (like g_fin, g_stdout, ...)
separately
- don't delete the LuaFile objects in closefile()
- delete all LuaFile objects in g_files at once in lua_iolibclose()
- for some objects LuaFile::close() is called twice (once by closefile()
and a second time by lua_iolibclose()) but this is uncritically due to
the way LuaFile::close() is implemented
- delete screenshot after texture is created
- free _data[] entries in BitmapData::freeData()
- destroy _specialtyTextures[] entries in
graphic driver's destructors
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.
TurnActorTo is mapped to Actor::singleTurnTo() which only
turns the actor (according to its turn rate) by a small amount.
If the turn could not be completed, TurnActorTo returns false.
In EMI, all LUA calls to TurnActorTo are repeated until the
actor does eventually look into the correct direction.
However, for parallel running LUA threads, calls to IsActorTurning
would return false during such a "LUA-controlled" turn.
In the scene with the dart players, the LUA code for the dialog
waits for the dart player to stop moving (and turning) by repeatedly
calling IsActorTurning. Since that function returns false
even if the players are still turning towards the dart board, the
dialog code starts and spawns a parallel LUA thread to use
TurnActorTo to make the dart players looking at Guybrush.
This means, that eventually for each dart player, two LUA
threads with contradicting TurnActorTo directions will run forever
since in none of the threads the final direction is ever reached.
To fix that, a new actor state variable, _singleTurning, is introduced.
It is set to true if an Actor::singleTurnTo() call indicates that
the turn is not complete. It is set to false once the turning has
fininshed.
Since all TurnActorTo calls in EMI are repeated until the function returns
false, it is safe to use that variable to indicate that a "LUA-controlled"
turning is in progress.
In GRIM, that's not the case and so isTurning() is only changed for EMI.
Overworld actors, e.g. the load/save menu or the inventory wheel
should not use the lights of the current scene for lighting.
This fixes the bug that the screenshots of the load menu
were dimmed to various levels depending on the current scene.
Ensure that all math operations are done with floating point
arithmetic to avoid a floating point division by zero for small
values of _volume. In this case, the term in parenthesis would
be evaluated first via integer arithmetic and may produce easily 0.
Per convention, in residualvm the default GL current color
should be (1.0f, 1.0f, 1.0f). If a function changes the color,
it is required to reset it before returning.
This fixes the issue that some videos were not correctly displayed
until the next glColor call (e.g. when drawing the sub-titles) was
issued.