Commit graph

461 commits

Author SHA1 Message Date
Martin Gerhardy
f2c9137979 COMMON: removed foreach.h
now that we are using c++11 we don't need this wrapper anymore
2023-01-07 02:40:44 +02:00
Donovan Watteau
27f9a460b5 JANITORIAL: Fix "the the" and similar typos 2022-07-29 19:36:40 +03:00
Paweł Kołodziejski
822d2e5319
GRIM: Added safety check. Make easier to debug 2022-06-18 21:09:43 +02:00
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
Paweł Kołodziejski
c66ca22cbb
TINYGL,GRIM: Replace custom shadows to stencil buffer solution 2021-12-10 18:37:24 +01:00
Orgad Shaneh
d1b35d26fc GRIM: Add isRemastered convenience function to engine 2021-11-02 10:23:17 +01:00
Orgad Shaneh
a05e54f00c JANITORIAL: Remove trailing whitespaces 2021-05-04 11:46:30 +03:00
Christian Krause
ab828f3f3c GRIM: gracefully handle critical floating point operations 2020-12-08 19:35:54 +01:00
Paweł Kołodziejski
6e619ca714 GRIM: Merge branch 'remastered' 2020-10-07 18:26:49 +02:00
Vincent Pelletier
bad3de8a12 GRIM: Drop off-screen buffers
These were present to implement actor freezing in software rendering mode
in the way original engine was intended for performance reason.
In residualvm, software rendering will generalise the principle through
dirty-rectangles management, so off-screen buffers should not be needed.

Also, properly implementing them requires invasive changes (move previous
draw call list from global OpenGL context to individual off-screen buffers,
along with associated linear vertex allocator, adding a new draw call to
track requested buffer changes until final on-screen frame buffer
presentation).
So instead of such added complexity, lie to lua API about actor not being
in set but keep it in so it is part of normal redraw sequence.

Fixes disappearing actors in cn, bi.
Likely also fixes at, ly, sh, mn, dd which uses free/thaw lua API, but
which I did not check.
2017-05-02 09:51:47 +00:00
Paweł Kołodziejski
18fc8cb336 Merge pull request #1257 from vpelletier/drop_setuptexture
GRIM,EMI: Drop Grim::Component::setupTexture
2016-07-14 09:52:46 +02:00
Bastien Bouclet
14b5763408 GRIM: Fix memory leaks related to EMI models 2016-07-12 06:16:36 +02:00
Vincent Pelletier
6519558046 GRIM,EMI: Drop Grim::Component::setupTexture
This method is never implemented, so drop its declaration and callers.
2016-07-05 23:13:11 +00:00
Dries Harnie
9f6697227e EMI: Move GetSphereInfo warning to Actors channel 2015-04-28 17:01:37 +02: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
Einar Johan Trøan Sømåen
00cc0ad867 Move the handling of language-prefixes to GrimEngine, and let Actor atleast ask for the correct voice file. 2015-02-03 14:08:03 +01:00
Pawel Kolodziejski
7a252183dc GRIM: fixed issue #1069 2014-12-28 00:04:24 +01:00
Joel Teichroeb
943ee12926 GRIM: Add sector null check. Fixes #1134 2014-12-26 08:42:45 -08:00
Christian Krause
8011a6a1e3 Merge pull request #1121 from chkr-private/dart-player-fixes
EMI: Fix stuck dart players
2014-11-30 21:48:25 +01:00
Christian Krause
5df7e5991d EMI: Fix semantic of IsActorTurning() LUA call
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.
2014-11-30 21:24:04 +01:00
Christian Krause
ce3d8bd81d EMI: Use static lights for overworld actors
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.
2014-11-22 16:58:43 +01:00
Joel Teichroeb
f832487ce4 GRIM: Only check collision on setPos in EMI
Fixes #1115
2014-11-07 20:40:15 -08:00
Christian Krause
268466bad6 GRIM/EMI: Handle special case in Actor::walkForward()
The walk chore of the monkey bot is simulating
a robotor-like walking style by setting _walkRate to
0.0f repeatedly. This prohibits walking forward
which results in stopping the walk chore eventually.

To avoid the walk chore in this case to stop, assume that
the actor has walked when calling Actor::walkForward() with
a _walkRate of 0.0f.
2014-11-04 21:01:33 +01:00
Christian Krause
b8cef18377 GRIM/EMI: Check for collissions in setPos
- check for collissions in setPos(), too
- the boats in EMI's lava puzzle need collission handling,
  but they are moved solely via putActorAt
2014-10-19 01:21:34 +02:00
Pawel Kolodziejski
e42d28ec2c GRIM/EMI: workaround for compilation error 2014-09-20 16:35:43 +02:00
Joseph Jezak
e34d0ddba3 MATH: Replace Quaternion XYZ with Euler. 2014-09-11 13:38:30 -04:00
Joseph Jezak
99fa91053c MATH: Rename XYZ Rotation Functions to Euler to better describe the function. 2014-09-11 13:38:28 -04: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
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
Joel Teichroeb
2303407c48 Merge pull request #1076 from JoseJX/FixAttachDetach
EMI: Rework attaching and detaching.
2014-09-03 11:04:46 -07:00
Joseph Jezak
aa1977618a EMI: Add stop turning to actor methods. 2014-08-26 13:36:07 -04:00
Joseph Jezak
00003a7fdb EMI: Rework attaching and detaching. 2014-08-26 13:32:40 -04:00
Joel Teichroeb
9c54ff5795 Merge pull request #1053 from Akz-/emi-shadow-fixes
EMI: Shadow fixes
2014-08-23 21:44:51 -07:00
Joel Teichroeb
e24829711b Merge pull request #1036 from Akz-/emi-lav-restore-fix
EMI: Decrease the iterator position when a material is erased from the material list.
2014-08-19 18:42:24 -07:00
Joni Vähämäki
7225f842b4 EMI: Don't do null check for current costume in lookAtRate setter and getter. 2014-08-20 01:37:32 +03:00
Joni Vähämäki
f015d8dc0b EMI: Modify the current costume instead of the last costume on the stack. 2014-08-20 01:37:31 +03:00
Joni Vähämäki
f464a8a90f EMI: Push dumbshadow.cos to the back of the costume stack like any other costume.
The order of the costumes no longer matters. This also fixes a fairly common crash when saving the game.
2014-08-20 01:37:30 +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
0bd258be1d EMI: Return the first costume that has a model component in Actor::getCurrentCostume. 2014-08-20 01:36:32 +03:00
Joni Vähämäki
6b1eb0ec4e EMI: Free costumes once all chores have finished. 2014-08-20 01:36:31 +03:00
Joel Teichroeb
e77f599f1c Merge pull request #1026 from Akz-/emi-sortorder-fix
EMI: Sort order fixes
2014-08-19 15:22:13 -07:00
Joni Vähämäki
3648da8934 EMI: Increase MAX_SHADOWS from 5 to 8. 2014-08-19 15:44:36 +03:00
Joni Vähämäki
c893447ba0 EMI: Decrease the iterator position when a material is erased from the material list. 2014-08-17 19:58:11 +03:00
Joni Vähämäki
a37890b8f5 EMI: Get the sort order from the closest sector even if the current position is not contained within any sector.
This fixes Guybrush occasionally being visible through the buildings and foliage on Lucre island when walking at the edge of the walkable sectors. This happened because for positions at the edge of the walkable sector the method Sector::isPointInSector may not always return true.
2014-08-14 18:06:59 +03:00
Joni Vähämäki
b8ab52d06f GRIM/EMI: Do not do 3D positioning for voices. 2014-08-14 17:51:06 +03:00
Joni Vähämäki
de049e0eaf EMI: If a sort order is specified for an actor that is attached to another, use the specified sort order instead of the parent's one. 2014-08-12 17:46:36 +03:00
Joni Vähämäki
963ce52902 EMI: Only update sector sort order if the actor is following walkboxes. 2014-08-10 18:51:37 +03:00
Joel Teichroeb
67440488ff Merge pull request #964 from JoseJX/FixTextPositions
EMI: Correct problems with text positions and word wrapping.
2014-08-06 09:51:58 -07:00