2636 Commits

Author SHA1 Message Date
Dries Harnie
ad64bdcbf6 GRAPHICS: Background drawing [OpenGLS] 2014-01-14 00:26:39 +01:00
Dries Harnie
b8a4b1acc6 GRAPHICS: Support Smush [OpenGLS] 2014-01-14 00:26:39 +01:00
Dries Harnie
141cc5a42b GRAPHICS: Text drawing [OpenGLS] 2014-01-14 00:26:39 +01:00
Dries Harnie
f2ff416c5d GRAPHICS: Emergency font [OpenGLS] 2014-01-14 00:26:39 +01:00
Dries Harnie
5da8aa7144 GRAPHICS: Introduce GfxOpenGLS 2014-01-14 00:26:39 +01:00
Bastien Bouclet
a0a8939f49 MYST3: Make sure to use the shortest direction when animating
Thanks klusark for noticing the issue in TOHO 5
2014-01-12 19:36:45 +01:00
Bastien Bouclet
434cb0859a MYST3: Add support for the 1.2 NL version
Botje's version
2014-01-12 14:28:55 +01:00
Joel Teichroeb
47ed5f883c Merge pull request #816 from chkr-private/sector-fixes
EMI/GRIM: Allow integer arguments for MakeSectorActive
2014-01-11 18:42:46 -08:00
Joel Teichroeb
850f576082 Merge pull request #812 from chkr-private/sprite-fixes
EMI/GRIM: Fix unaligned sprites
2014-01-11 18:35:39 -08:00
Christian Krause
928f41c914 EMI/GRIM: Allow integer arguments for MakeSectorActive
The first argument of MakeSectorActive can be either a string or a
number. If a number is used by the lua call lua_isstring will also return
true (see engines/grim/lua/lapi.cpp) and so the correct code which
handles the integer case is never called.

This patch reverses the order of the tests via lua_isstring and
lua_isnumber.

In EMI this fixes the following:
- big monkey head on Monkey Island stays open even after set or setup
  change
- the lights in the bank on lucre island stay off until Guybrush turns
  them on
- shadow of Pegnose's nose is visible in close-up camera view
2014-01-12 01:34:38 +01:00
Christian Krause
3f7d7df273 EMI/GRIM: Fix unaligned sprites and use correct axis
When an actor which is drawn using sprites moved due to water float
effects and if that actor uses multiple sprites, then these sprites are
not aligned (e.g. in the very first scene, the ship in the background is
not shown as one piece).

That is because the sprites are first rotated and then moved to
the correct position. It is necessary to first move them to their
correct position on the actor and then rotate the whole actor.

Additionally, non-overworld sprites needs to be rotated by the Yaw axis.
Otherwise the ship did not rock but only moved vertically.

This changes fixes:
- the ship in the background in the first scene
- the clock hands in the swamp
2014-01-11 23:58:49 +01: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
Ingo van Lil
f106a2a8b9 GRIM/EMI: Fix sprite scaling with non-native screen resolutions
When mapping a sprite to a GL polygon its dimensions are scaled by the ratio
between the current screen resolution and the native game resolution. When
the polygon is rendered it is scaled again, causing sprites to be displayed
unproportionally big when using larger screen resolutions.
2014-01-09 23:32:47 +01:00
Christian Krause
4a3d380e1d Merge pull request #810 from chkr-private/smush-movie-issue
EMI/GRIM: TextSplitter::checkString should ignore case
2014-01-08 15:34:16 -08:00
Christian Krause
58aa7f9651 EMI/GRIM: TextSplitter::checkString should ignore case
All other methods of TextSplitter ignore the case: the strings of the
splitted text are changed to lowercase and other strings provided via
arguments are compared case-insensitive.
2014-01-08 23:56:53 +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
Kirben
987c5f5f80 BUILD: Fix 32bit compilation. 2014-01-09 09:12:20 +11:00
Einar Johan Trøan Sømåen
c28426600e GRIM: Reduce scope of variable "version" in SmushDecoder 2014-01-07 18:33:56 +01:00
Einar Johan Trøan Sømåen
1348540dee GRIM: Use initializer list for _fname in TextSplit 2014-01-07 18:27:37 +01:00
Einar Johan Trøan Sømåen
c4e4528a31 GRIM: Initialize more members in Layer's default constructor 2014-01-07 12:38:20 +01:00
Einar Johan Trøan Sømåen
20809707ab GRIM: Initialize more members in Costume's constructor, and move _fname initialization to initalizer list. 2014-01-07 12:36:16 +01:00
Einar Johan Trøan Sømåen
acf7d8ef0c GRIM: Initialize BitmapData's _fname in initializer-list 2014-01-07 12:33:41 +01:00
Einar Johan Trøan Sømåen
d992b0759d GRIM: Initialize more members in Font's constructor 2014-01-07 12:32:04 +01:00
Einar Johan Trøan Sømåen
578bb14474 GRIM: Reduce scope of a few variables in MaterialData::initEMI 2014-01-07 12:29:41 +01:00
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