2510 Commits

Author SHA1 Message Date
Einar Johan Trøan Sømåen
d489dd937d GRIM: Set _filename by initializer-list in Model.cpp 2014-01-07 12:27:18 +01:00
Einar Johan Trøan Sømåen
0e67c0191a GRIM: Initialize members in Blocky16's constructor. 2014-01-07 12:26:17 +01:00
Einar Johan Trøan Sømåen
e0348758f2 GRIM: Initialize members in Blocky8's constructor 2014-01-07 12:19:47 +01:00
Einar Johan Trøan Sømåen
bf47bfca37 GRIM: Initialize _currentActor in GfxTinyGL. 2014-01-07 11:52:51 +01:00
Einar Johan Trøan Sømåen
f6fbe8c966 GRIM: Change iterator ++ to prefix ++ in pool.h 2014-01-07 11:49:31 +01:00
Einar Johan Trøan Sømåen
710deb613f GRIM: Change iterator ++ to prefix in lang_filter. 2014-01-07 11:47:56 +01:00
Einar Johan Trøan Sømåen
245ba3aa06 GRIM: Reduce scope of some variables in ChangeTextObject 2014-01-07 11:46:15 +01:00
Einar Johan Trøan Sømåen
bf49a3145d GRIM: Rename members in PatchR to follow convention better. 2014-01-07 11:29:26 +01:00
Einar Johan Trøan Sømåen
3c20a3422f GRIM: Initialize more members in Patchr's constructor. 2014-01-07 11:23:50 +01:00
Einar Johan Trøan Sømåen
8fd38d3762 GRIM: Initialize more members in MSCab's constructor 2014-01-07 11:19:58 +01:00
Einar Johan Trøan Sømåen
d741e0c1a5 GRIM: Initialize more members in Set's default constructor 2014-01-07 11:17:25 +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
Einar Johan Trøan Sømåen
af029e7a1d GRIM: Initialize more members in GfxBase's constructor. 2014-01-06 19:55:47 +01:00
Christian Krause
16eeb0c27e Merge pull request #802 from chkr-private/smush-movie-subtitles
EMI: implement SMUSH movie subtitles
2014-01-05 04:20:12 -08:00
Christian Krause
19b08f6fb3 EMI: implement subtitle support for SMUSH videos 2014-01-05 12:58:41 +01:00
Christian Krause
ff930b84de EMI: use enableSubtitles parameter of StartMovie lua function 2014-01-05 12:58:19 +01:00
Bastien Bouclet
6357534ed0 MYST3: Add JPEG as a dependency 2014-01-01 14:57:48 +01:00
Ingo van Lil
8e0cbb9651 EMI: Reset sort order when changing sets
Some sets (e.g. the big monkey's engine room) set Guybrush's sort order
to a large value, causing him to become invisible in other places. This
patch resets the sort order for all actors when switching to a new set.
2013-12-30 11:17:14 +01:00
Einar Johan Trøan Sømåen
c66b1b4c27 Merge pull request #794 from inguin/emi-walkto
GRIM/EMI: Ignore Actor:walkTo() if destination is unreachable
2013-12-29 08:26:43 -08: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
Ingo van Lil
82b3aa7a81 EMI: Ignore Actor:walkTo() if destination is unreachable
The path to the Curch of LeChuck has bogus coordinates as out point, so
the game will walk Guybrush to an invalid position when entering that
set. This patch will detect when no path can be found to the destination
position and ignore the walkTo() request in that case.

The behavior for Grim is unchanged in order to avoid the risk of breaking
the game. If the warning is never triggered the distinction can be removed.
2013-12-28 16:18:53 +01:00
tombsar
8503f7766e GRIM: Fix misplaced override specifier in costumeemi.cpp 2013-12-28 14:39:00 +00:00
Joel Teichroeb
9b1b336a7b GRIM: Fix the stuffit include to be relitive to the project 2013-12-23 16:49:46 -08:00
Ingo van Lil
a55c57d2ba EMI: Store active texture index for materials 2013-12-24 00:50:26 +01:00
Ingo van Lil
3efbe58ebf EMI: Store materials in costume, not in mesh
When multiple meshes in an EMI costume use the same material each will have
its own Grim::Material instance. If a material used by multiple meshes is
changed by a texi chore the instances will become inconsistent.

With this patch materials are managed by the costume, and there will only
be one instance of each reference material.
2013-12-24 00:50:13 +01:00
Ingo van Lil
68e4f8c572 EMI: Mangle filename when searching for shared material 2013-12-24 00:50:13 +01:00
Christian Krause
20ac34b7d7 Merge pull request #793 from chkr-private/pause-handling
EMI: fix pause handling
2013-12-23 15:28:59 -08:00
Christian Krause
187d34d319 EMI: fix pause handling
On vista point it may happen that two sequences for the rock landings
are executed at the same time. Although they intend to be locked via
pause_scripts(), changing the set will call unpause_scripts() and unlock
all of them.

The patch will use the optional parameter for (un)pause_scripts() to
determine whether the pause calls should be counting (e.g. when
switching a set or opening the inventory) or not.
2013-12-24 00:14:49 +01:00
Joel Teichroeb
ba0ccb602d Merge remote-tracking branch 'inguin/emi-overworld' 2013-12-23 06:39:55 -08:00
Joel Teichroeb
836efc25d0 Merge remote-tracking branch 'inguin/emi-fixes' 2013-12-23 06:39:41 -08:00
Joel Teichroeb
123c3f24a0 Merge remote-tracking branch 'inguin/emi-freeze-frame' 2013-12-23 06:39:30 -08:00
Ingo van Lil
c5a20438ce EMI: Fix rotation of overworld actors 2013-12-22 22:49:50 +01:00
Christian Krause
a5fb089bee EMI: Fix various movies
- several movies (e.g. at the boulder puzzle on vista point)
  were not played

- enhance search for BINK header (some movie files don't have a
  SMUSH header and for others the movies starts at a higher position in
  the stream)
2013-12-22 20:38:03 +01:00
Ingo van Lil
ea6ffdb934 EMI: Flip y coordinate when creating screenshot textures
The MakeScreenTextures() opcode is used to create texture tiles from the
current screen content for use with an overworld actor, e.g. when fading over
the slides in the intro. With OpenGL the created textures were mirrorered in
y direction because OpenGL uses a different coordinate system where (0, 0)
is the bottom left corner.
2013-12-22 20:11:39 +01:00
Ingo van Lil
d8d9614baa EMI: Separate radius and center for mesh collision sphere 2013-12-22 03:20:56 +01:00
Ingo van Lil
bf1e83deaa EMI/GRIM: Nothing should be visible if actor is not in current set
When fiddling with the controls in the Palace of Prosthetics Guybrush is
temporarily put into set "nil". No items should be visible to him in this
situation.
2013-12-22 02:05:16 +01:00
Dries Harnie
9edcb2fd67 JANITORIAL: Add FIXME about refactoring cf. #789 2013-12-17 01:09:18 +01:00
Dries Harnie
180b4659b9 Merge pull request #789 from sietschie/master
EMI: Place text when actors talk
2013-12-16 16:05:12 -08:00
sietschie
d06762ec52 EMI: removed unnecessary comments, made getBoundingBox const 2013-12-12 14:46:53 +01:00
Einar Johan Trøan Sømåen
a11670047a EMI: Apply alpha when drawing sprites.
This fixes the health bars in Monkey Kombat.
2013-12-12 03:36:21 +01:00
Einar Johan Trøan Sømåen
2cee5eb06c Merge pull request #784 from inguin/emi-pause-scripts
GRIM/EMI: Count pause/unpause calls of LUA scripts
2013-12-11 16:30:47 -08:00
Einar Johan Trøan Sømåen
e843d7855b Merge pull request #775 from inguin/emi-pause
EMI: Improve pause handling
2013-12-11 16:26:09 -08:00
Ingo van Lil
4788a21e0a EMI: Improve pause handling
Both EMI and Grim call RenderModeUser when entering the menus or dialogs,
but EMI does not use special "blast" commands to display text or images,
so we cannot suspend regular screen updates. The current implementation
does not switch engine modes in RenderModeUser, which has the drawback
that the frame time is not stopped during pause or menu.

With this patch, EMI handles draw mode like normal mode with frozen frame
time.
2013-12-12 01:17:27 +01:00
Ingo van Lil
d2aa15a30f EMI/GRIM: Handle normal mode and draw mode in separate virtual methods. 2013-12-12 01:17:27 +01:00
Ingo van Lil
9c044de7b6 GRIM/EMI: Stop frame time while debugger is open. 2013-12-12 01:16:57 +01:00
Einar Johan Trøan Sømåen
db365269bf Merge pull request #777 from chkr-private/costume-and-chore-sound-fixes
EMI: various costume and sound fixes
2013-12-11 16:16:18 -08:00
Christian Krause
469d1297e6 EMI: Fix costume handling
If a costume is not found in the existing costume stack of an actor,
try to load it via actor->pushCostume().
2013-12-12 01:10:12 +01:00
Christian Krause
9ebb158744 EMI: Fix format string of debug output 2013-12-12 01:10:12 +01:00
Christian Krause
41e6ed50fb EMI: Stop all PoolSounds when changing the set
- this fixes the problem that the fish sound was continuing
even after leaving the water without catching any of the fish
2013-12-12 01:10:11 +01:00
Christian Krause
645955f0f7 EMI: Fix VimaTrack::isPlaying() 2013-12-12 01:10:07 +01:00