[Scummvm-cvs-logs] scummvm master -> 9bbeaa668a559be34638c579310d0e832a278c6d

dreammaster dreammaster at scummvm.org
Fri Jun 26 03:37:29 CEST 2015


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:
9bbeaa668a SHERLOCK: RT: Set up new values for color constants


Commit: 9bbeaa668a559be34638c579310d0e832a278c6d
    https://github.com/scummvm/scummvm/commit/9bbeaa668a559be34638c579310d0e832a278c6d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-06-25T21:36:26-04:00

Commit Message:
SHERLOCK: RT: Set up new values for color constants

Changed paths:
    engines/sherlock/journal.cpp
    engines/sherlock/objects.cpp
    engines/sherlock/scalpel/scalpel.h
    engines/sherlock/screen.h
    engines/sherlock/sherlock.h
    engines/sherlock/tattoo/tattoo.h
    engines/sherlock/user_interface.cpp



diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp
index acc99e4..77b63d1 100644
--- a/engines/sherlock/journal.cpp
+++ b/engines/sherlock/journal.cpp
@@ -21,8 +21,9 @@
  */
 
 #include "sherlock/journal.h"
-#include "sherlock/sherlock.h"
+#include "sherlock/scalpel/scalpel.h"
 #include "sherlock/scalpel/scalpel_journal.h"
+#include "sherlock/tattoo/tattoo.h"
 #include "sherlock/tattoo/tattoo_journal.h"
 
 namespace Sherlock {
@@ -78,7 +79,7 @@ bool Journal::drawJournal(int direction, int howFar) {
 		if (direction)
 			drawFrame();
 
-		screen.gPrint(Common::Point(235, 21), PEN_COLOR, "Page %d", _page);
+		screen.gPrint(Common::Point(235, 21), COL_PEN_COLOR, "Page %d", _page);
 		return false;
 	}
 
@@ -198,7 +199,7 @@ bool Journal::drawJournal(int direction, int howFar) {
 
 	Common::String fixedText_Page = fixedText.getText(kFixedText_Journal_Page);
 
-	screen.gPrint(Common::Point(235, 21), PEN_COLOR, fixedText_Page.c_str(), _page);
+	screen.gPrint(Common::Point(235, 21), COL_PEN_COLOR, fixedText_Page.c_str(), _page);
 
 	temp = _sub;
 	savedIndex = _index;
@@ -228,26 +229,27 @@ bool Journal::drawJournal(int direction, int howFar) {
 					screen.gPrint(Common::Point(53, yp), 15, "%s", lineStart.c_str() + 1);
 				} else {
 					width = screen.stringWidth(lineStart.c_str());
-					screen.gPrint(Common::Point(53, yp), PEN_COLOR, "%s", lineStart.c_str());
+					screen.gPrint(Common::Point(53, yp), COL_PEN_COLOR, "%s", lineStart.c_str());
 				 }
 
 				// Print out the found keyword
 				Common::String lineMatch(matchP, matchP + _find.size());
-				screen.gPrint(Common::Point(53 + width, yp), INV_FOREGROUND, "%s", lineMatch.c_str());
+				byte fgColor = IS_SERRATED_SCALPEL ? Scalpel::INV_FOREGROUND : Tattoo::INV_FOREGROUND;
+				screen.gPrint(Common::Point(53 + width, yp), fgColor, "%s", lineMatch.c_str());
 				width += screen.stringWidth(lineMatch.c_str());
 
 				// Print remainder of line
-				screen.gPrint(Common::Point(53 + width, yp), PEN_COLOR, "%s", matchP + _find.size());
+				screen.gPrint(Common::Point(53 + width, yp), COL_PEN_COLOR, "%s", matchP + _find.size());
 			} else if (_lines[temp].hasPrefix("@")) {
 				screen.gPrint(Common::Point(53, yp), 15, "%s", _lines[temp].c_str() + 1);
 			} else {
-				screen.gPrint(Common::Point(53, yp), PEN_COLOR, "%s", _lines[temp].c_str());
+				screen.gPrint(Common::Point(53, yp), COL_PEN_COLOR, "%s", _lines[temp].c_str());
 			}
 		} else {
 			if (_lines[temp].hasPrefix("@")) {
 				screen.gPrint(Common::Point(53, yp), 15, "%s", _lines[temp].c_str() + 1);
 			} else {
-				screen.gPrint(Common::Point(53, yp), PEN_COLOR, "%s", _lines[temp].c_str());
+				screen.gPrint(Common::Point(53, yp), COL_PEN_COLOR, "%s", _lines[temp].c_str());
 			}
 		}
 
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp
index ac5296c..7982262 100644
--- a/engines/sherlock/objects.cpp
+++ b/engines/sherlock/objects.cpp
@@ -21,12 +21,13 @@
  */
 
 #include "common/util.h"
-#include "sherlock/sherlock.h"
 #include "sherlock/objects.h"
 #include "sherlock/people.h"
 #include "sherlock/scene.h"
+#include "sherlock/scalpel/scalpel.h"
 #include "sherlock/scalpel/scalpel_map.h"
 #include "sherlock/scalpel/scalpel_people.h"
+#include "sherlock/tattoo/tattoo.h"
 
 namespace Sherlock {
 
@@ -546,13 +547,13 @@ int BaseObject::checkNameForCodes(const Common::String &name, FixedTextActionId
 		ui._infoFlag = true;
 		ui.clearInfo();
 		Common::String errorMessage = fixedText.getActionMessage(fixedTextActionId, messageNum);
-		screen.print(Common::Point(0, INFO_LINE + 1), INFO_FOREGROUND, "%s", errorMessage.c_str());
+		screen.print(Common::Point(0, INFO_LINE + 1), COL_INFO_FOREGROUND, "%s", errorMessage.c_str());
 		ui._menuCounter = 25;
 	} else if (name.hasPrefix("@")) {
 		// Message attached to canimation
 		ui._infoFlag = true;
 		ui.clearInfo();
-		screen.print(Common::Point(0, INFO_LINE + 1), INFO_FOREGROUND, "%s", name.c_str() + 1);
+		screen.print(Common::Point(0, INFO_LINE + 1), COL_INFO_FOREGROUND, "%s", name.c_str() + 1);
 		printed = true;
 		ui._menuCounter = 25;
 	}
@@ -1321,7 +1322,7 @@ int Object::pickUpObject(FixedTextActionId fixedTextActionId) {
 		ui._infoFlag = true;
 		ui.clearInfo();
 		Common::String errorMessage = fixedText.getActionMessage(fixedTextActionId, message);
-		screen.print(Common::Point(0, INFO_LINE + 1), INFO_FOREGROUND, "%s", errorMessage.c_str());
+		screen.print(Common::Point(0, INFO_LINE + 1), COL_INFO_FOREGROUND, "%s", errorMessage.c_str());
 		ui._menuCounter = 30;
 	} else {
 		// Pick it up
@@ -1370,7 +1371,7 @@ int Object::pickUpObject(FixedTextActionId fixedTextActionId) {
 
 			Common::String itemName = _description;
 			itemName.setChar(tolower(itemName[0]), 0);
-			screen.print(Common::Point(0, INFO_LINE + 1), INFO_FOREGROUND, "Picked up %s", itemName.c_str());
+			screen.print(Common::Point(0, INFO_LINE + 1), COL_INFO_FOREGROUND, "Picked up %s", itemName.c_str());
 			ui._menuCounter = 25;
 		}
 	}
diff --git a/engines/sherlock/scalpel/scalpel.h b/engines/sherlock/scalpel/scalpel.h
index a2a1cbb..d2524cc 100644
--- a/engines/sherlock/scalpel/scalpel.h
+++ b/engines/sherlock/scalpel/scalpel.h
@@ -31,9 +31,17 @@ namespace Sherlock {
 namespace Scalpel {
 
 enum {
+	BUTTON_TOP			= 233,
+	BUTTON_MIDDLE		= 244,
+	BUTTON_BOTTOM		= 248,
 	COMMAND_FOREGROUND	= 15,
 	COMMAND_HIGHLIGHTED = 10,
-	COMMAND_NULL		= 248
+	COMMAND_NULL		= 248,
+	INFO_FOREGROUND		= 11,
+	INFO_BACKGROUND		= 1,
+	INV_FOREGROUND		= 14,
+	INV_BACKGROUND		= 1,
+	PEN_COLOR			= 250
 };
 
 class ScalpelEngine : public SherlockEngine {
diff --git a/engines/sherlock/screen.h b/engines/sherlock/screen.h
index 8b6198d..a98c6d7 100644
--- a/engines/sherlock/screen.h
+++ b/engines/sherlock/screen.h
@@ -39,19 +39,11 @@ namespace Sherlock {
 enum {
 	BLACK				= 0,
 	INFO_BLACK			= 1,
-	INFO_FOREGROUND		= 11,
-	INFO_BACKGROUND		= 1,
 	BORDER_COLOR		= 237,
-	INV_FOREGROUND		= 14,
-	INV_BACKGROUND		= 1,
 	COMMAND_BACKGROUND	= 4,
-	BUTTON_TOP			= 233,
-	BUTTON_MIDDLE		= 244,
-	BUTTON_BOTTOM		= 248,
 	BUTTON_BACKGROUND	= 235,
 	TALK_FOREGROUND		= 12,
-	TALK_NULL			= 16,
-	PEN_COLOR			= 250
+	TALK_NULL			= 16
 };
 
 class SherlockEngine;
diff --git a/engines/sherlock/sherlock.h b/engines/sherlock/sherlock.h
index d0e7bf2..5e6cf03 100644
--- a/engines/sherlock/sherlock.h
+++ b/engines/sherlock/sherlock.h
@@ -66,9 +66,11 @@ enum GameType {
 #define SHERLOCK_SCREEN_WIDTH _vm->_screen->w()
 #define SHERLOCK_SCREEN_HEIGHT _vm->_screen->h()
 #define SHERLOCK_SCENE_HEIGHT (IS_SERRATED_SCALPEL ? 138 : 480)
-// TODO: Is this the correct scene count for The Case of the Rose Tattoo?
 #define SCENES_COUNT (IS_SERRATED_SCALPEL ? 63 : 101)
 
+#define COL_INFO_FOREGROUND (IS_SERRATED_SCALPEL ? Scalpel::INFO_FOREGROUND : Tattoo::INFO_FOREGROUND)
+#define COL_PEN_COLOR (IS_SERRATED_SCALPEL ? Scalpel::PEN_COLOR : Tattoo::PEN_COLOR)
+
 struct SherlockGameDescription;
 
 class Resource;
diff --git a/engines/sherlock/tattoo/tattoo.h b/engines/sherlock/tattoo/tattoo.h
index d4f20bb..cd985d4 100644
--- a/engines/sherlock/tattoo/tattoo.h
+++ b/engines/sherlock/tattoo/tattoo.h
@@ -30,14 +30,19 @@ namespace Sherlock {
 namespace Tattoo {
 
 enum {
+	INV_FOREGROUND		= 167,
+	INV_BACKGROUND		= 1,
+	INFO_FOREGROUND		= 233,
+	INFO_BACKGROUND		= 239,
 	INFO_TOP			= 185,
 	INFO_MIDDLE			= 186,
 	INFO_BOTTOM			= 188,
 	MENU_BACKGROUND		= 225,
 	COMMAND_FOREGROUND	= 15,
 	COMMAND_HIGHLIGHTED	= 254,
-	COMMAND_NULL		= 193
-
+	COMMAND_NULL		= 193,
+	PEN_COLOR			= 248,
+	PEN_HIGHLIGHT_COLOR	= 129
 };
 
 class TattooEngine : public SherlockEngine {
diff --git a/engines/sherlock/user_interface.cpp b/engines/sherlock/user_interface.cpp
index 9e21be8..539efdd 100644
--- a/engines/sherlock/user_interface.cpp
+++ b/engines/sherlock/user_interface.cpp
@@ -21,8 +21,9 @@
  */
 
 #include "sherlock/user_interface.h"
-#include "sherlock/sherlock.h"
+#include "sherlock/scalpel/scalpel.h"
 #include "sherlock/scalpel/scalpel_user_interface.h"
+#include "sherlock/tattoo/tattoo.h"
 #include "sherlock/tattoo/tattoo_user_interface.h"
 
 namespace Sherlock {
@@ -72,7 +73,7 @@ void UserInterface::checkAction(ActionType &action, int objNum, FixedTextActionI
 		_infoFlag = true;
 		clearInfo();
 		Common::String errorMessage = fixedText.getActionMessage(fixedTextActionId, action._cAnimNum);
-		screen.print(Common::Point(0, INFO_LINE + 1), INFO_FOREGROUND, "%s", errorMessage.c_str());
+		screen.print(Common::Point(0, INFO_LINE + 1), COL_INFO_FOREGROUND, "%s", errorMessage.c_str());
 		_infoFlag = true;
 
 		// Set how long to show the message
@@ -176,7 +177,7 @@ void UserInterface::checkAction(ActionType &action, int objNum, FixedTextActionI
 			if (scene._goToScene != 1 && !printed && !talk._talkToAbort) {
 				_infoFlag = true;
 				clearInfo();
-				screen.print(Common::Point(0, INFO_LINE + 1), INFO_FOREGROUND, "Done...");
+				screen.print(Common::Point(0, INFO_LINE + 1), COL_INFO_FOREGROUND, "Done...");
 
 				// Set how long to show the message
 				_menuCounter = 30;






More information about the Scummvm-git-logs mailing list