3320 Commits

Author SHA1 Message Date
Pawel Kolodziejski
5c7fd27706 ALL: sync with ScummVM 2015-09-06 16:08:49 +02:00
Dries Harnie
c3b40cfe83 Merge pull request #1179 from Botje/side-textures
GRIM: Side texture support for the widescreen mod
2015-09-06 13:25:39 +02:00
Dries Harnie
ae4601c303 JANITORIAL: Code style fixes 2015-08-17 13:25:46 +02:00
Dries Harnie
73ef15d05f GRIM: Use system->suggestSideTextures 2015-08-17 13:25:46 +02:00
Dries Harnie
147ba6ecbb GRIM: Search for widescreen textures in widescreen directory 2015-08-17 13:25:46 +02:00
Dries Harnie
a07c8ce0ac GRAPHICS: Pass Graphics::Surface* to setSideTextures 2015-08-17 13:25:45 +02:00
Paweł Kołodziejski
0eb20ae8d5 Merge pull request #1177 from vpelletier/for_upstream
GRIM: Assorted lighting fixes
2015-08-16 08:53:18 +02:00
Pawel Kolodziejski
11b457122b ALL: synced with ScummVM 2015-08-16 08:49:02 +02:00
Matthew Hoops
fc33643a38 MYST3: Fix ambient table offsets for the 1.0 binaries 2015-08-16 08:00:49 +02:00
Dries Harnie
f7244925c3 GRIM: Enable side textures in postCamChangeHandler 2015-08-14 15:24:56 +02:00
Bastien Bouclet
aa316b9435 MYST3: Fix some warnings with clang
- Missing override qualifiers
- Unimplemented method declarations
2015-08-10 21:30:06 +02:00
Bastien Bouclet
58f8e6426a MYST3: Disable detection for the PS2 versions
The PS2 versions are not working at all. Furthermore,
the detection entries caused AdvancedMetaEngine to output
a misleading error message when the game executable cannot
be found.
2015-07-12 19:55:59 +02:00
Kirben
0872f730eb GRIM: Add Italian Windows demo of Grin Fandango 2015-07-08 16:12:22 +10:00
Kirben
3c08924136 GRIM: Add Spanish Windows demo of Escape from Monkey Island. 2015-07-06 14:59:40 +10:00
Kirben
15654d99a7 GRIM: Add Spanish Windows demo of Grim Fandango. 2015-07-06 13:57:22 +10:00
Dries Harnie
36c8b3d2d5 GRAPHICS: Move common OpenGL files into graphics/opengl 2015-05-27 10:08:25 +02:00
Bastien Bouclet
8e54a010b4 MYST3: Remove usage of Desktop specific GL features in GLES2 mode
- GL_UNPACK_ROW_LENGTH can only be used when extension GL_EXT_unpack_subimage is available
- GL_UNSIGNED_INT_8_8_8_8_REV does not exist in GLES2
2015-05-26 21:25:01 +02:00
Bastien Bouclet
317cdc55a7 Merge branch 'myst3-xbox' 2015-05-26 21:03:51 +02:00
Bastien Bouclet
23b40041ad MYST3: Filter save files accoring to the platform 2015-05-26 21:03:43 +02:00
Bastien Bouclet
ea3fcdd96f MYST3: Implement dragging using the gamepad
Used in the Xbox version menus
2015-05-26 21:03:43 +02:00
Bastien Bouclet
402517fbee MYST3: Turn some platform checks into generic checks 2015-05-26 21:03:43 +02:00
Bastien Bouclet
b900deb530 MYST3: Play the Xbox version introduction videos 2015-05-26 21:03:36 +02:00
Christian Krause
c4282b96dd Merge pull request #1194 from chkr-private/emi-chore-fixes
EMI: Keep time of chores and animations in sync
2015-05-19 22:28:03 +02:00
Christian Krause
bbc0e53837 Merge pull request #1189 from chkr-private/animation-fixes
EMI: Start animation when "Loop" key is set
2015-05-19 21:48:22 +02:00
Christian Krause
b186c21f85 EMI: Fix wrap around of Layers/Frames
This patch makes sure, that Layer::_frame is smaller than numLayers
of the bitmap in order to prevent out-of-bounds access to
BitmapData::_layers.
2015-05-16 10:39:08 +02:00
Christian Krause
d8ef15acc2 EMI: Keep time of chores and animations in sync
Both the animation components/tracks and the chores itself keep track of
the current time independently:

animation component:
- AnimationStateEmi::_time
- initialized with 0
- after the first update() call, _time is advanced by the frametime

chores:
- Costume::_currTime
- initialized with -1
- during the first update() call, _currTime is set first to 0
- during the next update() call, _currTime is advanced by the frametime

EMICostume::update() updates first the chore and then all components
with the same frame time. This has the effect, that the internal time
base of the chore and the animation has always an initial offset (the
value of the frametime of the first update() call).

For some costumes, the chore will pause the animation by setting the
according key for that animation at the end of the animation. However,
since the animation component has a different time base, it has already
reached that point and may have already disabled itself entirely
(instead of just being paused by the chore).

This bug fix let the animation set _time to 0 in the first update() call, too.
Any consecutive update() call will advance the time by the frametime.
This will keep the two time bases of the chore and the animation component
in sync.
2015-05-15 21:26:01 +02:00
Dries Harnie
fb3bd8139a JANITORIAL: Fix Coverity warnings
Fixes coverity warnings 1267220, 1256936, 1229470, 1224097, 1219766,
1054364, 1009896.
2015-05-12 08:49:19 +02:00
Dries Harnie
5c813a8b64 GRAPHICS: Only manually pull pointers if USE_GLEW not defined 2015-05-11 16:57:05 +02:00
Christian Krause
be771ab454 EMI: Correct draw order of textobjects
Instead of just ordering the textobjects by their layer, use their
creation time (indirectly provided by the pool ID which is continuously
counting up).

This ensures that if there are multiple textobjects with the same text
ID and the same layer, that the latest is drawn last and overwrites the
previous ones.

That's necessary since the LUA code will create multiple instances of
the same textobject for the color fading effect in the credits.
2015-05-09 16:32:26 +02:00
Christian Krause
f7a5e8ad15 Merge pull request #1192 from chkr-private/layer-fixes
Implement drawing of dynamically created layers
2015-05-09 16:28:05 +02:00
Vincent Pelletier
4239446a70 GRIM: SHADERS: Use non-zero constant attenuation.
This is consistent with OpenGL default value for GL_CONSTANT_ATTENUATION.
2015-05-06 19:49:43 +02:00
Vincent Pelletier
faad6a1fe3 GRIM: Disable quadratic attenuation for spotlights.
Enabling quadratic atenuation, even with values as low as 0.1, reduces spot
lighting too much in (at least) sets "do" (see Domino), "al" (see Manny when
walking along the garage door), "hq" (see Salvador).
Disabling is not perfect either, as attenuation can be seen (at least) in
set "tu" (see fire extinguisher), but it should be overall better.

Also, it should be noted that perfect fidelity cannot be achieved with openGL
fixed pipeline, as DirectX spotlight have two angles (0 <= phi <= theta <= pi),
atenuation being null below phi, full above theta, transitioning with a
configurable exponent between both (defaults to angle-linear). OpenGL would
correspond to phi=0 and theta=pi (ie, transition is always done between fixed
angles), plus a configurable hard cutoff.
2015-05-06 19:49:42 +02:00
Vincent Pelletier
351a4efa8a GRIM: Tweak attenuation.
Determined by enabling a single omnidirectional light (newlight9 in set
"ce", which stands at set entrance toward elevator) and comparing
luminosity level on Manny at several locations in that scene with original
software renderer.
This set is quite convenient for this comparison, as Manny position can be
easily controlled: stick to the wall with the red arrow pointing at the
stairs, making movements one-dimensional.

For spotlight, set "tu" was used with the single spotlight on, walking
from the fire extinguisher to server door, confirming similar attenuation.

From these tests, it seems only quadratic attenuation is used, which makes
sense as it gives a realistic effect.
2015-05-06 19:49:42 +02:00
Vincent Pelletier
06e7aa68b0 GRIM: Correct diffuse reflectance.
Determined by keping a single directional light source enabled, as they are
not subject to attenuation (having no position), and comparing with
original software renderer.
Default DirectX material reflects all diffuse light, so 1.0f coefficient is
likely correct.
2015-05-06 19:49:42 +02:00
Vincent Pelletier
f36d2b62f8 GRIM: Drop TinyGL-only intensity divisor.
Also, divide intensity once instead of once per component.
2015-05-06 19:49:42 +02:00
Vincent Pelletier
5c0d8ae30e GRIM: Set correct cutoff angle now that TinyGL renders spots correctly.
Also, set (T)GL_SPOT_EXPONENT as in OpenGL renderer.
2015-05-06 19:49:42 +02:00
Vincent Pelletier
6e996d145b GRIM: Disable specular lighting.
My initial idea that GRIM would use specular likely came from a difference
between DirectX and OpenGL lighting for spotlights: DirectX allows for an
extra penumbra angle, allowing stronger center spots while maintaining a
smooth fade (which I emulated with a fixed 2.0 exponent).
Also, specular involves an extra light color value and material definition
for specular reflection, which are not visible in game data files.
All this making the use of specular very unlikely to match original renderer.
2015-05-06 19:48:18 +02:00
Christian Krause
2fece8b8d7 EMI: Enable drawing of dynamic Layer objects
This patch enables drawing of Layer objects which are
dynamically created by LUA code.

All three sorted lists (background images, layers and actors) are
merged based on their sort-order.
2015-05-05 23:31:20 +02:00
Christian Krause
06df5f599f EMI: Layer::getSortOrder can be called in const context 2015-05-05 23:27:23 +02:00
Christian Krause
e77b5f46b1 GRAPHICS: Allow tiles with just one sub-image
Remove an error() call in BitmapData::loadTile when the number
of sub-images is smaller than 5. The code can handle such
bitmaps/tiles already.
2015-05-05 23:23:41 +02:00
Christian Krause
09bb2d7b0d EMI: Fix sanity check in Lua_V2::SetLayerSortOrder
Correct typo in sanity check and add an error message for
wrong parameters.
2015-05-05 23:22:42 +02:00
Christian Krause
d7e7ee214d GRAPHICS: Enable drawing of bitmaps/tiles with just one sub-image
Instead of using the number of sub-images to decide whether bitmaps
should be drawn using TIL information, better use the existance
of texture coordinates which are distinctive for tiles.
2015-05-05 23:19:16 +02:00
Dries Harnie
a518480359 GRIM: Fix abs->fabsf compiler warning 2015-05-05 18:37:30 +08:00
Einar Johan Trøan Sømåen
11ca8cca47 Merge pull request #1184 from vpelletier/controls
GRIM: Exit input handling after processing alt-return combo.
2015-05-03 16:08:47 +02:00
Christian Krause
409a6f7b95 EMI: Start animation when "Loop" key is set
This fixes the problem if the costume uses only key 3 ("Loop") but not
key 1 ("Play") for an animation. This happens e.g. for Pegnose's "run" chore.
2015-05-03 03:31:08 +02:00
Dries Harnie
9f6697227e EMI: Move GetSphereInfo warning to Actors channel 2015-04-28 17:01:37 +02:00
Dries Harnie
1d715329c2 Merge pull request #1187 from chkr-private/opengls-emi-fixes
GRAPHICS: Set uniform parameters for _spriteProgram
2015-04-28 16:57:55 +02:00
Dries Harnie
4955a71424 Merge pull request #1188 from chkr-private/opengls-fixes
GRAPHICS: Remove unused shader uniform variables
2015-04-28 16:52:15 +02:00
Christian Krause
a2e1c64d36 Merge pull request #1176 from chkr-private/screen-texture-lighting-fixes
EMI: Check bit in mesh face flags to disable lighting
2015-04-27 22:21:03 +02:00
Christian Krause
c2060b1649 GRAPHICS: Set uniform parameters for _spriteProgram
Set the uniform parameter for _spriteProgram
since they are needed by emi_actor.{fragment,vertex}
in drawSprite().
2015-04-27 21:46:16 +02:00