aboutsummaryrefslogtreecommitdiff
path: root/queen
diff options
context:
space:
mode:
authorMax Horn2005-05-10 22:56:25 +0000
committerMax Horn2005-05-10 22:56:25 +0000
commitb75c969e666b9f262a05e0d1e54d56f7d3e45441 (patch)
treee4868d14ac249a63e01f905472ec9be69f04a028 /queen
parent55c37c18ceed916eb3744666d3d10783b0cf8783 (diff)
downloadscummvm-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 'queen')
-rw-r--r--queen/queen.cpp2
-rw-r--r--queen/resource.cpp8
-rw-r--r--queen/resource.h6
-rw-r--r--queen/sound.cpp6
-rw-r--r--queen/talk.cpp2
5 files changed, 12 insertions, 12 deletions
diff --git a/queen/queen.cpp b/queen/queen.cpp
index cb16bf6676..67b28f8308 100644
--- a/queen/queen.cpp
+++ b/queen/queen.cpp
@@ -95,7 +95,7 @@ DetectedGameList Engine_QUEEN_detectGames(const FSList &fslist) {
const char *gameName = file->displayName().c_str();
if (0 == scumm_stricmp("queen.1", gameName) || 0 == scumm_stricmp("queen.1c", gameName)) {
- File dataFile;
+ Common::File dataFile;
dataFile.open(file->path().c_str());
assert(dataFile.isOpen());
diff --git a/queen/resource.cpp b/queen/resource.cpp
index 1019bea5e2..75292bca96 100644
--- a/queen/resource.cpp
+++ b/queen/resource.cpp
@@ -54,7 +54,7 @@ static int compareResourceEntry(const void *a, const void *b) {
Resource::Resource()
: _resourceEntries(0), _resourceTable(NULL) {
- _resourceFile = new File();
+ _resourceFile = new Common::File();
if (!findCompressedVersion() && !findNormalVersion())
error("Could not open resource file '%s'", "queen.1");
checkJASVersion();
@@ -190,7 +190,7 @@ Language Resource::getLanguage() const {
}
bool Resource::readTableFile(const GameVersion *gameVersion) {
- File tableFile;
+ Common::File tableFile;
tableFile.open(_tableFilename);
if (tableFile.isOpen() && tableFile.readUint32BE() == 'QTBL') {
if (tableFile.readUint32BE() != CURRENT_TBL_VERSION)
@@ -214,7 +214,7 @@ void Resource::readTableCompResource() {
readTableEntries(_resourceFile);
}
-void Resource::readTableEntries(File *file) {
+void Resource::readTableEntries(Common::File *file) {
_resourceEntries = file->readUint16BE();
_resourceTable = new ResourceEntry[_resourceEntries];
for (uint16 i = 0; i < _resourceEntries; ++i) {
@@ -237,7 +237,7 @@ const GameVersion *Resource::detectGameVersion(uint32 size) const {
return NULL;
}
-File *Resource::giveCompressedSound(const char *filename, uint32 *size) {
+Common::File *Resource::giveCompressedSound(const char *filename, uint32 *size) {
assert(strstr(filename, ".SB"));
ResourceEntry *re = resourceEntry(filename);
assert(re != NULL);
diff --git a/queen/resource.h b/queen/resource.h
index 920b2405e9..7e45a75453 100644
--- a/queen/resource.h
+++ b/queen/resource.h
@@ -68,7 +68,7 @@ public:
bool fileExists(const char *filename) const { return resourceEntry(filename) != NULL; }
//! returns a reference to a sound file
- File *giveCompressedSound(const char *filename, uint32 *size);
+ Common::File *giveCompressedSound(const char *filename, uint32 *size);
bool isDemo() const { return !strcmp(_versionString, "PE100"); }
bool isInterview() const { return !strcmp(_versionString, "PEint"); }
@@ -114,7 +114,7 @@ public:
protected:
- File *_resourceFile;
+ Common::File *_resourceFile;
//! compression type for audio files
uint8 _compression;
@@ -146,7 +146,7 @@ protected:
void readTableCompResource();
//! read the resource table from the specified file
- void readTableEntries(File *file);
+ void readTableEntries(Common::File *file);
//! detect game version based on queen.1 datafile size
const GameVersion *detectGameVersion(uint32 size) const;
diff --git a/queen/sound.cpp b/queen/sound.cpp
index 0170d451bc..7e8b8bc306 100644
--- a/queen/sound.cpp
+++ b/queen/sound.cpp
@@ -200,7 +200,7 @@ void SBSound::sfxPlay(const char *name, bool isSpeech) {
#ifdef USE_MAD
void MP3Sound::sfxPlay(const char *name, bool isSpeech) {
uint32 size;
- File *f = _vm->resource()->giveCompressedSound(name, &size);
+ Common::File *f = _vm->resource()->giveCompressedSound(name, &size);
_mixer->playInputStream(SoundMixer::kSFXSoundType, isSpeech ? &_speechHandle : &_sfxHandle, makeMP3Stream(f, size));
}
#endif
@@ -208,7 +208,7 @@ void MP3Sound::sfxPlay(const char *name, bool isSpeech) {
#ifdef USE_VORBIS
void OGGSound::sfxPlay(const char *name, bool isSpeech) {
uint32 size;
- File *f = _vm->resource()->giveCompressedSound(name, &size);
+ Common::File *f = _vm->resource()->giveCompressedSound(name, &size);
_mixer->playInputStream(SoundMixer::kSFXSoundType, isSpeech ? &_speechHandle : &_sfxHandle, makeVorbisStream(f, size));
}
#endif
@@ -216,7 +216,7 @@ void OGGSound::sfxPlay(const char *name, bool isSpeech) {
#ifdef USE_FLAC
void FLACSound::sfxPlay(const char *name, bool isSpeech) {
uint32 size;
- File *f = _vm->resource()->giveCompressedSound(name, &size);
+ Common::File *f = _vm->resource()->giveCompressedSound(name, &size);
_mixer->playInputStream(SoundMixer::kSFXSoundType, isSpeech ? &_speechHandle : &_sfxHandle, makeFlacStream(f, size));
}
#endif
diff --git a/queen/talk.cpp b/queen/talk.cpp
index bbf623e791..c2976ffb5c 100644
--- a/queen/talk.cpp
+++ b/queen/talk.cpp
@@ -355,7 +355,7 @@ byte *Talk::loadDialogFile(const char *filename) {
for (int i = 0; i < ARRAYSIZE(dogFiles); ++i) {
if (!scumm_stricmp(filename, dogFiles[i].filename) &&
_vm->resource()->getLanguage() == dogFiles[i].lang) {
- File fdog;
+ Common::File fdog;
fdog.open(filename);
if (fdog.isOpen()) {
debug(6, "Loading dog file '%s' from game data path", filename);