diff options
-rw-r--r-- | engines/kyra/kyra_hof.cpp | 8 | ||||
-rw-r--r-- | engines/kyra/sequences_hof.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/staticres.cpp | 3 |
3 files changed, 9 insertions, 4 deletions
diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index 9716c7edc1..f400173cb0 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -140,6 +140,8 @@ KyraEngine_HoF::KyraEngine_HoF(OSystem *system, const GameFlags &flags) : KyraEn _menuDirectlyToLoad = false; _menu = 0; + _chatIsNote = false; + memset(&_npcScriptData, 0, sizeof(_npcScriptData)); } KyraEngine_HoF::~KyraEngine_HoF() { @@ -792,6 +794,8 @@ void KyraEngine_HoF::cleanup() { delete [] _buttonShapes[i]; _buttonShapes[i] = 0; } + + _emc->unload(&_npcScriptData); } #pragma mark - Localization @@ -1006,7 +1010,7 @@ void KyraEngine_HoF::loadMouseShapes() { _screen->loadBitmap("_MOUSE.CSH", 3, 3, 0); for (int i = 0; i <= 8; ++i) - addShapeToPool(_screen->makeShapeCopy(_screen->getCPagePtr(3), i), i); + addShapeToPool(_screen->getCPagePtr(3), i, i); } void KyraEngine_HoF::loadItemShapes() { @@ -1068,6 +1072,8 @@ void KyraEngine_HoF::runStartScript(int script, int unk1) { } void KyraEngine_HoF::loadNPCScript() { + _emc->unload(&_npcScriptData); + char filename[12]; strcpy(filename, "_NPC.EMC"); diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp index 1c74f48990..050b00c878 100644 --- a/engines/kyra/sequences_hof.cpp +++ b/engines/kyra/sequences_hof.cpp @@ -2665,8 +2665,6 @@ void KyraEngine_HoF::seq_uninit() { if (_flags.isDemo && !_flags.isTalkie) _staticres->unloadId(k2SeqplayShapeAnimData); - _gameShapes.clear(); - delete _menu; _menu = 0; } diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 16d7ca4d9b..c9d81cc92a 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -831,7 +831,8 @@ void StaticResource::freeRawData(void *&ptr, int &size) { void StaticResource::freeStringTable(void *&ptr, int &size) { char **data = (char**)ptr; while (size--) - delete [] data[size]; + delete[] data[size]; + delete[] data; ptr = 0; size = 0; } |