From 412d30ca33adce079ed8ce0768f7662f5b055dc3 Mon Sep 17 00:00:00 2001 From: uruk Date: Sun, 18 May 2014 14:01:25 +0200 Subject: CGE2: Add release() to BitMap. --- engines/cge2/bitmap.cpp | 6 ++++-- engines/cge2/bitmap.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'engines') 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); -- cgit v1.2.3