Commit Graph
44 Commits
Author SHA1 Message Date
Paweł Kołodziejski 06902574b4 GRIM: Janitorial 2022-06-08 01:12:00 +02:00
Paweł Kołodziejski 18fb7e72d8 GRIM: Implemented Lua V1 'GetCameraLookVector' opcode 2022-06-05 22:16:42 +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
Vincent Pelletier 9bef2bd626 GRIM,EMI: SHADERS: Compute umbra angles cosine on set load instead of for each frame
Only benefits shaders renderer, as opengl/tinygl renderers leave such
details to the gl library.
Maintain saved-state compatibility by computing on restore.
2016-01-01 23:07:59 +01:00
Vincent Pelletier ea8245696b GRIM,EMI: Scale intensity on change instead of for each frame
Also uniformises intensity scaling factor implementation across renderers.
Maintain saved-state compatibility by computing on restore.
2016-01-01 23:07:59 +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
Joel Teichroeb 6a852161c7 Merge pull request #999 from JoseJX/Camera
EMI: Keep camera as a rotation matrix and add Lua functions for changing it.
2014-08-19 17:21:43 -07:00
Joseph Jezak 32a41525ee EMI: Implement Lua functions for getting camera rotation. 2014-08-19 18:35:32 -04:00
Joseph Jezak ff9f26981c EMI: Refactor to use a matrix for the camera. 2014-08-19 18:35:26 -04:00
Joni Vähämäki a37890b8f5 EMI: Get the sort order from the closest sector even if the current position is not contained within any sector.
This fixes Guybrush occasionally being visible through the buildings and foliage on Lucre island when walking at the edge of the walkable sectors. This happened because for positions at the edge of the walkable sector the method Sector::isPointInSector may not always return true.
2014-08-14 18:06:59 +03:00
Joni Vähämäki 09b062acdd EMI: Parse light name from shadow data. 2014-08-12 17:46:47 +03:00
Joni Vähämäki fe87ce80cf EMI: Initialize fields in Light and SetShadow. 2014-08-05 00:42:59 +03:00
Joni Vähämäki 8b754b0de5 EMI: Save and restore SetShadow data. 2014-08-02 20:43:02 +03:00
Joni Vähämäki 702bb8335c GRIM/EMI: Use Doxygen style for the comments. 2014-07-20 21:46:22 +03:00
Joni Vähämäki e5e05e1152 GRIM/EMI: Make Light and SetShadow structs instead of classes. 2014-07-20 21:46:21 +03:00
Joni Vähämäki 1081471119 EMI: Implement projection shadows. 2014-07-20 21:46:14 +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
Joseph Jezak josejx@gentoo.org 190dbfacb2 EMI: Load default room image when missing a background bitmap. Fixes #881. 2014-05-22 22:24:39 -04:00
Pawel Kolodziejski 8759900b6a ALL: synced with ScummVM 2014-04-05 18:18:42 +02:00
Christian Krause 98e1375763 EMI: Correct cacluation of sound position
In GRIM the position, direction and the roll of the camera is set via
gluLookAt but in EMI the camera is steady and its view is adjusted via
matrix rotations.

This patch adjusts the calculation for EMI and refactors the code to
do the calculation in the separate function Set::calculateSoundPosition.
That function will be used for implementing the positional sounds in
EMI.
2013-12-01 23:30:21 +01:00
Joel Teichroeb 03bfaf93f4 GRIM: Give LightType explicit values 2013-07-10 16:41:50 -07:00
Joel Teichroeb be41e30c00 GRIM: Make lights use an enum instead of checking against a string to get the type 2013-07-10 16:17:28 -07: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 a723b0e3f5 EMI: Draw background layers at intervals
Previously, we split the background layers into everything
before SO 15 and after, and drew like that. However, this caused
the pink ship in shi.setb to not be drawn.

This patch draws the layers of the background at intervals of ten.
So if a set has six layers, layer 5 is the background and 4,3,2,1,0
are rendered at sortorder 40,30,20,10,0.
2013-06-29 14:41:17 +02:00
Giulio Camuffo 1d5a5ede46 GRIM: Make the lights sorting stable. Fix #678 2013-01-14 22:32:27 +01:00
Giulio Camuffo d8d701c6dd GRIM: Implement Lua_V1::NextSetup and Lua_V1::PreviousSetup. 2013-01-08 22:10:41 +01:00
Giulio Camuffo 81ba83caa0 GRIMDEMO: Fix ObjectState creation. Fix #29 2013-01-08 21:30:14 +01:00
Giulio Camuffo 3b496abcb6 GRIM: Find the sector with the exact name in MakeSectorActive(). 2012-12-28 18:50:53 +01:00
Paweł Kołodziejski 175620b62a ALL: change license headers from LGPL to GPL, and few updates 2012-12-19 23:15:43 +01:00
Dries Harnie bde37f96a8 EMI: Over-draw some actors in Set::drawForeground
EMI draws portions of the background over actors
with sortOrder >= 15.
2012-11-26 02:08:58 +01:00
Joel Teichroeb 94aeca9663 GRIM: Remove tag from the pool template 2012-04-05 15:20:30 -07:00
Giulio Camuffo 0c68ad8a67 GRIM: Return the right sector in IsActorInSector(). Fix #538
There may be more than one sector that match the name wanted, so
we must push the one containing the actor position.
2012-02-19 16:08:01 +01:00
Giulio Camuffo 3344b3c756 GRIM: Setup the lights from the closest to the farthest to the actor position.
This way if OpenGL can't handle all the set lights it will use the most
important ones. Fix #481
2012-02-10 14:57:58 +01:00
Joel Teichroeb 7ff91c5817 GRIM: Various cleanups to code 2012-02-04 18:07:24 -08:00
Joel Teichroeb cd4adf5ac1 GRIM: Created a function out of some duplicated code 2012-02-02 12:18:11 -08:00
Joel Teichroeb a476452d6c GRIM: Move saving and loading code for Lights and Setups to their own functions 2012-01-19 14:19:36 -08:00
Paweł Kołodziejski e350c7f777 renames 2012-01-06 23:29:45 +01:00
Andrea Corna 23bc633f3a GRIM: Make Set and Sector load from a stream instead of a data Block 2011-12-30 17:17:08 +01:00
Giulio Camuffo a98c561668 GRIM: Do not create a new ObjectState if it exists already.
This way commit 075c1cae is practically reverted without reintroducing #296
and fixing #423. Fix #423
2011-11-19 19:31:32 +01:00
Giulio Camuffo 3193fec1e6 GRIM: Use a smart pointer to store objects that can be deleted behind our back. Fix #398 2011-10-29 15:13:39 +02:00
Giulio Camuffo 6a3dc3e9c8 GRIM: Turn off the lights of a set when changing it. 2011-10-18 18:01:52 +02:00
Giulio Camuffo 73684f1fbc GRIM: Rename Scene to Set, and scene.{h,cpp} to set.{h, cpp}. 2011-09-19 16:53:08 +02:00