diff options
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/resource.cpp | 10 | ||||
-rw-r--r-- | engines/saga/resource.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/engines/saga/resource.cpp b/engines/saga/resource.cpp index 6ab4fc878e..9590a99272 100644 --- a/engines/saga/resource.cpp +++ b/engines/saga/resource.cpp @@ -197,8 +197,6 @@ bool Resource::loadContext(ResourceContext *context) { bool Resource::createContexts() { int i; ResourceContext *context; - char musicFileName[256]; - char soundFileName[256]; int soundFileIndex = 0; int voicesFileIndex = 0; bool digitalMusic = false; @@ -288,7 +286,7 @@ bool Resource::createContexts() { if (Common::File::exists(curSoundfiles[i].fileName)) { _contextsCount++; soundFileIndex = _contextsCount - 1; - strcpy(soundFileName, curSoundfiles[i].fileName); + strcpy(_soundFileName, curSoundfiles[i].fileName); compressedSounds = curSoundfiles[i].isCompressed; fileFound = true; break; @@ -431,7 +429,7 @@ bool Resource::createContexts() { digitalMusic = true; compressedMusic = musicFilesITE[i].isCompressed; fileFound = true; - strcpy(musicFileName, musicFilesITE[i].fileName); + strcpy(_musicFileName, musicFilesITE[i].fileName); break; } } @@ -451,11 +449,11 @@ bool Resource::createContexts() { // For ITE, add the digital music file and sfx file information here if (_vm->getGameId() == GID_ITE && digitalMusic && i == _contextsCount - 1) { - context->fileName = musicFileName; + context->fileName = _musicFileName; context->fileType = GAME_DIGITALMUSICFILE; context->isCompressed = compressedMusic; } else if (!soundFileInArray && i == soundFileIndex) { - context->fileName = soundFileName; + context->fileName = _soundFileName; context->fileType = GAME_SOUNDFILE; context->isCompressed = compressedSounds; } else if (_vm->_voiceFilesExist && i == voicesFileIndex && !(_vm->getGameId() == GID_IHNM && _vm->isMacResources())) { diff --git a/engines/saga/resource.h b/engines/saga/resource.h index f861f0f52e..c3554cf7ce 100644 --- a/engines/saga/resource.h +++ b/engines/saga/resource.h @@ -158,6 +158,8 @@ protected: ResourceContext *_contexts; int _contextsCount; char _voicesFileName[8][256]; + char _musicFileName[256]; + char _soundFileName[256]; bool loadContext(ResourceContext *context); virtual bool loadMacContext(ResourceContext *context) = 0; |