Commit Graph
42 Commits
Author SHA1 Message Date
Paweł Kołodziejski 06902574b4 GRIM: Janitorial 2022-06-08 01:12:00 +02:00
Paweł Kołodziejski 20cb0ae228 ALL: Cleanup ResidualVM -> ScummVM 2021-12-26 21:19:38 +01:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Bastien Bouclet 23339184ce GRIM: Clean up float data loading 2018-04-14 11:49:35 +02:00
Vincent Pelletier 84f83fe6ea ALL: Rename get_float to READ_LE_FLOAT
For consistency with other functions/macros from common/endian.h .
2017-05-12 13:57:16 +00:00
Christian Krause d8ef15acc2 EMI: Keep time of chores and animations in sync
Both the animation components/tracks and the chores itself keep track of
the current time independently:

animation component:
- AnimationStateEmi::_time
- initialized with 0
- after the first update() call, _time is advanced by the frametime

chores:
- Costume::_currTime
- initialized with -1
- during the first update() call, _currTime is set first to 0
- during the next update() call, _currTime is advanced by the frametime

EMICostume::update() updates first the chore and then all components
with the same frame time. This has the effect, that the internal time
base of the chore and the animation has always an initial offset (the
value of the frametime of the first update() call).

For some costumes, the chore will pause the animation by setting the
according key for that animation at the end of the animation. However,
since the animation component has a different time base, it has already
reached that point and may have already disabled itself entirely
(instead of just being paused by the chore).

This bug fix let the animation set _time to 0 in the first update() call, too.
Any consecutive update() call will advance the time by the frametime.
This will keep the two time bases of the chore and the animation component
in sync.
2015-05-15 21:26:01 +02:00
Dries Harnie fb3bd8139a JANITORIAL: Fix Coverity warnings
Fixes coverity warnings 1267220, 1256936, 1229470, 1224097, 1219766,
1054364, 1009896.
2015-05-12 08:49:19 +02:00
Joni Vähämäki 4797ba9594 EMI: Correctly wrap the animation time when the animation duration is exceeded. Fixes #987 2014-08-12 00:32:31 +03:00
Joni Vähämäki 0ef3d24e15 EMI: Use uint instead of float for animation time. 2014-08-12 00:31:11 +03:00
Joel Teichroeb 391482c341 EMI: Fix typo in animations 2014-06-30 07:24:07 -07:00
Joni Vähämäki 8e31d1a8a4 EMI: Store joint indexes to avoid joint lookup by name in each animation step. 2014-06-15 03:13:31 +03:00
Joni Vähämäki eb26094de1 EMI: Move methods that require animation state information from AnimationEmi to AnimationStateEmi. 2014-06-15 03:13:30 +03:00
Joni Vähämäki e7b57bdff2 EMI: Save and restore animation states. Fixes #902 2014-06-05 08:12:49 -07:00
Joel Teichroeb 4aa61146c6 GRIM: Convert a few more NULLs 2014-06-02 16:59:09 -07:00
Joel Teichroeb 2920822e60 EMI: Add missing else 2014-06-01 11:12:52 -07:00
Joni Vähämäki 765ecf7870 EMI: Implemented PlayChore and PauseChore. 2014-05-31 03:05:32 +03:00
Joni Vähämäki b14b9856d6 EMI: Fixed implementation of AdvanceChore. 2014-05-31 03:05:30 +03:00
Joni Vähämäki a180b3b562 EMI: Chore fading fixes.
Fading out chores remain in playing state until they have completely faded out. Also using StopChore on a fading out chore will actually stop the chore, unlike in Grim where the chore will keep fading out.
2014-05-31 03:05:17 +03:00
Joni Vähämäki 47aa1ace87 EMI: Added support for animation priorities and implemented blending. 2014-05-31 02:50:06 +03:00
Pawel Kolodziejski 8759900b6a ALL: synced with ScummVM 2014-04-05 18:18:42 +02:00
Joni Vähämäki 13c86cc8af EMI: Implement keys for the animation component.
Key 3 seems to control whether the animation loops or not. If key 3 is not
set, the animation plays once and then deactivates. If the key is set, the
animation will repeat until the chore is stopped.
2014-03-26 18:51:51 +02:00
Joni Vähämäki 5a95dfd48d EMI: Fixed interpolation between animations and cleaned up the related code. 2014-03-26 14:08:36 +02:00
Christian Krause 95bceeb216 EMI: Handling of invalid bone names
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.
2014-02-02 14:26:12 +01:00
Ingo van Lil 70520e5ffa EMI: Fix actor animations
The current code for loading EMI costumes contains a special treatment that
expects the skeleton and mesh components in a chore named "wear_default".
This assumption is not valid for costumes that contains multiple wear chores,
most notably for Guybrush who has a different outfit for each island.

The new code considers any chore containing skeleton and mesh components
to be a wear chore. The skeleton from the last played wear chore will be
animated.
2013-12-08 01:06:57 +01:00
Joel Teichroeb 515a7685a7 EMI: Do not reset animations based on keyframes
This causes issues with idle animations. There is
probably some logic we are missing in here, but this
change makes idle animations look proper.
2013-11-30 16:29:31 -08:00
Joel Teichroeb db68189e43 EMI: Reduce jerkyness of animations 2013-11-30 12:08:17 -08:00
Joel Teichroeb 92c48e6637 GRIM: const more paramiters 2013-10-25 07:48:27 -07:00
Dries Harnie cfd580bbfa EMI: Draw attached actors w/ joint-relative rotation 2013-08-04 15:15:41 +02:00
Joel Teichroeb e7422d7875 EMI: Still animate when the duration has completed. This fixes the curtains in uch.set 2013-07-12 12:11:56 -07:00
Einar Johan Trøan Sømåen fe3883cecd GRIM: Reformat code to be closer to convention. 2013-07-09 21:12:55 +02:00
Dries Harnie db48705fbb EMI: Share skeleton transformation among ANIM components 2013-07-06 13:04:03 +02:00
Dries Harnie 10b98b1ce9 EMI: Move skeletal animation to AnimationEmi 2013-07-06 13:04:03 +02:00
Paweł Kołodziejski 175620b62a ALL: change license headers from LGPL to GPL, and few updates 2012-12-19 23:15:43 +01:00
Dries Harnie 7925f706ac EMI: Properly play short animations 2012-07-12 23:16:45 +02:00
Joel Teichroeb f5ccde127a EMI: Fix memory leak 2012-04-27 10:17:22 -07:00
Joel Teichroeb 639da48924 EMI: Make _rotations and _translations * instead of a ** 2012-04-27 10:17:21 -07:00
Joel Teichroeb 30a2ee7bb5 EMI: Make _bones a * instead of a ** 2012-04-27 10:17:21 -07:00
Joel Teichroeb 435ba6e1e7 EMI: Move the bone loading code to its own function 2012-04-27 10:17:20 -07:00
Joel Teichroeb 63938ba499 GRIM: Clean up unneeded includes and fix some trailing whitespace 2012-03-26 20:12:00 -07:00
Paweł Kołodziejski 0086e799e4 EMI: formatting 2012-03-05 12:19:04 +01:00
Einar Johan T. Sømåen 27d82c192e EMI: Add a component for the animations in emi. 2012-01-30 22:24:09 +01:00
Einar Johan T. Sømåen 55dc002079 EMI: Add in JohnDoe's load-code for skeleton and animation. 2012-01-30 21:40:19 +01:00