diff options
author | Johannes Schickel | 2008-05-06 17:30:31 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-05-06 17:30:31 +0000 |
commit | 2ee01bf757ace2cf24835c34baa18ce6711bea54 (patch) | |
tree | 80e690f5f057ccd00f386407b3f66829da3e88a2 /engines/kyra/kyra_hof.cpp | |
parent | 2976f961fe09c33e350fd8c6b4ccaddad738bf16 (diff) | |
download | scummvm-rg350-2ee01bf757ace2cf24835c34baa18ce6711bea54.tar.gz scummvm-rg350-2ee01bf757ace2cf24835c34baa18ce6711bea54.tar.bz2 scummvm-rg350-2ee01bf757ace2cf24835c34baa18ce6711bea54.zip |
- Fixed valgrind warnings in HoF
- Fixed memory leaks in HoF
svn-id: r31903
Diffstat (limited to 'engines/kyra/kyra_hof.cpp')
-rw-r--r-- | engines/kyra/kyra_hof.cpp | 8 |
1 files changed, 7 insertions, 1 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"); |