Commit graph

313 commits

Author SHA1 Message Date
Filippos Karapetis
1921ebf02e ENGINES: Use C++ 11 range-based for loops 2025-03-27 13:47:57 +08:00
Filippos Karapetis
ac06a27c06 ENGINES: Define that a game is using 3D graphics on init - bug #15521 2024-11-22 10:30:08 +02:00
Filippos Karapetis
eb7b6b97e4 ENGINES: Use common GFX code for 3D games - fixes part of bug #14342
Now, when the launcher is in full screen, the game will also be in full
screen. However, when returning to the launcher, graphics are reset to
default with a setupGraphics() call. Thus, if the user hasn't selected
full screen display in the options, but only used alt-enter to change
the launcher to full screen, the launcher will return to window mode.
2024-11-19 20:37:00 +02:00
Martin Gerhardy
bf6bd39f69 ENGINES: moved scumm enhancements system into shared engine code 2024-10-21 03:15:13 +03:00
Le Philousophe
b07a9388a4 ENGINES: Remove now useless Engine::getMetaEngineDetection
This function assumes that the detection plugin is loaded alongside the
engine plugin.
2024-06-30 18:39:06 +02:00
Le Philousophe
2645b1431c PLUGINS: Rename findPlugin to findDetectionPlugin
This function does return a MetaEngineDetection plugin
2024-06-30 18:39:06 +02:00
Paul Gilbert
27ee3640af ENGINES: Purge any remaining events when quitting an engine 2024-05-04 15:54:23 -07:00
Paul Gilbert
895c665654 ENGINES: Re-apply Allow shouldQuit to return true immediately
This reverts the revert commit 09de1bbca8.
2024-05-04 15:53:39 -07:00
Le Philousophe
09de1bbca8 Revert "ENGINES: Allow shouldQuit to return true immediately"
This reverts commit 741620e4bc.

This commit breaks several engines like scumm and sword1 because they
call quitEngine function without polling the event loop afterwards.
Purging the event loop after the engine has finished would solve this,
but the EVENT_QUIT message is supposed to be processed while the engine
is still running to let user confirm the quit action (if the setting is
enabled).
2024-05-04 18:15:42 +02:00
Eugene Sandulenko
9a4ae29304
JANITORIAL: Fix typo in a comment 2024-04-01 15:54:21 +02:00
Eugene Sandulenko
828b501e41
ENGINES: Reset palette in the base Engline constructor
If some engine is using less that 256 colors, but in its graphics
there are references to higher colors (by whatever reasons), it may
stay unnoticed on platforms that reset newly allocated memory to 0,
e.g. Windows.

On other systems like Mac, it might lead to random graphics artefacts
difficult to reproduce, e.g. due to the uninited memory.

Also, when you return to launcher from an engine, our GUI is not setting
any palette, so even on Windows, the new engine will inherit whatever
palette was set.

This was caught in Loom Mac, which uses 16 colors. Text shadow was
suddenly white instead of black. Steps to reproduce: run samnmax,
load a saved game, return to launcher, run Loom Mac.

It was addressed in 43c3cc69c2, but
this change makes it generic.
2024-04-01 15:21:32 +02:00
Paul Gilbert
741620e4bc ENGINES: Allow shouldQuit to return true immediately
It's been a long time problem that calling quitGame
doesn't result in shouldQuit returning true until
after event processing has been done. This has resulted
in engines doing various hacks such as manually doing
an event loop, or maintaining their own quit flag.

This helps resolve the problem by additionally adding
a _quitRequested flag that's set when quitGame is called,
and additionally checking for it in shouldQuit()
2024-03-24 13:49:59 -07:00
Cameron Cawley
dce0f057ec COMMON: Optimize U32String::vformat a bit by appending chars instead of inserting them 2024-01-08 23:39:22 +01:00
Cameron Cawley
d5863dd513 ENGINES: Allow specifying a start position for initGraphicsAny() 2023-12-28 20:41:22 +02:00
Le Philousophe
645a35c05b ENGINES: Migrate to Path class 2023-12-24 13:19:25 +01:00
Le Philousophe
2f34975164 COMMON: Make shaders API use the Path class 2023-12-24 13:19:25 +01:00
Eugene Sandulenko
ec2dd2726b ENGINES: Added optional parameter to canSave/LoadGameStateCurrently() for indicating the reason 2023-12-08 12:21:16 +01:00
Eugene Sandulenko
1aaf997aac
ENGINES: Fix CID 1519034 warning 2023-09-19 15:36:33 +02:00
Jozen
33e6dfb84b ENGINES: Show splash screen on 3D engines 2023-09-04 21:36:13 +02:00
elasota
5b48ceb68a ENGINES: Initialize mixer volume levels to levels from config so engine isn't required to call syncSoundSettings at startup. 2023-04-09 12:56:22 +02:00
Kaloyan Chehlarski
48a387832d ENGINES: Correctly store extended save playtime
Changed the extended saves code so time is stored in milliseconds
instead of seconds. This fixes an issue where loading a save would
pass a playtime value of 1/1000 of the real playtime to the engine,
resulting in total playtime effectively being zeroed every time a
save is loaded.
Existing savefile compatibility is ignored since the value stored
inside old saves would be wrong for any savefile that has been
saved over more than once.
2023-03-26 13:24:31 +03:00
macca8
746665db63 ENGINES: Update autosave time before adjusting interval
Correctly adjusts interval until next autosave attempt to 5 minutes, regardless of user’s selected autosave interval.
2023-03-16 15:10:12 +01:00
macca8
d507ce499f ENGINES: Allow warning dialog to delete existing save file
Presents the autosave with an empty autosave slot after a successful move, or when the Delete option is chosen.
Avoids potential renaming issues for engines which may not allow an existing save file to be renamed.
2023-03-05 23:19:40 +01:00
Miro Kropacek
06c9928f3a COMMON: gfx_mode is not always propagated 2023-03-04 23:38:42 +01:00
Vladimir Serbinenko
90f8c24265 ENGINES: Allow to specify several supported resolutions
This is useful in order to fallback resolutions even if supported
resolution is not known at compile time.
2023-02-28 01:58:13 +01:00
Cameron Cawley
138a983d80 COMMON: Refactor VSync handling to match the other options 2023-01-16 18:09:53 +01:00
elasota
5aeaa1015e ENGINES: Fix warning about passing a non-trivial class to va_start. 2022-11-26 23:09:24 +02:00
Eugene Sandulenko
57cd169a17 GUI: Allow both scalers and shaders to be enabled at the same time 2022-10-08 23:39:18 +02:00
Eugene Sandulenko
80f79f253d GUI: Make shaders/scalers work mutually exclusive 2022-10-08 23:39:18 +02:00
Cameron Cawley
79fff69231 COMMON: Use Common::String for OSystem::setShader 2022-10-08 23:39:18 +02:00
Cameron Cawley
64c359b5cb GUI: Replace the options for selecting shaders 2022-10-08 23:39:18 +02:00
Le Philousophe
6d60f91bc8 Revert "ENGINES: Don't pass U32String by value"
This reverts commit 30d8b64657.
It fails on MSVC with error:
C2338    static_assert failed: 'va_start argument must not have reference type and must not be parenthesized'
2022-09-18 23:32:15 +02:00
Le Philousophe
0fbd85772d ENGINES: Initialize _metaEngine 2022-09-18 16:15:56 +02:00
Le Philousophe
30d8b64657 ENGINES: Don't pass U32String by value 2022-09-18 16:15:56 +02:00
SupSuper
af8e07b943 BACKENDS: Move isDataAndCDAudioReadFromSameCD() to AudioCDManager 2022-08-24 23:37:33 +03:00
Donovan Watteau
27f9a460b5 JANITORIAL: Fix "the the" and similar typos 2022-07-29 19:36:40 +03:00
athrxx
9b05c20699 COMMON: fix bug no. 13703 (KYRA: Legend of Kyrandia 3: Problem with autosave)
The warning message was only based on the description of the autosave file. And that description depended on the GUI language setting, since it is a string that gets translated.

Now we also query the _saveType that is set by the metaengine...
2022-07-16 01:08:51 +02:00
Cameron Cawley
60c7372198 OPENGL3D: Make use of the active rect provided by WindowedGraphicsManager 2022-06-18 19:33:27 +01:00
Thierry Crozat
b3e15d584e Engines: Properly initialize TTSManager for unsupported gamae dialogs
This fixes bug #11550: TTS: Language is wrong for unsupported game warning
2022-06-05 14:15:31 +01:00
Eugene Sandulenko
5e05f93f36
ALL: Remove Symbian port 2022-05-28 12:32:29 +02:00
athrxx
5cba8f9242 Revert "GUI: honor tts_enabled option in some more places"
This reverts commit 5969a2667a.
2022-04-26 21:08:41 +03:00
athrxx
5969a2667a GUI: honor tts_enabled option in some more places
(in particular when opening the GMM)
2022-04-10 19:00:35 +02:00
Orgad Shaneh
58cb82684d ENGINES: Fix re-autosave when the engine cannot save right now
_autosaveInterval is in seconds, but _lastAutosaveTime is in ms.

Reported by antoniou79.
2022-01-13 22:16:58 +02:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh
aa8cabd18f ENGINE: Suppress autosave overwrite warning when description is empty
Some engines (like kyra) return a SaveStateDescriptor with slot assigned,
even when the slot is free. The indication for an empty save is empty
description on these cases.
2021-11-24 09:07:03 +02:00
Torbjörn Andersson
513fffe950 SCUMM: Check for the appropriate audio tracks for indyzak and zakloom
The FM Towns demos use audio tracks, but neither have a track 1. This
caused ScummVM to warn that the audio tracks had not been properly
ripped from the CD.
2021-11-22 19:38:40 +02:00
Orgad Shaneh
b7413e9a42 ENGINES: Do not attempt autosave when the autosave slot is -1 2021-09-10 09:26:15 +03:00
Scott Percival
13a20e11e6 EVENTRECORDER: Disable autosave in record/playback mode 2021-09-09 19:32:02 +02:00
Thierry Crozat
ea4d2d55d2 ENGINES: Scale ScummVM spash on HiDPI screens 2021-09-08 22:22:23 +01:00
antoniou79
5f9b39e55b ENGINES: Fix autosave overwrite message
The message is formatted as U32String, and the argument is U32String so %S should be used.
2021-08-28 20:57:48 +03:00