diff options
Diffstat (limited to 'engines/parallaction/gfxbase.cpp')
-rw-r--r-- | engines/parallaction/gfxbase.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/engines/parallaction/gfxbase.cpp b/engines/parallaction/gfxbase.cpp index 852235ce34..a9889cc7af 100644 --- a/engines/parallaction/gfxbase.cpp +++ b/engines/parallaction/gfxbase.cpp @@ -152,22 +152,22 @@ void Gfx::freeCharacterObjects() { freeDialogueObjects(); } -void BackgroundInfo::loadGfxObjMask(const char *name, GfxObj *obj) { +void BackgroundInfo::loadGfxObjMask(Parallaction *vm, const char *name, GfxObj *obj) { debugC(1, kDebugGraphics, "BackgroundInfo::loadGfxObjMask(\"%s\")", name); Common::Rect rect; obj->getRect(0, rect); - MaskBuffer *buf = _vm->_disk->loadMask(name, rect.width(), rect.height()); + MaskBuffer *buf = vm->_disk->loadMask(name, rect.width(), rect.height()); obj->_maskId = addMaskPatch(buf); obj->_hasMask = true; } -void BackgroundInfo::loadGfxObjPath(const char *name, GfxObj *obj) { +void BackgroundInfo::loadGfxObjPath(Parallaction *vm, const char *name, GfxObj *obj) { Common::Rect rect; obj->getRect(0, rect); - PathBuffer *buf = _vm->_disk->loadPath(name, rect.width(), rect.height()); + PathBuffer *buf = vm->_disk->loadPath(name, rect.width(), rect.height()); obj->_pathId = addPathPatch(buf); obj->_hasPath = true; @@ -226,6 +226,11 @@ void Gfx::drawGfxObject(GfxObj *obj, Graphics::Surface &surf) { rect.translate(x, y); data = obj->getData(obj->frame); + // WORKAROUND: During the end credits, game scripts try to show a + // non-existing frame. We change it to an existing one here. + if (obj->frame == 14 && obj->getNum() == 9 && !strcmp(obj->getName(), "Dinor")) + obj->frame = 8; + if (obj->getSize(obj->frame) == obj->getRawSize(obj->frame)) { blt(rect, data, &surf, obj->layer, obj->scale, obj->transparentKey); } else { |