diff options
Diffstat (limited to 'engines/sludge/graphics.cpp')
-rw-r--r-- | engines/sludge/graphics.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/sludge/graphics.cpp b/engines/sludge/graphics.cpp index 626c8a20c7..d0333bac8f 100644 --- a/engines/sludge/graphics.cpp +++ b/engines/sludge/graphics.cpp @@ -30,6 +30,7 @@ #include "sludge/sludge.h" #include "sludge/sludger.h" #include "sludge/sprites.h" +#include "sludge/sprbanks.h" #include "sludge/zbuffer.h" namespace Sludge { @@ -62,6 +63,9 @@ GraphicsManager::GraphicsManager(SludgeEngine *vm) { _spriteLayers = new SpriteLayers; _spriteLayers->numLayers = 0; + // Sprite Bank + _allLoadedBanks.clear(); + // ZBuffer _zBuffer = new ZBufferData; _zBuffer->originalNum = -1; @@ -98,6 +102,14 @@ GraphicsManager::~GraphicsManager() { delete _spriteLayers; _spriteLayers = nullptr; + // kill sprite banks + LoadedSpriteBanks::iterator it; + for (it = _allLoadedBanks.begin(); it != _allLoadedBanks.end(); ++it) { + delete (*it); + (*it) = nullptr; + } + _allLoadedBanks.clear(); + // kill zbuffer killZBuffer(); delete _zBuffer; |