diff options
author | Johannes Schickel | 2006-03-16 16:35:46 +0000 |
---|---|---|
committer | Johannes Schickel | 2006-03-16 16:35:46 +0000 |
commit | f1c9cd57265c64de835e6e9647afcf0e679651be (patch) | |
tree | 25873e83a092c4bc85fa8b5572fe88e712ffe547 /engines | |
parent | 79b5c11ee24cae949db80040dff269e6851b64f0 (diff) | |
download | scummvm-rg350-f1c9cd57265c64de835e6e9647afcf0e679651be.tar.gz scummvm-rg350-f1c9cd57265c64de835e6e9647afcf0e679651be.tar.bz2 scummvm-rg350-f1c9cd57265c64de835e6e9647afcf0e679651be.zip |
- Fixes some gfx glitches (the falling feather and the falling leaf now have correct restored background)
- Fixes brandon width value after loading (removes gfx glitch while talking with the tree)
svn-id: r21332
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/animator.cpp | 15 | ||||
-rw-r--r-- | engines/kyra/saveload.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/scene.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/script_v1.cpp | 4 | ||||
-rw-r--r-- | engines/kyra/sprites.cpp | 2 |
5 files changed, 14 insertions, 11 deletions
diff --git a/engines/kyra/animator.cpp b/engines/kyra/animator.cpp index 551c9b90b8..92b06a14a8 100644 --- a/engines/kyra/animator.cpp +++ b/engines/kyra/animator.cpp @@ -178,10 +178,10 @@ void ScreenAnimator::preserveOrRestoreBackground(AnimObject *obj, bool restore) int x = 0, y = 0, width = obj->width << 3, height = obj->height; if (restore) { - x = obj->x2; + x = obj->x2 >> 3; y = obj->y2; } else { - x = obj->x1; + x = obj->x1 >> 3; y = obj->y1; } @@ -202,9 +202,9 @@ void ScreenAnimator::preserveOrRestoreBackground(AnimObject *obj, bool restore) } if (restore) { - _screen->copyBlockToPage(_screen->_curPage, x, y, width, height, obj->background); + _screen->copyBlockToPage(_screen->_curPage, x << 3, y, width, height, obj->background); } else { - _screen->copyRegionToBuffer(_screen->_curPage, x, y, width, height, obj->background); + _screen->copyRegionToBuffer(_screen->_curPage, x << 3, y, width, height, obj->background); } } @@ -373,11 +373,14 @@ void ScreenAnimator::copyChangedObjectsForward(int refreshFlag) { if (curObject->active) { if (curObject->refreshFlag || refreshFlag) { int xpos = 0, ypos = 0, width = 0, height = 0; - xpos = curObject->x1 - (curObject->width2+1); + xpos = (curObject->x1>>3) - (curObject->width2>>3) - 1; ypos = curObject->y1 - curObject->height2; - width = (curObject->width + ((curObject->width2)>>3)+1)<<3; + width = curObject->width + (curObject->width2>>3) + 2; height = curObject->height + curObject->height2*2; + xpos <<= 3; + width <<= 3; + if (xpos < 8) { xpos = 8; } else if (xpos + width > 312) { diff --git a/engines/kyra/saveload.cpp b/engines/kyra/saveload.cpp index 4404214ee2..bd8f02ebab 100644 --- a/engines/kyra/saveload.cpp +++ b/engines/kyra/saveload.cpp @@ -205,7 +205,7 @@ void KyraEngine::loadGame(const char *fileName) { } createMouseItem(_itemInHand); - _animator->setBrandonAnimSeqSize(5, 48); + _animator->setBrandonAnimSeqSize(3, 48); _animator->_noDrawShapesFlag = 1; enterNewScene(_currentCharacter->sceneId, _currentCharacter->facing, 0, 0, 1); _animator->_noDrawShapesFlag = 0; diff --git a/engines/kyra/scene.cpp b/engines/kyra/scene.cpp index ebf6bdc464..6fbbe2dcbe 100644 --- a/engines/kyra/scene.cpp +++ b/engines/kyra/scene.cpp @@ -777,7 +777,7 @@ void KyraEngine::initSceneObjectList(int brandonAlive) { } curAnimState->height = _sprites->_anims[i].height; curAnimState->height2 = _sprites->_anims[i].height2; - curAnimState->width = _sprites->_anims[i].width + 1; + curAnimState->width = _sprites->_anims[i].width; curAnimState->width2 = _sprites->_anims[i].width2; curAnimState->drawY = _sprites->_anims[i].drawY; curAnimState->x1 = curAnimState->x2 = _sprites->_anims[i].x; diff --git a/engines/kyra/script_v1.cpp b/engines/kyra/script_v1.cpp index d869c8a7cf..be04c85a9b 100644 --- a/engines/kyra/script_v1.cpp +++ b/engines/kyra/script_v1.cpp @@ -762,9 +762,9 @@ int KyraEngine::cmd_displayWSASequentialFrames(ScriptState *script) { if (endFrame >= startFrame) { int frame = startFrame; while (endFrame >= frame) { + uint32 continueTime = waitTime * _tickLength + _system->getMillis(); _movieObjects[wsaIndex]->displayFrame(frame); _animator->_updateScreen = true; - uint32 continueTime = waitTime * _tickLength + _system->getMillis(); while (_system->getMillis() < continueTime) { _sprites->updateSceneAnims(); _animator->updateAllObjectShapes(); @@ -779,9 +779,9 @@ int KyraEngine::cmd_displayWSASequentialFrames(ScriptState *script) { } else { int frame = startFrame; while (endFrame <= frame) { + uint32 continueTime = waitTime * _tickLength + _system->getMillis(); _movieObjects[wsaIndex]->displayFrame(frame); _animator->_updateScreen = true; - uint32 continueTime = waitTime * _tickLength + _system->getMillis(); while (_system->getMillis() < continueTime) { _sprites->updateSceneAnims(); _animator->updateAllObjectShapes(); diff --git a/engines/kyra/sprites.cpp b/engines/kyra/sprites.cpp index 1bfd7813de..6e95b5ff30 100644 --- a/engines/kyra/sprites.cpp +++ b/engines/kyra/sprites.cpp @@ -89,7 +89,7 @@ void Sprites::setupSceneAnims() { data += 4; _anims[i].y = READ_LE_UINT16(data); data += 4; - _anims[i].width = *(data) - 1; + _anims[i].width = *(data); data += 4; _anims[i].height = *(data); data += 4; |