[Scummvm-cvs-logs] scummvm master -> 0a983e1df5c8db22fe7e480322c1f2bd10cdef26
sylvaintv
sylvaintv at gmail.com
Mon Mar 14 23:29:23 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0a983e1df5 TOON: Fix more dirty rect issues
Commit: 0a983e1df5c8db22fe7e480322c1f2bd10cdef26
https://github.com/scummvm/scummvm/commit/0a983e1df5c8db22fe7e480322c1f2bd10cdef26
Author: sylvaintv (sylvaintv at gmail.com)
Date: 2011-03-14T15:28:15-07:00
Commit Message:
TOON: Fix more dirty rect issues
Especially not refreshing pictures when viewing
inventory items and corrupted last line of the screen.
Changed paths:
engines/toon/toon.cpp
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index 4568f72..0c7989f 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -3413,6 +3413,7 @@ void ToonEngine::viewInventoryItem(Common::String str, int32 lineId, int32 itemD
Picture *pic = new Picture(this);
pic->loadPicture(str, false);
pic->setupPalette();
+ dirtyAllScreen();
flushPalette();
if (lineId) {
@@ -3436,7 +3437,13 @@ void ToonEngine::viewInventoryItem(Common::String str, int32 lineId, int32 itemD
break;
}
- pic->draw(*_mainSurface, 0, 0, 0, 0);
+ if (!_dirtyAll) {
+ pic->drawWithRectList(*_mainSurface, 0, 0, 0, 0, _dirtyRects);
+ } else {
+ pic->draw(*_mainSurface, 0, 0, 0, 0);
+ _dirtyRects.push_back(Common::Rect(0, 0, TOON_SCREEN_WIDTH, TOON_SCREEN_HEIGHT));
+ }
+ clearDirtyRects();
drawConversationLine();
if (!_audioManager->voiceStillPlaying()) {
@@ -3455,6 +3462,7 @@ void ToonEngine::viewInventoryItem(Common::String str, int32 lineId, int32 itemD
}
fadeOut(5);
+ dirtyAllScreen();
restorePalette();
_firstFrame = true;
_gameState->_currentScrollValue = oldScrollValue;
@@ -4674,10 +4682,10 @@ void ToonEngine::dirtyAllScreen()
}
void ToonEngine::addDirtyRect( int32 left, int32 top, int32 right, int32 bottom ) {
- left = MIN<int32>(MAX<int32>(left, 0), TOON_BACKBUFFER_WIDTH - 1);
- right = MIN<int32>(MAX<int32>(right, 0), TOON_BACKBUFFER_WIDTH - 1);
- top = MIN<int32>(MAX<int32>(top, 0), TOON_BACKBUFFER_HEIGHT - 1);
- bottom = MIN<int32>(MAX<int32>(bottom, 0), TOON_BACKBUFFER_HEIGHT - 1);
+ left = MIN<int32>(MAX<int32>(left, 0), TOON_BACKBUFFER_WIDTH);
+ right = MIN<int32>(MAX<int32>(right, 0), TOON_BACKBUFFER_WIDTH);
+ top = MIN<int32>(MAX<int32>(top, 0), TOON_BACKBUFFER_HEIGHT);
+ bottom = MIN<int32>(MAX<int32>(bottom, 0), TOON_BACKBUFFER_HEIGHT);
Common::Rect rect(left, top, right, bottom);
More information about the Scummvm-git-logs
mailing list