aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorJohannes Schickel2012-11-19 13:00:33 +0100
committerJohannes Schickel2012-11-19 13:00:33 +0100
commitdd551c4775ab016ad9d24e2d48a0919bf5739d4b (patch)
treef2f38640f7c01b2812f3d382239f7a9bd963ef2b /engines/kyra
parent6437aa2c92ffc60290d9983be337d6e6482b4ec8 (diff)
downloadscummvm-rg350-dd551c4775ab016ad9d24e2d48a0919bf5739d4b.tar.gz
scummvm-rg350-dd551c4775ab016ad9d24e2d48a0919bf5739d4b.tar.bz2
scummvm-rg350-dd551c4775ab016ad9d24e2d48a0919bf5739d4b.zip
KYRA: Make more static data tables const.
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/chargen.cpp2
-rw-r--r--engines/kyra/darkmoon.h8
-rw-r--r--engines/kyra/scene_eob.cpp2
-rw-r--r--engines/kyra/sequences_hof.cpp4
-rw-r--r--engines/kyra/staticres_eob.cpp18
5 files changed, 17 insertions, 17 deletions
diff --git a/engines/kyra/chargen.cpp b/engines/kyra/chargen.cpp
index 23274349e7..7ea2feb361 100644
--- a/engines/kyra/chargen.cpp
+++ b/engines/kyra/chargen.cpp
@@ -1206,7 +1206,7 @@ void CharacterGenerator::finish() {
static const int8 itemList1[] = { 1, 2, 0, 17, -1, 0, 0 };
static const int8 itemList2[] = { 2, 56, 1, 17, 31, 0, 1, 23, 1, 17, 31, 0, 1 };
static const int8 itemList3[] = { 2, 1, 1, 17, 31, 1, 1, 1, 0, 17, 31, 2, 1 };
- static const int8 *itemList[] = { itemList0, itemList1, itemList2, itemList3 };
+ static const int8 *const itemList[] = { itemList0, itemList1, itemList2, itemList3 };
for (int i = 0; i < 4; i++) {
EoBCharacter *c = &_characters[i];
diff --git a/engines/kyra/darkmoon.h b/engines/kyra/darkmoon.h
index a61990a8f2..5f090491d6 100644
--- a/engines/kyra/darkmoon.h
+++ b/engines/kyra/darkmoon.h
@@ -83,10 +83,10 @@ private:
const DarkMoonAnimCommand **_animFinale;
const DarkMoonShapeDef **_shapesFinale;
- static const char *_palFilesIntroVGA[];
- static const char *_palFilesIntroEGA[];
- static const char *_palFilesFinaleVGA[];
- static const char *_palFilesFinaleEGA[];
+ static const char *const _palFilesIntroVGA[];
+ static const char *const _palFilesIntroEGA[];
+ static const char *const _palFilesFinaleVGA[];
+ static const char *const _palFilesFinaleEGA[];
// Ingame sequence
void seq_nightmare();
diff --git a/engines/kyra/scene_eob.cpp b/engines/kyra/scene_eob.cpp
index bf9eb01332..53f000a50c 100644
--- a/engines/kyra/scene_eob.cpp
+++ b/engines/kyra/scene_eob.cpp
@@ -100,7 +100,7 @@ void EoBCoreEngine::loadLevel(int level, int sub) {
void EoBCoreEngine::readLevelFileData(int level) {
Common::String file;
Common::SeekableReadStream *s = 0;
- static const char *suffix[] = { "INF", "DRO", "ELO", 0 };
+ static const char *const suffix[] = { "INF", "DRO", "ELO", 0 };
for (const char *const *sf = suffix; *sf && !s; sf++) {
file = Common::String::format("LEVEL%d.%s", level, *sf);
diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp
index 757907d4a8..110cfec6e6 100644
--- a/engines/kyra/sequences_hof.cpp
+++ b/engines/kyra/sequences_hof.cpp
@@ -572,8 +572,8 @@ void SeqPlayer_HOF::setupCallbacks() {
#endif
static const SeqProc nestedSeqCallbacksLoLDemo[] = { 0 };
- static const SeqProc *seqCallbacks[] = { seqCallbacksHoF, seqCallbacksHoFDemo, seqCallbacksLoLDemo};
- static const SeqProc *nestedSeqCallbacks[] = { nestedSeqCallbacksHoF, nestedSeqCallbacksHoFDemo, nestedSeqCallbacksLoLDemo};
+ static const SeqProc *const seqCallbacks[] = { seqCallbacksHoF, seqCallbacksHoFDemo, seqCallbacksLoLDemo};
+ static const SeqProc *const nestedSeqCallbacks[] = { nestedSeqCallbacksHoF, nestedSeqCallbacksHoFDemo, nestedSeqCallbacksLoLDemo};
int tmpSize = 0;
delete _config;
diff --git a/engines/kyra/staticres_eob.cpp b/engines/kyra/staticres_eob.cpp
index 0e34341117..79f018c53e 100644
--- a/engines/kyra/staticres_eob.cpp
+++ b/engines/kyra/staticres_eob.cpp
@@ -465,13 +465,13 @@ void EoBCoreEngine::initStaticResource() {
// EOB I doesn't have load and save menus, because there is only one single
// save slot. Instead of emulating this we provide a menu similiar to EOB II.
- static const char *saveLoadStrings[3][4] = {
+ static const char *const saveLoadStrings[3][4] = {
{ "Cancel", "Empty Slot", "Save Game", "Load Game" },
{ "Abbr.", "Leerer Slot", "Speichern", " Laden" },
{ 0, 0, 0, 0 }
};
- static const char *errorSlotEmptyString[3] = {
+ static const char *const errorSlotEmptyString[3] = {
"There is no game\rsaved in that slot!",
"Hier ist noch kein\rSpiel gespeichert!",
0
@@ -1096,7 +1096,7 @@ void EoBEngine::initStaticResource() {
p->dmgModifierEvade = *ps++;
}
- static const char *errorSlotNoNameString[3] = {
+ static const char *const errorSlotNoNameString[3] = {
" You must specify\r a name for your\r save game!",
" Spielstaende mues-\r sen einen Namen\r haben!",
0
@@ -1249,7 +1249,7 @@ void DarkMoonEngine::initStaticResource() {
_wallOfForceDsNumH = _staticres->loadRawData(kEoB2WallOfForceNumH, temp);
_wallOfForceShpId = _staticres->loadRawData(kEoB2WallOfForceShpId, temp);
- static const char *errorSlotNoNameString[3] = {
+ static const char *const errorSlotNoNameString[3] = {
" You must specify\r a name for your\r save game!",
" Spielst[nde m]ssen\r einen Namen haben!",
0
@@ -1258,7 +1258,7 @@ void DarkMoonEngine::initStaticResource() {
_errorSlotNoNameString = errorSlotNoNameString[(_flags.lang == Common::EN_ANY) ? 0 : ((_flags.lang == Common::DE_DEU) ? 1 : 2)];
// ScummVM specific
- static const char *transferStringsScummVM[3][5] = {
+ static const char *const transferStringsScummVM[3][5] = {
{
"\r We cannot find any EOB save game\r file. Please make sure that the\r save game file with the party\r you wish to transfer is located\r in your ScummVM save game\r directory. If you have set up\r multiple save directories you\r have to copy the EOB save file\r into your EOB II save directory.\r Do you wish to try again?",
"Game ID",
@@ -1300,7 +1300,7 @@ void DarkMoonEngine::initSpells() {
}
}
-const char *DarkMoonEngine::_palFilesIntroVGA[] = {
+const char *const DarkMoonEngine::_palFilesIntroVGA[] = {
"PALETTE1.PAL",
"PALETTE3.PAL",
"PALETTE2.PAL",
@@ -1308,7 +1308,7 @@ const char *DarkMoonEngine::_palFilesIntroVGA[] = {
0
};
-const char *DarkMoonEngine::_palFilesIntroEGA[] = {
+const char *const DarkMoonEngine::_palFilesIntroEGA[] = {
"PALETTE0.PAL",
"PALETTE3.PAL",
"PALETTE2.PAL",
@@ -1316,7 +1316,7 @@ const char *DarkMoonEngine::_palFilesIntroEGA[] = {
0
};
-const char *DarkMoonEngine::_palFilesFinaleVGA[] = {
+const char *const DarkMoonEngine::_palFilesFinaleVGA[] = {
"FINALE_0.PAL",
"FINALE_0.PAL",
"FINALE_1.PAL",
@@ -1329,7 +1329,7 @@ const char *DarkMoonEngine::_palFilesFinaleVGA[] = {
0
};
-const char *DarkMoonEngine::_palFilesFinaleEGA[] = {
+const char *const DarkMoonEngine::_palFilesFinaleEGA[] = {
"FINALE_0.PAL",
"FINALE_0.PAL",
"FINALE_1.PAL",