Commit Graph

524 Commits

Author SHA1 Message Date
Paweł Kołodziejski
06902574b4
GRIM: Janitorial 2022-06-08 01:12:00 +02:00
Paweł Kołodziejski
25b50c058e
GRIM: Fixed compilation 2022-06-05 22:46:34 +02:00
Paweł Kołodziejski
74e5684257
GRIM: Added Lua V1 'GetCameraPosition' opcode 2022-06-05 22:14:43 +02:00
Paweł Kołodziejski
526a08263a
GRIM: Added lua function stubs used by game 2022-01-16 12:51:32 +01:00
Paweł Kołodziejski
2065fd9d0b EMI: Improve check for followed walkboxes for Actor.
This eliminate return nil by GetActorPuckVector() when it shouldn't.
Script Lua function "find_stair_chore" is not expecting nil and will throw error.
2022-01-06 16:23:13 +01: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
Paweł Kołodziejski
af37825be3
ENGINES: Replace PixelBuffer with Surface 2021-11-27 20:14:44 +01:00
Orgad Shaneh
fd4d6e3bc0 GRIM: Use override
Using clang-tidy modernize-use-override
2021-11-14 14:34:14 +02:00
Orgad Shaneh
ee57380de7 ENGINES: JANITORIAL: Remove 'virtual' when override is specified 2021-11-14 14:32:04 +02:00
Thunderforge
35c3668275 COMMON: Fixing misspellings "occured" -> "occurred"
Fixing this misspelled word across multiple parts of the codebase.
2021-09-25 21:36:42 +03:00
Max Horn
445fe63524 GRIM: fix global constructor warnings
Since now `_musicTable` always points to a an array allocated
via `new[]`, we can also simplify the `EMISound` destructor.
2021-08-07 10:46:14 +02:00
Max Horn
b7e6d61669 JANITORIAL: Fix compiler warnings about unused code 2021-08-07 10:46:14 +02:00
Cameron Cawley
757a819da9 GRIM: Remove unneeded use of Graphics::createPixelFormat 2021-06-24 11:55:54 +02:00
Orgad Shaneh
a05e54f00c JANITORIAL: Remove trailing whitespaces 2021-05-04 11:46:30 +03:00
Eugene Sandulenko
5e7fe2dc57
JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02: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
Eugene Sandulenko
a312ddce78 GRIM: Fix typo in error message 2020-10-12 13:13:34 +02:00
Pawel Kolodziejski
490bedb584 ALL: Fixed some compiler warnings while using c++11 2020-09-25 18:51:18 +02:00
Pawel Kolodziejski
d5304e2568 ALL: Synced with ScummVM - rev: 33a47d23b8 2020-09-03 02:21:14 +02:00
Dries Harnie
f393929c6f EMI: Always enable subtitles for the demo
Fixes #1161.
Tested on the German and Spanish demo.
2020-05-17 13:49:54 +02:00
Mathias Parnaudeau
a8e8b71550 EMI: Check _musicTable is null before it is used
After having installed EMI data and started the game, if we are in the situation
where it is asked to rename resource file FullMonkeyMap.imt from both CDs
into FullMonkeyMap1.imt and FullMonkeyMap2.imt, the game tries to start but
leads to an immediate segmentation fault.

In EMISound::setMusicState, _musicTable is checked againt nullptr but ... after
it is used. This check is moved up.
2020-02-21 07:11:56 +01:00
Dries Harnie
74a8f2d09c EMI: Support merged FullMonkeyMap.int as well 2019-05-13 20:55:21 +02:00
Bastien Bouclet
23339184ce GRIM: Clean up float data loading 2018-04-14 11:49:35 +02:00
Bastien Bouclet
6708f19a50 GRIM: Fix invalid ADGF_DEMO flag usage 2017-07-26 20:12:35 +02:00
Vincent Pelletier
2490cb986f EMI: Reuse existing variable 2017-05-15 10:31:25 +00: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
Vincent Pelletier
66d24776ec EMI: Directly use converted buffer
Data is already converted to the correct format by copyBuffer, so write
it directly to save file.
This fixes save game screenshots taken with TinyGL renderer: Bitmap
constructor calls graphic driver's createBitmap method, and TinyGL's
converts the buffer to its own buffer pixel format - undoing the conversion
storeSaveGameImage did just before.
2017-04-26 13:11:00 +00:00
Bastien Bouclet
14b5763408 GRIM: Fix memory leaks related to EMI models 2016-07-12 06:16:36 +02:00
Bastien Bouclet
f31ef249ba GRIM: Only request actual save slots in listSaves and lua. 2016-01-31 07:02:02 +01:00
Pawel Kolodziejski
5c7fd27706 ALL: sync with ScummVM 2015-09-06 16:08:49 +02:00
Pawel Kolodziejski
11b457122b ALL: synced with ScummVM 2015-08-16 08:49:02 +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
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
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
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
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
Christian Krause
a8460f4f3f EMI: Check bit in mesh face flags to disable lighting
Use bit 0x20 in the mesh face flags to disable ligthing. This
fixes the problem that once a previous screen is used as
texture (e.g. in the intro or for the transition effects
in set kab when walking eastwards or westwards), it is shown
too dark due to the applied static lighting for overworld
actors.
2015-02-24 22:49:48 +01: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
David Cardwell
9b1bbd61dc EMI: Change the file-extension of PS2 saves
Prevent conflicts with incompatible save files by changing the
file-extension of PS2 saves to “*.ps2”.
2015-02-14 14:18:09 -05:00
David Cardwell
3952fda0e3 EMI: Append filename to PS2 saves
Append “.gsv” to filenames so that ResidualVM’s load screen will show
them.  However, the description text is internal names such as
“/txtsavwed/“.
2015-02-14 14:18:09 -05:00
David Cardwell
c2d0941890 EMI: Allow saving in-game on the PS2 version
Change the memory card id and the reported free space so that the game
is able to save.
2015-02-14 14:18:09 -05:00