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);