mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 17:29:11 +00:00
HPL1: implement save loading method
This commit is contained in:
parent
eabf877903
commit
c9e0b7733c
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user