[Scummvm-cvs-logs] SF.net SVN: scummvm: [21332] scummvm/trunk/engines/kyra
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Thu Mar 16 08:37:04 CET 2006
Revision: 21332
Author: lordhoto
Date: 2006-03-16 08:35:46 -0800 (Thu, 16 Mar 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=21332&view=rev
Log Message:
-----------
- 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)
Modified Paths:
--------------
scummvm/trunk/engines/kyra/animator.cpp
scummvm/trunk/engines/kyra/saveload.cpp
scummvm/trunk/engines/kyra/scene.cpp
scummvm/trunk/engines/kyra/script_v1.cpp
scummvm/trunk/engines/kyra/sprites.cpp
Modified: scummvm/trunk/engines/kyra/animator.cpp
===================================================================
--- scummvm/trunk/engines/kyra/animator.cpp 2006-03-16 12:12:05 UTC (rev 21331)
+++ scummvm/trunk/engines/kyra/animator.cpp 2006-03-16 16:35:46 UTC (rev 21332)
@@ -178,10 +178,10 @@
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 @@
}
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 @@
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) {
Modified: scummvm/trunk/engines/kyra/saveload.cpp
===================================================================
--- scummvm/trunk/engines/kyra/saveload.cpp 2006-03-16 12:12:05 UTC (rev 21331)
+++ scummvm/trunk/engines/kyra/saveload.cpp 2006-03-16 16:35:46 UTC (rev 21332)
@@ -205,7 +205,7 @@
}
createMouseItem(_itemInHand);
- _animator->setBrandonAnimSeqSize(5, 48);
+ _animator->setBrandonAnimSeqSize(3, 48);
_animator->_noDrawShapesFlag = 1;
enterNewScene(_currentCharacter->sceneId, _currentCharacter->facing, 0, 0, 1);
_animator->_noDrawShapesFlag = 0;
Modified: scummvm/trunk/engines/kyra/scene.cpp
===================================================================
--- scummvm/trunk/engines/kyra/scene.cpp 2006-03-16 12:12:05 UTC (rev 21331)
+++ scummvm/trunk/engines/kyra/scene.cpp 2006-03-16 16:35:46 UTC (rev 21332)
@@ -777,7 +777,7 @@
}
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;
Modified: scummvm/trunk/engines/kyra/script_v1.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_v1.cpp 2006-03-16 12:12:05 UTC (rev 21331)
+++ scummvm/trunk/engines/kyra/script_v1.cpp 2006-03-16 16:35:46 UTC (rev 21332)
@@ -762,9 +762,9 @@
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 @@
} 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();
Modified: scummvm/trunk/engines/kyra/sprites.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sprites.cpp 2006-03-16 12:12:05 UTC (rev 21331)
+++ scummvm/trunk/engines/kyra/sprites.cpp 2006-03-16 16:35:46 UTC (rev 21332)
@@ -89,7 +89,7 @@
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;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list