diff options
author | Strangerke | 2013-10-05 14:37:20 +0200 |
---|---|---|
committer | Strangerke | 2013-10-05 14:37:20 +0200 |
commit | b6d6c17727755fe50bbbb02ddc126ab7c887683c (patch) | |
tree | d235da483c3f06dede1268ff652efd204ca8b9ad /engines/avalanche/avalot.cpp | |
parent | d3cd7e237a017af32962bc20c4dd8f510a4b7c80 (diff) | |
download | scummvm-rg350-b6d6c17727755fe50bbbb02ddc126ab7c887683c.tar.gz scummvm-rg350-b6d6c17727755fe50bbbb02ddc126ab7c887683c.tar.bz2 scummvm-rg350-b6d6c17727755fe50bbbb02ddc126ab7c887683c.zip |
AVALANCHE: Replace static strings by static char*
Diffstat (limited to 'engines/avalanche/avalot.cpp')
-rw-r--r-- | engines/avalanche/avalot.cpp | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp index ad71ce5ee8..f80a915508 100644 --- a/engines/avalanche/avalot.cpp +++ b/engines/avalanche/avalot.cpp @@ -1541,26 +1541,27 @@ bool AvalancheEngine::decreaseMoney(uint16 amount) { } Common::String AvalancheEngine::getName(People whose) { - 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 char lads[17][20] = { + "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 lasses[4] = {"Arkata", "Geida", "\0xB1", "the Wise Woman"}; + static const char lasses[4][15] = {"Arkata", "Geida", "\0xB1", "the Wise Woman"}; if (whose < kPeopleArkata) - return lads[whose - kPeopleAvalot]; + return Common::String(lads[whose - kPeopleAvalot]); else - return lasses[whose - kPeopleArkata]; + return Common::String(lasses[whose - kPeopleArkata]); } Common::String AvalancheEngine::getItem(byte which) { - 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", - "an onion" + static const char items[kObjectNum][18] = { + "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", "an onion" }; Common::String result; @@ -1573,7 +1574,7 @@ Common::String AvalancheEngine::getItem(byte which) { case 0: case 1: case 4: - result = items[which - 1]; + result = Common::String(items[which - 1]); break; case 3: result = "some vinegar"; @@ -1586,11 +1587,11 @@ Common::String AvalancheEngine::getItem(byte which) { else if (_onionInVinegar) result = "a pickled onion (in the vinegar)"; else - result = items[which - 1]; + result = Common::String(items[which - 1]); break; default: if ((which < kObjectNum) && (which > 0)) - result = items[which - 1]; + result = Common::String(items[which - 1]); else result = ""; } |