aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorMax Horn2008-02-01 23:32:20 +0000
committerMax Horn2008-02-01 23:32:20 +0000
commit511019bd83c55d47fdc0e3c94220d3a68e851779 (patch)
treea76f425905c0b53b0ad5ed1888696f8ff7a02e31 /engines/scumm
parent0ae9fe74674c4487bb74c2582fe03e74cc7da720 (diff)
downloadscummvm-rg350-511019bd83c55d47fdc0e3c94220d3a68e851779.tar.gz
scummvm-rg350-511019bd83c55d47fdc0e3c94220d3a68e851779.tar.bz2
scummvm-rg350-511019bd83c55d47fdc0e3c94220d3a68e851779.zip
Change InSaveFile -> SeekableReadStream where possible
svn-id: r30722
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/saveload.cpp12
-rw-r--r--engines/scumm/saveload.h6
-rw-r--r--engines/scumm/scumm.h6
-rw-r--r--engines/scumm/thumbnail.cpp2
4 files changed, 13 insertions, 13 deletions
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index bb05859c24..b9e3a9287b 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -130,7 +130,7 @@ bool ScummEngine::saveState(int slot, bool compat) {
return true;
}
-static bool loadSaveGameHeader(Common::InSaveFile *in, SaveGameHeader &hdr) {
+static bool loadSaveGameHeader(Common::SeekableReadStream *in, SaveGameHeader &hdr) {
hdr.type = in->readUint32BE();
hdr.size = in->readUint32LE();
hdr.ver = in->readUint32LE();
@@ -140,7 +140,7 @@ static bool loadSaveGameHeader(Common::InSaveFile *in, SaveGameHeader &hdr) {
bool ScummEngine::loadState(int slot, bool compat) {
char filename[256];
- Common::InSaveFile *in;
+ Common::SeekableReadStream *in;
int i, j;
SaveGameHeader hdr;
int sb, sh;
@@ -433,7 +433,7 @@ void ScummEngine::listSavegames(bool *marks, int num) {
bool ScummEngine::getSavegameName(int slot, char *desc) {
char filename[256];
- Common::InSaveFile *in;
+ Common::SeekableReadStream *in;
SaveGameHeader hdr;
makeSavegameName(filename, slot, false);
@@ -469,7 +469,7 @@ bool ScummEngine::getSavegameName(int slot, char *desc) {
Graphics::Surface *ScummEngine::loadThumbnailFromSlot(int slot) {
char filename[256];
- Common::InSaveFile *in;
+ Common::SeekableReadStream *in;
SaveGameHeader hdr;
makeSavegameName(filename, slot, false);
@@ -497,7 +497,7 @@ Graphics::Surface *ScummEngine::loadThumbnailFromSlot(int slot) {
bool ScummEngine::loadInfosFromSlot(int slot, InfoStuff *stuff) {
char filename[256];
- Common::InSaveFile *in;
+ Common::SeekableReadStream *in;
SaveGameHeader hdr;
makeSavegameName(filename, slot, false);
@@ -537,7 +537,7 @@ bool ScummEngine::loadInfosFromSlot(int slot, InfoStuff *stuff) {
return true;
}
-bool ScummEngine::loadInfos(Common::InSaveFile *file, InfoStuff *stuff) {
+bool ScummEngine::loadInfos(Common::SeekableReadStream *file, InfoStuff *stuff) {
memset(stuff, 0, sizeof(InfoStuff));
SaveInfoSection section;
diff --git a/engines/scumm/saveload.h b/engines/scumm/saveload.h
index 449cfc57f1..0ddb4e5d2a 100644
--- a/engines/scumm/saveload.h
+++ b/engines/scumm/saveload.h
@@ -30,7 +30,7 @@
#include <stddef.h> // for ptrdiff_t
namespace Common {
- class InSaveFile;
+ class SeekableReadStream;
class OutSaveFile;
}
@@ -125,7 +125,7 @@ struct SaveLoadEntry {
class Serializer {
public:
- Serializer(Common::InSaveFile *in, Common::OutSaveFile *out, uint32 savegameVersion)
+ Serializer(Common::SeekableReadStream *in, Common::OutSaveFile *out, uint32 savegameVersion)
: _loadStream(in), _saveStream(out),
_savegameVersion(savegameVersion)
{ }
@@ -150,7 +150,7 @@ public:
void loadBytes(void *b, int len);
protected:
- Common::InSaveFile *_loadStream;
+ Common::SeekableReadStream *_loadStream;
Common::OutSaveFile *_saveStream;
uint32 _savegameVersion;
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index 41f7784d36..f636fee825 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -45,7 +45,7 @@ namespace GUI {
}
using GUI::Dialog;
namespace Common {
- class InSaveFile;
+ class SeekableReadStream;
class OutSaveFile;
}
@@ -635,8 +635,8 @@ public:
bool loadInfosFromSlot(int slot, InfoStuff *stuff);
protected:
- Graphics::Surface *loadThumbnail(Common::InSaveFile *file);
- bool loadInfos(Common::InSaveFile *file, InfoStuff *stuff);
+ Graphics::Surface *loadThumbnail(Common::SeekableReadStream *file);
+ bool loadInfos(Common::SeekableReadStream *file, InfoStuff *stuff);
void saveThumbnail(Common::OutSaveFile *file);
void saveInfos(Common::OutSaveFile* file);
diff --git a/engines/scumm/thumbnail.cpp b/engines/scumm/thumbnail.cpp
index ab43eb49e7..40f1ee48e5 100644
--- a/engines/scumm/thumbnail.cpp
+++ b/engines/scumm/thumbnail.cpp
@@ -49,7 +49,7 @@ inline void colorToRGB(uint16 color, uint8 &r, uint8 &g, uint8 &b) {
b = ((color&0x1F) << 3);
}
-Graphics::Surface *ScummEngine::loadThumbnail(Common::InSaveFile *file) {
+Graphics::Surface *ScummEngine::loadThumbnail(Common::SeekableReadStream *file) {
ThumbnailHeader header;
header.type = file->readUint32BE();