diff options
-rw-r--r-- | engines/xeen/character.cpp | 22 | ||||
-rw-r--r-- | engines/xeen/character.h | 4 | ||||
-rw-r--r-- | engines/xeen/dialogs_char_info.cpp | 14 | ||||
-rw-r--r-- | engines/xeen/dialogs_create_char.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/dialogs_items.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/dialogs_quests.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/locations.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/map.cpp | 18 | ||||
-rw-r--r-- | engines/xeen/party.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/resources.cpp | 8 | ||||
-rw-r--r-- | engines/xeen/resources.h | 525 |
11 files changed, 300 insertions, 301 deletions
diff --git a/engines/xeen/character.cpp b/engines/xeen/character.cpp index d98142eacb..69fbc1666a 100644 --- a/engines/xeen/character.cpp +++ b/engines/xeen/character.cpp @@ -61,7 +61,7 @@ AttributeCategory XeenItem::getAttributeCategory() const { return (AttributeCategory)idx; } -const Common::String &XeenItem::getItemName(ItemCategory category, uint id) { +const char *XeenItem::getItemName(ItemCategory category, uint id) { if (id < 82) return Res.ITEM_NAMES[category][id]; @@ -294,7 +294,7 @@ Common::String WeaponItems::getFullDescription(int itemIndex, int displayNum) { (i._bonusFlags & ITEMFLAG_BROKEN) ? Res.ITEM_BROKEN : "", (i._bonusFlags & ITEMFLAG_CURSED) ? Res.ITEM_CURSED : "", displayNum, - Res.WEAPON_NAMES[i._id].c_str(), + Res.WEAPON_NAMES[i._id], !i._bonusFlags ? "" : Res.BONUS_NAMES[i._bonusFlags & ITEMFLAG_BONUS_MASK], (i._bonusFlags & (ITEMFLAG_BROKEN | ITEMFLAG_CURSED)) || !i._bonusFlags ? "\b " : "" @@ -451,10 +451,10 @@ Common::String ArmorItems::getFullDescription(int itemIndex, int displayNum) { return Common::String::format("\f%02u%s%s%s\f%02u%s%s", displayNum, !i._bonusFlags ? "" : res._maeNames[i._material].c_str(), - (i._bonusFlags & ITEMFLAG_BROKEN) ? Res.ITEM_BROKEN.c_str() : "", - (i._bonusFlags & ITEMFLAG_CURSED) ? Res.ITEM_CURSED.c_str() : "", + (i._bonusFlags & ITEMFLAG_BROKEN) ? Res.ITEM_BROKEN : "", + (i._bonusFlags & ITEMFLAG_CURSED) ? Res.ITEM_CURSED : "", displayNum, - Res.ARMOR_NAMES[i._id].c_str(), + Res.ARMOR_NAMES[i._id], (i._bonusFlags & (ITEMFLAG_BROKEN | ITEMFLAG_CURSED)) || !i._bonusFlags ? "\b " : "" ); @@ -568,10 +568,10 @@ Common::String AccessoryItems::getFullDescription(int itemIndex, int displayNum) return Common::String::format("\f%02u%s%s%s\f%02u%s%s", displayNum, !i._bonusFlags ? "" : res._maeNames[i._material].c_str(), - (i._bonusFlags & ITEMFLAG_BROKEN) ? Res.ITEM_BROKEN.c_str() : "", - (i._bonusFlags & ITEMFLAG_CURSED) ? Res.ITEM_CURSED.c_str() : "", + (i._bonusFlags & ITEMFLAG_BROKEN) ? Res.ITEM_BROKEN : "", + (i._bonusFlags & ITEMFLAG_CURSED) ? Res.ITEM_CURSED : "", displayNum, - Res.ARMOR_NAMES[i._id].c_str(), + Res.ARMOR_NAMES[i._id], (i._bonusFlags & (ITEMFLAG_BROKEN | ITEMFLAG_CURSED)) || !i._bonusFlags ? "\b " : "" ); @@ -614,10 +614,10 @@ Common::String MiscItems::getFullDescription(int itemIndex, int displayNum) { return Common::String::format("\f%02u%s%s%s\f%02u%s%s", displayNum, !i._bonusFlags ? "" : res._maeNames[i._material].c_str(), - (i._bonusFlags & ITEMFLAG_BROKEN) ? Res.ITEM_BROKEN.c_str() : "", - (i._bonusFlags & ITEMFLAG_CURSED) ? Res.ITEM_CURSED.c_str() : "", + (i._bonusFlags & ITEMFLAG_BROKEN) ? Res.ITEM_BROKEN : "", + (i._bonusFlags & ITEMFLAG_CURSED) ? Res.ITEM_CURSED : "", displayNum, - Res.ARMOR_NAMES[i._id].c_str(), + Res.ARMOR_NAMES[i._id], (i._bonusFlags & (ITEMFLAG_BROKEN | ITEMFLAG_CURSED)) || !i._id ? "\b " : "" ); diff --git a/engines/xeen/character.h b/engines/xeen/character.h index 480215aa67..649da7ec12 100644 --- a/engines/xeen/character.h +++ b/engines/xeen/character.h @@ -106,7 +106,7 @@ public: /** * Return the name of the item */ - static const Common::String &getItemName(ItemCategory category, uint id); + static const char *getItemName(ItemCategory category, uint id); public: XeenItem(); @@ -140,7 +140,7 @@ class InventoryItems : public Common::Array<XeenItem> { protected: Character *_character; ItemCategory _category; - const Common::String *_names; + const char **_names; XeenEngine *getVm(); void equipError(int itemIndex1, ItemCategory category1, int itemIndex2, diff --git a/engines/xeen/dialogs_char_info.cpp b/engines/xeen/dialogs_char_info.cpp index 132fbd5a4b..3d9ebfb2e0 100644 --- a/engines/xeen/dialogs_char_info.cpp +++ b/engines/xeen/dialogs_char_info.cpp @@ -434,9 +434,9 @@ bool CharacterInfo::expandStat(int attrib, const Character &c) { if (c._skills[skill]) { if (skill == THIEVERY) { lines[0] = Common::String::format("\n\t020%s%u", - Res.SKILL_NAMES[THIEVERY].c_str(), c.getThievery()); + Res.SKILL_NAMES[THIEVERY], c.getThievery()); } else { - lines[skill] = Common::String::format("\n\t020%s", Res.SKILL_NAMES[skill].c_str()); + lines[skill] = Common::String::format("\n\t020%s", Res.SKILL_NAMES[skill]); } } } @@ -446,7 +446,7 @@ bool CharacterInfo::expandStat(int attrib, const Character &c) { } msg = Common::String::format("\x2\x3""c%s\x3l%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", - Res.STAT_NAMES[attrib].c_str(), lines[0].c_str(), lines[1].c_str(), + Res.STAT_NAMES[attrib], lines[0].c_str(), lines[1].c_str(), lines[2].c_str(), lines[3].c_str(), lines[4].c_str(), lines[5].c_str(), lines[17].c_str(), lines[6].c_str(), lines[7].c_str(), lines[8].c_str(), lines[9].c_str(), lines[10].c_str(), lines[11].c_str(), lines[12].c_str(), @@ -505,10 +505,10 @@ bool CharacterInfo::expandStat(int attrib, const Character &c) { if (c._conditions[condition]) { if (condition >= UNCONSCIOUS) { lines[condition] = Common::String::format("\n\t020%s", - Res.CONDITION_NAMES[condition].c_str()); + Res.CONDITION_NAMES[condition]); } else { lines[condition] = Common::String::format("\n\t020%s\t095-%d", - Res.CONDITION_NAMES[condition].c_str(), c._conditions[condition]); + Res.CONDITION_NAMES[condition], c._conditions[condition]); } ++total; @@ -517,7 +517,7 @@ bool CharacterInfo::expandStat(int attrib, const Character &c) { Condition condition = c.worstCondition(); if (condition == NO_CONDITION) { - lines[0] = Common::String::format("\n\t020%s", Res.GOOD.c_str()); + lines[0] = Common::String::format("\n\t020%s", Res.GOOD); ++total; } @@ -531,7 +531,7 @@ bool CharacterInfo::expandStat(int attrib, const Character &c) { lines[19] = Common::String::format(Res.HEROISM, party._heroism); msg = Common::String::format("\x2\x3""c%s\x3l%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\x1", - Res.CONSUMABLE_NAMES[3].c_str(), lines[0].c_str(), lines[1].c_str(), + Res.CONSUMABLE_NAMES[3], lines[0].c_str(), lines[1].c_str(), lines[2].c_str(), lines[3].c_str(), lines[4].c_str(), lines[5].c_str(), lines[6].c_str(), lines[7].c_str(), lines[8].c_str(), lines[9].c_str(), lines[10].c_str(), diff --git a/engines/xeen/dialogs_create_char.cpp b/engines/xeen/dialogs_create_char.cpp index c1c6bc8c04..73aa4b3f02 100644 --- a/engines/xeen/dialogs_create_char.cpp +++ b/engines/xeen/dialogs_create_char.cpp @@ -384,7 +384,7 @@ int CreateCharacterDialog::newCharDetails(Race race, Sex sex, int classId, // If a class is provided, set the class name if (classId != -1) { - classStr = Common::String::format("\t062\v168%s", Res.CLASS_NAMES[classId].c_str()); + classStr = Common::String::format("\t062\v168%s", Res.CLASS_NAMES[classId]); } // Set up default skill for the race, if any diff --git a/engines/xeen/dialogs_items.cpp b/engines/xeen/dialogs_items.cpp index bbf7fa4ab8..c9249f3b74 100644 --- a/engines/xeen/dialogs_items.cpp +++ b/engines/xeen/dialogs_items.cpp @@ -1052,7 +1052,7 @@ void ItemsDialog::itemToGold(Character &c, int itemIndex, ItemCategory category, if (category == CATEGORY_WEAPON && item._id == 34) { sound.playFX(21); ErrorScroll::show(_vm, Common::String::format("\v012\t000\x03""c%s", - Res.SPELL_FAILED.c_str())); + Res.SPELL_FAILED)); } else if (item._id != 0) { // There is a valid item present // Calculate cost of item and add it to the party's total diff --git a/engines/xeen/dialogs_quests.cpp b/engines/xeen/dialogs_quests.cpp index 73035b3bb9..5e5171ea87 100644 --- a/engines/xeen/dialogs_quests.cpp +++ b/engines/xeen/dialogs_quests.cpp @@ -91,7 +91,7 @@ void Quests::execute() { case 83: case 84: lines[count++] = Common::String::format("%d %s%c", - party._questItems[idx], Res.QUEST_ITEM_NAMES[idx].c_str(), + party._questItems[idx], Res.QUEST_ITEM_NAMES[idx], party._questItems[idx] == 1 ? ' ' : 's'); break; default: diff --git a/engines/xeen/locations.cpp b/engines/xeen/locations.cpp index 53a1c80c48..7a8290504a 100644 --- a/engines/xeen/locations.cpp +++ b/engines/xeen/locations.cpp @@ -69,7 +69,7 @@ int BaseLocation::show() { // Load the needed sprite sets for the location for (uint idx = 0; idx < _townSprites.size(); ++idx) { Common::String shapesName = Common::String::format("%s%d.twn", - Res.TOWN_ACTION_SHAPES[_locationActionId].c_str(), idx + 1); + Res.TOWN_ACTION_SHAPES[_locationActionId], idx + 1); _townSprites[idx].load(shapesName); } diff --git a/engines/xeen/map.cpp b/engines/xeen/map.cpp index 58a294c610..e3ab879e65 100644 --- a/engines/xeen/map.cpp +++ b/engines/xeen/map.cpp @@ -1195,7 +1195,7 @@ void Map::load(int mapId) { if (_mazeData[0]._wallTypes[i] != 0) { _wallSprites._surfaces[i].load(Common::String::format("%s.wal", - Res.OUTDOORS_WALL_TYPES[_mazeData[0]._wallTypes[i]].c_str())); + Res.OUTDOORS_WALL_TYPES[_mazeData[0]._wallTypes[i]])); } _surfaceSprites[i].clear(); @@ -1223,11 +1223,11 @@ void Map::load(int mapId) { // Load sprite sets needed for scene rendering _skySprites[1].load(Common::String::format("%s.sky", - Res.TERRAIN_TYPES[_mazeData[0]._wallKind].c_str())); + Res.TERRAIN_TYPES[_mazeData[0]._wallKind])); _groundSprites.load(Common::String::format("%s.gnd", - Res.TERRAIN_TYPES[_mazeData[0]._wallKind].c_str())); + Res.TERRAIN_TYPES[_mazeData[0]._wallKind])); _tileSprites.load(Common::String::format("%s.til", - Res.TERRAIN_TYPES[_mazeData[0]._wallKind].c_str())); + Res.TERRAIN_TYPES[_mazeData[0]._wallKind])); for (int i = 0; i < TOTAL_SURFACES; ++i) { _surfaceSprites[i].clear(); @@ -1240,15 +1240,15 @@ void Map::load(int mapId) { _wallSprites._surfaces[i].clear(); _wallSprites._fwl1.load(Common::String::format("f%s1.fwl", - Res.TERRAIN_TYPES[_mazeData[0]._wallKind].c_str())); + Res.TERRAIN_TYPES[_mazeData[0]._wallKind])); _wallSprites._fwl2.load(Common::String::format("f%s2.fwl", - Res.TERRAIN_TYPES[_mazeData[0]._wallKind].c_str())); + Res.TERRAIN_TYPES[_mazeData[0]._wallKind])); _wallSprites._fwl3.load(Common::String::format("f%s3.fwl", - Res.TERRAIN_TYPES[_mazeData[0]._wallKind].c_str())); + Res.TERRAIN_TYPES[_mazeData[0]._wallKind])); _wallSprites._fwl4.load(Common::String::format("f%s4.fwl", - Res.TERRAIN_TYPES[_mazeData[0]._wallKind].c_str())); + Res.TERRAIN_TYPES[_mazeData[0]._wallKind])); _wallSprites._swl.load(Common::String::format("s%s.swl", - Res.TERRAIN_TYPES[_mazeData[0]._wallKind].c_str())); + Res.TERRAIN_TYPES[_mazeData[0]._wallKind])); // Set entries in the indoor draw list to the correct sprites // for drawing various parts of the background diff --git a/engines/xeen/party.cpp b/engines/xeen/party.cpp index 68bc7685cb..d45c7fa257 100644 --- a/engines/xeen/party.cpp +++ b/engines/xeen/party.cpp @@ -720,7 +720,7 @@ void Party::giveTreasureToCharacter(Character &c, ItemCategory category, int ite w.update(); events.ipause(5); - const char *itemName = XeenItem::getItemName(category, treasureItem._id).c_str(); + const char *itemName = XeenItem::getItemName(category, treasureItem._id); w.writeString(Common::String::format(Res.X_FOUND_Y, c._name.c_str(), itemName)); w.update(); events.ipause(5); diff --git a/engines/xeen/resources.cpp b/engines/xeen/resources.cpp index 86dc4413f8..cd794a3603 100644 --- a/engines/xeen/resources.cpp +++ b/engines/xeen/resources.cpp @@ -52,7 +52,7 @@ Resources::Resources() { } void Resources::loadData() { - ResFile file; + ResFile file(_buffer); file.syncString(CREDITS); file.syncString(OPTIONS_TITLE); file.syncString(THE_PARTY_NEEDS_REST); @@ -61,7 +61,7 @@ void Resources::loadData() { file.syncString(WHATS_THE_PASSWORD); file.syncString(IN_NO_CONDITION); file.syncString(NOTHING_HERE); - file.syncStrings(TERRAIN_TYPES, 6); + file.syncStrings(&TERRAIN_TYPES[0], 6); file.syncStrings(OUTDOORS_WALL_TYPES, 16); file.syncStrings(SURFACE_NAMES, 16); file.syncStrings(WHO_ACTIONS, 32); @@ -136,7 +136,7 @@ void Resources::loadData() { file.syncNumbers2D((int *)MAKE_ITEM_ARR5, 8, 2); file.syncNumbers(OUTDOOR_DRAWSTRUCT_INDEXES, 44); file.syncNumbers2D((int *)TOWN_MAXES, 2, 11); - file.syncStrings2D((String *)TOWN_ACTION_MUSIC, 2, 7); + file.syncStrings2D(&TOWN_ACTION_MUSIC[0][0], 2, 7); file.syncStrings(TOWN_ACTION_SHAPES, 7); file.syncNumbers2D((int *)TOWN_ACTION_FILES, 2, 7); file.syncString(BANK_TEXT); @@ -376,7 +376,7 @@ void Resources::loadData() { file.syncString(CLOUDS_CONGRATULATIONS2); file.syncStrings(GOOBER, 3); file.syncStrings(MUSIC_FILES1, 5); - file.syncStrings2D((String *)MUSIC_FILES2, 6, 7); + file.syncStrings2D(&MUSIC_FILES2[0][0], 6, 7); } } // End of namespace Xeen diff --git a/engines/xeen/resources.h b/engines/xeen/resources.h index 513e70d1c4..8cdeaf4c21 100644 --- a/engines/xeen/resources.h +++ b/engines/xeen/resources.h @@ -33,43 +33,40 @@ namespace Xeen { #define Res (*g_resources) +#define STRING_BUFFER_SIZE 32768 class XeenEngine; class Resources { /** - * Derived string class to fix automatic type conversion to const char * - */ - class String : public Common::String { - public: - String() : Common::String() {} - String(const Common::String &s) : Common::String(s) {} - operator const char *() { return c_str(); } - }; - - /** * Derived file class with sync method aliases so that the same * code from create_xeen can be re-used for both reading and * writing the resource data */ class ResFile : public File { + private: + char *_buffer; + char *_buffStart; public: - ResFile() : File("CONSTANTS") {} + ResFile(char *buffer) : File("CONSTANTS"), _buffer(buffer), _buffStart(buffer) {} - void syncString(String &str) { - str = readString(); + void syncString(const char *&str) { + str = _buffer; + strcpy(_buffer, readString().c_str()); + _buffer += strlen(_buffer) + 1; + assert((_buffer - _buffStart) < STRING_BUFFER_SIZE); } - void syncStrings(String *str, int count) { + void syncStrings(const char **str, int count) { uint tag = readUint32LE(); assert(tag == MKTAG(count, 0, 0, 0)); for (int idx = 0; idx < count; ++idx) - str[idx] = readString(); + syncString(str[idx]); } - void syncStrings2D(String *str, int count1, int count2) { + void syncStrings2D(const char **str, int count1, int count2) { uint tag = readUint32LE(); assert(tag == MKTAG(count1, count2, 0, 0)); for (int idx = 0; idx < count1 * count2; ++idx) - str[idx] = readString(); + syncString(str[idx]); } void syncNumber(int &val) { val = readSint32LE(); @@ -105,6 +102,8 @@ class Resources { } }; private: + char _buffer[STRING_BUFFER_SIZE]; +private: /** * Loads all the constants data stored in the xeen.css */ @@ -112,52 +111,52 @@ private: public: SpriteResource _globalSprites; Common::StringArray _maeNames; // Magic and equipment names - String *ITEM_NAMES[4]; + const char **ITEM_NAMES[4]; // Data loaded from xeen.ccs - String CREDITS; - String OPTIONS_TITLE; - String THE_PARTY_NEEDS_REST; - String WHO_WILL; - String HOW_MUCH; - String WHATS_THE_PASSWORD; - String IN_NO_CONDITION; - String NOTHING_HERE; - String TERRAIN_TYPES[6]; - String OUTDOORS_WALL_TYPES[16]; - String SURFACE_NAMES[16]; - String WHO_ACTIONS[32]; - String WHO_WILL_ACTIONS[4]; + const char *CREDITS; + const char *OPTIONS_TITLE; + const char *THE_PARTY_NEEDS_REST; + const char *WHO_WILL; + const char *HOW_MUCH; + const char *WHATS_THE_PASSWORD; + const char *IN_NO_CONDITION; + const char *NOTHING_HERE; + const char *TERRAIN_TYPES[6]; + const char *OUTDOORS_WALL_TYPES[16]; + const char *SURFACE_NAMES[16]; + const char *WHO_ACTIONS[32]; + const char *WHO_WILL_ACTIONS[4]; byte SYMBOLS[20][64]; byte TEXT_COLORS[40][4]; - String DIRECTION_TEXT_UPPER[4]; - String DIRECTION_TEXT[4]; - String RACE_NAMES[5]; + const char *DIRECTION_TEXT_UPPER[4]; + const char *DIRECTION_TEXT[4]; + const char *RACE_NAMES[5]; int RACE_HP_BONUSES[5]; int RACE_SP_BONUSES[5][2]; - String CLASS_NAMES[11]; + const char *CLASS_NAMES[11]; int CLASS_EXP_LEVELS[10]; - String ALIGNMENT_NAMES[3]; - String SEX_NAMES[2]; - String SKILL_NAMES[18]; - String CONDITION_NAMES[17]; + const char *ALIGNMENT_NAMES[3]; + const char *SEX_NAMES[2]; + const char *SKILL_NAMES[18]; + const char *CONDITION_NAMES[17]; int CONDITION_COLORS[17]; - String GOOD; - String BLESSED; - String POWER_SHIELD; - String HOLY_BONUS; - String HEROISM; - String IN_PARTY; - String PARTY_DETAILS; - String PARTY_DIALOG_TEXT; + const char *GOOD; + const char *BLESSED; + const char *POWER_SHIELD; + const char *HOLY_BONUS; + const char *HEROISM; + const char *IN_PARTY; + const char *PARTY_DETAILS; + const char *PARTY_DIALOG_TEXT; int FACE_CONDITION_FRAMES[17]; int CHAR_FACES_X[6]; int HP_BARS_X[6]; - String NO_ONE_TO_ADVENTURE_WITH; + const char *NO_ONE_TO_ADVENTURE_WITH; byte DARKNESS_XLAT[3][256]; - String YOUR_ROSTER_IS_FULL; - String PLEASE_WAIT; - String OOPS; + const char *YOUR_ROSTER_IS_FULL; + const char *PLEASE_WAIT; + const char *OOPS; int SCREEN_POSITIONING_X[4][48]; int SCREEN_POSITIONING_Y[4][48]; int MONSTER_GRID_BITMASK[12]; @@ -198,36 +197,36 @@ public: int MAKE_ITEM_ARR5[8][2]; int OUTDOOR_DRAWSTRUCT_INDEXES[44]; int TOWN_MAXES[2][11]; - String TOWN_ACTION_MUSIC[2][7]; - String TOWN_ACTION_SHAPES[7]; + const char *TOWN_ACTION_MUSIC[2][7]; + const char *TOWN_ACTION_SHAPES[7]; int TOWN_ACTION_FILES[2][7]; - String BANK_TEXT; - String BLACKSMITH_TEXT; - String GUILD_NOT_MEMBER_TEXT; - String GUILD_TEXT; - String TAVERN_TEXT; - String GOOD_STUFF; - String HAVE_A_DRINK; - String YOURE_DRUNK; + const char *BANK_TEXT; + const char *BLACKSMITH_TEXT; + const char *GUILD_NOT_MEMBER_TEXT; + const char *GUILD_TEXT; + const char *TAVERN_TEXT; + const char *GOOD_STUFF; + const char *HAVE_A_DRINK; + const char *YOURE_DRUNK; int TAVERN_EXIT_LIST[2][6][5][2]; - String FOOD_AND_DRINK; - String TEMPLE_TEXT; - String EXPERIENCE_FOR_LEVEL; - String LEARNED_ALL; - String ELIGIBLE_FOR_LEVEL; - String TRAINING_TEXT; - String GOLD_GEMS; - String GOLD_GEMS_2; - String DEPOSIT_WITHDRAWL[2]; - String NOT_ENOUGH_X_IN_THE_Y; - String NO_X_IN_THE_Y; - String STAT_NAMES[16]; - String CONSUMABLE_NAMES[4]; - String WHERE_NAMES[2]; - String AMOUNT; - String FOOD_PACKS_FULL; - String BUY_SPELLS; - String GUILD_OPTIONS; + const char *FOOD_AND_DRINK; + const char *TEMPLE_TEXT; + const char *EXPERIENCE_FOR_LEVEL; + const char *LEARNED_ALL; + const char *ELIGIBLE_FOR_LEVEL; + const char *TRAINING_TEXT; + const char *GOLD_GEMS; + const char *GOLD_GEMS_2; + const char *DEPOSIT_WITHDRAWL[2]; + const char *NOT_ENOUGH_X_IN_THE_Y; + const char *NO_X_IN_THE_Y; + const char *STAT_NAMES[16]; + const char *CONSUMABLE_NAMES[4]; + const char *WHERE_NAMES[2]; + const char *AMOUNT; + const char *FOOD_PACKS_FULL; + const char *BUY_SPELLS; + const char *GUILD_OPTIONS; int MISC_SPELL_INDEX[74]; int SPELL_COSTS[77]; int CLOUDS_SPELL_OFFSETS[5][20]; @@ -235,76 +234,76 @@ public: int DARK_SPELL_RANGES[12][2]; int SPELL_LEVEL_OFFSETS[3][39]; int SPELL_GEM_COST[77]; - String NOT_A_SPELL_CASTER; - String SPELLS_FOR; - String SPELL_LINES_0_TO_9; - String SPELLS_DIALOG_SPELLS; - String SPELL_PTS; - String GOLD; - String SPELLS_PRESS_A_KEY; - String SPELLS_PURCHASE; - String MAP_TEXT; - String LIGHT_COUNT_TEXT; - String FIRE_RESISTENCE_TEXT; - String ELECRICITY_RESISTENCE_TEXT; - String COLD_RESISTENCE_TEXT; - String POISON_RESISTENCE_TEXT; - String CLAIRVOYANCE_TEXT; - String LEVITATE_TEXT; - String WALK_ON_WATER_TEXT; - String GAME_INFORMATION; - String WORLD_GAME_TEXT; - String DARKSIDE_GAME_TEXT; - String CLOUDS_GAME_TEXT; - String SWORDS_GAME_TEXT; - String WEEK_DAY_STRINGS[10]; - String CHARACTER_DETAILS; - String PARTY_GOLD; - String PLUS_14; - String CHARACTER_TEMPLATE; - String EXCHANGING_IN_COMBAT; - String CURRENT_MAXIMUM_RATING_TEXT; - String CURRENT_MAXIMUM_TEXT; - String RATING_TEXT[24]; - String AGE_TEXT; - String LEVEL_TEXT; - String RESISTENCES_TEXT; - String NONE; - String EXPERIENCE_TEXT; - String ELIGIBLE; - String IN_PARTY_IN_BANK; - String FOOD_TEXT; - String EXCHANGE_WITH_WHOM; - String QUICK_REF_LINE; - String QUICK_REFERENCE; + const char *NOT_A_SPELL_CASTER; + const char *SPELLS_FOR; + const char *SPELL_LINES_0_TO_9; + const char *SPELLS_DIALOG_SPELLS; + const char *SPELL_PTS; + const char *GOLD; + const char *SPELLS_PRESS_A_KEY; + const char *SPELLS_PURCHASE; + const char *MAP_TEXT; + const char *LIGHT_COUNT_TEXT; + const char *FIRE_RESISTENCE_TEXT; + const char *ELECRICITY_RESISTENCE_TEXT; + const char *COLD_RESISTENCE_TEXT; + const char *POISON_RESISTENCE_TEXT; + const char *CLAIRVOYANCE_TEXT; + const char *LEVITATE_TEXT; + const char *WALK_ON_WATER_TEXT; + const char *GAME_INFORMATION; + const char *WORLD_GAME_TEXT; + const char *DARKSIDE_GAME_TEXT; + const char *CLOUDS_GAME_TEXT; + const char *SWORDS_GAME_TEXT; + const char *WEEK_DAY_STRINGS[10]; + const char *CHARACTER_DETAILS; + const char *PARTY_GOLD; + const char *PLUS_14; + const char *CHARACTER_TEMPLATE; + const char *EXCHANGING_IN_COMBAT; + const char *CURRENT_MAXIMUM_RATING_TEXT; + const char *CURRENT_MAXIMUM_TEXT; + const char *RATING_TEXT[24]; + const char *AGE_TEXT; + const char *LEVEL_TEXT; + const char *RESISTENCES_TEXT; + const char *NONE; + const char *EXPERIENCE_TEXT; + const char *ELIGIBLE; + const char *IN_PARTY_IN_BANK; + const char *FOOD_TEXT; + const char *EXCHANGE_WITH_WHOM; + const char *QUICK_REF_LINE; + const char *QUICK_REFERENCE; int BLACKSMITH_MAP_IDS[2][4]; - String ITEMS_DIALOG_TEXT1; - String ITEMS_DIALOG_TEXT2; - String ITEMS_DIALOG_LINE1; - String ITEMS_DIALOG_LINE2; - String BTN_BUY; - String BTN_SELL; - String BTN_IDENTIFY; - String BTN_FIX; - String BTN_USE; - String BTN_EQUIP; - String BTN_REMOVE; - String BTN_DISCARD; - String BTN_QUEST; - String BTN_ENCHANT; - String BTN_RECHARGE; - String BTN_GOLD; - String ITEM_BROKEN; - String ITEM_CURSED; - String BONUS_NAMES[7]; - String WEAPON_NAMES[35]; - String ARMOR_NAMES[14]; - String ACCESSORY_NAMES[11]; - String MISC_NAMES[22]; - String ELEMENTAL_NAMES[6]; - String ATTRIBUTE_NAMES[10]; - String EFFECTIVENESS_NAMES[7]; - String QUEST_ITEM_NAMES[85]; + const char *ITEMS_DIALOG_TEXT1; + const char *ITEMS_DIALOG_TEXT2; + const char *ITEMS_DIALOG_LINE1; + const char *ITEMS_DIALOG_LINE2; + const char *BTN_BUY; + const char *BTN_SELL; + const char *BTN_IDENTIFY; + const char *BTN_FIX; + const char *BTN_USE; + const char *BTN_EQUIP; + const char *BTN_REMOVE; + const char *BTN_DISCARD; + const char *BTN_QUEST; + const char *BTN_ENCHANT; + const char *BTN_RECHARGE; + const char *BTN_GOLD; + const char *ITEM_BROKEN; + const char *ITEM_CURSED; + const char *BONUS_NAMES[7]; + const char *WEAPON_NAMES[35]; + const char *ARMOR_NAMES[14]; + const char *ACCESSORY_NAMES[11]; + const char *MISC_NAMES[22]; + const char *ELEMENTAL_NAMES[6]; + const char *ATTRIBUTE_NAMES[10]; + const char *EFFECTIVENESS_NAMES[7]; + const char *QUEST_ITEM_NAMES[85]; int WEAPON_BASE_COSTS[35]; int ARMOR_BASE_COSTS[14]; int ACCESSORY_BASE_COSTS[11]; @@ -314,73 +313,73 @@ public: int ITEM_SKILL_DIVISORS[4]; int RESTRICTION_OFFSETS[4]; int ITEM_RESTRICTIONS[86]; - String NOT_PROFICIENT; - String NO_ITEMS_AVAILABLE; - String CATEGORY_NAMES[4]; - String X_FOR_THE_Y; - String X_FOR_Y; - String X_FOR_Y_GOLD; - String FMT_CHARGES; - String AVAILABLE_GOLD_COST; - String CHARGES; - String COST; - String ITEM_ACTIONS[7]; - String WHICH_ITEM; - String WHATS_YOUR_HURRY; - String USE_ITEM_IN_COMBAT; - String NO_SPECIAL_ABILITIES; - String CANT_CAST_WHILE_ENGAGED; - String EQUIPPED_ALL_YOU_CAN; - String REMOVE_X_TO_EQUIP_Y; - String RING; - String MEDAL; - String CANNOT_REMOVE_CURSED_ITEM; - String CANNOT_DISCARD_CURSED_ITEM; - String PERMANENTLY_DISCARD; - String BACKPACK_IS_FULL; - String CATEGORY_BACKPACK_IS_FULL[4]; - String BUY_X_FOR_Y_GOLD; - String SELL_X_FOR_Y_GOLD; - String NO_NEED_OF_THIS; - String NOT_RECHARGABLE; - String SPELL_FAILED; - String NOT_ENCHANTABLE; - String ITEM_NOT_BROKEN; - String FIX_IDENTIFY[2]; - String FIX_IDENTIFY_GOLD; - String IDENTIFY_ITEM_MSG; - String ITEM_DETAILS; - String ALL; - String FIELD_NONE; - String DAMAGE_X_TO_Y; - String ELEMENTAL_XY_DAMAGE; - String ATTR_XY_BONUS; - String EFFECTIVE_AGAINST; - String QUESTS_DIALOG_TEXT; - String CLOUDS_OF_XEEN_LINE; - String DARKSIDE_OF_XEEN_LINE; - String NO_QUEST_ITEMS; - String NO_CURRENT_QUESTS; - String NO_AUTO_NOTES; - String QUEST_ITEMS_DATA; - String CURRENT_QUESTS_DATA; - String AUTO_NOTES_DATA; - String REST_COMPLETE; - String PARTY_IS_STARVING; - String HIT_SPELL_POINTS_RESTORED; - String TOO_DANGEROUS_TO_REST; - String SOME_CHARS_MAY_DIE; - String CANT_DISMISS_LAST_CHAR; - String REMOVE_DELETE[2]; - String REMOVE_OR_DELETE_WHICH; - String YOUR_PARTY_IS_FULL; - String HAS_SLAYER_SWORD; - String SURE_TO_DELETE_CHAR; - String CREATE_CHAR_DETAILS; - String NEW_CHAR_STATS; - String NAME_FOR_NEW_CHARACTER; - String SELECT_CLASS_BEFORE_SAVING; - String EXCHANGE_ATTR_WITH; + const char *NOT_PROFICIENT; + const char *NO_ITEMS_AVAILABLE; + const char *CATEGORY_NAMES[4]; + const char *X_FOR_THE_Y; + const char *X_FOR_Y; + const char *X_FOR_Y_GOLD; + const char *FMT_CHARGES; + const char *AVAILABLE_GOLD_COST; + const char *CHARGES; + const char *COST; + const char *ITEM_ACTIONS[7]; + const char *WHICH_ITEM; + const char *WHATS_YOUR_HURRY; + const char *USE_ITEM_IN_COMBAT; + const char *NO_SPECIAL_ABILITIES; + const char *CANT_CAST_WHILE_ENGAGED; + const char *EQUIPPED_ALL_YOU_CAN; + const char *REMOVE_X_TO_EQUIP_Y; + const char *RING; + const char *MEDAL; + const char *CANNOT_REMOVE_CURSED_ITEM; + const char *CANNOT_DISCARD_CURSED_ITEM; + const char *PERMANENTLY_DISCARD; + const char *BACKPACK_IS_FULL; + const char *CATEGORY_BACKPACK_IS_FULL[4]; + const char *BUY_X_FOR_Y_GOLD; + const char *SELL_X_FOR_Y_GOLD; + const char *NO_NEED_OF_THIS; + const char *NOT_RECHARGABLE; + const char *SPELL_FAILED; + const char *NOT_ENCHANTABLE; + const char *ITEM_NOT_BROKEN; + const char *FIX_IDENTIFY[2]; + const char *FIX_IDENTIFY_GOLD; + const char *IDENTIFY_ITEM_MSG; + const char *ITEM_DETAILS; + const char *ALL; + const char *FIELD_NONE; + const char *DAMAGE_X_TO_Y; + const char *ELEMENTAL_XY_DAMAGE; + const char *ATTR_XY_BONUS; + const char *EFFECTIVE_AGAINST; + const char *QUESTS_DIALOG_TEXT; + const char *CLOUDS_OF_XEEN_LINE; + const char *DARKSIDE_OF_XEEN_LINE; + const char *NO_QUEST_ITEMS; + const char *NO_CURRENT_QUESTS; + const char *NO_AUTO_NOTES; + const char *QUEST_ITEMS_DATA; + const char *CURRENT_QUESTS_DATA; + const char *AUTO_NOTES_DATA; + const char *REST_COMPLETE; + const char *PARTY_IS_STARVING; + const char *HIT_SPELL_POINTS_RESTORED; + const char *TOO_DANGEROUS_TO_REST; + const char *SOME_CHARS_MAY_DIE; + const char *CANT_DISMISS_LAST_CHAR; + const char *REMOVE_DELETE[2]; + const char *REMOVE_OR_DELETE_WHICH; + const char *YOUR_PARTY_IS_FULL; + const char *HAS_SLAYER_SWORD; + const char *SURE_TO_DELETE_CHAR; + const char *CREATE_CHAR_DETAILS; + const char *NEW_CHAR_STATS; + const char *NAME_FOR_NEW_CHARACTER; + const char *SELECT_CLASS_BEFORE_SAVING; + const char *EXCHANGE_ATTR_WITH; int NEW_CHAR_SKILLS[10]; int NEW_CHAR_SKILLS_LEN[10]; int NEW_CHAR_RACE_SKILLS[10]; @@ -391,55 +390,55 @@ public: int RACE_ENERGY_RESISTENCES[5]; int RACE_POISON_RESISTENCES[5]; int NEW_CHARACTER_SPELLS[10][4]; - String COMBAT_DETAILS; - String NOT_ENOUGH_TO_CAST; - String SPELL_CAST_COMPONENTS[2]; - String CAST_SPELL_DETAILS; - String PARTY_FOUND; - String BACKPACKS_FULL_PRESS_KEY; - String HIT_A_KEY; - String GIVE_TREASURE_FORMATTING; - String X_FOUND_Y; - String ON_WHO; - String WHICH_ELEMENT1; - String WHICH_ELEMENT2; - String DETECT_MONSTERS; - String LLOYDS_BEACON; - String HOW_MANY_SQUARES; - String TOWN_PORTAL; + const char *COMBAT_DETAILS; + const char *NOT_ENOUGH_TO_CAST; + const char *SPELL_CAST_COMPONENTS[2]; + const char *CAST_SPELL_DETAILS; + const char *PARTY_FOUND; + const char *BACKPACKS_FULL_PRESS_KEY; + const char *HIT_A_KEY; + const char *GIVE_TREASURE_FORMATTING; + const char *X_FOUND_Y; + const char *ON_WHO; + const char *WHICH_ELEMENT1; + const char *WHICH_ELEMENT2; + const char *DETECT_MONSTERS; + const char *LLOYDS_BEACON; + const char *HOW_MANY_SQUARES; + const char *TOWN_PORTAL; int TOWN_MAP_NUMBERS[2][5]; - String MONSTER_DETAILS; - String MONSTER_SPECIAL_ATTACKS[23]; - String IDENTIFY_MONSTERS; - String EVENT_SAMPLES[6]; - String MOONS_NOT_ALIGNED; - String AWARDS_FOR; - String AWARDS_TEXT; - String NO_AWARDS; - String WARZONE_BATTLE_MASTER; - String WARZONE_MAXED; - String WARZONE_LEVEL; - String WARZONE_HOW_MANY; - String PICKS_THE_LOCK; - String UNABLE_TO_PICK_LOCK; - String CONTROL_PANEL_TEXT; - String CONTROL_PANEL_BUTTONS; - String ON; - String OFF; - String CONFIRM_QUIT; - String MR_WIZARD; - String NO_LOADING_IN_COMBAT; - String NO_SAVING_IN_COMBAT; - String QUICK_FIGHT_TEXT; - String QUICK_FIGHT_OPTIONS[4]; - String WORLD_END_TEXT[9]; - String WORLD_CONGRATULATIONS; - String WORLD_CONGRATULATIONS2; - String CLOUDS_CONGRATULATIONS1; - String CLOUDS_CONGRATULATIONS2; - String GOOBER[3]; - String MUSIC_FILES1[5]; - String MUSIC_FILES2[6][7]; + const char *MONSTER_DETAILS; + const char *MONSTER_SPECIAL_ATTACKS[23]; + const char *IDENTIFY_MONSTERS; + const char *EVENT_SAMPLES[6]; + const char *MOONS_NOT_ALIGNED; + const char *AWARDS_FOR; + const char *AWARDS_TEXT; + const char *NO_AWARDS; + const char *WARZONE_BATTLE_MASTER; + const char *WARZONE_MAXED; + const char *WARZONE_LEVEL; + const char *WARZONE_HOW_MANY; + const char *PICKS_THE_LOCK; + const char *UNABLE_TO_PICK_LOCK; + const char *CONTROL_PANEL_TEXT; + const char *CONTROL_PANEL_BUTTONS; + const char *ON; + const char *OFF; + const char *CONFIRM_QUIT; + const char *MR_WIZARD; + const char *NO_LOADING_IN_COMBAT; + const char *NO_SAVING_IN_COMBAT; + const char *QUICK_FIGHT_TEXT; + const char *QUICK_FIGHT_OPTIONS[4]; + const char *WORLD_END_TEXT[9]; + const char *WORLD_CONGRATULATIONS; + const char *WORLD_CONGRATULATIONS2; + const char *CLOUDS_CONGRATULATIONS1; + const char *CLOUDS_CONGRATULATIONS2; + const char *GOOBER[3]; + const char *MUSIC_FILES1[5]; + const char *MUSIC_FILES2[6][7]; public: /** * Constructor |