5003 Commits

Author SHA1 Message Date
Joseph Jezak
55f77fb92f EMI/GRIM/MYST3: Replace some Quaternions with Rotation3D. 2014-06-23 09:24:26 -04:00
Joseph Jezak
76d36f676b MATH: Add a selectable Euler Order to Rotation3D. 2014-06-23 09:04:25 -04:00
Joseph Jezak
35462205aa MATH: Fix indentation for matrix4. 2014-06-23 09:04:07 -04:00
Joel Teichroeb
54b245f171 Merge pull request #941 from Akz-/emi-savecrash-fix
GRIM/EMI: Always initialize the fields of BitmapData
2014-06-22 09:55:24 -07:00
Joni Vähämäki
6fa4b66aa7 EMI: Initialize _texc, _verts and _layers in the constructor of BitmapData. 2014-06-22 17:49:35 +03:00
Joni Vähämäki
3232b9cb4d EMI: Draw model faces with alpha textures also to the depth buffer. Fixes #874 2014-06-22 14:19:56 +03:00
Joni Vähämäki
83ed05c269 EMI: Read vertex color values from sprite files.
This makes the coals in wed more transparent, matching the original game better.
2014-06-22 14:19:56 +03:00
Joni Vähämäki
59e60654f8 EMI: Add support for additively blended sprites. 2014-06-22 14:19:54 +03:00
Joni Vähämäki
75184a30b1 EMI: Don't set global alpha to 0 when light mode is set to LIGHT_NONE.
Fixes sprites not appearing in various places. For example the lights on Stan's house now show up.
2014-06-22 14:19:53 +03:00
Joni Vähämäki
72a7f7c1b0 EMI: GetActorPuckVector should return nil for actors that have never followed walkboxes.
In Lua, The wear chore of dumbshadow.cos is only started if GetActorPuckVector returns a non-nil value. In the original game GetActorPuckVector seems to always return nil until a call is made to SetActorFollowBoxes.

This fixes the candles not appearing in the set gmi. The original Lua code only starts the candle animation if the candle actor is not playing any chores. Previously the wear chore of dumbshadow.cos was playing, so the animation was never started.
2014-06-22 14:19:52 +03:00
Kirben
bbf1843b73 BUILD: Engine data and theme files are in Windows executable. 2014-06-22 14:05:02 +10:00
Christian Krause
2ef86c624e Merge pull request #933 from chkr-private/sprite-fixes
EMI: Various Sprite/Texture fixes
GRIM/EMI: Cleanup
2014-06-22 02:23:03 +02:00
Christian Krause
58833e15f0 EMI: Change frustum parameters for Overworld actors
- lower the distance to the near plane of the frustum for Overworld
  and change the other parameters accordingly

- this makes the following actors visible:
 - background of directions to Pegnose Pete's house (issue #869)
 - Murray in the murray_go easter egg
 - the trophies during the diving contest (upper left corner)
 - the screenshots for the save games (still with the wrong texture)
2014-06-21 23:59:07 +02:00
Christian Krause
bf8501fd37 EMI: Clear depth buffer before starting to draw the Overworld
- all actors of the Overworld should cover any non-Overworld drawings
- Overworld actors need to use the depth buffer so that e.g. the
pause screen is drawn above the inventory

- this fixes issue #927 (inventory is drawn above background of pause
  or menu screen)
2014-06-21 23:59:07 +02:00
Christian Krause
ec43bc6755 GRIM/EMI: Cleanup
- add override to overridden functions
- make sure that all overridden functions are virtual
- make local functions protected
2014-06-21 23:59:04 +02:00
Joel Teichroeb
3cfccc39bb GRIM: Set g_grim to nullptr in the deconstructor 2014-06-21 00:08:10 -07:00
Pawel Kolodziejski
029e04c859 DEBIAN: disable enabling shaders for now 2014-06-21 07:26:25 +02:00
Joel Teichroeb
854618ae0f EMI: Remove doublefreeing of materials.
I think there are cases where things are not all freed, but something else
is going wrong causing issues here.
2014-06-20 15:15:40 -07:00
Joel Teichroeb
f106e23a21 GRIM/EMI: Do not check if _chores is null as it does not matter 2014-06-20 11:00:49 -07:00
Joel Teichroeb
a6a2cb71d4 EMI: Free more memory properly 2014-06-20 11:00:44 -07:00
Joel Teichroeb
bdfea0265b Merge pull request #932 from Akz-/emi-skinning-fix
EMI: Fix vertex skinning
2014-06-20 08:40:08 -07:00
Joel Teichroeb
21115e35da Merge pull request #930 from Akz-/grim-shadows-fix
GRIM: Shadow fixes
2014-06-20 08:38:23 -07:00
Joel Teichroeb
a539832c78 Merge pull request #910 from JoseJX/FixGLTextureParams
EMI: Clamp sprites, repeat other textures.
2014-06-20 08:30:44 -07:00
Christian Krause
1fb3b5df4b GRIM/EMI: fix compiler warning
- remove unused variable
2014-06-19 23:57:14 +02:00
Joseph Jezak
df3d63fc24 EMI: Add support for clamping sprite textures and repeating other textures. 2014-06-18 22:19:42 -04:00
Joel Teichroeb
c053a68807 EMI: Allow nil to be passed to volume in PlayLoadedSound 2014-06-16 20:19:12 -07:00
Joni Vähämäki
911ee12d23 EMI: Allow vertices to be associated with multiple joints. 2014-06-17 03:49:28 +03:00
Joni Vähämäki
350d916670 MATH: Make inverseTranslate and inverseRotate methods of Matrix4 const. 2014-06-17 03:47:50 +03:00
Joel Teichroeb
11c65aeab2 Merge pull request #907 from somaen/fixPS2Audio
EMI: Make SCXTrack behave like MP3Track in regards to isPlaying
2014-06-16 16:24:12 -07:00
Joel Teichroeb
d4f6d70522 Merge pull request #883 from JoseJX/FixPPH
EMI: Fix sector names that are substrings - Fixes #873
2014-06-16 10:54:48 -07:00
Joel Teichroeb
6ad4b70d84 Merge pull request #926 from Akz-/pathfind-fix
GRIM/EMI: Pathfinding fixes
2014-06-16 10:54:01 -07:00
Joel Teichroeb
e827d87173 Merge pull request #920 from Akz-/emi-lighting-rebase
EMI: Implement lighting for OpenGL and TinyGL renderers
2014-06-16 10:39:36 -07:00
Joni Vähämäki
07009b7dad EMI: Preserve light color when clamping to [0-1] range.
This makes the light color match the original more closely. The effect of this can be seen for example on Otis' shirt in set mel as well as on the contract on Elaine's table in set gmi.
2014-06-16 16:19:22 +03:00
Joni Vähämäki
647458a6d0 EMI: Avoid square root in light distance check. 2014-06-16 15:42:27 +03:00
Joni Vähämäki
690845515e EMI: Precompute the vector of enabled lights and the hasAmbient flag. 2014-06-16 15:42:26 +03:00
Joni Vähämäki
360c6ee95f EMI: Implemented SetActorLighting. 2014-06-16 15:42:25 +03:00
Joni Vähämäki
b5cdd1240f EMI: Only draw models for actors inside the view frustum.
This adds math classes for doing frustum culling in software. These could be used for optimizing performance in many other places as well. For example, if an actor is outside the view frustum, it may not be necessary to do expensive keyframe animation and vertex skinning calculations for that actor.
2014-06-16 15:42:18 +03:00
Joni Vähämäki
8f9f541f17 EMI: Implemented dynamic lighting for models.
Lighting is done by calculating vertex colors in software, since the attenuation model used in EMI cannot be simulated with OpenGL fixed function lighting. The original game does the lighting this way as well. Ideally for the modern shader-based renderer a shader would be used for this instead.
2014-06-16 15:41:06 +03:00
Joni Vähämäki
c3bcfbb87b GRIM: Test model center position instead of origin in shouldDrawShadow. Fixes #741 2014-06-16 15:24:46 +03:00
Joni Vähämäki
cd47ccb50c GRIM: Use exact string search when searching for shadow sectors.
Fixes shadows in set st.
2014-06-16 15:24:45 +03:00
Joel Teichroeb
29ddd3b3e9 Merge pull request #911 from Akz-/emi-save-animation
EMI: Save/restore fixes
2014-06-15 09:04:02 -07:00
Joni Vähämäki
f3af129711 GRIM/EMI: The walk destination may reside in multiple sectors, so don't choose a single end sector.
This fixes Elaine walking through Guybrush at the end of the first cutscene in the set gme.
2014-06-15 13:32:16 +03:00
Joni Vähämäki
fa6ffcb46e GRIM/EMI: Always walk towards the target position in a straight line if possible. 2014-06-15 13:32:16 +03:00
Joni Vähämäki
db5a91bcb1 MATH: Return false in intersectLine2d if lines do not intersect. 2014-06-15 13:32:15 +03:00
Joni Vähämäki
4cfa9eb5a1 GRIM/EMI: Remove bridge length check. 2014-06-15 13:32:14 +03:00
Tobias Pfaff
3ec234757f GRIM/EMI: Fix bridge height check. See #842 2014-06-15 13:31:54 +03:00
Joel Teichroeb
8488cf35ca Merge pull request #923 from Akz-/emi-anim-perf
EMI: Animation performance optimization
2014-06-14 18:27:52 -07:00
Joni Vähämäki
d9a8ecb7e2 EMI: Fix compatibility with older savegames. 2014-06-15 03:17:23 +03:00
Joni Vähämäki
3316420448 EMI: Save and restore chore instance IDs.
Previously chore instance IDs stored as Lua userdata became invalid after
loading a save, because the chores were recreated with different IDs. This
caused certain opcodes like StopChore to fail.
2014-06-15 03:17:13 +03:00
Joni Vähämäki
b6b7b51528 MATH: More efficient matrix multiplication implementation for 3x3 and 4x4 matrix specializations. 2014-06-15 03:13:40 +03:00