From b05a16a0ad0dcc2881aeda81e0d1a84a752eccab Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 17 Nov 2018 16:52:47 -0800 Subject: GLK: Centralizing more of the savegame code in GlkEngine --- engines/glk/glk.h | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) (limited to 'engines/glk/glk.h') diff --git a/engines/glk/glk.h b/engines/glk/glk.h index 8dce78f085..f925fd0cc3 100644 --- a/engines/glk/glk.h +++ b/engines/glk/glk.h @@ -30,6 +30,7 @@ #include "engines/advancedDetector.h" #include "engines/engine.h" #include "glk/glk_types.h" +#include "glk/streams.h" namespace Glk { @@ -180,6 +181,11 @@ public: return _targetName; } + /** + * Display a message in a GUI dialog + */ + void GUIError(const char *msg, ...); + /** * Return the filename for a given save slot */ @@ -188,9 +194,34 @@ public: } /** - * Display a message in a GUI dialog + * Prompt the user for a savegame to load, and then load it */ - void GUIError(const char *msg, ...); + Common::Error loadGame(); + + /** + * Prompt the user to save their game, and then save it + */ + Common::Error saveGame(); + + /** + * Load a savegame from a given slot + */ + virtual Common::Error loadGameState(int slot) override; + + /** + * Save the game to a given slot + */ + virtual Common::Error saveGameState(int slot, const Common::String &desc) override; + + /** + * Load a savegame from the passed file + */ + virtual Common::Error loadGameData(strid_t file) = 0; + + /** + * Save the game to the passed file + */ + virtual Common::Error saveGameData(strid_t file) = 0; }; extern GlkEngine *g_vm; -- cgit v1.2.3