ResidualVM's EMI patch installs a custom version of system_prefs.loadprefs
which maps config reads to GetResidualVMPreference() calls. The original
system_prefs.cfg is saved and used as source for default values. When
the custom loadprefs function is called a second time (i.e. when using
the New Game option in the main menu) any config read results in an
endless recursion.
The first argument of MakeSectorActive can be either a string or a
number. If a number is used by the lua call lua_isstring will also return
true (see engines/grim/lua/lapi.cpp) and so the correct code which
handles the integer case is never called.
This patch reverses the order of the tests via lua_isstring and
lua_isnumber.
In EMI this fixes the following:
- big monkey head on Monkey Island stays open even after set or setup
change
- the lights in the bank on lucre island stay off until Guybrush turns
them on
- shadow of Pegnose's nose is visible in close-up camera view
When an actor which is drawn using sprites moved due to water float
effects and if that actor uses multiple sprites, then these sprites are
not aligned (e.g. in the very first scene, the ship in the background is
not shown as one piece).
That is because the sprites are first rotated and then moved to
the correct position. It is necessary to first move them to their
correct position on the actor and then rotate the whole actor.
Additionally, non-overworld sprites needs to be rotated by the Yaw axis.
Otherwise the ship did not rock but only moved vertically.
This changes fixes:
- the ship in the background in the first scene
- the clock hands in the swamp
- use the costumeName instead of a pointer to the costume object to
check, whether the current costume matches the requested one
- this fixes an uninitialized pointer read
When mapping a sprite to a GL polygon its dimensions are scaled by the ratio
between the current screen resolution and the native game resolution. When
the polygon is rendered it is scaled again, causing sprites to be displayed
unproportionally big when using larger screen resolutions.
All other methods of TextSplitter ignore the case: the strings of the
splitted text are changed to lowercase and other strings provided via
arguments are compared case-insensitive.
- the costumes are handled on a stack per Actor
- the last costume is considered the current one
- currently, the costumes are never removed from from the stack
- this causes an issue when Guybrush is using its original
costume first, later the monkey robot costume for the final Monkey Kombat
and then again the standard costume (the robot costume will remain the last
on the stack and cosidered the current one - this causes a problem
when attaching the head actor since the robot has different joints
than guybrush with the standard costume)
- if a new wear chore is set and it uses a different costume than the
current one and neither of them is the shadow costume remove the old
costume before setting the new one
- additionally, this patch makes sure, that all active chores of all
costumes on the stack of an actor are stopped