AVALANCHE: Fix static array names

This commit is contained in:
Strangerke 2013-10-04 17:52:12 +02:00
parent 89559e07a3
commit 300859aa43
4 changed files with 24 additions and 24 deletions

View File

@ -1545,22 +1545,22 @@ bool AvalancheEngine::decreaseMoney(uint16 amount) {
}
Common::String AvalancheEngine::getName(People whose) {
static const Common::String kLads[17] = {
static const Common::String lads[17] = {
"Avalot", "Spludwick", "Crapulus", "Dr. Duck", "Malagauche", "Friar Tuck",
"Robin Hood", "Cwytalot", "du Lustie", "the Duke of Cardiff", "Dogfood",
"A trader", "Ibythneth", "Ayles", "Port", "Spurge", "Jacques"
};
static const Common::String kLasses[4] = {"Arkata", "Geida", "\0xB1", "the Wise Woman"};
static const Common::String lasses[4] = {"Arkata", "Geida", "\0xB1", "the Wise Woman"};
if (whose < kPeopleArkata)
return kLads[whose - kPeopleAvalot];
return lads[whose - kPeopleAvalot];
else
return kLasses[whose - kPeopleArkata];
return lasses[whose - kPeopleArkata];
}
Common::String AvalancheEngine::getItem(byte which) {
static const Common::String kItems[kObjectNum] = {
static const Common::String items[kObjectNum] = {
"some wine", "your money-bag", "your bodkin", "a potion", "a chastity belt",
"a crossbow bolt", "a crossbow", "a lute", "a pilgrim's badge", "a mushroom",
"a key", "a bell", "a scroll", "a pen", "some ink", "your clothes", "a habit",
@ -1577,7 +1577,7 @@ Common::String AvalancheEngine::getItem(byte which) {
case 0:
case 1:
case 4:
get_better_result = kItems[which - 1];
get_better_result = items[which - 1];
break;
case 3:
get_better_result = "some vinegar";
@ -1590,11 +1590,11 @@ Common::String AvalancheEngine::getItem(byte which) {
else if (_onionInVinegar)
get_better_result = "a pickled onion (in the vinegar)";
else
get_better_result = kItems[which - 1];
get_better_result = items[which - 1];
break;
default:
if ((which < kObjectNum) && (which > 0))
get_better_result = kItems[which - 1];
get_better_result = items[which - 1];
else
get_better_result = "";
}

View File

@ -166,12 +166,12 @@ void GraphicManager::loadMouse(byte which) {
}
void GraphicManager::drawThinkPic(Common::String filename, int id) {
static const int16 kPicSize = 966;
static const int16 picSize = 966;
Common::File file;
if (!file.open(filename))
error("drawThinkPic(): File not found: %s", filename.c_str());
file.seek(id * kPicSize + 65);
file.seek(id * picSize + 65);
Graphics::Surface picture = loadPictureGraphic(file);
drawPicture(_surface, picture, 205, 170);

View File

@ -771,7 +771,7 @@ void Menu::update() { // TODO: Optimize it ASAP!!! It really needs it...
}
char Menu::getThingChar(byte which) {
static const char kThingsChar[] = "WMBParCLguKeSnIohn"; // V=Vinegar
static const char thingsChar[] = "WMBParCLguKeSnIohn"; // V=Vinegar
char result;
switch (which) {
@ -779,26 +779,26 @@ char Menu::getThingChar(byte which) {
if (_vm->_wineState == 3)
result = 'V'; // Vinegar
else
result = kThingsChar[which - 1];
result = thingsChar[which - 1];
break;
default:
result = kThingsChar[which - 1];
result = thingsChar[which - 1];
}
return result;
}
byte Menu::getNameChar(People whose) {
static const char kLadChar[] = "ASCDMTRwLfgeIyPu";
static const char kLassChar[] = "kG\0xB1o";
static const char ladChar[] = "ASCDMTRwLfgeIyPu";
static const char lassChar[] = "kG\0xB1o";
if (whose < kPeopleArkata)
return kLadChar[whose - kPeopleAvalot];
return ladChar[whose - kPeopleAvalot];
else
return kLassChar[whose - kPeopleArkata];
return lassChar[whose - kPeopleArkata];
}
Common::String Menu::getThing(byte which) {
static const Common::String kThings[kObjectNum] = {
static const Common::String things[kObjectNum] = {
"Wine", "Money-bag", "Bodkin", "Potion", "Chastity belt",
"Crossbow bolt", "Crossbow", "Lute", "Pilgrim's badge", "Mushroom", "Key",
"Bell", "Scroll", "Pen", "Ink", "Clothes", "Habit", "Onion"
@ -810,7 +810,7 @@ Common::String Menu::getThing(byte which) {
switch (_vm->_wineState) {
case 1:
case 4:
result = kThings[which - 1];
result = things[which - 1];
break;
case 3:
result = "Vinegar";
@ -821,10 +821,10 @@ Common::String Menu::getThing(byte which) {
if (_vm->_rottenOnion)
result = "rotten onion";
else
result = kThings[which - 1];
result = things[which - 1];
break;
default:
result = kThings[which - 1];
result = things[which - 1];
}
return result;
}

View File

@ -527,7 +527,7 @@ void Parser::replace(Common::String oldChars, byte newChar) {
}
Common::String Parser::rank() {
static const RankType kRanks[9] = {
static const RankType ranks[9] = {
{0, "Beginner"}, {10, "Novice"},
{20, "Improving"}, {35, "Not bad"},
{50, "Passable"}, {65, "Good"},
@ -536,8 +536,8 @@ Common::String Parser::rank() {
};
for (int i = 0; i < 8; i++) {
if ((_vm->_dnascore >= kRanks[i]._score) && (_vm->_dnascore < kRanks[i + 1]._score)) {
return kRanks[i]._title;
if ((_vm->_dnascore >= ranks[i]._score) && (_vm->_dnascore < ranks[i + 1]._score)) {
return ranks[i]._title;
}
}
return "";