diff options
-rw-r--r-- | engines/hdb/draw-manager.cpp | 8 | ||||
-rw-r--r-- | engines/hdb/draw-manager.h | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/engines/hdb/draw-manager.cpp b/engines/hdb/draw-manager.cpp index 7e558e04a5..80ba1c77d5 100644 --- a/engines/hdb/draw-manager.cpp +++ b/engines/hdb/draw-manager.cpp @@ -38,6 +38,10 @@ void DrawMan::loadTile32(char *name, uint32 *length) { } +Picture::~Picture() { + _surface.free(); +} + Graphics::Surface Picture::load(Common::SeekableReadStream *stream) { _width = stream->readUint32LE(); _height = stream->readUint32LE(); @@ -64,6 +68,10 @@ Graphics::Surface Picture::load(Common::SeekableReadStream *stream) { return _surface; } +Tile::~Tile() { + _surface.free(); +} + Graphics::Surface Tile::load(Common::SeekableReadStream *stream) { _flags = stream->readUint32LE(); stream->read(_name, 64); diff --git a/engines/hdb/draw-manager.h b/engines/hdb/draw-manager.h index 0f8d0442dc..9845ffa16e 100644 --- a/engines/hdb/draw-manager.h +++ b/engines/hdb/draw-manager.h @@ -64,6 +64,8 @@ private: class Picture { public: + ~Picture(); + Graphics::Surface load(Common::SeekableReadStream *stream); private: @@ -77,6 +79,9 @@ private: class Tile { public: + + ~Tile(); + Graphics::Surface load(Common::SeekableReadStream *stream); private: |