aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2011-09-08 00:05:09 +0200
committerJohannes Schickel2011-09-08 00:05:09 +0200
commit3a15c10241421beaa8a3fe84f3b0567bb2215573 (patch)
tree47c9ae0ec0bb24f24b057934a3331bf5be8c91dd
parent928cb5ab1196f800049ba3e22038acf9cab3bc60 (diff)
downloadscummvm-rg350-3a15c10241421beaa8a3fe84f3b0567bb2215573.tar.gz
scummvm-rg350-3a15c10241421beaa8a3fe84f3b0567bb2215573.tar.bz2
scummvm-rg350-3a15c10241421beaa8a3fe84f3b0567bb2215573.zip
SWORD1: Made some static data const.
-rw-r--r--engines/sword1/animation.cpp2
-rw-r--r--engines/sword1/detection.cpp4
-rw-r--r--engines/sword1/logic.h4
-rw-r--r--engines/sword1/objectman.cpp2
-rw-r--r--engines/sword1/objectman.h2
-rw-r--r--engines/sword1/staticres.cpp4
-rw-r--r--engines/sword1/sword1.cpp2
7 files changed, 10 insertions, 10 deletions
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp
index f19efd2635..324154f709 100644
--- a/engines/sword1/animation.cpp
+++ b/engines/sword1/animation.cpp
@@ -38,7 +38,7 @@
namespace Sword1 {
-static const char *sequenceList[20] = {
+static const char *const sequenceList[20] = {
"ferrari", // 0 CD2 ferrari running down fitz in sc19
"ladder", // 1 CD2 george walking down ladder to dig sc24->sc$
"steps", // 2 CD2 george walking down steps sc23->sc24
diff --git a/engines/sword1/detection.cpp b/engines/sword1/detection.cpp
index c2c03dee9f..e4c068e667 100644
--- a/engines/sword1/detection.cpp
+++ b/engines/sword1/detection.cpp
@@ -48,7 +48,7 @@ static const PlainGameDescriptor sword1PSXDemoSettings =
// check these subdirectories (if present)
-static const char *g_dirNames[] = { "clusters", "speech", "english", "italian"};
+static const char *const g_dirNames[] = { "clusters", "speech", "english", "italian"};
#define NUM_COMMON_FILES_TO_CHECK 1
#define NUM_PC_FILES_TO_CHECK 3
@@ -59,7 +59,7 @@ static const char *g_dirNames[] = { "clusters", "speech", "english", "italian"};
#define NUM_MAC_DEMO_FILES_TO_CHECK 1
#define NUM_FILES_TO_CHECK NUM_COMMON_FILES_TO_CHECK + NUM_PC_FILES_TO_CHECK + NUM_MAC_FILES_TO_CHECK + NUM_PSX_FILES_TO_CHECK + NUM_DEMO_FILES_TO_CHECK + NUM_MAC_DEMO_FILES_TO_CHECK + NUM_PSX_DEMO_FILES_TO_CHECK
-static const char *g_filesToCheck[NUM_FILES_TO_CHECK] = { // these files have to be found
+static const char *const g_filesToCheck[NUM_FILES_TO_CHECK] = { // these files have to be found
"swordres.rif", // Mac, PC and PSX version
"general.clu", // PC and PSX version
"compacts.clu", // PC and PSX version
diff --git a/engines/sword1/logic.h b/engines/sword1/logic.h
index b6686f6249..d4b297e8ea 100644
--- a/engines/sword1/logic.h
+++ b/engines/sword1/logic.h
@@ -207,8 +207,8 @@ private:
int fnPurple(Object *cpt, int32 id, int32 c, int32 d, int32 e, int32 f, int32 z, int32 x);
int fnBlack(Object *cpt, int32 id, int32 c, int32 d, int32 e, int32 f, int32 z, int32 x);
static const uint32 _scriptVarInit[NON_ZERO_SCRIPT_VARS][2];
- static const uint8 *_startData[];
- static const uint8 *_helperData[];
+ static const uint8 *const _startData[];
+ static const uint8 *const _helperData[];
void startPosCallFn(uint8 fnId, uint32 param1, uint32 param2, uint32 param3);
void runStartScript(const uint8 *data);
};
diff --git a/engines/sword1/objectman.cpp b/engines/sword1/objectman.cpp
index 52b5ea2121..ed994a97fa 100644
--- a/engines/sword1/objectman.cpp
+++ b/engines/sword1/objectman.cpp
@@ -179,7 +179,7 @@ char ObjectMan::_missingSubTitleStr[] = " ";
// is not needed. The English version of the game does not include Portuguese
// so I cannot check.)
-const char *ObjectMan::_translationId2950145[7] = {
+const char *const ObjectMan::_translationId2950145[7] = {
"Oh?", // English (not needed)
"Quoi?", // French
"Oh?", // German
diff --git a/engines/sword1/objectman.h b/engines/sword1/objectman.h
index 7bc31b08d7..ca3c7c1526 100644
--- a/engines/sword1/objectman.h
+++ b/engines/sword1/objectman.h
@@ -59,7 +59,7 @@ private:
uint16 _liveList[TOTAL_SECTIONS]; //which sections are active
uint8 *_cptData[TOTAL_SECTIONS];
static char _missingSubTitleStr[];
- static const char *_translationId2950145[7]; //translation for textId 2950145 (missing from cluster file for some langages)
+ static const char *const _translationId2950145[7]; //translation for textId 2950145 (missing from cluster file for some langages)
};
} // End of namespace Sword1
diff --git a/engines/sword1/staticres.cpp b/engines/sword1/staticres.cpp
index 402e349576..60c6877232 100644
--- a/engines/sword1/staticres.cpp
+++ b/engines/sword1/staticres.cpp
@@ -7055,7 +7055,7 @@ const uint8 g_genWhiteCoat[] = {
INIT_SEQ_END
};
-const uint8 *Logic::_startData[] = {
+const uint8 *const Logic::_startData[] = {
g_startPos0,
g_startPos1,
g_startPos2,
@@ -7139,7 +7139,7 @@ const uint8 *Logic::_startData[] = {
g_startPos80
};
-const uint8 *Logic::_helperData[] = {
+const uint8 *const Logic::_helperData[] = {
g_genIreland,
g_genSyria,
g_genSpain,
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index 6a3f215c4b..865e025786 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -240,7 +240,7 @@ void SwordEngine::flagsToBool(bool *dest, uint8 flags) {
}
}
-static const char *errorMsgs[] = {
+static const char *const errorMsgs[] = {
"The file \"%s\" is missing and the game doesn't work without it.\n"
"Please copy it from CD %d and try starting the game again.\n"
"The Readme file also contains further information.",