aboutsummaryrefslogtreecommitdiff
path: root/engines/tinsel/saveload.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/tinsel/saveload.cpp')
-rw-r--r--engines/tinsel/saveload.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/engines/tinsel/saveload.cpp b/engines/tinsel/saveload.cpp
index 13c1fc58f2..b17ee93d4d 100644
--- a/engines/tinsel/saveload.cpp
+++ b/engines/tinsel/saveload.cpp
@@ -30,11 +30,11 @@
#include "tinsel/dw.h"
#include "tinsel/rince.h"
#include "tinsel/savescn.h"
-#include "tinsel/serializer.h"
#include "tinsel/timers.h"
#include "tinsel/tinlib.h"
#include "tinsel/tinsel.h"
+#include "common/serializer.h"
#include "common/savefile.h"
namespace Tinsel {
@@ -73,16 +73,16 @@ SRSTATE SRstate = SR_IDLE;
//----------------- EXTERN FUNCTIONS --------------------
// in DOS_DW.C
-extern void syncSCdata(Serializer &s);
+extern void syncSCdata(Common::Serializer &s);
// in DOS_MAIN.C
//char HardDriveLetter(void);
// in PCODE.C
-extern void syncGlobInfo(Serializer &s);
+extern void syncGlobInfo(Common::Serializer &s);
// in POLYGONS.C
-extern void syncPolyInfo(Serializer &s);
+extern void syncPolyInfo(Common::Serializer &s);
//----------------- LOCAL DEFINES --------------------
@@ -120,7 +120,7 @@ static char *SaveSceneSsData = 0; // points to 'SAVED_DATA ssdata[MAX_NEST]'
void setNeedLoad() { NeedLoad = true; }
-static void syncTime(Serializer &s, struct tm &t) {
+static void syncTime(Common::Serializer &s, struct tm &t) {
s.syncAsUint16LE(t.tm_year);
s.syncAsByte(t.tm_mon);
s.syncAsByte(t.tm_mday);
@@ -134,7 +134,7 @@ static void syncTime(Serializer &s, struct tm &t) {
}
}
-static bool syncSaveGameHeader(Serializer &s, SaveGameHeader &hdr) {
+static bool syncSaveGameHeader(Common::Serializer &s, SaveGameHeader &hdr) {
s.syncAsUint32LE(hdr.id);
s.syncAsUint32LE(hdr.size);
s.syncAsUint32LE(hdr.ver);
@@ -153,7 +153,7 @@ static bool syncSaveGameHeader(Serializer &s, SaveGameHeader &hdr) {
return true;
}
-static void syncSavedMover(Serializer &s, SAVED_MOVER &sm) {
+static void syncSavedMover(Common::Serializer &s, SAVED_MOVER &sm) {
SCNHANDLE *pList[3] = { (SCNHANDLE *)&sm.walkReels,
(SCNHANDLE *)&sm.standReels, (SCNHANDLE *)&sm.talkReels };
@@ -178,7 +178,7 @@ static void syncSavedMover(Serializer &s, SAVED_MOVER &sm) {
}
}
-static void syncSavedActor(Serializer &s, SAVED_ACTOR &sa) {
+static void syncSavedActor(Common::Serializer &s, SAVED_ACTOR &sa) {
s.syncAsUint16LE(sa.actorID);
s.syncAsUint16LE(sa.zFactor);
s.syncAsUint32LE(sa.bAlive);
@@ -188,33 +188,33 @@ static void syncSavedActor(Serializer &s, SAVED_ACTOR &sa) {
s.syncAsUint16LE(sa.presPlayY);
}
-extern void syncAllActorsAlive(Serializer &s);
+extern void syncAllActorsAlive(Common::Serializer &s);
-static void syncNoScrollB(Serializer &s, NOSCROLLB &ns) {
+static void syncNoScrollB(Common::Serializer &s, NOSCROLLB &ns) {
s.syncAsSint32LE(ns.ln);
s.syncAsSint32LE(ns.c1);
s.syncAsSint32LE(ns.c2);
}
-static void syncZPosition(Serializer &s, Z_POSITIONS &zp) {
+static void syncZPosition(Common::Serializer &s, Z_POSITIONS &zp) {
s.syncAsSint16LE(zp.actor);
s.syncAsSint16LE(zp.column);
s.syncAsSint32LE(zp.z);
}
-static void syncPolyVolatile(Serializer &s, POLY_VOLATILE &p) {
+static void syncPolyVolatile(Common::Serializer &s, POLY_VOLATILE &p) {
s.syncAsByte(p.bDead);
s.syncAsSint16LE(p.xoff);
s.syncAsSint16LE(p.yoff);
}
-static void syncSoundReel(Serializer &s, SOUNDREELS &sr) {
+static void syncSoundReel(Common::Serializer &s, SOUNDREELS &sr) {
s.syncAsUint32LE(sr.hFilm);
s.syncAsSint32LE(sr.column);
s.syncAsSint32LE(sr.actorCol);
}
-static void syncSavedData(Serializer &s, SAVED_DATA &sd) {
+static void syncSavedData(Common::Serializer &s, SAVED_DATA &sd) {
s.syncAsUint32LE(sd.SavedSceneHandle);
s.syncAsUint32LE(sd.SavedBgroundHandle);
for (int i = 0; i < MAX_MOVERS; ++i)
@@ -324,7 +324,7 @@ int getList(Common::SaveFileManager *saveFileMan, const Common::String &target)
}
// Try to load save game header
- Serializer s(f, 0);
+ Common::Serializer s(f, 0);
SaveGameHeader hdr;
bool validHeader = syncSaveGameHeader(s, hdr);
delete f;
@@ -379,7 +379,7 @@ char *ListEntry(int i, letype which) {
return NULL;
}
-static void DoSync(Serializer &s) {
+static void DoSync(Common::Serializer &s) {
int sg = 0;
if (TinselV2) {
@@ -433,7 +433,7 @@ static bool DoRestore() {
return false;
}
- Serializer s(f, 0);
+ Common::Serializer s(f, 0);
SaveGameHeader hdr;
if (!syncSaveGameHeader(s, hdr)) {
delete f; // Invalid header, or savegame too new -> skip it
@@ -474,7 +474,7 @@ static void DoSave(void) {
if (f == NULL)
return;
- Serializer s(0, f);
+ Common::Serializer s(0, f);
// Write out a savegame header
SaveGameHeader hdr;