[Scummvm-cvs-logs] CVS: scummvm/saga actor.cpp,1.125,1.126 actor.h,1.69,1.70 game.cpp,1.63,1.64 music.cpp,1.51,1.52 rscfile.cpp,1.20,1.21 rscfile.h,1.9,1.10 saga.cpp,1.107,1.108 saveload.cpp,1.5,1.6 sndres.cpp,1.41,1.42
Max Horn
fingolfin at users.sourceforge.net
Tue May 10 15:58:44 CEST 2005
Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17315/saga
Modified Files:
actor.cpp actor.h game.cpp music.cpp rscfile.cpp rscfile.h
saga.cpp saveload.cpp sndres.cpp
Log Message:
Moved class File and the MD5 stuff to namespace Common
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actor.cpp,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -d -r1.125 -r1.126
--- actor.cpp 10 May 2005 13:56:23 -0000 1.125
+++ actor.cpp 10 May 2005 22:55:49 -0000 1.126
@@ -2296,7 +2296,7 @@
#endif
}
-void Actor::saveState(File& out) {
+void Actor::saveState(Common::File& out) {
uint16 i;
out.writeSint16LE(getProtagState());
@@ -2312,7 +2312,7 @@
}
}
-void Actor::loadState(File& in) {
+void Actor::loadState(Common::File& in) {
int32 i;
setProtagState(in.readSint16LE());
Index: actor.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actor.h,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- actor.h 8 May 2005 21:49:43 -0000 1.69
+++ actor.h 10 May 2005 22:55:50 -0000 1.70
@@ -141,12 +141,12 @@
Location() {
x = y = z = 0;
}
- void saveState(File& out) {
+ void saveState(Common::File& out) {
out.writeSint32LE(x);
out.writeSint32LE(y);
out.writeSint32LE(z);
}
- void loadState(File& in) {
+ void loadState(Common::File& in) {
x = in.readSint32LE();
y = in.readSint32LE();
z = in.readSint32LE();
@@ -222,7 +222,7 @@
int32 screenDepth; //
int32 screenScale; //
- void saveState(File& out) {
+ void saveState(Common::File& out) {
out.writeUint16LE(flags);
out.writeSint32LE(nameIndex);
out.writeSint32LE(sceneNumber);
@@ -232,7 +232,7 @@
out.writeSint32LE(screenDepth);
out.writeSint32LE(screenScale);
}
- void loadState(File& in) {
+ void loadState(Common::File& in) {
flags = in.readUint16LE();
nameIndex = in.readSint32LE();
sceneNumber = in.readSint32LE();
@@ -297,7 +297,7 @@
Location partialTarget;
int32 walkFrameSequence;
- void saveState(File& out) {
+ void saveState(Common::File& out) {
CommonObjectData::saveState(out);
out.writeUint16LE(actorFlags);
out.writeSint32LE(currentAction);
@@ -330,7 +330,7 @@
partialTarget.saveState(out);
out.writeSint32LE(walkFrameSequence);
}
- void loadState(File& in) {
+ void loadState(Common::File& in) {
CommonObjectData::loadState(in);
actorFlags = in.readUint16LE();
currentAction = in.readSint32LE();
@@ -495,8 +495,8 @@
return _activeSpeech.stringsCount > 0;
}
- void saveState(File& out);
- void loadState(File& in);
+ void saveState(Common::File& out);
+ void loadState(Common::File& in);
void setProtagState(int state);
int getProtagState() { return _protagState; }
Index: game.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/game.cpp,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- game.cpp 23 Apr 2005 14:28:59 -0000 1.63
+++ game.cpp 10 May 2005 22:55:52 -0000 1.64
@@ -761,7 +761,7 @@
uint16 file_count;
uint16 file_n;
- File test_file;
+ Common::File test_file;
bool file_missing;
Common::String tstr, tstr1;
@@ -790,7 +790,7 @@
tstr.toLowercase();
if (filesList.contains(tstr) || filesList.contains(tstr1)) {
- if (md5_file(file->path().c_str(), md5sum, NULL, FILE_MD5_BYTES)) {
+ if (Common::md5_file(file->path().c_str(), md5sum, NULL, FILE_MD5_BYTES)) {
for (int j = 0; j < 16; j++) {
sprintf(md5str + j*2, "%02x", (int)md5sum[j]);
}
@@ -801,12 +801,12 @@
}
}
} else {
- File testFile;
+ Common::File testFile;
for (StringSet::const_iterator file = filesList.begin(); file != filesList.end(); ++file) {
if (testFile.open(file->_key.c_str())) {
testFile.close();
- if (md5_file(file->_key.c_str(), md5sum, NULL, FILE_MD5_BYTES)) {
+ if (Common::md5_file(file->_key.c_str(), md5sum, NULL, FILE_MD5_BYTES)) {
for (int j = 0; j < 16; j++) {
sprintf(md5str + j*2, "%02x", (int)md5sum[j]);
}
Index: music.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/music.cpp,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- music.cpp 3 Apr 2005 22:01:24 -0000 1.51
+++ music.cpp 10 May 2005 22:55:54 -0000 1.52
@@ -42,7 +42,7 @@
class RAWInputStream : public AudioStream {
private:
- File *_file;
+ Common::File *_file;
uint32 _file_pos;
uint32 _start_pos;
uint32 _end_pos;
@@ -56,7 +56,7 @@
inline bool eosIntern() const;
public:
- RAWInputStream(File *file, int size, bool looping);
+ RAWInputStream(Common::File *file, int size, bool looping);
~RAWInputStream();
int readBuffer(int16 *buffer, const int numSamples);
@@ -66,7 +66,7 @@
int getRate() const { return 11025; }
};
-RAWInputStream::RAWInputStream(File *file, int size, bool looping)
+RAWInputStream::RAWInputStream(Common::File *file, int size, bool looping)
: _file(file), _finished(false), _looping(looping),
_bufferEnd(_buf + BUFFER_SIZE) {
@@ -147,7 +147,7 @@
}
AudioStream *makeRAWStream(const char *filename, uint32 pos, int size, bool looping) {
- File *file = new File();
+ Common::File *file = new Common::File();
if (!file->open(filename)) {
delete file;
@@ -285,7 +285,7 @@
_mixer->setVolumeForSoundType(SoundMixer::kMusicSoundType, ConfMan.getInt("music_volume"));
if (_vm->getGameType() == GType_ITE) {
- File file;
+ Common::File file;
byte footerBuf[ARRAYSIZE(_digiTableITECD) * 8];
// The lookup table is stored at the end of music.rsc. I don't
@@ -400,7 +400,7 @@
AudioStream *audioStream = NULL;
MidiParser *parser;
- File midiFile;
+ Common::File midiFile;
if (_vm->getGameType() == GType_ITE) {
if (music_rn >= 9 && music_rn <= 34) {
Index: rscfile.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/rscfile.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- rscfile.cpp 11 Jan 2005 21:10:20 -0000 1.20
+++ rscfile.cpp 10 May 2005 22:55:54 -0000 1.21
@@ -50,7 +50,7 @@
empty_context.rc_file_loaded = 0;
empty_context.rc_res_table = NULL;
empty_context.rc_res_ct = 0;
- empty_context.rc_file = new File();
+ empty_context.rc_file = new Common::File();
RSCFILE_CONTEXT *new_context;
new_context = (RSCFILE_CONTEXT *)malloc(sizeof(*new_context));
@@ -257,7 +257,7 @@
substnum = -1;
if (substnum != -1) {
- File in;
+ Common::File in;
if (in.open(substitutes[substnum].fname)) {
res_size = in.size();
Index: rscfile.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/rscfile.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- rscfile.h 1 Jan 2005 16:18:36 -0000 1.9
+++ rscfile.h 10 May 2005 22:55:54 -0000 1.10
@@ -44,7 +44,7 @@
struct RSCFILE_CONTEXT {
const char *rc_file_fspec;
- File *rc_file;
+ Common::File *rc_file;
int rc_file_loaded;
RSCFILE_RESOURCE *rc_res_table;
size_t rc_res_ct;
Index: saga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/saga.cpp,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -d -r1.107 -r1.108
--- saga.cpp 8 May 2005 21:49:43 -0000 1.107
+++ saga.cpp 10 May 2005 22:55:54 -0000 1.108
@@ -142,16 +142,16 @@
// The Linux version of Inherit the Earth puts all data files in an
// 'itedata' sub-directory, except for voices.rsc
- File::addDefaultDirectory(_gameDataPath + "itedata/");
+ Common::File::addDefaultDirectory(_gameDataPath + "itedata/");
// The Windows version of Inherit the Earth puts various data files in
// other subdirectories.
- File::addDefaultDirectory(_gameDataPath + "graphics/");
- File::addDefaultDirectory(_gameDataPath + "music/");
- File::addDefaultDirectory(_gameDataPath + "sound/");
+ Common::File::addDefaultDirectory(_gameDataPath + "graphics/");
+ Common::File::addDefaultDirectory(_gameDataPath + "music/");
+ Common::File::addDefaultDirectory(_gameDataPath + "sound/");
// Mac CD Wyrmkeep
- File::addDefaultDirectory(_gameDataPath + "patch/");
+ Common::File::addDefaultDirectory(_gameDataPath + "patch/");
// Setup mixer
if (!_mixer->isReady()) {
@@ -202,15 +202,15 @@
// Add some default directories
// Win32 demo & full game
- File::addDefaultDirectory("graphics");
- File::addDefaultDirectory("music");
- File::addDefaultDirectory("sound");
+ Common::File::addDefaultDirectory("graphics");
+ Common::File::addDefaultDirectory("music");
+ Common::File::addDefaultDirectory("sound");
// Linux demo
- File::addDefaultDirectory("itedata");
+ Common::File::addDefaultDirectory("itedata");
// Mac demos & full game
- File::addDefaultDirectory("patch");
+ Common::File::addDefaultDirectory("patch");
// Process command line
Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/saveload.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- saveload.cpp 8 May 2005 14:04:06 -0000 1.5
+++ saveload.cpp 10 May 2005 22:55:54 -0000 1.6
@@ -40,9 +40,9 @@
namespace Saga {
void SagaEngine::save(const char *fileName) {
- File out;
+ Common::File out;
- out.open(fileName, File::kFileWriteMode);
+ out.open(fileName, Common::File::kFileWriteMode);
//TODO: version number
// Surrounding scene
@@ -67,7 +67,7 @@
}
void SagaEngine::load(const char *fileName) {
- File in;
+ Common::File in;
int commonBufferSize;
int sceneNumber, insetSceneNumber;
int mapx, mapy;
Index: sndres.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sndres.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- sndres.cpp 6 Apr 2005 12:19:15 -0000 1.41
+++ sndres.cpp 10 May 2005 22:56:06 -0000 1.42
@@ -83,7 +83,7 @@
// separate file (p2_a.voc or P2_A.iaf), to correct voice 4 in
// the intro. Use that, if available.
- File f;
+ Common::File f;
uint32 size;
bool voc = false;
@@ -235,7 +235,7 @@
assert(_init);
- File f;
+ Common::File f;
// The Wyrmkeep release of Inherit the Earth provides a separate file
// (p2_a.voc or P2_A.iaf), to correct voice 4 in the intro. Use that,
More information about the Scummvm-git-logs
mailing list