aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/scumm_v4.h
diff options
context:
space:
mode:
authorMax Horn2009-04-19 01:01:54 +0000
committerMax Horn2009-04-19 01:01:54 +0000
commit3044593da01c055ad274b2ae552b8a285ce4fdb0 (patch)
treecfea7dd1e502ab5fba1f3e472693b6617f353eb7 /engines/scumm/scumm_v4.h
parent0e82403daa80424fb9c6089632f7dcfd9015689d (diff)
downloadscummvm-rg350-3044593da01c055ad274b2ae552b8a285ce4fdb0.tar.gz
scummvm-rg350-3044593da01c055ad274b2ae552b8a285ce4fdb0.tar.bz2
scummvm-rg350-3044593da01c055ad274b2ae552b8a285ce4fdb0.zip
SCUMM: Moved o5_saveLoadGame and o5_saveLoadVars to ScummEngine_v4 (the highest SCUMM version to implement these opcodes. Actually, our code was bugged in so far as we only ever invoked o5_saveLoadGame in V3 games, never in V4 games (but this properly never mattered ;)
svn-id: r40014
Diffstat (limited to 'engines/scumm/scumm_v4.h')
-rw-r--r--engines/scumm/scumm_v4.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/engines/scumm/scumm_v4.h b/engines/scumm/scumm_v4.h
index 6e0326ed17..be3f6cb47e 100644
--- a/engines/scumm/scumm_v4.h
+++ b/engines/scumm/scumm_v4.h
@@ -34,6 +34,21 @@ namespace Scumm {
* Engine for version 4 SCUMM games; GF_SMALL_HEADER is always set for these.
*/
class ScummEngine_v4 : public ScummEngine_v5 {
+ friend class ScummEngine_v5;
+public:
+
+ /**
+ * Prepared savegame used by the orginal save/load dialog.
+ * Must be valid as long as the savescreen is active. As we are not
+ * notified when the savescreen is closed, memory is only freed on a game
+ * reset, at the destruction of the engine or when the original save/load
+ * dialog is entered the next time.
+ */
+ Common::SeekableReadStream *_savePreparedSavegame;
+
+ void prepareSavegame();
+ bool savePreparedSavegame(int slot, char *desc);
+
public:
ScummEngine_v4(OSystem *syst, const DetectorResult &dr);
@@ -42,6 +57,8 @@ public:
protected:
virtual void setupOpcodes();
+ virtual void scummLoop_handleSaveLoad();
+
virtual void readResTypeList(int id);
virtual void readIndexFile();
virtual void loadCharset(int no);
@@ -51,11 +68,19 @@ protected:
virtual void resetRoomObject(ObjectData *od, const byte *room, const byte *searchptr = NULL);
+ void saveVars();
+ void loadVars();
+ void saveIQPoints();
+ void loadIQPoints(byte *ptr, int size);
+ void updateIQPoints();
+
/* Version 4 script opcodes */
void o4_ifState();
void o4_ifNotState();
void o4_oldRoomEffect();
void o4_pickupObject();
+ void o4_saveLoadGame();
+ void o4_saveLoadVars();
};