[Scummvm-cvs-logs] SF.net SVN: scummvm:[44535] scummvm/branches/branch-1-0-0/engines/cruise
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Fri Oct 2 15:11:57 CEST 2009
Revision: 44535
http://scummvm.svn.sourceforge.net/scummvm/?rev=44535&view=rev
Author: dreammaster
Date: 2009-10-02 13:11:56 +0000 (Fri, 02 Oct 2009)
Log Message:
-----------
Bugfix for dirty rects getting lost during room fade-ins
Modified Paths:
--------------
scummvm/branches/branch-1-0-0/engines/cruise/gfxModule.cpp
scummvm/branches/branch-1-0-0/engines/cruise/gfxModule.h
scummvm/branches/branch-1-0-0/engines/cruise/mainDraw.cpp
Modified: scummvm/branches/branch-1-0-0/engines/cruise/gfxModule.cpp
===================================================================
--- scummvm/branches/branch-1-0-0/engines/cruise/gfxModule.cpp 2009-10-02 12:53:45 UTC (rev 44534)
+++ scummvm/branches/branch-1-0-0/engines/cruise/gfxModule.cpp 2009-10-02 13:11:56 UTC (rev 44535)
@@ -272,13 +272,11 @@
}
}
-void flip() {
- RectList::iterator dr;
- int i;
+void gfxModuleData_updatePalette() {
byte paletteRGBA[256 * 4];
if (palDirtyMax != -1) {
- for (i = palDirtyMin; i <= palDirtyMax; i++) {
+ for (int i = palDirtyMin; i <= palDirtyMax; i++) {
paletteRGBA[i * 4 + 0] = lpalette[i].R;
paletteRGBA[i * 4 + 1] = lpalette[i].G;
paletteRGBA[i * 4 + 2] = lpalette[i].B;
@@ -288,7 +286,19 @@
palDirtyMin = 256;
palDirtyMax = -1;
}
+}
+void gfxModuleData_updateScreen() {
+ g_system->updateScreen();
+ g_system->delayMillis(20);
+}
+
+void flip() {
+ RectList::iterator dr;
+
+ // Update the palette
+ gfxModuleData_updatePalette();
+
// Make a copy of the prior frame's dirty rects, and then backup the current frame's rects
RectList tempList = _priorFrameRects;
_priorFrameRects = _dirtyRects;
Modified: scummvm/branches/branch-1-0-0/engines/cruise/gfxModule.h
===================================================================
--- scummvm/branches/branch-1-0-0/engines/cruise/gfxModule.h 2009-10-02 12:53:45 UTC (rev 44534)
+++ scummvm/branches/branch-1-0-0/engines/cruise/gfxModule.h 2009-10-02 13:11:56 UTC (rev 44535)
@@ -52,6 +52,9 @@
void gfxModuleData_field_90(void);
void gfxModuleData_gfxWaitVSync(void);
void gfxModuleData_flip(void);
+void gfxModuleData_updatePalette();
+void gfxModuleData_updateScreen();
+
void gfxCopyRect(const uint8 *sourceBuffer, int width, int height, byte *dest, int x, int y, int colour);
void gfxModuleData_gfxCopyScreen(const uint8 *sourcePtr, uint8 *destPtr);
void convertGfxFromMode4(const uint8 *sourcePtr, int width, int height, uint8 *destPtr);
Modified: scummvm/branches/branch-1-0-0/engines/cruise/mainDraw.cpp
===================================================================
--- scummvm/branches/branch-1-0-0/engines/cruise/mainDraw.cpp 2009-10-02 12:53:45 UTC (rev 44534)
+++ scummvm/branches/branch-1-0-0/engines/cruise/mainDraw.cpp 2009-10-02 13:11:56 UTC (rev 44535)
@@ -107,7 +107,9 @@
calcRGB(&palScreen[masterScreen][3*j], &workpal[3*j], offsetTable);
}
gfxModuleData_setPal256(workpal);
- gfxModuleData_flipScreen();
+
+ gfxModuleData_updatePalette();
+ gfxModuleData_updateScreen();
}
for (long int j = 0; j < 256; j++) {
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