[Scummvm-cvs-logs] SF.net SVN: scummvm: [30722] scummvm/trunk/engines/scumm
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sat Feb 2 00:32:21 CET 2008
Revision: 30722
http://scummvm.svn.sourceforge.net/scummvm/?rev=30722&view=rev
Author: fingolfin
Date: 2008-02-01 15:32:20 -0800 (Fri, 01 Feb 2008)
Log Message:
-----------
Change InSaveFile -> SeekableReadStream where possible
Modified Paths:
--------------
scummvm/trunk/engines/scumm/saveload.cpp
scummvm/trunk/engines/scumm/saveload.h
scummvm/trunk/engines/scumm/scumm.h
scummvm/trunk/engines/scumm/thumbnail.cpp
Modified: scummvm/trunk/engines/scumm/saveload.cpp
===================================================================
--- scummvm/trunk/engines/scumm/saveload.cpp 2008-01-31 22:03:00 UTC (rev 30721)
+++ scummvm/trunk/engines/scumm/saveload.cpp 2008-02-01 23:32:20 UTC (rev 30722)
@@ -130,7 +130,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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;
Modified: scummvm/trunk/engines/scumm/saveload.h
===================================================================
--- scummvm/trunk/engines/scumm/saveload.h 2008-01-31 22:03:00 UTC (rev 30721)
+++ scummvm/trunk/engines/scumm/saveload.h 2008-02-01 23:32:20 UTC (rev 30722)
@@ -30,7 +30,7 @@
#include <stddef.h> // for ptrdiff_t
namespace Common {
- class InSaveFile;
+ class SeekableReadStream;
class OutSaveFile;
}
@@ -125,7 +125,7 @@
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 @@
void loadBytes(void *b, int len);
protected:
- Common::InSaveFile *_loadStream;
+ Common::SeekableReadStream *_loadStream;
Common::OutSaveFile *_saveStream;
uint32 _savegameVersion;
Modified: scummvm/trunk/engines/scumm/scumm.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm.h 2008-01-31 22:03:00 UTC (rev 30721)
+++ scummvm/trunk/engines/scumm/scumm.h 2008-02-01 23:32:20 UTC (rev 30722)
@@ -45,7 +45,7 @@
}
using GUI::Dialog;
namespace Common {
- class InSaveFile;
+ class SeekableReadStream;
class OutSaveFile;
}
@@ -635,8 +635,8 @@
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);
Modified: scummvm/trunk/engines/scumm/thumbnail.cpp
===================================================================
--- scummvm/trunk/engines/scumm/thumbnail.cpp 2008-01-31 22:03:00 UTC (rev 30721)
+++ scummvm/trunk/engines/scumm/thumbnail.cpp 2008-02-01 23:32:20 UTC (rev 30722)
@@ -49,7 +49,7 @@
b = ((color&0x1F) << 3);
}
-Graphics::Surface *ScummEngine::loadThumbnail(Common::InSaveFile *file) {
+Graphics::Surface *ScummEngine::loadThumbnail(Common::SeekableReadStream *file) {
ThumbnailHeader header;
header.type = file->readUint32BE();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list