2510 Commits

Author SHA1 Message Date
Christian Krause
6acf4984d0 GRIM/EMI: Use proper GL constants 2014-02-15 18:40:30 +01:00
Christian Krause
446f56eb67 GRIM/EMI: Fix compile warnings 2014-02-15 18:40:19 +01:00
Einar Johan Trøan Sømåen
cc2cc0fdf8 GRIM: Fix broken overriding functions play and loadFile in NullPlayer 2014-02-02 04:12:48 +01:00
Ingo van Lil
549225964a EMI: Use parent sort order for attached actors
When drawing attached actors the engine uses the parent's sort order
plus one. This offset can move the attached actor behind a background
plane, for instance the chess board in the Lucre docks or Guybrush when
riding the manatee.
2014-02-02 00:51:47 +01:00
Bastien Bouclet
0d194bd8ba BINK: Use the new audio track selection API 2014-01-26 09:43:21 +01:00
Pawel Kolodziejski
9098dfe9a2 ALL: sync with scummvm 2014-01-25 22:16:57 +01:00
Dries Harnie
ca20357bd5 GRAPHICS: Add shadow mode to grim actors [OpenGLS] 2014-01-23 20:03:22 +01:00
Dries Harnie
6c8a35e53b GRAPHICS: Transpose view/model matrices correctly 2014-01-23 20:03:21 +01:00
Dries Harnie
f618b90d31 GRAPHICS: Stencil for grim shadows [OpenGLS] 2014-01-23 20:03:21 +01:00
Joel Teichroeb
7cf3f2f99c GRIM: Add a constructor for Shadow
This lets us get rid of the loop in Actor and lets us ensure
that Shadow is initizlied even if constructed elsewhere.
2014-01-23 10:22:44 -08:00
Joel Teichroeb
91f4e2681b GRIM: Add a vertex buffer object for blast text drawing
This makes it so that we don't have to destroy the VBO
that a blast text object uses. This fixes what is probably
a driver bug with the windows nvidia drivers.
2014-01-17 09:48:09 -08:00
Joel Teichroeb
4af2b19577 GRIM: Initialize _userData in BitmapData and Mesh 2014-01-15 09:16:02 -08:00
Christian Krause
71a44ba28a Merge pull request #797 from chkr-private/collision-fixes
Collision fixes
2014-01-14 14:48:52 -08:00
Joel Teichroeb
9d4ba85cd9 Merge pull request #815 from chkr-private/costume-fixes
EMI: Fix costume unloading
2014-01-14 14:41:57 -08:00
Dries Harnie
3ab4fa601f GRAPHICS: Support Irises [OpenGLS] 2014-01-14 00:26:47 +01:00
Dries Harnie
85c94be5b5 JANITORIAL: Fix signed-unsigned warnings 2014-01-14 00:26:47 +01:00
Dries Harnie
583eafc2d6 GRAPHICS: Remove duplicate EBO [OpenGLS] 2014-01-14 00:26:44 +01:00
Dries Harnie
f4626819ce GRAPHICS: Disable lighting for now [OpenGLS] 2014-01-14 00:26:43 +01:00
Dries Harnie
3a9af2dabc GRAPHICS: Add support for Grim primitives [OpenGLS] 2014-01-14 00:26:43 +01:00
Dries Harnie
00e72387e0 GRAPHICS: Use RGBA for all textures [OpenGLS] 2014-01-14 00:26:43 +01:00
Dries Harnie
2313ce4fb0 GRAPHICS: Support sprites (WIP) [OpenGLS] 2014-01-14 00:26:39 +01:00
Dries Harnie
fa2077626d GRAPHICS: Screenshots and specialty textures [OpenGLS] 2014-01-14 00:26:39 +01:00
Dries Harnie
4157f52eb2 GRAPHICS: Drawing of actors [OpenGLS] 2014-01-14 00:26:39 +01:00
Dries Harnie
be53635c9a GRAPHICS: Loading and updating of GRIM/EMI models [OpenGLS] 2014-01-14 00:26:39 +01:00
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