mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-10 03:40:25 +00:00
HDB: Add destructors to Picture and Tile
_surface is freed in the destructors for Picture and Tile
This commit is contained in:
parent
7a00e0b6a1
commit
6e6de19c77
@ -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);
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user