diff options
Diffstat (limited to 'saga')
-rw-r--r-- | saga/actor.cpp | 4 | ||||
-rw-r--r-- | saga/actor.h | 16 | ||||
-rw-r--r-- | saga/game.cpp | 8 | ||||
-rw-r--r-- | saga/music.cpp | 12 | ||||
-rw-r--r-- | saga/rscfile.cpp | 4 | ||||
-rw-r--r-- | saga/rscfile.h | 2 | ||||
-rw-r--r-- | saga/saga.cpp | 20 | ||||
-rw-r--r-- | saga/saveload.cpp | 6 | ||||
-rw-r--r-- | saga/sndres.cpp | 4 |
9 files changed, 38 insertions, 38 deletions
diff --git a/saga/actor.cpp b/saga/actor.cpp index 43f262f26a..2272977154 100644 --- a/saga/actor.cpp +++ b/saga/actor.cpp @@ -2296,7 +2296,7 @@ void Actor::drawPathTest() { #endif } -void Actor::saveState(File& out) { +void Actor::saveState(Common::File& out) { uint16 i; out.writeSint16LE(getProtagState()); @@ -2312,7 +2312,7 @@ void Actor::saveState(File& out) { } } -void Actor::loadState(File& in) { +void Actor::loadState(Common::File& in) { int32 i; setProtagState(in.readSint16LE()); diff --git a/saga/actor.h b/saga/actor.h index 6064e259ef..9bc2658d47 100644 --- a/saga/actor.h +++ b/saga/actor.h @@ -141,12 +141,12 @@ struct Location { 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 @@ public: 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 @@ public: 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 @@ public: 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 @@ public: 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 @@ public: 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; } diff --git a/saga/game.cpp b/saga/game.cpp index 5689dd96f9..d53e9bb863 100644 --- a/saga/game.cpp +++ b/saga/game.cpp @@ -761,7 +761,7 @@ int detectGame(const FSList &fslist, bool mode) { uint16 file_count; uint16 file_n; - File test_file; + Common::File test_file; bool file_missing; Common::String tstr, tstr1; @@ -790,7 +790,7 @@ int detectGame(const FSList &fslist, bool mode) { 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 @@ int detectGame(const FSList &fslist, bool mode) { } } } 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]); } diff --git a/saga/music.cpp b/saga/music.cpp index 40ce5f670a..2a6e1b9d82 100644 --- a/saga/music.cpp +++ b/saga/music.cpp @@ -42,7 +42,7 @@ namespace Saga { class RAWInputStream : public AudioStream { private: - File *_file; + Common::File *_file; uint32 _file_pos; uint32 _start_pos; uint32 _end_pos; @@ -56,7 +56,7 @@ private: 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 @@ public: 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 @@ void RAWInputStream::refill() { } 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 @@ Music::Music(SoundMixer *mixer, MidiDriver *driver, int enabled) : _mixer(mixer) _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 @@ int Music::play(uint32 music_rn, uint16 flags) { AudioStream *audioStream = NULL; MidiParser *parser; - File midiFile; + Common::File midiFile; if (_vm->getGameType() == GType_ITE) { if (music_rn >= 9 && music_rn <= 34) { diff --git a/saga/rscfile.cpp b/saga/rscfile.cpp index 0fbde0ab81..045d2e21f8 100644 --- a/saga/rscfile.cpp +++ b/saga/rscfile.cpp @@ -50,7 +50,7 @@ RSCFILE_CONTEXT *RSC_CreateContext() { 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 @@ int RSC_LoadResource(RSCFILE_CONTEXT *rsc, uint32 res_num, byte **res_p, size_t substnum = -1; if (substnum != -1) { - File in; + Common::File in; if (in.open(substitutes[substnum].fname)) { res_size = in.size(); diff --git a/saga/rscfile.h b/saga/rscfile.h index e1548abc89..c09f36ac5f 100644 --- a/saga/rscfile.h +++ b/saga/rscfile.h @@ -44,7 +44,7 @@ struct RSCFILE_RESOURCE { 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; diff --git a/saga/saga.cpp b/saga/saga.cpp index 462517d09b..c3a5ff528d 100644 --- a/saga/saga.cpp +++ b/saga/saga.cpp @@ -142,16 +142,16 @@ SagaEngine::SagaEngine(GameDetector *detector, OSystem *syst) // 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 @@ int SagaEngine::init(GameDetector &detector) { // 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 diff --git a/saga/saveload.cpp b/saga/saveload.cpp index 36c397054f..2c7dd17a7b 100644 --- a/saga/saveload.cpp +++ b/saga/saveload.cpp @@ -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::save(const char *fileName) { } void SagaEngine::load(const char *fileName) { - File in; + Common::File in; int commonBufferSize; int sceneNumber, insetSceneNumber; int mapx, mapy; diff --git a/saga/sndres.cpp b/saga/sndres.cpp index fd4a84daab..2d77d3e779 100644 --- a/saga/sndres.cpp +++ b/saga/sndres.cpp @@ -83,7 +83,7 @@ int SndRes::playVoice(uint32 voice_rn) { // 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 @@ int SndRes::getVoiceLength(uint32 voice_rn) { 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, |