aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray2005-08-10 12:42:56 +0000
committerJonathan Gray2005-08-10 12:42:56 +0000
commit603a5e4d6f7403d3d797ead4b4cc909ab55c34d1 (patch)
tree7d2419b901c71a0e6c823d4a7b07abebaf610dd7
parent3c1b5648aed0be45b303cea49e7537c98dd4a001 (diff)
downloadscummvm-rg350-603a5e4d6f7403d3d797ead4b4cc909ab55c34d1.tar.gz
scummvm-rg350-603a5e4d6f7403d3d797ead4b4cc909ab55c34d1.tar.bz2
scummvm-rg350-603a5e4d6f7403d3d797ead4b4cc909ab55c34d1.zip
Don't explicity check for tremor and vorbis everywhere and
require both USE_TREMOR and USE_VORBIS to be defined when using tremor. svn-id: r18642
-rw-r--r--backends/gp32/build.rules2
-rw-r--r--base/engine.cpp2
-rwxr-xr-xconfigure1
-rw-r--r--queen/sound.cpp4
-rw-r--r--queen/sound.h2
-rw-r--r--scumm/imuse_digi/dimuse_sndmgr.cpp4
-rw-r--r--scumm/smush/smush_player.cpp4
-rw-r--r--scumm/sound.cpp4
-rw-r--r--simon/sound.cpp6
-rw-r--r--sound/audiocd.cpp2
-rw-r--r--sound/audiostream.cpp2
-rw-r--r--sound/vorbis.cpp2
-rw-r--r--sound/vorbis.h2
-rw-r--r--sword1/animation.cpp4
-rw-r--r--sword1/music.cpp4
-rw-r--r--sword1/sound.cpp4
-rw-r--r--sword1/sword1.cpp2
-rw-r--r--sword2/driver/d_sound.cpp4
18 files changed, 28 insertions, 27 deletions
diff --git a/backends/gp32/build.rules b/backends/gp32/build.rules
index 605afdee36..44c0a9538d 100644
--- a/backends/gp32/build.rules
+++ b/backends/gp32/build.rules
@@ -75,7 +75,7 @@ DEFINES = -D__GP32__
DEFINES += -DNONSTANDARD_PORT
# Support Vorbis Tremor Patches.
-#DEFINES += -DVORBIS_TREMOR
+#DEFINES += -DUSE_TREMOR
# Support LIBMAD Patches.
#DEFINES += -DGP32_MADMP3
diff --git a/base/engine.cpp b/base/engine.cpp
index 0fd5aaee6e..d84728a2e0 100644
--- a/base/engine.cpp
+++ b/base/engine.cpp
@@ -94,7 +94,7 @@ void Engine::checkCD() {
// If we can find a compressed audio track, then it should be ok even
// if it's running from CD.
-#if defined(USE_VORBIS) || defined(USE_TREMOR)
+#ifdef USE_VORBIS
if (Common::File::exists("track1.ogg"))
return;
#endif
diff --git a/configure b/configure
index 4be20adbc2..d6032f8426 100755
--- a/configure
+++ b/configure
@@ -945,6 +945,7 @@ cc_check $LDFLAGS $CXXFLAGS $TREMOR_CFLAGS $TREMOR_LIBS -lvorbisidec && \
fi
if test "$_tremor" = yes && test "$_vorbis" = no; then
_def_tremor='#define USE_TREMOR'
+ _def_vorbis='#define USE_VORBIS'
LIBS="$LIBS $TREMOR_LIBS -lvorbisidec"
INCLUDES="$INCLUDES $TREMOR_CFLAGS"
else
diff --git a/queen/sound.cpp b/queen/sound.cpp
index d9f3b84cc5..97f464989c 100644
--- a/queen/sound.cpp
+++ b/queen/sound.cpp
@@ -60,7 +60,7 @@ Sound *Sound::giveSound(Audio::Mixer *mixer, QueenEngine *vm, uint8 compression)
#endif
break;
case COMPRESSION_OGG:
-#if !defined(USE_VORBIS) && !defined(USE_TREMOR)
+#ifndef USE_VORBIS
warning("Using OGG compressed datafile, but OGG support not compiled in");
return new SilentSound(mixer, vm);
#else
@@ -205,7 +205,7 @@ void MP3Sound::sfxPlay(const char *name, bool isSpeech) {
}
#endif
-#if defined(USE_VORBIS) || defined(USE_TREMOR)
+#ifdef USE_VORBIS
void OGGSound::sfxPlay(const char *name, bool isSpeech) {
uint32 size;
Common::File *f = _vm->resource()->giveCompressedSound(name, &size);
diff --git a/queen/sound.h b/queen/sound.h
index fdc6cd2e03..5ab078d150 100644
--- a/queen/sound.h
+++ b/queen/sound.h
@@ -138,7 +138,7 @@ public:
};
#endif
-#if defined(USE_VORBIS) || defined(USE_TREMOR)
+#ifdef USE_VORBIS
class OGGSound : public Sound {
public:
OGGSound(Audio::Mixer *mixer, QueenEngine *vm) : Sound(mixer, vm) {};
diff --git a/scumm/imuse_digi/dimuse_sndmgr.cpp b/scumm/imuse_digi/dimuse_sndmgr.cpp
index 508ae8e495..4c47ddaf16 100644
--- a/scumm/imuse_digi/dimuse_sndmgr.cpp
+++ b/scumm/imuse_digi/dimuse_sndmgr.cpp
@@ -588,7 +588,7 @@ int32 ImuseDigiSndMgr::getDataFromRegion(soundStruct *soundHandle, int region, b
if (!len) {
sprintf(fileName, "%s_reg%03d.ogg", soundHandle->name, region);
cmpFile = soundHandle->bundle->getFile(fileName, offs, len);
-#if !defined(USE_VORBIS) && !defined(USE_TREMOR)
+#ifndef USE_VORBIS
if (len)
error("Vorbis library compiled support needed!");
#endif
@@ -596,7 +596,7 @@ int32 ImuseDigiSndMgr::getDataFromRegion(soundStruct *soundHandle, int region, b
oggMode = true;
}
if (!soundHandle->compressedStream) {
-#if defined(USE_VORBIS) || defined(USE_TREMOR)
+#ifdef USE_VORBIS
if (oggMode)
soundHandle->compressedStream = makeVorbisStream(cmpFile, len);
#endif
diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp
index e3b2d836e4..9ce66eb44e 100644
--- a/scumm/smush/smush_player.cpp
+++ b/scumm/smush/smush_player.cpp
@@ -1199,7 +1199,7 @@ void SmushPlayer::tryCmpFile(const char *filename) {
if (i == NULL) {
error("invalid filename : %s", filename);
}
-#if defined(USE_MAD) || defined(USE_VORBIS) || defined(USE_TREMOR)
+#if defined(USE_MAD) || defined(USE_VORBIS)
char fname[260];
#endif
#ifdef USE_MAD
@@ -1213,7 +1213,7 @@ void SmushPlayer::tryCmpFile(const char *filename) {
return;
}
#endif
-#if defined(USE_VORBIS) || defined(USE_TREMOR)
+#ifdef USE_VORBIS
memcpy(fname, filename, i - filename);
strcpy(fname + (i - filename), ".ogg");
_compressedFile.open(fname);
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index 00d9d48610..a3ea155c6f 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -792,7 +792,7 @@ void Sound::startTalkSound(uint32 offset, uint32 b, int mode, Audio::SoundHandle
#endif
break;
case kVorbisMode:
- #if defined(USE_VORBIS) || defined(USE_TREMOR)
+ #ifdef USE_VORBIS
assert(size > 0);
input = makeVorbisStream(_sfxFile, size);
#endif
@@ -1124,7 +1124,7 @@ ScummFile *Sound::openSfxFile() {
#ifdef USE_FLAC
{ "sof", kFlacMode },
#endif
- #if defined(USE_VORBIS) || defined(USE_TREMOR)
+ #ifdef USE_VORBIS
{ "sog", kVorbisMode },
#endif
#ifdef USE_MAD
diff --git a/simon/sound.cpp b/simon/sound.cpp
index 591d2c9b3e..606328366d 100644
--- a/simon/sound.cpp
+++ b/simon/sound.cpp
@@ -183,7 +183,7 @@ void MP3Sound::playSound(uint sound, Audio::SoundHandle *handle, byte flags)
}
#endif
-#if defined(USE_VORBIS) || defined(USE_TREMOR)
+#ifdef USE_VORBIS
class VorbisSound : public BaseSound {
public:
VorbisSound(Audio::Mixer *mixer, File *file, uint32 base = 0) : BaseSound(mixer, file, base) {};
@@ -271,7 +271,7 @@ Sound::Sound(const byte game, const GameSpecificSettings *gss, Audio::Mixer *mix
}
}
#endif
-#if defined(USE_VORBIS) || defined(USE_TREMOR)
+#ifdef USE_VORBIS
if (!_voice && gss->vorbis_filename && gss->vorbis_filename[0]) {
file->open(gss->vorbis_filename);
if (file->isOpen()) {
@@ -323,7 +323,7 @@ Sound::Sound(const byte game, const GameSpecificSettings *gss, Audio::Mixer *mix
}
}
#endif
-#if defined(USE_VORBIS) || defined(USE_TREMOR)
+#ifdef USE_VORBIS
if (!_effects && gss->vorbis_effects_filename && gss->vorbis_effects_filename[0]) {
file->open(gss->vorbis_effects_filename);
if (file->isOpen()) {
diff --git a/sound/audiocd.cpp b/sound/audiocd.cpp
index dee17a0910..a08937a713 100644
--- a/sound/audiocd.cpp
+++ b/sound/audiocd.cpp
@@ -47,7 +47,7 @@ static const TrackFormat TRACK_FORMATS[] = {
#ifdef USE_FLAC
{ "Flac", getFlacTrack },
#endif
-#if defined(USE_VORBIS) || defined(USE_TREMOR)
+#ifdef USE_VORBIS
{ "Ogg Vorbis", getVorbisTrack },
#endif
#ifdef USE_MAD
diff --git a/sound/audiostream.cpp b/sound/audiostream.cpp
index 776322d0fe..019f088b9b 100644
--- a/sound/audiostream.cpp
+++ b/sound/audiostream.cpp
@@ -45,7 +45,7 @@ static const StreamFileFormat STREAM_FILEFORMATS[] = {
{ "Flac", "flac", makeFlacStream },
{ "Flac", "fla", makeFlacStream },
#endif
-#if defined(USE_VORBIS) || defined(USE_TREMOR)
+#ifdef USE_VORBIS
{ "Ogg Vorbis", "ogg", makeVorbisStream },
#endif
#ifdef USE_MAD
diff --git a/sound/vorbis.cpp b/sound/vorbis.cpp
index 669293a90f..99170102cb 100644
--- a/sound/vorbis.cpp
+++ b/sound/vorbis.cpp
@@ -21,7 +21,7 @@
#include "sound/vorbis.h"
-#if defined(USE_TREMOR) || defined(USE_VORBIS)
+#ifdef USE_VORBIS
#include "common/file.h"
#include "common/util.h"
diff --git a/sound/vorbis.h b/sound/vorbis.h
index fe8da6881f..6f3796afff 100644
--- a/sound/vorbis.h
+++ b/sound/vorbis.h
@@ -25,7 +25,7 @@
#include "common/stdafx.h"
#include "common/scummsys.h"
-#if defined(USE_VORBIS) || defined(USE_TREMOR)
+#ifdef USE_VORBIS
class AudioStream;
class DigitalTrackInfo;
diff --git a/sword1/animation.cpp b/sword1/animation.cpp
index 7b768d0458..18082374a3 100644
--- a/sword1/animation.cpp
+++ b/sword1/animation.cpp
@@ -100,7 +100,7 @@ MoviePlayer::~MoviePlayer(void) {
* @param id the id of the file
*/
void MoviePlayer::play(uint32 id) {
-#if defined(USE_MPEG2) && (defined(USE_VORBIS) || defined(USE_TREMOR))
+#if defined(USE_MPEG2) && defined(USE_VORBIS)
AnimationState *anim = new AnimationState(_scr, _snd, _sys);
AudioStream *stream = NULL;
if (SwordEngine::_systemVars.cutscenePackVersion == 1) {
@@ -166,7 +166,7 @@ void MoviePlayer::play(uint32 id) {
while (!anim->soundFinished())
_sys->delayMillis(100);
delete anim;
-#endif // USE_MPEG2 && (USE_VORBIS || USE_TREMOR)
+#endif // USE_MPEG2 && USE_VORBIS
}
void MoviePlayer::insertOverlay(OverlayColor *buf, uint8 *ovl, OverlayColor *pal) {
diff --git a/sword1/music.cpp b/sword1/music.cpp
index ff6c817880..b15fa6145e 100644
--- a/sword1/music.cpp
+++ b/sword1/music.cpp
@@ -114,7 +114,7 @@ AudioStream *MusicHandle::createAudioSource(void) {
case MusicMp3:
return makeMP3Stream(&_file, _file.size());
#endif
-#if defined(USE_VORBIS) || defined(USE_TREMOR)
+#ifdef USE_VORBIS
case MusicVorbis:
return makeVorbisStream(&_file, _file.size());
#endif
@@ -138,7 +138,7 @@ bool MusicHandle::play(const char *fileBase, bool loop) {
if (_file.open(fileName))
_musicMode = MusicMp3;
#endif
-#if defined(USE_VORBIS) || defined(USE_TREMOR)
+#ifdef USE_VORBIS
if (!_file.isOpen()) { // mp3 doesn't exist (or not compiled with MAD support)
sprintf(fileName, "%s.ogg", fileBase);
if (_file.open(fileName))
diff --git a/sword1/sound.cpp b/sword1/sound.cpp
index b6605b5fd8..ee6aca37b2 100644
--- a/sword1/sound.cpp
+++ b/sword1/sound.cpp
@@ -203,7 +203,7 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) {
_waveVolPos = 0;
}
#endif
-#if defined(USE_VORBIS) || defined(USE_TREMOR)
+#ifdef USE_VORBIS
else if (_cowMode == CowVorbis) {
_cowFile.seek(index);
_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_speechHandle, makeVorbisStream(&_cowFile, sampleSize), SOUND_SPEECH_ID, speechVol, speechPan);
@@ -329,7 +329,7 @@ void Sound::initCowSystem(void) {
_cowMode = CowMp3;
}
#endif
-#if defined(USE_VORBIS) || defined(USE_TREMOR)
+#ifdef USE_VORBIS
if (!_cowFile.isOpen()) {
sprintf(cowName, "SPEECH%d.CLV", SwordEngine::_systemVars.currentCD);
_cowFile.open(cowName);
diff --git a/sword1/sword1.cpp b/sword1/sword1.cpp
index bb1e6c32a1..4475198940 100644
--- a/sword1/sword1.cpp
+++ b/sword1/sword1.cpp
@@ -297,7 +297,7 @@ const CdFile SwordEngine::_cdFileList[] = {
,{ "speech1.cl3", FLAG_SPEECH1 },
{ "speech2.cl3", FLAG_SPEECH2 }
#endif
-#if defined(USE_VORBIS) || defined(USE_TREMOR)
+#ifdef USE_VORBIS
,{ "speech1.clv", FLAG_SPEECH1 },
{ "speech2.clv", FLAG_SPEECH2 }
#endif
diff --git a/sword2/driver/d_sound.cpp b/sword2/driver/d_sound.cpp
index 3b408417f1..f24646a9af 100644
--- a/sword2/driver/d_sound.cpp
+++ b/sword2/driver/d_sound.cpp
@@ -51,7 +51,7 @@ static AudioStream *getAudioStream(SoundFileHandle *fh, const char *base, int cd
#ifdef USE_MAD
{ "cl3", kMP3Mode },
#endif
- #if defined(USE_VORBIS) || defined(USE_TREMOR)
+ #ifdef USE_VORBIS
{ "clg", kVorbisMode },
#endif
#ifdef USE_FLAC
@@ -135,7 +135,7 @@ static AudioStream *getAudioStream(SoundFileHandle *fh, const char *base, int cd
case kMP3Mode:
return makeMP3Stream(fh->file, enc_len);
#endif
-#if defined(USE_VORBIS) || defined(USE_TREMOR)
+#ifdef USE_VORBIS
case kVorbisMode:
return makeVorbisStream(fh->file, enc_len);
#endif