aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/scalpel
diff options
context:
space:
mode:
authorPaul Gilbert2015-09-06 20:52:15 -0400
committerPaul Gilbert2015-09-06 20:52:15 -0400
commite0ad8a9ef56095df91273b1d27c6511d702546fd (patch)
tree53edcac9fb63d46196a9947052ae05ba66a82517 /engines/sherlock/scalpel
parent735bd2c3f7ddce6eefa4dacf396df1180e93373e (diff)
downloadscummvm-rg350-e0ad8a9ef56095df91273b1d27c6511d702546fd.tar.gz
scummvm-rg350-e0ad8a9ef56095df91273b1d27c6511d702546fd.tar.bz2
scummvm-rg350-e0ad8a9ef56095df91273b1d27c6511d702546fd.zip
SHERLOCK: 3DO: Set up RGB color constants for 3DO
Diffstat (limited to 'engines/sherlock/scalpel')
-rw-r--r--engines/sherlock/scalpel/scalpel.cpp59
-rw-r--r--engines/sherlock/scalpel/scalpel.h30
-rw-r--r--engines/sherlock/scalpel/scalpel_screen.cpp2
-rw-r--r--engines/sherlock/scalpel/scalpel_screen.h2
4 files changed, 78 insertions, 15 deletions
diff --git a/engines/sherlock/scalpel/scalpel.cpp b/engines/sherlock/scalpel/scalpel.cpp
index c3915a1cf2..d1dad93b1a 100644
--- a/engines/sherlock/scalpel/scalpel.cpp
+++ b/engines/sherlock/scalpel/scalpel.cpp
@@ -174,12 +174,71 @@ const PeopleData PEOPLE_DATA[MAX_PEOPLE] = {
{ "INSP", "Inspector Lestrade", { 4, 0, 0 }, { 2, 0, 0 } }
};
+uint INFO_BLACK;
+uint BORDER_COLOR;
+uint COMMAND_BACKGROUND;
+uint BUTTON_BACKGROUND;
+uint TALK_FOREGROUND;
+uint TALK_NULL;
+uint BUTTON_TOP;
+uint BUTTON_MIDDLE;
+uint BUTTON_BOTTOM;
+uint COMMAND_FOREGROUND;
+uint COMMAND_HIGHLIGHTED;
+uint COMMAND_NULL;
+uint INFO_FOREGROUND;
+uint INFO_BACKGROUND;
+uint INV_FOREGROUND;
+uint INV_BACKGROUND;
+uint PEN_COLOR;
+
/*----------------------------------------------------------------*/
+#define FROM_RGB(r, g, b) pixelFormatRGB565.ARGBToColor(0, r, g, b)
+
ScalpelEngine::ScalpelEngine(OSystem *syst, const SherlockGameDescription *gameDesc) :
SherlockEngine(syst, gameDesc) {
_darts = nullptr;
_mapResult = 0;
+
+ if (getPlatform() == Common::kPlatform3DO) {
+ const Graphics::PixelFormat pixelFormatRGB565 = Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0);
+ INFO_BLACK = FROM_RGB(0, 0, 0x48);
+ BORDER_COLOR = FROM_RGB(0x6d, 0x38, 0x10);
+ COMMAND_BACKGROUND = FROM_RGB(0x38, 0x38, 0xce);
+ BUTTON_BACKGROUND = FROM_RGB(0x95, 0x5d, 0x24);
+ TALK_FOREGROUND = FROM_RGB(0xff, 0x55, 0x55);
+ TALK_NULL = FROM_RGB(0xce, 0xc6, 0xc2);
+ BUTTON_TOP = FROM_RGB(0xbe, 0x85, 0x3c);
+ BUTTON_MIDDLE = FROM_RGB(0x9d, 0x40, 0);
+ BUTTON_BOTTOM = FROM_RGB(0x69, 0x24, 0);
+ COMMAND_FOREGROUND = FROM_RGB(0xFF, 0xFF, 0xFF);
+ COMMAND_HIGHLIGHTED = FROM_RGB(0x55, 0xff, 0x55);
+ COMMAND_NULL = FROM_RGB(0x69, 0x24, 0);
+ INFO_FOREGROUND = FROM_RGB(0x55, 0xff, 0xff);
+ INFO_BACKGROUND = FROM_RGB(0, 0, 0x48);
+ INV_FOREGROUND = FROM_RGB(0xff, 0xff, 0x55);
+ INV_BACKGROUND = FROM_RGB(0, 0, 0x48);
+ PEN_COLOR = FROM_RGB(0x50, 0x18, 0);
+ } else {
+ INFO_BLACK = 1;
+ BORDER_COLOR = 237;
+ COMMAND_BACKGROUND = 4;
+ BUTTON_BACKGROUND = 235;
+ TALK_FOREGROUND = 12;
+ TALK_NULL = 16;
+ BUTTON_TOP = 233;
+ BUTTON_MIDDLE = 244;
+ BUTTON_BOTTOM = 248;
+ COMMAND_FOREGROUND = 15;
+ COMMAND_HIGHLIGHTED = 10;
+ COMMAND_NULL = 248;
+ INFO_FOREGROUND = 11;
+ INFO_BACKGROUND = 1;
+ INV_FOREGROUND = 14;
+ INV_BACKGROUND = 1;
+ PEN_COLOR = 250;
+ }
}
ScalpelEngine::~ScalpelEngine() {
diff --git a/engines/sherlock/scalpel/scalpel.h b/engines/sherlock/scalpel/scalpel.h
index cb1cb20492..6ae8563e61 100644
--- a/engines/sherlock/scalpel/scalpel.h
+++ b/engines/sherlock/scalpel/scalpel.h
@@ -30,19 +30,23 @@ namespace Sherlock {
namespace Scalpel {
-enum {
- BUTTON_TOP = 233,
- BUTTON_MIDDLE = 244,
- BUTTON_BOTTOM = 248,
- COMMAND_FOREGROUND = 15,
- COMMAND_HIGHLIGHTED = 10,
- COMMAND_NULL = 248,
- INFO_FOREGROUND = 11,
- INFO_BACKGROUND = 1,
- INV_FOREGROUND = 14,
- INV_BACKGROUND = 1,
- PEN_COLOR = 250
-};
+extern uint BUTTON_TOP;
+extern uint BUTTON_MIDDLE;
+extern uint BUTTON_BOTTOM;
+extern uint COMMAND_FOREGROUND;
+extern uint COMMAND_HIGHLIGHTED;
+extern uint COMMAND_NULL;
+extern uint INFO_FOREGROUND;
+extern uint INFO_BACKGROUND;
+extern uint INV_FOREGROUND;
+extern uint INV_BACKGROUND;
+extern uint PEN_COLOR;
+extern uint INFO_BLACK;
+extern uint BORDER_COLOR;
+extern uint COMMAND_BACKGROUND;
+extern uint BUTTON_BACKGROUND;
+extern uint TALK_FOREGROUND;
+extern uint TALK_NULL;
class ScalpelEngine : public SherlockEngine {
private:
diff --git a/engines/sherlock/scalpel/scalpel_screen.cpp b/engines/sherlock/scalpel/scalpel_screen.cpp
index 2096dabcdf..44113b2a5d 100644
--- a/engines/sherlock/scalpel/scalpel_screen.cpp
+++ b/engines/sherlock/scalpel/scalpel_screen.cpp
@@ -45,7 +45,7 @@ void ScalpelScreen::makeButton(const Common::Rect &bounds, int textX,
COMMAND_FOREGROUND, "%s", str.c_str() + 1);
}
-void ScalpelScreen::buttonPrint(const Common::Point &pt, byte color, bool slamIt,
+void ScalpelScreen::buttonPrint(const Common::Point &pt, uint color, bool slamIt,
const Common::String &str) {
int xStart = pt.x - stringWidth(str) / 2;
diff --git a/engines/sherlock/scalpel/scalpel_screen.h b/engines/sherlock/scalpel/scalpel_screen.h
index 472fe9e220..0277bcd16f 100644
--- a/engines/sherlock/scalpel/scalpel_screen.h
+++ b/engines/sherlock/scalpel/scalpel_screen.h
@@ -45,7 +45,7 @@ public:
* Prints an interface command with the first letter highlighted to indicate
* what keyboard shortcut is associated with it
*/
- void buttonPrint(const Common::Point &pt, byte color, bool slamIt, const Common::String &str);
+ void buttonPrint(const Common::Point &pt, uint color, bool slamIt, const Common::String &str);
/**
* Draw a panel in the back buffer with a raised area effect around the edges