diff options
author | uruk | 2014-05-18 14:01:25 +0200 |
---|---|---|
committer | uruk | 2014-05-18 14:01:25 +0200 |
commit | 412d30ca33adce079ed8ce0768f7662f5b055dc3 (patch) | |
tree | e77c8ef9310a54ccfe0c0bbecc821ffcec67e96f | |
parent | 938a2e66c214b9db4de563061639c74265e70fdb (diff) | |
download | scummvm-rg350-412d30ca33adce079ed8ce0768f7662f5b055dc3.tar.gz scummvm-rg350-412d30ca33adce079ed8ce0768f7662f5b055dc3.tar.bz2 scummvm-rg350-412d30ca33adce079ed8ce0768f7662f5b055dc3.zip |
CGE2: Add release() to BitMap.
-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); |