diff options
Diffstat (limited to 'engines/gob/mult.cpp')
-rw-r--r-- | engines/gob/mult.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/gob/mult.cpp b/engines/gob/mult.cpp index 924cc9a4a7..70b6d33136 100644 --- a/engines/gob/mult.cpp +++ b/engines/gob/mult.cpp @@ -36,6 +36,7 @@ #include "gob/scenery.h" #include "gob/sound.h" #include "gob/video.h" +#include "gob/videoplayer.h" namespace Gob { @@ -120,6 +121,8 @@ void Mult::freeAll(void) { } void Mult::freeMult() { + clearObjectVideos(); + delete[] _objects; delete[] _renderData; delete[] _renderObjs; @@ -198,6 +201,8 @@ void Mult::playMult(int16 startFrame, int16 endFrame, char checkEscape, if (!stopNoClear) { if (_animDataAllocated) { + clearObjectVideos(); + delete[] _objects; delete[] _renderData; delete[] _renderObjs; @@ -424,4 +429,10 @@ void Mult::doSoundAnim(bool &stop, int16 frame) { } } +void Mult::clearObjectVideos() { + for (int i = 0; i < _objCount; i++) + if (_objects[i].videoSlot > 0) + _vm->_vidPlayer->slotClose(_objects[i].videoSlot - 1); +} + } // End of namespace Gob |