aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/gfxbase.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2009-01-07 08:16:18 +0000
committerNicola Mettifogo2009-01-07 08:16:18 +0000
commitf1ad8b69342affed0583b0b53042cc98af8f0a76 (patch)
tree940402ff0cf751f3ac60c02164d2ed60c1fbb607 /engines/parallaction/gfxbase.cpp
parent21fae9d029e1c902c47f59143c1a8f938c694318 (diff)
downloadscummvm-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.cpp16
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);
+ }
}