[Scummvm-git-logs] scummvm master -> 21248eca74643f8e181937567a9c24490e79e01b
bluegr
noreply at scummvm.org
Tue Jan 2 09:24:03 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
21248eca74 KINGDOM: Supporting returning back to launcher feature
Commit: 21248eca74643f8e181937567a9c24490e79e01b
https://github.com/scummvm/scummvm/commit/21248eca74643f8e181937567a9c24490e79e01b
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2024-01-02T11:23:59+02:00
Commit Message:
KINGDOM: Supporting returning back to launcher feature
Also adds a _mixer->stopAll() call in the engine's destructor
Changed paths:
engines/kingdom/kingdom.cpp
engines/kingdom/kingdom.h
diff --git a/engines/kingdom/kingdom.cpp b/engines/kingdom/kingdom.cpp
index aca893bb913..9f850d62adb 100644
--- a/engines/kingdom/kingdom.cpp
+++ b/engines/kingdom/kingdom.cpp
@@ -142,6 +142,8 @@ void KingdomGame::initVariables() {
}
KingdomGame::~KingdomGame() {
+ _mixer->stopAll();
+
unloadKingArt();
delete[] _asPtr;
@@ -149,6 +151,11 @@ KingdomGame::~KingdomGame() {
delete _rnd;
}
+bool KingdomGame::hasFeature(EngineFeature f) const {
+ return
+ f == kSupportsReturnToLauncher;
+}
+
bool KingdomGame::isDemo() const {
return (bool)(_gameDescription->flags & ADGF_DEMO);
}
diff --git a/engines/kingdom/kingdom.h b/engines/kingdom/kingdom.h
index 37ea2f7ac8b..83160cf879d 100644
--- a/engines/kingdom/kingdom.h
+++ b/engines/kingdom/kingdom.h
@@ -89,9 +89,10 @@ namespace Kingdom {
class KingdomGame : public Engine {
public:
KingdomGame(OSystem *syst, const ADGameDescription *gameDesc);
- ~KingdomGame();
+ ~KingdomGame() override;
- virtual Common::Error run();
+ bool hasFeature(EngineFeature f) const override;
+ Common::Error run() override;
// Detection related functions
const ADGameDescription *_gameDescription;
@@ -229,8 +230,8 @@ namespace Kingdom {
void cursorTypeExit();
void saveGame();
void restoreGame();
- virtual Common::Error loadGameState(int slot);
- virtual Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave = false);
+ Common::Error loadGameState(int slot) override;
+ Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave = false) override;
Common::String getSavegameFilename(int slot);
void writeSavegameHeader(Common::OutSaveFile *out, KingdomSavegameHeader &header);
void synchronize(Common::Serializer &s);
More information about the Scummvm-git-logs
mailing list