Commit Graph

571 Commits

Author SHA1 Message Date
Le Philousophe
4113d2a3e6 CGE2: Don't pass the engine object to EncryptedStream
It doesn't need it and when linked with detection and with UBSan enabled
build fails because CGE2Engine isn't linked in
2022-01-03 14:44:03 +02:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh
7f476c844f CGE2: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Orgad Shaneh
fe104cc337 ENGINES: Use MetaEngine consistently for getting autosave slot
The autosave refactoring that was done in
7adad5aaf5 used g_engine for identifying the
autosave slot. This worked for in-game save/load, but doesn't fit when
called from the launcher.

Fix by passing MetaEngine to SaveStateDescriptor ctor and using it for this
query.

Amends 7adad5aaf5.
2021-10-24 16:46:06 +02:00
trembyle
d915b804ac CGE2: Add detection for Sfinx Lite (demo)
Found on CD-ACTION (Poland) #21a Feb 1998.

From SFINX.TXT:
Przedstawiamy gre SFINX Lite, która jest grywalnym demem gry SFINX.

Translation:
We present the game SFINX Lite, which is a playable demo of the game
SFINX.
2021-09-19 14:52:46 +02:00
Coen Rampen
36d395b2d1 CGE2: Stop current SFX before loading a new one
When loading a sound effect, the engine would deallocate the memory for the
currently playing sound effect, and stop playback afterwards. This commit
changes this to stop playback first, and then deallocate and load the new
sound effect.

This should fix the problem with the mixer accessing deallocated memory
reported in issue #12852.
2021-08-31 23:31:54 +02:00
Orgad Shaneh
7adad5aaf5 ENGINES: Streamline auto-save write/delete protection
Some engines call setAutosave and some don't. isAutosave is used to
determine if a saved game is an autosave, but in fact, on most cases it
just falls back to comparing the name to "Autosave".

This is wrong for several reasons:
* Older versions of ScummVM used Autosave 0.
* The name "Autosave" is translated, so if you change the language, it
  won't be detected.

Instead of relying on the name, use the well-known getAutosaveSlot() from
Engine/MetaEngine.

Fixes #12735.
2021-08-23 13:34:35 +02:00
Max Horn
2f1f8f502e DEVTOOLS: move credits from devtools/credits.pl to engines
This employs a "lazy" approach: the "format" for the credits stays
exactly as it was, i.e., perl code. Of course one may want to change
this to another format (e.g. YAML, JSON, XML; or also shell script or
AWK, like `configure.engine` uses). But I deliberately kept it simple,
to get a minimal change that is easy to verify. Any further changes to
e.g. the format can be layered atop this.
2021-08-05 00:01:46 +02:00
taylorzhancher
d3dd051e91
CGE2: Adding TTS feature 2021-07-26 12:35:27 +01:00
Thierry Crozat
fc024141b7 CGE2: Fix heap buffer overflow
This was reported by address-sanitizer.
When the command is kCmdGhost, the Sprite pointer is not a valid
sprite, and trying to access its content causes a buffer overflow.
In normal usage it was not causing issues as while it reads some
random values in memory, this was then ignore.
2021-07-21 22:30:37 +01:00
sluicebox
8e1d90f8e4 ALL: Remove clearAllDebugChannels() from Engine dtors 2021-06-14 12:42:38 -05:00
ysj1173886760
7af3a3f84c ENGINES: introduce ADDectedGameExtraInfo to ADGameDetector, add extra info as parameter for fallback detect. 2021-06-13 14:15:45 +02:00
ysj1173886760
b2f5ee4ab9 CGE2: move debug channels to metaEngineDetection 2021-05-22 01:34:57 +02:00
Eugene Sandulenko
5e7fe2dc57
JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
SupSuper
b6d9b187d0 CGE2: Make sure to stop playing sounds before freeing resources 2021-04-01 23:25:43 +03:00
Orgad Shaneh
e64570f6c3 CGE2: Remove trivial copy ctor and copy assignment operator 2021-03-15 13:26:32 +02:00
D G Turner
b378d19fad CGE2: Fix GCC Warning for Implicit Copy Operator
This is emitted when -Wdeprecated-copy is enabled. The fix implemented
is to implement the copy operator as per the expected default.

This has the advantage of working with compilers prior to C++-11.
2021-03-14 14:23:17 +00:00
sluicebox
93eeffc84d JANITORIAL: Update old bug tracker numbers 2021-03-03 02:15:05 +02:00
Cameron Cawley
4ced49acd4 ENGINES: Changed AdvancedMetaEngine::createInstance to return a Common::Error 2020-12-04 20:57:14 +00:00
Eugene Sandulenko
09249f7ef2 CGE2: Use AD_ENTRY2s in detection table 2020-11-28 13:45:22 +01:00
Eugene Sandulenko
7ff34bc9ec PLUGINS: MetaEngineStatic -> MetaEngineDetection 2020-10-11 23:14:39 +02:00
Eugene Sandulenko
7ea6781043 PLUGINS: PLUGIN_TYPE_METAENGINE -> PLUGIN_TYPE_ENGINE_DETECTION 2020-10-11 23:12:32 +02:00
aryanrawlani28
d26bbe521c ENGINES: ALL: Finish renaming ME & AME classes
- ME -> MetaEngineStatic (static parts)
- MEC -> MetaEngine (dynamic parts)
2020-10-03 14:56:36 +02:00
aryanrawlani28
29ceb07959 ENGINES: ALL: Revert detection submodule to be directly present in the engine directory
- DETECT_OBJS are present and added inside an engine's modules.mk file.
2020-10-03 14:56:36 +02:00
aryanrawlani28
8189a05316 ENGINES: ALL: Adapt to changes for new plugins by defining a new detection module
For each engine:
- Make a new folder detection
- Move detection-related files inside the folder
- Add a new module "enginename/detection"
- Add DETECT_OBJS here
- Adjust the normal engine module to remove detect_objs
- Adjust every file for the new changes.
2020-10-03 14:56:36 +02:00
aryanrawlani28
4ef8eab545 CGE2: Split detection code & adapt to new plugins. 2020-10-03 14:56:36 +02:00
Bastien Bouclet
0f2c6cd9ea ENGINES: Change mac resource fork file detection to use the file cache
Common::MacResMan is now able to open files from a specified
Common::Archive. This is a bit hacky as dynamic_cast is used to break
the Archive encapsulation to retreive the underlying FSNode. It should
however be more correct than the previous code that assumed files were
at the root of the currently running game's path.

AdvancedDetector constructs a Common::Archive from its FileMap based
filesystem cache and uses it to detect the mac resource fork files.

This cuts the time it takes to run the detection code with all the
engines enabled as dynamic plugins on the 3DS to 30 s from 280 s.
2020-09-20 16:33:45 +02:00
Eugene Sandulenko
fe0193b914 JANITORIAL: Remove unndeded "common/translation.h" include 2020-08-27 20:26:45 +02:00
mataniko
581a6ec7d6 JANITORIAL: Rename kSupportsRTL to kSupportsReturnToLauncher 2020-05-12 10:36:38 +02:00
Tomasz Długosz
eaab877d66 JANITORIAL: fix the name of original author of cge and cge2
The first name is Janusz, not Janus.
The correct name was used in AUTHORS and credits.
In case of doubts, see his personal webpage: https://www.jbw.pl/ - name is in the page footer
2020-04-18 20:59:57 +02:00
Paul Gilbert
9f175c4053 ENGINES: Cleanup of savegame filenames generation
This removes filename methods when it matched the Engine method.
Secondly, ensuring there was an overriden getSaveStateName method
for engines that didn't do the standard target.00x save filenames
2020-02-16 15:44:28 -08:00
Paul Gilbert
a00e44ba6c ENGINES: Merge saveGameState virtual methods into a single one 2020-02-16 15:44:28 -08:00
Paul Gilbert
bef176fb3a CGE2: Refactor to use Engine debugger 2020-02-16 13:07:19 +02:00
Bastien Bouclet
db347350a5 CGE2: Remove duplicate override keywords 2020-02-09 12:58:14 +01:00
Bastien Bouclet
8b2902539e CGE2: Add override keywords 2020-02-09 12:43:14 +01:00
Eugene Sandulenko
ba708682b2 CGE2: Added override keywords 2020-02-05 14:51:32 +01:00
Paul Gilbert
5b80320525 ENGINES: Adding override keyword to hasFeature methods 2020-02-04 20:04:11 -08:00
Paul Gilbert
b7797bc475 CGE2: Use Engine save/load dialog methods 2020-02-04 19:05:26 -08:00
Eugene Sandulenko
1413dfb0a7 CGE2: Added override keywords 2020-01-31 12:54:57 +01:00
Bastien Bouclet
9c8bd056d6 ENGINES: Stop using 'single id' 2019-11-03 11:43:00 +01:00
Bastien Bouclet
4b42112721 ENGINES: Add an engine ID to all the engines 2019-11-03 11:43:00 +01:00
D G Turner
32a6f0b376 CGE2: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-10-16 22:53:54 +01:00
D G Turner
76ec4b8d82 CGE2: Fix GCC Warnings by Explicit Structure Initialization
This is as per the changes to the CGE engine.
2019-07-24 22:04:37 +01:00
D G Turner
110a1e3df5 CGE2: Allow Triggering of Carpet Workaround from Debug Console.
This allows the recovery of saved games with the dead-end condition from
bug Trac #6842.
2018-10-09 18:10:40 +01:00
D G Turner
f39a9b5563 CGE2: Add Script Workaround for Clothes Horse Carpet Bug.
This now allows the Carpet to be placed and removed from the Clothes
Horse repeatedly, thus avoiding the dead-end when you do not beat the
Carpet with the Racket on first attempt.

This is bug Trac #6842.
2018-10-09 18:07:59 +01:00
Bastien Bouclet
cf1ebf2951 ENGINES: Add unknown game variants to the game detector results 2018-05-10 09:04:23 +02:00
Thierry Crozat
699532157a CGE2: Add detection entry for Polish v1.1 version 2018-05-05 23:18:45 +01:00
Adrian Frühwirth
03312fba61 CGE2: Add play time metadata to savegames 2018-05-05 22:19:03 +02:00
Bastien Bouclet
dc96d43717 CGE2: Push down the AD includes 2018-05-01 12:48:05 +02:00
Adrian Frühwirth
9bee9e1ba6 JANITORIAL: Fix whitespace 2018-04-19 12:08:31 +02:00