Some chores need to stay active even after a call to
StopAllChores(). E.g. the hold chores should stay active
even after changing the set (which calls StopAllChores()).
It looks like that the previously unknown boolean paramter
of StopAllChores() controls that behavior. If set to TRUE,
stop only the non-looping chores.
This patch fixes:
- hold chore was lost when switching sets
- blue painting did not show the ultimate insult when opening
the inventory
The hold chore was always lost after e.g. turning left or right.
Although that chore was still in _playingChores, it was not shown.
The patch uses the following order for drawing the chores:
- wear chores
- rest chores
- walk/turn chores
- other chores (in order of the playChore calls)
- remove some ResidualVM specific entries
- make OpenGL part as ResidualVM specific
- added more detection checks in OpenGL part
- allow only detect OpenGL ES2
The effect looks similar enough to the original but not exactly the same.
This is CPU intensive. Once well tested it may be worth reimplementing it
as a shader.
When attaching an actor to another one, set its local position
so that its final position (position of the parent actor + the
local position) remains the same as the final position before
it was attached.
Use matrix multiplications to fix the rotation for attached actors:
- calculate the final transformation matrix recursively for attached
actors (instead of using getWorldPos and getWorldRot)
- use a different order for building the quaternions out of the Euler
angles
- changed handling of camera position (just apply the rotation of the
camera, the (inverted) position of the camera and the position of the
actor
- no functional changes for GRIM
- no changes for drawing in overworld
Code simplification for GRIM:
- no need to use _currentPos in calculations for GRIM since it is
always (0, 0, 0)
This fixes:
- the rotation of any items Guybrush is holding in his hands
- the handling of the pole when using the raft in the swamps
- getting the bananas with the banana picker
Two animations (guy_puton_cap, guy_holdstickystuff) contain bone names
which which don't match any joints. To avoid that the holding actor is
drawn with a wrong orientation, ingore the unknown bone names when
running the animations.
Skeleton::getJointNamed() will now return null for unknown names.
The original behaviour for Actor::getWorldPos and
Actor::getRotationQuat is kept.
This patch fixes the problem, that Guybrush is "lying down" once he
holds the bottle of glue.