diff options
author | Eugene Sandulenko | 2004-12-22 13:09:47 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2004-12-22 13:09:47 +0000 |
commit | 2fb8a8e45369b000b9f36d2433425ca48f6d9d13 (patch) | |
tree | 7b0c6ad4c4e004a2d58302e2cc57f226be7c13a8 /saga/sndres.cpp | |
parent | eaa0f3b9740b81fff59792de55f335c149344c69 (diff) | |
download | scummvm-rg350-2fb8a8e45369b000b9f36d2433425ca48f6d9d13.tar.gz scummvm-rg350-2fb8a8e45369b000b9f36d2433425ca48f6d9d13.tar.bz2 scummvm-rg350-2fb8a8e45369b000b9f36d2433425ca48f6d9d13.zip |
o Moved GAME_* to SagaEngine object
o Renamed GAME_ITE_* to GID_ITE_*
o Renamed GID_ITE and GID_IHNM to GType_ITE and GType_IHNM
svn-id: r16258
Diffstat (limited to 'saga/sndres.cpp')
-rw-r--r-- | saga/sndres.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/saga/sndres.cpp b/saga/sndres.cpp index 38e1fdfcae..89154c7d84 100644 --- a/saga/sndres.cpp +++ b/saga/sndres.cpp @@ -25,7 +25,6 @@ #include "saga/saga.h" -#include "saga/game_mod.h" #include "saga/rscfile_mod.h" #include "saga/sndres.h" @@ -40,18 +39,18 @@ namespace Saga { SndRes::SndRes(SagaEngine *vm) : _vm(vm) { /* Load sound module resource file contexts */ - _sfx_ctxt = GAME_GetFileContext(GAME_SOUNDFILE, 0); + _sfx_ctxt = _vm->getFileContext(GAME_SOUNDFILE, 0); if (_sfx_ctxt == NULL) { return; } - _voice_ctxt = GAME_GetFileContext(GAME_VOICEFILE, 0); + _voice_ctxt = _vm->getFileContext(GAME_VOICEFILE, 0); if (_voice_ctxt == NULL) { return; } // Grab sound resource information for the current game - GAME_GetSoundInfo(&_snd_info); + _snd_info = _vm->getSoundInfo(); _init = 1; } @@ -78,7 +77,7 @@ int SndRes::playVoice(uint32 voice_rn) { debug(0, "SndRes::playVoice(%ld)", voice_rn); - if (GAME_GetGameType() == GID_ITE && voice_rn == 4) { + if (_vm->_gameType == GType_ITE && voice_rn == 4) { // 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, if available. @@ -122,7 +121,7 @@ int SndRes::playVoice(uint32 voice_rn) { return FAILURE; } - if (GAME_GetFeatures() & GF_VOX_VOICES && !voiceFile) + if (_vm->_features & GF_VOX_VOICES && !voiceFile) _vm->_sound->playVoxVoice(&snd_buffer); else _vm->_sound->playVoice(&snd_buffer); @@ -274,7 +273,7 @@ int SndRes::getVoiceLength(uint32 voice_rn) { // (p2_a.voc or P2_A.iaf), to correct voice 4 in the intro. Use that, // if available. - if (GAME_GetGameType() == GID_ITE && voice_rn == 4) { + if (_vm->_gameType == GType_ITE && voice_rn == 4) { if (f.open("p2_a.voc")) { result = SUCCESS; length = f.size(); @@ -298,7 +297,7 @@ int SndRes::getVoiceLength(uint32 voice_rn) { } } - if (GAME_GetFeatures() & GF_VOX_VOICES && !voiceFile) { + if (_vm->_features & GF_VOX_VOICES && !voiceFile) { // Rough hack, fix this to be accurate ms_f = (double)length / 22050 * 2000.0; ms_i = (int)ms_f; |