diff --git a/engines/hpl1/hpl1.cpp b/engines/hpl1/hpl1.cpp index 104107eadaf..b9c04ec4dfa 100644 --- a/engines/hpl1/hpl1.cpp +++ b/engines/hpl1/hpl1.cpp @@ -21,6 +21,8 @@ #include "hpl1/penumbra-overture/Init.h" #include "hpl1/penumbra-overture/MainMenu.h" +#include "hpl1/penumbra-overture/SaveHandler.h" +#include "hpl1/engine/system/String.h" #include "engine/engine.h" #include "hpl1/hpl1.h" #include "common/config-manager.h" @@ -124,6 +126,14 @@ Common::StringArray Hpl1Engine::listInternalSaves(const Common::String &pattern) return internalSaves; } +Common::Error Hpl1Engine::loadGameState(int slot) { + SaveStateDescriptor a = getMetaEngine()->querySaveMetaInfos(_targetName.c_str(), slot); + _gameInit->mpMainMenu->SetActive(false); + // FIXME: strings + _gameInit->mpSaveHandler->LoadGameFromFile(cString::To16Char(Common::String(a.getDescription()).c_str())); + return Common::kNoError; +} + Common::Error Hpl1Engine::syncGame(Common::Serializer &s) { // The Serializer has methods isLoading() and isSaving() // if you need to specific steps; for example setting diff --git a/engines/hpl1/hpl1.h b/engines/hpl1/hpl1.h index f0493ff0678..cceddd8e00e 100644 --- a/engines/hpl1/hpl1.h +++ b/engines/hpl1/hpl1.h @@ -98,6 +98,8 @@ public: Common::StringArray listInternalSaves(const Common::String &pattern); + Common::Error loadGameState(int slot) override; + /** * Uses a serializer to allow implementing savegame * loading and saving using a single method