[Scummvm-cvs-logs] SF.net SVN: scummvm: [24329] scummvm/trunk/engines/scumm/charset.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sun Oct 15 04:00:52 CEST 2006
Revision: 24329
http://svn.sourceforge.net/scummvm/?rev=24329&view=rev
Author: fingolfin
Date: 2006-10-14 19:00:48 -0700 (Sat, 14 Oct 2006)
Log Message:
-----------
Turned some more static vars into static const
Modified Paths:
--------------
scummvm/trunk/engines/scumm/charset.cpp
Modified: scummvm/trunk/engines/scumm/charset.cpp
===================================================================
--- scummvm/trunk/engines/scumm/charset.cpp 2006-10-15 02:00:37 UTC (rev 24328)
+++ scummvm/trunk/engines/scumm/charset.cpp 2006-10-15 02:00:48 UTC (rev 24329)
@@ -430,14 +430,14 @@
}
#ifdef PALMOS_68K
-static byte *englishCharsetDataV2;
-static byte *germanCharsetDataV2;
-static byte *frenchCharsetDataV2;
-static byte *italianCharsetDataV2;
-static byte *spanishCharsetDataV2;
+static const byte *englishCharsetDataV2;
+static const byte *germanCharsetDataV2;
+static const byte *frenchCharsetDataV2;
+static const byte *italianCharsetDataV2;
+static const byte *spanishCharsetDataV2;
#else
// English Zak font
-static byte englishCharsetDataV2[] = {
+static const byte englishCharsetDataV2[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x03, 0x06, 0x0C, 0x18, 0x3E, 0x03, 0x00,
0x80, 0xC0, 0x60, 0x30, 0x18, 0x7C, 0xC0, 0x00,
@@ -569,7 +569,7 @@
};
// German Zak font
-static byte germanCharsetDataV2[] = {
+static const byte germanCharsetDataV2[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x03, 0x06, 0x0c, 0x18, 0x3e, 0x03, 0x00,
0x80, 0xc0, 0x60, 0x30, 0x18, 0x7c, 0xc0, 0x00,
@@ -701,7 +701,7 @@
};
// French Zak font.
-static byte frenchCharsetDataV2[] = {
+static const byte frenchCharsetDataV2[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x03, 0x06, 0x0c, 0x18, 0x3e, 0x03, 0x00,
0x80, 0xc0, 0x60, 0x30, 0x18, 0x7c, 0xc0, 0x00,
@@ -833,7 +833,7 @@
};
// Italian Zak font.
-static byte italianCharsetDataV2[] = {
+static const byte italianCharsetDataV2[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x03, 0x06, 0x0c, 0x18, 0x3e, 0x03, 0x00,
0x80, 0xc0, 0x60, 0x30, 0x18, 0x7c, 0xc0, 0x00,
@@ -966,7 +966,7 @@
// Spanish Zak font.
// FIXME: This is identical to germanCharsetDataV2 it seems?!
-static byte spanishCharsetDataV2[] = {
+static const byte spanishCharsetDataV2[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x03, 0x06, 0x0c, 0x18, 0x3e, 0x03, 0x00,
0x80, 0xc0, 0x60, 0x30, 0x18, 0x7c, 0xc0, 0x00,
@@ -1204,7 +1204,8 @@
// Indy3 / Zak256 / Loom
int width, height, origWidth = 0, origHeight;
VirtScreen *vs;
- byte *charPtr, *dst;
+ const byte *charPtr;
+ byte *dst;
int is2byte = (chr >= 0x80 && _vm->_useCJKMode) ? 1 : 0;
assertRange(0, _curId, _vm->_numCharsets - 1, "charset");
@@ -1277,7 +1278,8 @@
}
void CharsetRendererV3::drawChar(int chr, const Graphics::Surface &s, int x, int y) {
- byte *charPtr, *dst;
+ const byte *charPtr;
+ byte *dst;
int width, height;
int is2byte = (chr >= 0x80 && _vm->_useCJKMode) ? 1 : 0;
if (is2byte) {
@@ -1297,13 +1299,13 @@
void CharsetRenderer::translateColor() {
// Based on disassembly
if (_vm->_renderMode == Common::kRenderCGA) {
- static byte CGAtextColorMap[16] = {0, 3, 3, 3, 5, 5, 5, 15,
+ static const byte CGAtextColorMap[16] = {0, 3, 3, 3, 5, 5, 5, 15,
15, 3, 3, 3, 5, 5, 15, 15};
_color = CGAtextColorMap[_color & 0x0f];
}
if (_vm->_renderMode == Common::kRenderHercA || _vm->_renderMode == Common::kRenderHercG) {
- static byte HercTextColorMap[16] = {0, 15, 2, 15, 15, 5, 15, 15,
+ static const byte HercTextColorMap[16] = {0, 15, 2, 15, 15, 5, 15, 15,
8, 15, 15, 15, 15, 15, 15, 15};
_color = HercTextColorMap[_color & 0x0f];
}
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