aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise/gfxModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/cruise/gfxModule.cpp')
-rw-r--r--engines/cruise/gfxModule.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/cruise/gfxModule.cpp b/engines/cruise/gfxModule.cpp
index 47d3f49204..50e6587d90 100644
--- a/engines/cruise/gfxModule.cpp
+++ b/engines/cruise/gfxModule.cpp
@@ -40,6 +40,7 @@ palEntry lpalette[256];
int palDirtyMin = 256;
int palDirtyMax = -1;
+bool isBlack = false;
gfxModuleDataStruct gfxModuleData = {
0, // use Tandy
@@ -237,6 +238,12 @@ void flip() {
g_system->setPalette(paletteRGBA + palDirtyMin*4, palDirtyMin, palDirtyMax - palDirtyMin + 1);
palDirtyMin = 256;
palDirtyMax = -1;
+
+ isBlack = true;
+ for (i = 0; i < 256; ++i) {
+ isBlack = (lpalette[i].R == 0) && (lpalette[i].G == 0) && (lpalette[i].B == 0);
+ if (!isBlack) break;
+ }
}
g_system->copyRectToScreen(globalScreen, 320, 0, 0, 320, 200);