aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/gfx.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2014-01-12 10:59:14 +0200
committerEugene Sandulenko2014-01-12 10:59:14 +0200
commit491a045eea1af99a4bf54ab84304135c946b6cc0 (patch)
tree264a6a625baaa2469785d015aff72e07cb03ad78 /engines/fullpipe/gfx.cpp
parent4e592c724904bb0bc597e5bc7fe7707c1f858dab (diff)
downloadscummvm-rg350-491a045eea1af99a4bf54ab84304135c946b6cc0.tar.gz
scummvm-rg350-491a045eea1af99a4bf54ab84304135c946b6cc0.tar.bz2
scummvm-rg350-491a045eea1af99a4bf54ab84304135c946b6cc0.zip
FULLPIPE: Implement Movement::freePixelData()
Diffstat (limited to 'engines/fullpipe/gfx.cpp')
-rw-r--r--engines/fullpipe/gfx.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp
index 6e6e35f17a..a67a4d7b19 100644
--- a/engines/fullpipe/gfx.cpp
+++ b/engines/fullpipe/gfx.cpp
@@ -58,6 +58,8 @@ Bitmap::Bitmap(Bitmap *src) {
Bitmap::~Bitmap() {
if (_pixels)
free(_pixels);
+
+ _pixels = 0;
}
void Bitmap::load(Common::ReadStream *s) {
@@ -230,7 +232,7 @@ void PictureObject::drawAt(int x, int y) {
bool PictureObject::setPicAniInfo(PicAniInfo *picAniInfo) {
if (!(picAniInfo->type & 2) || (picAniInfo->type & 1)) {
- error("Picture::setPicAniInfo(): Wrong type: %d", picAniInfo->type);
+ error("PictureObject::setPicAniInfo(): Wrong type: %d", picAniInfo->type);
return false;
}
@@ -482,7 +484,7 @@ void Picture::freePicture() {
if (_bitmap) {
if (testFlags() && !_field_54) {
freeData();
- delete _bitmap;
+ free(_bitmap);
_bitmap = 0;
}
}
@@ -499,6 +501,11 @@ void Picture::freePicture() {
}
}
+void Picture::freePixelData() {
+ freePicture();
+ freeData();
+}
+
bool Picture::load(MfcArchive &file) {
debug(5, "Picture::load()");
MemoryObject::load(file);