diff options
author | Nicola Mettifogo | 2009-01-07 08:16:18 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2009-01-07 08:16:18 +0000 |
commit | f1ad8b69342affed0583b0b53042cc98af8f0a76 (patch) | |
tree | 940402ff0cf751f3ac60c02164d2ed60c1fbb607 /engines/parallaction/gfxbase.cpp | |
parent | 21fae9d029e1c902c47f59143c1a8f938c694318 (diff) | |
download | scummvm-rg350-f1ad8b69342affed0583b0b53042cc98af8f0a76.tar.gz scummvm-rg350-f1ad8b69342affed0583b0b53042cc98af8f0a76.tar.bz2 scummvm-rg350-f1ad8b69342affed0583b0b53042cc98af8f0a76.zip |
Extended PathBuffer to support BRA.
svn-id: r35766
Diffstat (limited to 'engines/parallaction/gfxbase.cpp')
-rw-r--r-- | engines/parallaction/gfxbase.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/engines/parallaction/gfxbase.cpp b/engines/parallaction/gfxbase.cpp index a585caa713..2c9039c275 100644 --- a/engines/parallaction/gfxbase.cpp +++ b/engines/parallaction/gfxbase.cpp @@ -168,6 +168,18 @@ void Gfx::loadGfxObjMask(const char *name, GfxObj *obj) { obj->_hasMask = true; } +void Gfx::loadGfxObjPath(const char *name, GfxObj *obj) { + Common::Rect rect; + obj->getRect(0, rect); + + PathBuffer *buf = new PathBuffer; + buf->create(rect.width(), rect.height()); + _vm->_disk->loadPath(name, *buf); + + obj->_pathId = _backgroundInfo->addPathPatch(buf); + obj->_hasPath = true; +} + void Gfx::showGfxObj(GfxObj* obj, bool visible) { if (!obj) { return; @@ -179,10 +191,12 @@ void Gfx::showGfxObj(GfxObj* obj, bool visible) { obj->clearFlags(kGfxObjVisible); } - //TODO: move handling of mask existence inside MaskManager if (obj->_hasMask) { _backgroundInfo->toggleMaskPatch(obj->_maskId, obj->x, obj->y, visible); } + if (obj->_hasPath) { + _backgroundInfo->togglePathPatch(obj->_pathId, obj->x, obj->y, visible); + } } |