[Scummvm-cvs-logs] SF.net SVN: scummvm:[48843] scummvm/trunk/engines/cine
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Thu Apr 29 00:24:11 CEST 2010
Revision: 48843
http://scummvm.svn.sourceforge.net/scummvm/?rev=48843&view=rev
Author: fingolfin
Date: 2010-04-28 22:24:11 +0000 (Wed, 28 Apr 2010)
Log Message:
-----------
CINE: Get rid of some global constructor uses
Modified Paths:
--------------
scummvm/trunk/engines/cine/gfx.cpp
scummvm/trunk/engines/cine/pal.cpp
scummvm/trunk/engines/cine/pal.h
Modified: scummvm/trunk/engines/cine/gfx.cpp
===================================================================
--- scummvm/trunk/engines/cine/gfx.cpp 2010-04-28 22:23:34 UTC (rev 48842)
+++ scummvm/trunk/engines/cine/gfx.cpp 2010-04-28 22:24:11 UTC (rev 48843)
@@ -40,6 +40,23 @@
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,
Modified: scummvm/trunk/engines/cine/pal.cpp
===================================================================
--- scummvm/trunk/engines/cine/pal.cpp 2010-04-28 22:23:34 UTC (rev 48842)
+++ scummvm/trunk/engines/cine/pal.cpp 2010-04-28 22:24:11 UTC (rev 48843)
@@ -186,7 +186,9 @@
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
Modified: scummvm/trunk/engines/cine/pal.h
===================================================================
--- scummvm/trunk/engines/cine/pal.h 2010-04-28 22:23:34 UTC (rev 48842)
+++ scummvm/trunk/engines/cine/pal.h 2010-04-28 22:24:11 UTC (rev 48843)
@@ -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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list