aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/cine/gfx.cpp17
-rw-r--r--engines/cine/pal.cpp4
-rw-r--r--engines/cine/pal.h20
3 files changed, 20 insertions, 21 deletions
diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp
index 9392636b39..b266b84647 100644
--- a/engines/cine/gfx.cpp
+++ b/engines/cine/gfx.cpp
@@ -40,6 +40,23 @@ namespace Cine {
byte *collisionPage;
FWRenderer *renderer = NULL;
+// Constants related to kLowPalFormat
+#define kLowPalBytesPerColor 2
+#define kLowPalNumColors 16
+#define kLowPalNumBytes ((kLowPalNumColors) * (kLowPalBytesPerColor))
+
+/** Low resolution (9-bit) color format used in Cine's 16-color modes. */
+#define kLowPalFormat Graphics::PixelFormat(kLowPalBytesPerColor, 3, 3, 3, 0, 8, 4, 0, 0)
+
+
+// Constants related to kHighPalFormat
+#define kHighPalBytesPerColor 3
+#define kHighPalNumColors 256
+#define kHighPalNumBytes ((kHighPalNumColors) * (kHighPalBytesPerColor))
+
+/** High resolution (24-bit) color format used in Cine's 256-color modes. */
+#define kHighPalFormat Graphics::PixelFormat(kHighPalBytesPerColor, 8, 8, 8, 0, 0, 8, 16, 0)
+
static const byte mouseCursorNormal[] = {
0x00, 0x00, 0x40, 0x00, 0x60, 0x00, 0x70, 0x00,
0x78, 0x00, 0x7C, 0x00, 0x7E, 0x00, 0x7F, 0x00,
diff --git a/engines/cine/pal.cpp b/engines/cine/pal.cpp
index 6da121a0f2..6e730aedd9 100644
--- a/engines/cine/pal.cpp
+++ b/engines/cine/pal.cpp
@@ -186,7 +186,9 @@ const Graphics::PixelFormat &Palette::colorFormat() const {
void Palette::setGlobalOSystemPalette() const {
byte buf[256 * 4]; // Allocate space for the largest possible palette
- save(buf, sizeof(buf), Cine::kSystemPalFormat, CINE_LITTLE_ENDIAN);
+ // The color format used by OSystem's setPalette-function:
+ static const Graphics::PixelFormat kSystemPalFormat(4, 8, 8, 8, 0, 0, 8, 16, 0);
+ save(buf, sizeof(buf), kSystemPalFormat, CINE_LITTLE_ENDIAN);
if (g_cine->getPlatform() == Common::kPlatformAmiga && colorCount() == 16) {
// The Amiga version of Future Wars does use the upper 16 colors for a darkened
diff --git a/engines/cine/pal.h b/engines/cine/pal.h
index e5bb8db78f..0086711636 100644
--- a/engines/cine/pal.h
+++ b/engines/cine/pal.h
@@ -30,26 +30,6 @@
namespace Cine {
-// Constants related to kLowPalFormat
-#define kLowPalBytesPerColor 2
-#define kLowPalNumColors 16
-#define kLowPalNumBytes ((kLowPalNumColors) * (kLowPalBytesPerColor))
-
-/** Low resolution (9-bit) color format used in Cine's 16-color modes. */
-static const Graphics::PixelFormat kLowPalFormat(kLowPalBytesPerColor, 3, 3, 3, 0, 8, 4, 0, 0);
-
-
-// Constants related to kHighPalFormat
-#define kHighPalBytesPerColor 3
-#define kHighPalNumColors 256
-#define kHighPalNumBytes ((kHighPalNumColors) * (kHighPalBytesPerColor))
-
-/** High resolution (24-bit) color format used in Cine's 256-color modes. */
-static const Graphics::PixelFormat kHighPalFormat(kHighPalBytesPerColor, 8, 8, 8, 0, 0, 8, 16, 0);
-
-/** The color format used by OSystem's setPalette-function. */
-static const Graphics::PixelFormat kSystemPalFormat(4, 8, 8, 8, 0, 0, 8, 16, 0);
-
/**
* Endian types. Used at least by Palette class's load and save functions.
* TODO: Move somewhere more general as this is definitely not Cine-engine specific