diff options
Diffstat (limited to 'engines/fullpipe/gameloader.cpp')
-rw-r--r-- | engines/fullpipe/gameloader.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index 28a3964285..aebf73dbe4 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -85,6 +85,23 @@ GameLoader::~GameLoader() { g_fp->_gameLoader = 0; + for (uint i = 0; i < _sc2array.size(); i++) { + if (_sc2array[i]._defPicAniInfos) + free(_sc2array[i]._defPicAniInfos); + + if (_sc2array[i]._picAniInfos) + free(_sc2array[i]._picAniInfos); + + if (_sc2array[i]._motionController) + delete _sc2array[i]._motionController; + + if (_sc2array[i]._data1) + free(_sc2array[i]._data1); + + if (_sc2array[i]._entranceData) + free(_sc2array[i]._entranceData); + } + delete _gameVar; _gameVar = 0; @@ -600,23 +617,6 @@ Sc2::Sc2() { _entranceDataCount = 0; } -Sc2::~Sc2() { - delete _motionController; - free(_data1); - - for (int i = 0; i < _defPicAniInfosCount; i++) - delete _defPicAniInfos[i]; - free(_defPicAniInfos); - - for (int i = 0; i < _entranceDataCount; i++) - delete _entranceData[i]; - free(_entranceData); - - for (int i = 0; i < _picAniInfosCount; i++) - delete _picAniInfos[i]; - free(_picAniInfos); -} - bool Sc2::load(MfcArchive &file) { debugC(5, kDebugLoading, "Sc2::load()"); |