diff options
author | David Corrales | 2007-08-05 19:34:20 +0000 |
---|---|---|
committer | David Corrales | 2007-08-05 19:34:20 +0000 |
commit | 6856535010bd2fa4449bcfde1c88dc06cd46e26f (patch) | |
tree | b81a2234c2beff0312c93e039d6cafda4babeca6 /engines/parallaction/zone.cpp | |
parent | 1400d28bfb37fc94f3c44dec0a4d0cef65fb8fb7 (diff) | |
parent | ec1803f838d5efc7decf75c05a1fb4a9633751e5 (diff) | |
download | scummvm-rg350-6856535010bd2fa4449bcfde1c88dc06cd46e26f.tar.gz scummvm-rg350-6856535010bd2fa4449bcfde1c88dc06cd46e26f.tar.bz2 scummvm-rg350-6856535010bd2fa4449bcfde1c88dc06cd46e26f.zip |
Merged fsnode with trunk: r27971:28460
svn-id: r28462
Diffstat (limited to 'engines/parallaction/zone.cpp')
-rw-r--r-- | engines/parallaction/zone.cpp | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/engines/parallaction/zone.cpp b/engines/parallaction/zone.cpp index d9bd36a1f5..50f63b3b75 100644 --- a/engines/parallaction/zone.cpp +++ b/engines/parallaction/zone.cpp @@ -295,6 +295,13 @@ void Parallaction::parseZoneTypeBlock(Script &script, Zone *z) { void Parallaction::displayCharacterComment(ExamineData *data) { if (data->_description == NULL) return; + // NOTE: saving visible screen before displaying comment allows + // to restore the exact situation after the comment is deleted. + // This means animations are restored in the exact position as + // they were, thus avoiding clipping effect as signalled in + // BUG item #1762614. + _gfx->copyScreen(Gfx::kBitFront, Gfx::kBitBack); + _gfx->setFont(kFontDialogue); _gfx->flatBlitCnv(_char._talk, 0, 190, 80, Gfx::kBitFront); @@ -305,11 +312,10 @@ void Parallaction::displayCharacterComment(ExamineData *data) { _gfx->drawBalloon(r, 0); _gfx->displayWrappedString(data->_description, 140, 10, 0, 130); - _gfx->updateScreen(); - waitUntilLeftClick(); _gfx->copyScreen(Gfx::kBitBack, Gfx::kBitFront); + _gfx->updateScreen(); return; } @@ -332,7 +338,7 @@ void Parallaction::displayItemComment(ExamineData *data) { char v68[PATH_LEN]; strcpy(v68, data->_filename); data->_cnv = _disk->loadStatic(v68); - _gfx->flatBlitCnv(data->_cnv, 140, (SCREEN_HEIGHT - data->_cnv->_height)/2, Gfx::kBitFront); + _gfx->flatBlitCnv(data->_cnv, 140, (_screenHeight - data->_cnv->_height)/2, Gfx::kBitFront); _gfx->freeStaticCnv(data->_cnv); delete data->_cnv; @@ -343,7 +349,7 @@ void Parallaction::displayItemComment(ExamineData *data) { Common::Rect r(v6C, v6A); r.moveTo(0, 90); _gfx->drawBalloon(r, 0); - _gfx->flatBlitCnv(_vm->_char._head, 100, 152, Gfx::kBitFront); + _gfx->flatBlitCnv(_char._head, 100, 152, Gfx::kBitFront); _gfx->displayWrappedString(data->_description, 0, 90, 0, 130); jobEraseAnimations((void*)1, NULL); @@ -353,6 +359,7 @@ void Parallaction::displayItemComment(ExamineData *data) { _gfx->setHalfbriteMode(false); _gfx->copyScreen(Gfx::kBitBack, Gfx::kBitFront); + _gfx->updateScreen(); return; } @@ -417,14 +424,17 @@ void jobToggleDoor(void *parm, Job *j) { StaticCnv v14; if (z->u.door->_cnv) { + Common::Rect r(z->_left, z->_top, z->_left+z->u.door->_cnv->_width, z->_top+z->u.door->_cnv->_height); + + uint16 _ax = (z->_flags & kFlagsClosed ? 1 : 0); + v14._width = z->u.door->_cnv->_width; v14._height = z->u.door->_cnv->_height; + v14._data0 = z->u.door->_cnv->getFramePtr(_ax); - Common::Rect r(z->_left, z->_top, z->_left+z->u.door->_cnv->_width, z->_top+z->u.door->_cnv->_height); - - _vm->_gfx->restoreZoneBackground(r, z->u.door->_background); + _vm->_gfx->restoreDoorBackground(&v14, r, z->u.door->_background); - uint16 _ax = (z->_flags & kFlagsClosed ? 0 : 1); + _ax = (z->_flags & kFlagsClosed ? 0 : 1); _vm->_gfx->flatBlitCnv(z->u.door->_cnv, _ax, z->_left, z->_top, Gfx::kBitBack); _vm->_gfx->flatBlitCnv(z->u.door->_cnv, _ax, z->_left, z->_top, Gfx::kBit2); @@ -462,7 +472,7 @@ void jobRemovePickedItem(void *parm, Job *j) { if (z->u.get->_cnv) { Common::Rect r(z->_left, z->_top, z->_left + z->u.get->_cnv->_width, z->_top + z->u.get->_cnv->_height); - _vm->_gfx->restoreZoneBackground(r, z->u.get->_backup); + _vm->_gfx->restoreGetBackground(r, z->u.get->_backup); } count++; |