Commit Graph
100 Commits
Author SHA1 Message Date
Paweł Kołodziejski 06902574b4 GRIM: Janitorial 2022-06-08 01:12:00 +02:00
Paweł Kołodziejski 2065fd9d0b EMI: Improve check for followed walkboxes for Actor.
This eliminate return nil by GetActorPuckVector() when it shouldn't.
Script Lua function "find_stair_chore" is not expecting nil and will throw error.
2022-01-06 16:23:13 +01: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
Christian Krause 6d226501b5 EMI: Implement mesh-specific alpha values
- if Lua_V2::SetActorGlobalAlpha() is called with a mesh name,
  set a mesh-specific alpha value / mode
- use this alpha value in drawEMIModelFace()
- fixes the problem that the whole actor vanishes in some scenes
  (e.g. when entering or leaving the porch of the of LUA bar)
2015-02-17 01:57:07 +01:00
Christian Krause 36b037c81d EMI: Refactor conversion of sound volume values
- LUA code uses a range of 0 .. 100
- the LUA group volumes are in the range 25 .. 100, otherwise the sound
  group is muted
- residualvm engine uses a range of 0 .. Audio::Mixer::kMaxChannelVolume
- do most of the conversion in lua_v2_sound.cpp
- most parts of the engine will solely use the engine internal range
- only when reading/writing the registry residualvm continues to use
  a special conversion for compatibility with the volume settings
  of the residualvm engine settings
- proper handling of volumes close to 0.0f in SoundTrack::updatePosition()
2014-10-27 01:10:29 +01:00
Dries Harnie 26a37c1410 EMI: Reroute AttachActor/DetachActor to debug channel 2014-10-11 12:48:07 +02:00
Joel Teichroeb 6c01a3ca74 Merge pull request #1077 from JoseJX/StopTurning
EMI: Add stop turning to actor methods.
2014-09-09 09:01:33 -07:00
Joel Teichroeb 6227388dce EMI: Fix casting issue with MSVC 2014-09-08 18:30:22 -07:00
Christian Krause e2eee80716 EMI: Implement Lua_V2::SetActorLocalAlpha
- sets the alpha mode and the alpha value for single vertices
2014-09-08 09:00:21 +02:00
Joseph Jezak aa1977618a EMI: Add stop turning to actor methods. 2014-08-26 13:36:07 -04:00
Joseph Jezak 68bf45f373 EMI: Additional conversions from interest/roll to _rot. 2014-08-19 21:15:18 -04:00
Joni Vähämäki 292d567013 EMI: Go through all costumes in IsActorChoring. 2014-08-20 01:37:29 +03:00
Joni Vähämäki 70b65cb45f EMI: Return playing chores of all costumes from GetActorChores. 2014-08-20 01:37:28 +03:00
Joni Vähämäki 8ebdf5eb8e EMI: Make Lua_V2::findCostume only return true if a costume is found. 2014-08-20 01:37:28 +03:00
Joni Vähämäki 1bf63977a6 EMI: Remove special treatment of wear chores which is no longer necessary. 2014-08-20 01:37:19 +03:00
Joni Vähämäki 73d62214d3 EMI: Do not reset the costume when a new wear chore is started. Fixes #878 2014-08-20 01:36:33 +03:00
Joni Vähämäki c36f0b377b EMI: Return the effective sort order in GetActorSortOrder. 2014-08-12 17:46:41 +03:00
Joel Teichroeb 9d913a83bb EMI: Make sure that all cases are handled in setChoreAndCostume 2014-08-04 22:25:55 -07:00
Joni Vähämäki 7f3ce45b1c EMI: Ignore fade times longer than 0.6 seconds in StopChore. Fixes #988 2014-08-03 16:46:26 +03:00
Joni Vähämäki bc6492a9c2 EMI: Return false in IsChorePlaying if the chore is paused. Fixes #983 2014-08-02 21:59:55 +03:00
Joni Vähämäki 2e3cf9ac2d EMI: Implement WalkActorVector. 2014-07-29 13:37:44 -07:00
Joel Teichroeb 7d43c8c90c Merge pull request #956 from Akz-/emi-shadows-rebase
EMI: Implement shadows for OpenGL and TinyGL renderers
2014-07-20 13:42:39 -07:00
Joni Vähämäki 1081471119 EMI: Implement projection shadows. 2014-07-20 21:46:14 +03:00
Joni Vähämäki 8316549020 EMI: Allow nil X, Y and Z values in SetActorHead.
This fixes Deadeye Dave's animation in pop.
2014-07-15 18:13:30 +03:00
Joni Vähämäki 39fa931012 EMI: Continuously update the look at vector when looking at an actor. 2014-07-05 14:14:53 +03:00
Joni Vähämäki 23a99a9f2b EMI: Implement head limits. 2014-07-02 22:43:58 +03:00
Joni Vähämäki 3adbd1fdcf EMI: Implement head tracking. 2014-07-02 22:43:50 +03:00
Joni Vähämäki 75184a30b1 EMI: Don't set global alpha to 0 when light mode is set to LIGHT_NONE.
Fixes sprites not appearing in various places. For example the lights on Stan's house now show up.
2014-06-22 14:19:53 +03:00
Joni Vähämäki 72a7f7c1b0 EMI: GetActorPuckVector should return nil for actors that have never followed walkboxes.
In Lua, The wear chore of dumbshadow.cos is only started if GetActorPuckVector returns a non-nil value. In the original game GetActorPuckVector seems to always return nil until a call is made to SetActorFollowBoxes.

This fixes the candles not appearing in the set gmi. The original Lua code only starts the candle animation if the candle actor is not playing any chores. Previously the wear chore of dumbshadow.cos was playing, so the animation was never started.
2014-06-22 14:19:52 +03:00
Joni Vähämäki 360c6ee95f EMI: Implemented SetActorLighting. 2014-06-16 15:42:25 +03:00
Joel Teichroeb 0f3da43694 GRIM: Change NULL to nullptr. 2014-05-30 17:43:08 -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 c0c80e0624 EMI: Fixed talk chore index 0 being ignored by SetActorTalkChore. 2014-05-31 02:51:53 +03:00
Joni Vähämäki f151ce8e2d EMI: Fade chores if PlayChore/StopChore specifies a fade time. 2014-05-31 02:51:45 +03:00
Joseph Jezak josejx@gentoo.org d98282e6cc EMI: Add a stopWalking() call to ActorStopMoving. Fixes #880. 2014-05-25 21:00:42 -04:00
Joseph Jezak josejx@gentoo.org ed44e64369 EMI: Allow actors to be hidden by a call to set_wear_chore(nil). 2014-04-06 17:50:31 -04:00
Pawel Kolodziejski 8759900b6a ALL: synced with ScummVM 2014-04-05 18:18:42 +02:00
Joni Vähämäki e7f895e248 EMI: Allow StopChore without fade time parameter. 2014-03-26 18:52:02 +02:00
Christian Krause b35bdd2ddf EMI: Don't stop looping chores in StopAllChores
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
2014-02-21 20:13:11 +01:00
Christian Krause 446f56eb67 GRIM/EMI: Fix compile warnings 2014-02-15 18:40:19 +01:00
Christian Krause 71a44ba28a Merge pull request #797 from chkr-private/collision-fixes
Collision fixes
2014-01-14 14:48:52 -08:00
Christian Krause d5a1b77852 EMI: Fix costume unloading
- 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
2014-01-11 17:30:25 +01:00
Christian Krause 967d0b0589 EMI: Minor refactoring for setting chores and costumes
Refactor some repeated code blocks into a single function.
2014-01-08 23:19:46 +01:00
Christian Krause 5a65ffd470 EMI: Unload the active costume once a different is set
- 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
2014-01-08 23:19:46 +01:00
Christian Krause f856f2341e EMI: Don't load a costume if a "nil" chore is set
Don't call findCostume for "nil" chores to avoid loading the costume
indirectly via findCostume even if it is not needed.
2014-01-08 23:19:46 +01:00
Christian Krause ce9239412d EMI/GRIM: Implement collision handling for EMI
- for solving the Monkey Kombat puzzle it is necessary that a kombat is
  triggered when Guybrush runs into one of the monkeys on the map
- implement SetActorCollisionMode and SetActorCollisionScale
- add EMI-specific calculations for retrieving the sphere data for the
  actors (and some minor refactoring for better readability)

The following changes may alter the behaviour in GRIM, too:
- in Actor::collisionHandlerCallback(), call the collision handler for
  both affected objects (that is necessary since only one actor may have
  a collision handler associated in lua but it may happen that the
  character with the handler is standing still and the other one is run
  into him)
- Actor::handleCollisionTo() did only update a given position to ensure
  that there is no collision - so it is necessary to actually check for
  collisions and execute the lua callback if necessary (via
  Actor::handleCollisionWith())
2014-01-07 03:21:52 +01:00
Christian Krause 4b0129e6de EMI: invalidate sortorder after detaching actors
- the order of the active actors is based on the effective sort order
  which is based on the sortorder of actors itself but also on the
  attached actors
- invalidate the sortorder also when detaching actors
- this fixes two glitches in the final end scene (guybrush is still
  displayed after falling from the cliff and monkey robot is drawn in
  the foreground)
2013-12-29 13:33:00 +01:00