Commit Graph
60 Commits
Author SHA1 Message Date
Martin Gerhardy f2c9137979 COMMON: removed foreach.h
now that we are using c++11 we don't need this wrapper anymore
2023-01-07 02:40:44 +02:00
Paweł Kołodziejski 06902574b4 GRIM: Janitorial 2022-06-08 01:12:00 +02:00
Paweł Kołodziejski 20cb0ae228 ALL: Cleanup ResidualVM -> ScummVM 2021-12-26 21:19:38 +01:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Paweł Kołodziejski 9ae57ad4c1 GRIM: EMI: Use new math vector and matrix multiplication 2021-12-26 18:45:59 +01:00
Paweł Kołodziejski 4d62b275e0 GRIM: EMI: Replace function with simple math operation 2021-12-26 16:47:50 +01:00
Orgad Shaneh a05e54f00c JANITORIAL: Remove trailing whitespaces 2021-05-04 11:46:30 +03:00
Christian Krause ab828f3f3c GRIM: gracefully handle critical floating point operations 2020-12-08 19:35:54 +01:00
Laurent Merckx 741cd5ddc7 GRIM: use GL_UNSIGNED_SHORT for glDrawElements instead of GL_UNSIGNED_INT (not supported for GLES <= 2) 2020-11-12 05:58:36 +01:00
Bastien Bouclet 23339184ce GRIM: Clean up float data loading 2018-04-14 11:49:35 +02:00
Vincent Pelletier 84f83fe6ea ALL: Rename get_float to READ_LE_FLOAT
For consistency with other functions/macros from common/endian.h .
2017-05-12 13:57:16 +00:00
Bastien Bouclet 14b5763408 GRIM: Fix memory leaks related to EMI models 2016-07-12 06:16:36 +02:00
Christian Krause 6d226501b5 EMI: Implement mesh-specific alpha values
- if Lua_V2::SetActorGlobalAlpha() is called with a mesh name,
  set a mesh-specific alpha value / mode
- use this alpha value in drawEMIModelFace()
- fixes the problem that the whole actor vanishes in some scenes
  (e.g. when entering or leaving the porch of the of LUA bar)
2015-02-17 01:57:07 +01:00
Christian Krause ce3d8bd81d EMI: Use static lights for overworld actors
Overworld actors, e.g. the load/save menu or the inventory wheel
should not use the lights of the current scene for lighting.

This fixes the bug that the screenshots of the load menu
were dimmed to various levels depending on the current scene.
2014-11-22 16:58:43 +01:00
Joseph Jezak c0a598e7ad EMI: Remove clamping from prepareTextures. 2014-08-16 19:41:27 -04:00
Christian Krause 4204b2649c EMI: clamp specialty textures
The specialty textures which are used in the intro need to be clamped
to avoid dark lines between the tiles.
2014-08-14 02:59:00 +02:00
Joni Vähämäki 8d3ef741cd EMI: Print information to debug channel if an unknown sprite or texture flag is encountered. 2014-08-12 17:46:51 +03:00
Joni Vähämäki 18df8a29f8 EMI: Disable lighting for actors that have lightMode == LightNone in OpenGLS. 2014-08-12 17:46:49 +03:00
Joni Vähämäki 9a87fa5d51 EMI: Parse per-texture blending mode from model data. 2014-08-12 17:46:42 +03:00
Joseph Jezak 60fa48490e EMI/GRIM: Rename getBoundingBoxPos to getScreenBoundingBox to better describe the behavior. 2014-07-30 15:23:53 -04:00
Christian Krause 1e82136592 EMI: Implement screenshot thumbnails for savegames 2014-07-16 23:18:43 +02:00
Joni Vähämäki 88ec1d5285 EMI: Implement lighting for OpenGL Shaders renderer. 2014-07-05 14:09:56 +03: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 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 a539832c78 Merge pull request #910 from JoseJX/FixGLTextureParams
EMI: Clamp sprites, repeat other textures.
2014-06-20 08:30:44 -07:00
Joseph Jezak df3d63fc24 EMI: Add support for clamping sprite textures and repeating other textures. 2014-06-18 22:19:42 -04: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 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 af7bc0679c EMI: Use a hash map for joint lookup by name. 2014-06-15 03:13:29 +03:00
Joel Teichroeb 0f3da43694 GRIM: Change NULL to nullptr. 2014-05-30 17:43:08 -07:00
Pawel Kolodziejski 8759900b6a ALL: synced with ScummVM 2014-04-05 18:18:42 +02:00
Christian Krause 71a44ba28a Merge pull request #797 from chkr-private/collision-fixes
Collision fixes
2014-01-14 14:48:52 -08: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 d8d9614baa EMI: Separate radius and center for mesh collision sphere 2013-12-22 03:20:56 +01:00
sietschie 98e9b41010 EMI: Implement GetBoundingPos for EMIModel
Added the ability to compute the bounding boxes of models so that the
text can be correctly placed near the actors.
2013-12-10 17:19:07 +01:00
Dries Harnie df481915f8 EMI: Add GfxBase::updateEMIModel 2013-11-05 07:30:02 -08:00
Dries Harnie d97ff82dea GRAPHICS: CreateModel in GfxBase 2013-11-05 07:29:40 -08:00
Einar Johan Trøan Sømåen fe3883cecd GRIM: Reformat code to be closer to convention. 2013-07-09 21:12:55 +02:00
Dries Harnie 71c2e44983 EMI: Read binary data in little-endian format 2013-06-04 21:21:26 +02:00
Dries Harnie 636a858ae5 EMI: Remove unused EMIModel::_bones 2013-06-04 20:29:10 +02:00
Einar Johan Trøan Sømåen ccce470e9c GRIM/EMI: Initialize and delete _boneNames. 2013-04-21 14:54:18 +02:00
Paweł Kołodziejski 175620b62a ALL: change license headers from LGPL to GPL, and few updates 2012-12-19 23:15:43 +01:00
Joel Teichroeb 233566c615 GRIM: Fix a few small type warnings 2012-11-18 12:14:51 -08:00
Dries Harnie ae24f4f8bb EMI: Don't allow setTex with out of range index 2012-09-01 17:32:55 +02:00