diff options
-rw-r--r-- | engines/cge2/bitmap.cpp | 6 | ||||
-rw-r--r-- | engines/cge2/bitmap.h | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/engines/cge2/bitmap.cpp b/engines/cge2/bitmap.cpp index 39483b067d..4bde584ec8 100644 --- a/engines/cge2/bitmap.cpp +++ b/engines/cge2/bitmap.cpp @@ -111,10 +111,12 @@ Bitmap::Bitmap(CGE2Engine *vm, const Bitmap &bmp) : _w(bmp._w), _h(bmp._h), _m(N } Bitmap::~Bitmap() { + release(); +} + +void Bitmap::release() { free(_m); delete[] _v; - - warning("Bitmap: Don't forget to review the whole implemenation!"); } Bitmap &Bitmap::operator=(const Bitmap &bmp) { diff --git a/engines/cge2/bitmap.h b/engines/cge2/bitmap.h index ea7146f0d7..7f467903af 100644 --- a/engines/cge2/bitmap.h +++ b/engines/cge2/bitmap.h @@ -73,6 +73,7 @@ public: Bitmap *code(); Bitmap &operator=(const Bitmap &bmp); + void release(); void hide(int16 x, int16 y); void show(int16 x, int16 y); void xShow(int16 x, int16 y); |