diff options
author | Max Horn | 2005-05-10 22:56:25 +0000 |
---|---|---|
committer | Max Horn | 2005-05-10 22:56:25 +0000 |
commit | b75c969e666b9f262a05e0d1e54d56f7d3e45441 (patch) | |
tree | e4868d14ac249a63e01f905472ec9be69f04a028 /sword1 | |
parent | 55c37c18ceed916eb3744666d3d10783b0cf8783 (diff) | |
download | scummvm-rg350-b75c969e666b9f262a05e0d1e54d56f7d3e45441.tar.gz scummvm-rg350-b75c969e666b9f262a05e0d1e54d56f7d3e45441.tar.bz2 scummvm-rg350-b75c969e666b9f262a05e0d1e54d56f7d3e45441.zip |
Moved class File and the MD5 stuff to namespace Common
svn-id: r18037
Diffstat (limited to 'sword1')
-rw-r--r-- | sword1/animation.cpp | 2 | ||||
-rw-r--r-- | sword1/control.cpp | 2 | ||||
-rw-r--r-- | sword1/credits.cpp | 2 | ||||
-rw-r--r-- | sword1/music.cpp | 4 | ||||
-rw-r--r-- | sword1/music.h | 6 | ||||
-rw-r--r-- | sword1/resman.cpp | 12 | ||||
-rw-r--r-- | sword1/resman.h | 4 | ||||
-rw-r--r-- | sword1/sound.h | 2 | ||||
-rw-r--r-- | sword1/sword1.cpp | 18 |
9 files changed, 26 insertions, 26 deletions
diff --git a/sword1/animation.cpp b/sword1/animation.cpp index 35d6a090cc..e0c9794f85 100644 --- a/sword1/animation.cpp +++ b/sword1/animation.cpp @@ -108,7 +108,7 @@ void MoviePlayer::play(uint32 id) { // these sequences are language specific char sndName[20]; sprintf(sndName, "%s.snd", _sequenceList[id]); - File *oggSource = new File(); + Common::File *oggSource = new Common::File(); if (oggSource->open(sndName)) { SplittedAudioStream *sStream = new SplittedAudioStream(); uint32 numSegs = oggSource->readUint32LE(); // number of audio segments, either 1 or 2. diff --git a/sword1/control.cpp b/sword1/control.cpp index d1bbc9c32a..a572aaee4a 100644 --- a/sword1/control.cpp +++ b/sword1/control.cpp @@ -186,7 +186,7 @@ void Control::askForCd(void) { _system->setPalette(palOut, 0, 256); free(palOut); - File test; + Common::File test; char fName[10]; uint8 textA[50]; sprintf(fName, "cd%d.id", SwordEngine::_systemVars.currentCD); diff --git a/sword1/credits.cpp b/sword1/credits.cpp index 3ab89bbe11..511dd37e42 100644 --- a/sword1/credits.cpp +++ b/sword1/credits.cpp @@ -303,7 +303,7 @@ ArcFile::~ArcFile(void) { } bool ArcFile::open(const char *name) { - File arc; + Common::File arc; if (!arc.open(name)) return false; _bufPos = _buf = (uint8*)malloc(arc.size()); diff --git a/sword1/music.cpp b/sword1/music.cpp index 66995afc5d..f8b60bca5b 100644 --- a/sword1/music.cpp +++ b/sword1/music.cpp @@ -36,11 +36,11 @@ namespace Sword1 { -WaveAudioStream *makeWaveStream(File *source, uint32 size) { +WaveAudioStream *makeWaveStream(Common::File *source, uint32 size) { return new WaveAudioStream(source, size); } -WaveAudioStream::WaveAudioStream(File *source, uint32 pSize) { +WaveAudioStream::WaveAudioStream(Common::File *source, uint32 pSize) { int rate, size; byte flags; diff --git a/sword1/music.h b/sword1/music.h index 1920edd0f1..53873c87cc 100644 --- a/sword1/music.h +++ b/sword1/music.h @@ -43,14 +43,14 @@ enum MusicMode { class WaveAudioStream : public AudioStream { public: - WaveAudioStream(File *source, uint32 pSize); + WaveAudioStream(Common::File *source, uint32 pSize); virtual ~WaveAudioStream(); virtual int readBuffer(int16 *buffer, const int numSamples); virtual bool isStereo(void) const { return _isStereo; }; virtual bool endOfData(void) const; virtual int getRate(void) const { return _rate; }; private: - File *_sourceFile; + Common::File *_sourceFile; uint8 *_sampleBuf; uint32 _rate; bool _isStereo; @@ -60,7 +60,7 @@ private: class MusicHandle : public AudioStream { private: - File _file; + Common::File _file; bool _looping; int32 _fading; int32 _fadeSamples; diff --git a/sword1/resman.cpp b/sword1/resman.cpp index cfeafce330..4d7f29d07a 100644 --- a/sword1/resman.cpp +++ b/sword1/resman.cpp @@ -79,7 +79,7 @@ ResMan::~ResMan(void) { } void ResMan::loadCluDescript(const char *fileName) { - File file; + Common::File file; file.open(fileName); if (!file.isOpen()) { @@ -205,8 +205,8 @@ void *ResMan::openFetchRes(uint32 id) { void ResMan::dumpRes(uint32 id) { char outn[30]; sprintf(outn, "DUMP%08X.BIN", id); - File outf; - if (outf.open(outn, File::kFileWriteMode)) { + Common::File outf; + if (outf.open(outn, Common::File::kFileWriteMode)) { resOpen(id); MemHandle *memHandle = resHandle(id); outf.write(memHandle->data, memHandle->size); @@ -253,7 +253,7 @@ void ResMan::resOpen(uint32 id) { // load resource ID into memory if (memHandle->cond == MEM_FREED) { // memory has been freed uint32 size = resLength(id); _memMan->alloc(memHandle, size); - File *clusFile = resFile(id); + Common::File *clusFile = resFile(id); assert(clusFile); clusFile->seek( resOffset(id) ); clusFile->read( memHandle->data, size); @@ -288,7 +288,7 @@ FrameHeader *ResMan::fetchFrame(void *resourceData, uint32 frameNo) { return (FrameHeader*)frameFile; } -File *ResMan::resFile(uint32 id) { +Common::File *ResMan::resFile(uint32 id) { Clu *cluster = _prj.clu + ((id >> 24) - 1); if (cluster->file == NULL) { _openClus++; @@ -298,7 +298,7 @@ File *ResMan::resFile(uint32 id) { _openCluEnd->nextOpen = cluster; _openCluEnd = cluster; } - cluster->file = new File(); + cluster->file = new Common::File(); char fileName[15]; sprintf(fileName, "%s.CLU", _prj.clu[(id >> 24)-1].label); cluster->file->open(fileName); diff --git a/sword1/resman.h b/sword1/resman.h index 901bacc3d4..568e214c44 100644 --- a/sword1/resman.h +++ b/sword1/resman.h @@ -40,7 +40,7 @@ struct Grp { struct Clu { uint32 refCount; - File *file; + Common::File *file; char label[MAX_LABEL_SIZE]; uint32 noGrp; Grp *grp; @@ -70,7 +70,7 @@ private: uint32 resLength(uint32 id); MemHandle *resHandle(uint32 id); uint32 resOffset(uint32 id); - File *resFile(uint32 id); + Common::File *resFile(uint32 id); void openCptResourceBigEndian(uint32 id); void openScriptResourceBigEndian(uint32 id); diff --git a/sword1/sound.h b/sword1/sound.h index 982a941a4b..8a65f0dcf0 100644 --- a/sword1/sound.h +++ b/sword1/sound.h @@ -96,7 +96,7 @@ private: void calcWaveVolume(int16 *data, uint32 length); bool _waveVolume[WAVE_VOL_TAB_LENGTH]; uint16 _waveVolPos; - File _cowFile; + Common::File _cowFile; uint32 *_cowHeader; uint32 _cowHeaderSize; uint8 _currentCowFile; diff --git a/sword1/sword1.cpp b/sword1/sword1.cpp index 8be47448bc..aa08e352d0 100644 --- a/sword1/sword1.cpp +++ b/sword1/sword1.cpp @@ -131,14 +131,14 @@ SwordEngine::SwordEngine(GameDetector *detector, OSystem *syst) warning("Sound initialization failed"); // Add default file directories - File::addDefaultDirectory(_gameDataPath + "CLUSTERS/"); - File::addDefaultDirectory(_gameDataPath + "MUSIC/"); - File::addDefaultDirectory(_gameDataPath + "SPEECH/"); - File::addDefaultDirectory(_gameDataPath + "VIDEO/"); - File::addDefaultDirectory(_gameDataPath + "clusters/"); - File::addDefaultDirectory(_gameDataPath + "music/"); - File::addDefaultDirectory(_gameDataPath + "speech/"); - File::addDefaultDirectory(_gameDataPath + "video/"); + Common::File::addDefaultDirectory(_gameDataPath + "CLUSTERS/"); + Common::File::addDefaultDirectory(_gameDataPath + "MUSIC/"); + Common::File::addDefaultDirectory(_gameDataPath + "SPEECH/"); + Common::File::addDefaultDirectory(_gameDataPath + "VIDEO/"); + Common::File::addDefaultDirectory(_gameDataPath + "clusters/"); + Common::File::addDefaultDirectory(_gameDataPath + "music/"); + Common::File::addDefaultDirectory(_gameDataPath + "speech/"); + Common::File::addDefaultDirectory(_gameDataPath + "video/"); } SwordEngine::~SwordEngine() { @@ -334,7 +334,7 @@ void SwordEngine::showFileErrorMsg(uint8 type, bool *fileExists) { } void SwordEngine::checkCdFiles(void) { // check if we're running from cd, hdd or what... - File test; + Common::File test; bool fileExists[30]; bool isFullVersion = false; // default to demo version bool missingTypes[8] = { false, false, false, false, false, false, false, false }; |