Commit graph

39 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
af37825be3
ENGINES: Replace PixelBuffer with Surface 2021-11-27 20:14:44 +01:00
Cameron Cawley
757a819da9 GRIM: Remove unneeded use of Graphics::createPixelFormat 2021-06-24 11:55:54 +02:00
Vincent Pelletier
2490cb986f EMI: Reuse existing variable 2017-05-15 10:31:25 +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
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
56e13b52ca EMI: Use half-transparent plane to implement dimScreen (OpenGL)
- instead of re-calculating the color values when dimming the screen,
  better draw a half-transparent plane after drawing all non-overworld
  characters
- fixes the issue that overworld actors were dimmed and that the
  pause screen is transparent when the inventory is open
2014-09-13 10:43:33 +02:00
Joseph Jezak
68bf45f373 EMI: Additional conversions from interest/roll to _rot. 2014-08-19 21:15:18 -04:00
Joni Vähämäki
1a038315e4 EMI: Compare the camera-space Z coordinates of actors instead of their Euclidean distance to the camera. 2014-08-14 18:00:00 +03:00
Joni Vähämäki
a5745f1554 EMI: Sort actors by id if distance is equal. 2014-08-12 23:52:15 +03:00
Joni Vähämäki
baa760d00a EMI: If sort orders are equal, compare distance to camera. 2014-08-12 17:46:40 +03:00
Joel Teichroeb
265f62d3b3 GRIM: Fix build with GLES2 2014-07-28 15:20:57 -07:00
Christian Krause
1e82136592 EMI: Implement screenshot thumbnails for savegames 2014-07-16 23:18:43 +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
Joel Teichroeb
7df2d49dc5 EMI: Draw primitives last. Fixes #906 2014-06-05 07:50:49 -07: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
Ingo van Lil
4788a21e0a EMI: Improve pause handling
Both EMI and Grim call RenderModeUser when entering the menus or dialogs,
but EMI does not use special "blast" commands to display text or images,
so we cannot suspend regular screen updates. The current implementation
does not switch engine modes in RenderModeUser, which has the drawback
that the frame time is not stopped during pause or menu.

With this patch, EMI handles draw mode like normal mode with frozen frame
time.
2013-12-12 01:17:27 +01:00
Ingo van Lil
d947558987 EMI: Avoid deleting pool objects while iterating 2013-12-08 21:47:06 +01:00
Ingo van Lil
5d2e2240b7 EMI: Rework text stack handling
The text stack in EMI must be saved and restored in save games because
the game will call PopText after returning from the menu. Instead of
managing separate lists for each text stack level this patch adds a
_stackLevel field that is incremented for PushText and decremented for
PopText. Only text objects from the stack top (level 0) are rendered.
2013-12-01 23:45:07 +01:00
Christian Krause
f3c81da634 EMI: Fix color of menu entries
The highlighted menu entry is sometimes not correctly colored.
There are multiple textObjects per string (one for each color) and
residualvm draws them in an unspecified order.

To ensure that the correct textObject is drawn on top, each
object gets a layer attribute assigned by the lua code.

The patch adds the layer attribute to the runtime engine and orders the
textObjects by layer before drawing them.
2013-11-27 22:07:25 +01:00
Ingo van Lil
4509e4ff34 EMI: Return to original sort order when no sort plane is available
The floor in the Hall of Justice is hidden by a solid gray actor named
"trap plane". This actor is originally positioned far in the background
but moved to the foreground because we can't find a sort plane in the
sector.

This patch stores returns an actor to the original sort order set by
the game script when entering a sector that has no sort information.
2013-11-25 21:16:45 +01:00
Joel Teichroeb
92c48e6637 GRIM: const more paramiters 2013-10-25 07:48:27 -07:00
Andrea Corna
7cd733c901 EMI: Remove an header included twice 2013-09-28 18:21:39 +02:00
Andrea Corna
fcadc4af48 EMI: Add functions to handle saving preferences outside efmi.cfg and relative hooks in scripts 2013-09-10 00:00:24 +02:00
Andrea Corna
2cc500aad8 EMI: Split GrimEngine::getUpdateFilename into EmiEngine 2013-08-29 23:05:49 +02:00
Dries Harnie
7ae32ec8c4 EMI: Draw overworld actors separately 2013-07-29 22:02:43 +02:00
Joel Teichroeb
b96ea34a90 EMI: Preserve actor order within a sortorder when sorting 2013-07-29 08:29:50 -07:00
Joel Teichroeb
7d66ca8510 EMI: Rearrage a bit of code for drawing 2013-07-14 10:17:10 -07:00
Joel Teichroeb
7e87286cb8 EMI: Sort actors seperatly from invalidating the active actors list 2013-07-14 10:16:27 -07:00
Joel Teichroeb
3d1eb65b0c GRIM/EMI: Split out normal mode drawing in order to reduce complexity 2013-07-14 09:28:07 -07:00
Joel Teichroeb
2fe6e3f2a6 GRIM/EMI: Move lua creation into each engine class 2013-07-07 12:54:01 -07:00
Joel Teichroeb
1593fefb45 EMI: Add support for pushing and popping text objects 2013-07-07 12:39:58 -07:00
Joel Teichroeb
b27b14430d EMI: Add a EMIEngine subclass 2013-07-07 12:38:54 -07:00