SWORD1: Made some static data const.

This commit is contained in:
Johannes Schickel 2011-09-08 00:05:09 +02:00
parent 928cb5ab11
commit 3a15c10241
7 changed files with 10 additions and 10 deletions

View File

@ -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

View File

@ -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

View File

@ -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);
};

View File

@ -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

View File

@ -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

View File

@ -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,

View File

@ -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.",