aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNipun Garg2019-07-04 23:30:09 +0530
committerEugene Sandulenko2019-09-03 17:17:11 +0200
commitac04002411d4094359c9f2722cecb41dd740d861 (patch)
tree6a9c19a6688c80b6cc0c12b888f572be43d13636
parentd70888269ed5dc5aacf55b5eacdacffcaa311f5c (diff)
downloadscummvm-rg350-ac04002411d4094359c9f2722cecb41dd740d861.tar.gz
scummvm-rg350-ac04002411d4094359c9f2722cecb41dd740d861.tar.bz2
scummvm-rg350-ac04002411d4094359c9f2722cecb41dd740d861.zip
HDB: Add Tile::free() and Picture::free()
-rw-r--r--engines/hdb/gfx.cpp8
-rw-r--r--engines/hdb/gfx.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp
index 36ec659e0b..6c14f57f63 100644
--- a/engines/hdb/gfx.cpp
+++ b/engines/hdb/gfx.cpp
@@ -758,6 +758,10 @@ int Picture::drawMasked(int x, int y) {
return 0;
}
+void Picture::free() {
+ _surface.free();
+}
+
Tile::Tile() : _flags(0), _name("") {
_surface.create(32, 32, g_hdb->_format);
}
@@ -812,4 +816,8 @@ int Tile::drawMasked(int x, int y) {
return 0;
}
+void Tile::free() {
+ _surface.free();
+}
+
}
diff --git a/engines/hdb/gfx.h b/engines/hdb/gfx.h
index 849ae693ea..83af1e49da 100644
--- a/engines/hdb/gfx.h
+++ b/engines/hdb/gfx.h
@@ -219,6 +219,7 @@ public:
Graphics::Surface load(Common::SeekableReadStream *stream);
int draw(int x, int y);
int drawMasked(int x, int y);
+ void free();
uint _width, _height;
@@ -241,6 +242,7 @@ public:
Graphics::Surface load(Common::SeekableReadStream *stream);
int draw(int x, int y);
int drawMasked(int x, int y);
+ void free();
uint32 _flags;