aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/glk.h
diff options
context:
space:
mode:
authorPaul Gilbert2018-11-17 16:52:47 -0800
committerPaul Gilbert2018-12-08 19:05:59 -0800
commitb05a16a0ad0dcc2881aeda81e0d1a84a752eccab (patch)
treee7f0468357c5c3248591bd334b1a4d42a999b550 /engines/glk/glk.h
parent326f69136eb4fee72391a8175ad722a317f84ca6 (diff)
downloadscummvm-rg350-b05a16a0ad0dcc2881aeda81e0d1a84a752eccab.tar.gz
scummvm-rg350-b05a16a0ad0dcc2881aeda81e0d1a84a752eccab.tar.bz2
scummvm-rg350-b05a16a0ad0dcc2881aeda81e0d1a84a752eccab.zip
GLK: Centralizing more of the savegame code in GlkEngine
Diffstat (limited to 'engines/glk/glk.h')
-rw-r--r--engines/glk/glk.h35
1 files changed, 33 insertions, 2 deletions
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 {
@@ -181,6 +182,11 @@ public:
}
/**
+ * Display a message in a GUI dialog
+ */
+ void GUIError(const char *msg, ...);
+
+ /**
* Return the filename for a given save slot
*/
Common::String getSaveName(uint slot) const {
@@ -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;