[Scummvm-git-logs] scummvm master -> e672c8a844f1d29d9fd613f2a3a8d423ee0d5cce

npjg nathanael.gentrydb8 at gmail.com
Thu Jul 9 17:38:41 UTC 2020


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:
e672c8a844 DIRECTOR: Remove some hardcoded colours


Commit: e672c8a844f1d29d9fd613f2a3a8d423ee0d5cce
    https://github.com/scummvm/scummvm/commit/e672c8a844f1d29d9fd613f2a3a8d423ee0d5cce
Author: Nathanael Gentry (nathanael.gentrydb8 at gmail.com)
Date: 2020-07-09T13:38:25-04:00

Commit Message:
DIRECTOR: Remove some hardcoded colours

Changed paths:
    engines/director/graphics.cpp


diff --git a/engines/director/graphics.cpp b/engines/director/graphics.cpp
index 76a353a09d..9fd3a51475 100644
--- a/engines/director/graphics.cpp
+++ b/engines/director/graphics.cpp
@@ -960,9 +960,10 @@ bool DirectorPlotData::setNeedsColor() {
 		return false;
 
 	// TODO: Is colour white always last entry in palette?
-	uint numColors = g_director->getPaletteColorCount() - 1;
+	uint colorBlack = 0;
+	uint colorWhite = g_director->getPaletteColorCount() - 1;
 
-	if (foreColor == 0 && backColor == numColors)
+	if (foreColor == colorBlack && backColor == colorWhite)
 		return false;
 
 	switch (ink) {
@@ -980,12 +981,12 @@ bool DirectorPlotData::setNeedsColor() {
 		break;
 	}
 
-	if (foreColor != 0) {
+	if (foreColor != colorBlack) {
 		if (ink != kInkTypeGhost && ink != kInkTypeNotGhost)
 			return true;
 	}
 
-	if (backColor != numColors) {
+	if (backColor != colorWhite) {
 		if (ink != kInkTypeTransparent &&
 				ink != kInkTypeNotTrans)
 			return true;




More information about the Scummvm-git-logs mailing list