diff options
author | D G Turner | 2012-10-12 17:03:32 +0100 |
---|---|---|
committer | D G Turner | 2012-10-12 17:03:32 +0100 |
commit | 151b7beb47ec4b964862d6779bd48e3a33482bbd (patch) | |
tree | 867717c5266d0908d95edd82560599be20a4ede9 /engines/parallaction/gfxbase.cpp | |
parent | 80af0e239473f85c49cc2da3c848dfcde41d4a37 (diff) | |
parent | 2b55837650c4229dc3d75b660cecfc7a3292e5e0 (diff) | |
download | scummvm-rg350-151b7beb47ec4b964862d6779bd48e3a33482bbd.tar.gz scummvm-rg350-151b7beb47ec4b964862d6779bd48e3a33482bbd.tar.bz2 scummvm-rg350-151b7beb47ec4b964862d6779bd48e3a33482bbd.zip |
Merge branch 'master' into teenagentRefactor
Conflicts:
engines/teenagent/callbacks.cpp
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 { |