diff options
-rw-r--r-- | kyra/saveload.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/kyra/saveload.cpp b/kyra/saveload.cpp index 65a4297d84..4808ef32bc 100644 --- a/kyra/saveload.cpp +++ b/kyra/saveload.cpp @@ -22,6 +22,7 @@ #include "kyra/kyra.h" #include "kyra/animator.h" #include "kyra/screen.h" +#include "kyra/resource.h" #include "common/savefile.h" #include "common/system.h" @@ -69,6 +70,17 @@ void KyraEngine::loadGame(const char *fileName) { warning("Make sure your savefile was from this version! (too old savefile version to detect that)"); } + // unload the current voice file should fix some problems with voices + if (_currentRoom != 0xFFFF && (_features & GF_TALKIE)) { + char file[32]; + assert(_currentRoom < _roomTableSize); + int tableId = _roomTable[_currentRoom].nameIndex; + assert(tableId < _roomFilenameTableSize); + strcpy(file, _roomFilenameTable[tableId]); + strcat(file, ".VRM"); + _res->unloadPakFile(file); + } + int brandonX = 0, brandonY = 0; for (int i = 0; i < 11; i++) { _characterList[i].sceneId = in->readUint16BE(); |