Skip to content

Commit

Permalink
XEEN: gcc compilation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Feb 28, 2015
1 parent 93cc299 commit 8106190
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions engines/xeen/character.cpp
Expand Up @@ -300,7 +300,7 @@ Common::String WeaponItems::getFullDescription(int itemIndex, int displayNum) {
Resources &res = *vm()->_resources;

return Common::String::format("\f%02u%s%s%s\f%02u%s%s%s", displayNum,
!i._bonusFlags ? res._maeNames[i._material] : "",
!i._bonusFlags ? res._maeNames[i._material].c_str() : "",
(i._bonusFlags & ITEMFLAG_BROKEN) ? ITEM_BROKEN : "",
(i._bonusFlags & ITEMFLAG_CURSED) ? ITEM_CURSED : "",
WEAPON_NAMES[i._id],
Expand Down Expand Up @@ -466,7 +466,7 @@ Common::String ArmorItems::getFullDescription(int itemIndex, int displayNum) {
Resources &res = *vm()->_resources;

return Common::String::format("\f%02u%s%s%s\f%02u%s%s", displayNum,
!i._bonusFlags ? "" : res._maeNames[i._material],
!i._bonusFlags ? "" : res._maeNames[i._material].c_str(),
(i._bonusFlags & ITEMFLAG_BROKEN) ? ITEM_BROKEN : "",
(i._bonusFlags & ITEMFLAG_CURSED) ? ITEM_CURSED : "",
ARMOR_NAMES[i._id],
Expand Down Expand Up @@ -589,7 +589,7 @@ Common::String AccessoryItems::getFullDescription(int itemIndex, int displayNum)
Resources &res = *vm()->_resources;

return Common::String::format("\f%02u%s%s%s\f%02u%s%s", displayNum,
!i._bonusFlags ? "" : res._maeNames[i._material],
!i._bonusFlags ? "" : res._maeNames[i._material].c_str(),
(i._bonusFlags & ITEMFLAG_BROKEN) ? ITEM_BROKEN : "",
(i._bonusFlags & ITEMFLAG_CURSED) ? ITEM_CURSED : "",
ARMOR_NAMES[i._id],
Expand Down Expand Up @@ -638,7 +638,7 @@ Common::String MiscItems::getFullDescription(int itemIndex, int displayNum) {
Resources &res = *vm()->_resources;

return Common::String::format("\f%02u%s%s%s\f%02u%s%s", displayNum,
!i._bonusFlags ? "" : res._maeNames[i._material],
!i._bonusFlags ? "" : res._maeNames[i._material].c_str(),
(i._bonusFlags & ITEMFLAG_BROKEN) ? ITEM_BROKEN : "",
(i._bonusFlags & ITEMFLAG_CURSED) ? ITEM_CURSED : "",
ARMOR_NAMES[i._id],
Expand Down
10 changes: 5 additions & 5 deletions engines/xeen/dialogs_items.cpp
Expand Up @@ -149,11 +149,11 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) {
|| mode == ITEMMODE_ENCHANT || mode == ITEMMODE_RECHARGE) {
lines.push_back(Common::String::format(ITEMS_DIALOG_LINE1,
arr[idx], idx + 1,
c->_items[category].getFullDescription(idx, arr[idx])));
c->_items[category].getFullDescription(idx, arr[idx]).c_str()));
} else {
lines.push_back(Common::String::format(ITEMS_DIALOG_LINE2,
arr[idx], idx + 1,
c->_items[category].getFullDescription(idx, arr[idx]),
c->_items[category].getFullDescription(idx, arr[idx]).c_str(),
calcItemCost(c, idx, mode,
mode == ITEMMODE_TO_GOLD ? 1 : startingChar->_skills[MERCHANT],
category)
Expand Down Expand Up @@ -194,7 +194,7 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) {

lines.push_back(Common::String::format(ITEMS_DIALOG_LINE2,
arr[idx], idx + 1,
c->_items[category].getFullDescription(idx, arr[idx]),
c->_items[category].getFullDescription(idx, arr[idx]).c_str(),
calcItemCost(c, idx, tempMode, skill, category)
));
}
Expand Down Expand Up @@ -1002,7 +1002,7 @@ int ItemsDialog::doItemOptions(Character &c, int actionIndex, int itemIndex, Ite
int cost = calcItemCost(&c, itemIndex, mode, actionIndex, category);
Common::String msg = Common::String::format(FIX_IDENTIFY_GOLD,
FIX_IDENTIFY[0],
c._items[category].getFullDescription(itemIndex),
c._items[category].getFullDescription(itemIndex).c_str(),
cost);

if (Confirm::show(_vm, msg) && party.subtract(0, cost, 0)) {
Expand All @@ -1015,7 +1015,7 @@ int ItemsDialog::doItemOptions(Character &c, int actionIndex, int itemIndex, Ite
int cost = calcItemCost(&c, itemIndex, mode, actionIndex, category);
Common::String msg = Common::String::format(FIX_IDENTIFY_GOLD,
FIX_IDENTIFY[1],
c._items[category].getFullDescription(itemIndex),
c._items[category].getFullDescription(itemIndex).c_str(),
cost);

if (Confirm::show(_vm, msg) && party.subtract(0, cost, 0)) {
Expand Down
8 changes: 4 additions & 4 deletions engines/xeen/dialogs_spells.cpp
Expand Up @@ -67,7 +67,7 @@ Character *SpellsDialog::execute(ButtonContainer *priorDialog, Character *c, int

Common::String title = Common::String::format(BUY_SPELLS, c->_name.c_str());
Common::String msg = Common::String::format(GUILD_OPTIONS,
title.c_str(), XeenEngine::printMil(party._gold));
title.c_str(), XeenEngine::printMil(party._gold).c_str());
screen._windows[10].writeString(msg);

warning("TODO: Sprite draw using previously used button sprites");
Expand Down Expand Up @@ -353,7 +353,7 @@ const char *SpellsDialog::setSpellText(Character *c, int isCasting) {
if (!c->_spells[idx] || (isCasting & 0x80)) {
int cost = spells.calcSpellCost(SPELLS_ALLOWED[category][idx], expenseFactor);
_spells.push_back(SpellEntry(Common::String::format("\x3l%s\x3r\x9""000%u",
spells._spellNames[SPELLS_ALLOWED[category][idx]], cost),
spells._spellNames[SPELLS_ALLOWED[category][idx]].c_str(), cost),
idx, spellId));
}
}
Expand All @@ -370,7 +370,7 @@ const char *SpellsDialog::setSpellText(Character *c, int isCasting) {
if (!c->_spells[idx] || (isCasting & 0x80)) {
int cost = spells.calcSpellCost(SPELLS_ALLOWED[category][idx], expenseFactor);
_spells.push_back(SpellEntry(Common::String::format("\x3l%s\x3r\x9""000%u",
spells._spellNames[SPELLS_ALLOWED[category][idx]], cost),
spells._spellNames[SPELLS_ALLOWED[category][idx]].c_str(), cost),
idx, spellId));
}
}
Expand All @@ -385,7 +385,7 @@ const char *SpellsDialog::setSpellText(Character *c, int isCasting) {
if (!c->_spells[idx] || (isCasting & 0x80)) {
int cost = spells.calcSpellCost(SPELLS_ALLOWED[category][idx], expenseFactor);
_spells.push_back(SpellEntry(Common::String::format("\x3l%s\x3r\x9""000%u",
spells._spellNames[SPELLS_ALLOWED[category][idx]], cost),
spells._spellNames[SPELLS_ALLOWED[category][idx]].c_str(), cost),
idx, spellId));
}
}
Expand Down
6 changes: 3 additions & 3 deletions engines/xeen/module.mk
@@ -1,9 +1,9 @@
MODULE := engines/xeen

MODULE_OBJS := \
clouds\clouds_game.o \
darkside\darkside_game.o \
worldofxeen\worldofxeen_game.o \
clouds/clouds_game.o \
darkside/darkside_game.o \
worldofxeen/worldofxeen_game.o \
character.o \
combat.o \
debugger.o \
Expand Down
2 changes: 1 addition & 1 deletion engines/xeen/spells.cpp
Expand Up @@ -151,7 +151,7 @@ int Spells::castSpell(Character *c, int spellId) {
// Return the spell costs and flag that another spell can be selected
addSpellCost(*c, spellId);
ErrorDialog::show(_vm, Common::String::format(CANT_CAST_WHILE_ENGAGED,
_spellNames[spellId]));
_spellNames[spellId].c_str()));
result = -1;
}
break;
Expand Down

0 comments on commit 8106190

Please sign in to comment.