diff options
author | Kamil Zbróg | 2014-01-12 18:44:51 +0000 |
---|---|---|
committer | Kamil Zbróg | 2014-01-12 18:44:51 +0000 |
commit | 444934a0accec982f55db92c17ef65270fe18e66 (patch) | |
tree | f62210b1ff15696accd87d97b68b03688a153156 /engines/fullpipe/gfx.cpp | |
parent | e94fabc37407a7d300af04493b0f5cbced42a092 (diff) | |
parent | 1a4f951f8bff52f6185304722f2ab9cf9bcd58f4 (diff) | |
download | scummvm-rg350-444934a0accec982f55db92c17ef65270fe18e66.tar.gz scummvm-rg350-444934a0accec982f55db92c17ef65270fe18e66.tar.bz2 scummvm-rg350-444934a0accec982f55db92c17ef65270fe18e66.zip |
Merge remote-tracking branch 'sync/master' into prince-malik
Diffstat (limited to 'engines/fullpipe/gfx.cpp')
-rw-r--r-- | engines/fullpipe/gfx.cpp | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 435a06d63b..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) { @@ -87,6 +89,10 @@ Background::Background() { _palette = 0; } +Background::~Background() { + warning("STUB: Background::~Background()"); +} + bool Background::load(MfcArchive &file) { debug(5, "Background::load()"); _bgname = file.readPascalString(); @@ -152,6 +158,10 @@ PictureObject::PictureObject() { _objtype = kObjTypePictureObject; } +PictureObject::~PictureObject() { + warning("STUB: PictureObject::~PictureObject()"); +} + PictureObject::PictureObject(PictureObject *src) : GameObject(src) { _picture = src->_picture; _ox2 = _ox; @@ -222,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; } @@ -269,6 +279,11 @@ bool PictureObject::isPixelHitAtPos(int x, int y) { return res; } +void PictureObject::setOXY2() { + _ox2 = _ox; + _oy2 = _oy; +} + GameObject::GameObject() { _okeyCode = 0; _flags = 0; @@ -469,7 +484,7 @@ void Picture::freePicture() { if (_bitmap) { if (testFlags() && !_field_54) { freeData(); - delete _bitmap; + free(_bitmap); _bitmap = 0; } } @@ -486,6 +501,11 @@ void Picture::freePicture() { } } +void Picture::freePixelData() { + freePicture(); + freeData(); +} + bool Picture::load(MfcArchive &file) { debug(5, "Picture::load()"); MemoryObject::load(file); |