Browse Source

Update format strings

pull/2030/head
Jmgr 5 years ago committed by Anders Jenbo
parent
commit
6e85cde978
  1. 2
      Source/DiabloUI/selconn.cpp
  2. 2
      Source/DiabloUI/selgame.cpp
  3. 4
      Source/DiabloUI/selhero.cpp
  4. 4
      Source/appfat.cpp
  5. 6
      Source/automap.cpp
  6. 36
      Source/control.cpp
  7. 2
      Source/cursor.cpp
  8. 6
      Source/diablo.cpp
  9. 126
      Source/items.cpp
  10. 8
      Source/monster.cpp
  11. 18
      Source/msg.cpp
  12. 10
      Source/multi.cpp
  13. 6
      Source/objects.cpp
  14. 2
      Source/player.cpp
  15. 2
      Source/plrmsg.cpp
  16. 4
      Source/qol/xpbar.cpp
  17. 2
      Source/quests.cpp
  18. 48
      Source/stores.cpp
  19. 30
      Source/trigs.cpp

2
Source/DiabloUI/selconn.cpp

@ -118,7 +118,7 @@ void SelconnFocus(int value)
break;
}
snprintf(selconn_MaxPlayers, sizeof(selconn_MaxPlayers), fmt::format(_("Players Supported: %i"), players).c_str());
snprintf(selconn_MaxPlayers, sizeof(selconn_MaxPlayers), fmt::format(_("Players Supported: {:d}"), players).c_str());
WordWrapArtStr(selconn_Description, DESCRIPTION_WIDTH);
}

2
Source/DiabloUI/selgame.cpp

@ -414,7 +414,7 @@ static bool IsGameCompatible(GameData *data)
UiSelOkDialog(title, _("The host is running a different game than you."), false);
} else {
char msg[64];
sprintf(msg, fmt::format(_(/* TRANSLATORS: Error message when somebody tries to join a game running another version. */ "Your version %s does not match the host %i.%i.%i."), PROJECT_VERSION, PROJECT_VERSION_MAJOR, PROJECT_VERSION_MINOR, PROJECT_VERSION_PATCH).c_str());
sprintf(msg, fmt::format(_(/* TRANSLATORS: Error message when somebody tries to join a game running another version. */ "Your version {:s} does not match the host {:d}.{:d}.{:d}."), PROJECT_VERSION, PROJECT_VERSION_MAJOR, PROJECT_VERSION_MINOR, PROJECT_VERSION_PATCH).c_str());
UiSelOkDialog(title, msg, false);
}

4
Source/DiabloUI/selhero.cpp

@ -344,7 +344,7 @@ void SelheroNameSelect(int value)
if (strcasecmp(selhero_heros[i].name, selhero_heroInfo.name) == 0) {
ArtBackground.Unload();
char dialogText[256];
snprintf(dialogText, sizeof(dialogText), fmt::format(_(/* Error message when User tries to create multiple heros with the same name */ "Character already exists. Do you want to overwrite \"%s\"?"), selhero_heroInfo.name).c_str());
snprintf(dialogText, sizeof(dialogText), fmt::format(_(/* Error message when User tries to create multiple heros with the same name */ "Character already exists. Do you want to overwrite \"{:s}\"?"), selhero_heroInfo.name).c_str());
overwrite = UiSelHeroYesNoDialog(title, dialogText);
LoadBackgroundArt("ui_art\\selhero.pcx");
@ -621,7 +621,7 @@ static void UiSelHeroDialog(
} else {
strncpy(dialogTitle, _("Delete Single Player Hero"), sizeof(dialogTitle) - 1);
}
snprintf(dialogText, sizeof(dialogText), fmt::format(_("Are you sure you want to delete the character \"%s\"?"), selhero_heroInfo.name).c_str());
snprintf(dialogText, sizeof(dialogText), fmt::format(_("Are you sure you want to delete the character \"{:s}\"?"), selhero_heroInfo.name).c_str());
if (UiSelHeroYesNoDialog(dialogTitle, dialogText))
fnremove(&selhero_heroInfo);

4
Source/appfat.cpp

@ -116,7 +116,7 @@ void ErrDlg(const char *title, const char *error, const char *logFilePath, int l
FreeDlg();
snprintf(text, sizeof(text), fmt::format(_(/* TRANSLATORS: Error message that displays relevant information for bug report */ "%s\n\nThe error occurred at: %s line %i"), error, logFilePath, logLineNr).c_str());
snprintf(text, sizeof(text), fmt::format(_(/* TRANSLATORS: Error message that displays relevant information for bug report */ "{:s}\n\nThe error occurred at: {:s} line {:d}"), error, logFilePath, logLineNr).c_str());
UiErrorOkDialog(title, text);
app_fatal(nullptr);
@ -175,7 +175,7 @@ void DirErrorDlg(const char *error)
{
char text[1024];
snprintf(text, sizeof(text), fmt::format(_(/* TRANSLATORS: Error when Program is not allowed to write data */ "Unable to write to location:\n%s"), error).c_str());
snprintf(text, sizeof(text), fmt::format(_(/* TRANSLATORS: Error when Program is not allowed to write data */ "Unable to write to location:\n{:s}"), error).c_str());
UiErrorOkDialog(_("Read-Only Directory Error"), text);
app_fatal(nullptr);

6
Source/automap.cpp

@ -404,11 +404,11 @@ void DrawAutomapText(const CelOutputBuffer &out)
if (currlevel != 0) {
if (currlevel >= 17 && currlevel <= 20) {
sprintf(desc, fmt::format(_("Level: Nest %i"), currlevel - 16).c_str());
sprintf(desc, fmt::format(_("Level: Nest {:d}"), currlevel - 16).c_str());
} else if (currlevel >= 21 && currlevel <= 24) {
sprintf(desc, fmt::format(_("Level: Crypt %i"), currlevel - 20).c_str());
sprintf(desc, fmt::format(_("Level: Crypt {:d}"), currlevel - 20).c_str());
} else {
sprintf(desc, fmt::format(_("Level: %i"), currlevel).c_str());
sprintf(desc, fmt::format(_("Level: {:d}"), currlevel).c_str());
}
DrawString(out, desc, { 8, nextLine, 0, 0 });

36
Source/control.cpp

@ -393,10 +393,10 @@ void DrawSpellList(const CelOutputBuffer &out)
DrawSpellCel(out, x, y, *pSpellCels, c);
switch (pSplType) {
case RSPLTYPE_SKILL:
sprintf(infostr, fmt::format(_("%s Skill"), _(spelldata[pSpell].sSkillText)).c_str());
sprintf(infostr, fmt::format(_("{:s} Skill"), _(spelldata[pSpell].sSkillText)).c_str());
break;
case RSPLTYPE_SPELL:
sprintf(infostr, fmt::format(_("%s Spell"), _(spelldata[pSpell].sNameText)).c_str());
sprintf(infostr, fmt::format(_("{:s} Spell"), _(spelldata[pSpell].sNameText)).c_str());
if (pSpell == SPL_HBOLT) {
strcpy(tempstr, _("Damages undead only"));
AddPanelString(tempstr);
@ -404,11 +404,11 @@ void DrawSpellList(const CelOutputBuffer &out)
if (s == 0)
strcpy(tempstr, _("Spell Level 0 - Unusable"));
else
sprintf(tempstr, fmt::format(_("Spell Level %i"), s).c_str());
sprintf(tempstr, fmt::format(_("Spell Level {:d}"), s).c_str());
AddPanelString(tempstr);
break;
case RSPLTYPE_SCROLL: {
sprintf(infostr, fmt::format(_("Scroll of %s"), _(spelldata[pSpell].sNameText)).c_str());
sprintf(infostr, fmt::format(_("Scroll of {:s}"), _(spelldata[pSpell].sNameText)).c_str());
int v = 0;
for (int t = 0; t < plr[myplr]._pNumInv; t++) {
if (!plr[myplr].InvList[t].isEmpty()
@ -428,7 +428,7 @@ void DrawSpellList(const CelOutputBuffer &out)
AddPanelString(tempstr);
} break;
case RSPLTYPE_CHARGES: {
sprintf(infostr, fmt::format(_("Staff of %s"), _(spelldata[pSpell].sNameText)).c_str());
sprintf(infostr, fmt::format(_("Staff of {:s}"), _(spelldata[pSpell].sNameText)).c_str());
int charges = plr[myplr].InvBody[INVLOC_HAND_LEFT]._iCharges;
sprintf(tempstr, ngettext("%i Charge", "%i Charges", charges), charges);
AddPanelString(tempstr);
@ -440,7 +440,7 @@ void DrawSpellList(const CelOutputBuffer &out)
if (plr[myplr]._pSplHotKey[t] == pSpell && plr[myplr]._pSplTHotKey[t] == pSplType) {
auto hotkeyName = keymapper.keyNameForAction(quickSpellActionIndexes[t]);
PrintSBookHotkey(out, x, y, hotkeyName);
sprintf(tempstr, fmt::format(_("Spell Hotkey %s"), hotkeyName.c_str()).c_str());
sprintf(tempstr, fmt::format(_("Spell Hotkey {:s}"), hotkeyName.c_str()).c_str());
AddPanelString(tempstr);
}
}
@ -917,7 +917,7 @@ void CheckPanelInfo()
strcpy(infostr, _("Player attack"));
}
if (PanBtnHotKey[i] != nullptr) {
sprintf(tempstr, fmt::format(_("Hotkey: %s"), _(PanBtnHotKey[i])).c_str());
sprintf(tempstr, fmt::format(_("Hotkey: {:s}"), _(PanBtnHotKey[i])).c_str());
AddPanelString(tempstr);
}
infoclr = UIS_SILVER;
@ -936,11 +936,11 @@ void CheckPanelInfo()
if (v != SPL_INVALID) {
switch (plr[myplr]._pRSplType) {
case RSPLTYPE_SKILL:
sprintf(tempstr, fmt::format(_("%s Skill"), _(spelldata[v].sSkillText)).c_str());
sprintf(tempstr, fmt::format(_("{:s} Skill"), _(spelldata[v].sSkillText)).c_str());
AddPanelString(tempstr);
break;
case RSPLTYPE_SPELL: {
sprintf(tempstr, fmt::format(_("%s Spell"), _(spelldata[v].sNameText)).c_str());
sprintf(tempstr, fmt::format(_("{:s} Spell"), _(spelldata[v].sNameText)).c_str());
AddPanelString(tempstr);
int c = plr[myplr]._pISplLvlAdd + plr[myplr]._pSplLvl[v];
if (c < 0)
@ -948,11 +948,11 @@ void CheckPanelInfo()
if (c == 0)
strcpy(tempstr, _("Spell Level 0 - Unusable"));
else
sprintf(tempstr, fmt::format(_("Spell Level %i"), c).c_str());
sprintf(tempstr, fmt::format(_("Spell Level {:d}"), c).c_str());
AddPanelString(tempstr);
} break;
case RSPLTYPE_SCROLL: {
sprintf(tempstr, fmt::format(_("Scroll of %s"), _(spelldata[v].sNameText)).c_str());
sprintf(tempstr, fmt::format(_("Scroll of {:s}"), _(spelldata[v].sNameText)).c_str());
AddPanelString(tempstr);
int s = 0;
for (int i = 0; i < plr[myplr]._pNumInv; i++) {
@ -973,7 +973,7 @@ void CheckPanelInfo()
AddPanelString(tempstr);
} break;
case RSPLTYPE_CHARGES:
sprintf(tempstr, fmt::format(_("Staff of %s"), _(spelldata[v].sNameText)).c_str());
sprintf(tempstr, fmt::format(_("Staff of {:s}"), _(spelldata[v].sNameText)).c_str());
AddPanelString(tempstr);
sprintf(tempstr, ngettext("%i Charge", "%i Charges", plr[myplr].InvBody[INVLOC_HAND_LEFT]._iCharges), plr[myplr].InvBody[INVLOC_HAND_LEFT]._iCharges);
AddPanelString(tempstr);
@ -1162,9 +1162,9 @@ void DrawInfoBox(const CelOutputBuffer &out)
infoclr = UIS_GOLD;
strcpy(infostr, plr[pcursplr]._pName);
ClearPanel();
sprintf(tempstr, fmt::format(_("%s, Level: %i"), _(ClassStrTbl[static_cast<std::size_t>(plr[pcursplr]._pClass)]), plr[pcursplr]._pLevel).c_str());
sprintf(tempstr, fmt::format(_("{:s}, Level: {:d}"), _(ClassStrTbl[static_cast<std::size_t>(plr[pcursplr]._pClass)]), plr[pcursplr]._pLevel).c_str());
AddPanelString(tempstr);
sprintf(tempstr, fmt::format(_("Hit Points %i of %i"), plr[pcursplr]._pHitPoints >> 6, plr[pcursplr]._pMaxHP >> 6).c_str());
sprintf(tempstr, fmt::format(_("Hit Points {:d} of {:d}"), plr[pcursplr]._pHitPoints >> 6, plr[pcursplr]._pMaxHP >> 6).c_str());
AddPanelString(tempstr);
}
}
@ -1627,12 +1627,12 @@ void DrawSpellBook(const CelOutputBuffer &out)
int max;
GetDamageAmt(sn, &min, &max);
if (min != -1) {
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: Dam refers to damage. UI constrains, keep short please.*/ "Mana: %i Dam: %i - %i"), mana, min, max).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: Dam refers to damage. UI constrains, keep short please.*/ "Mana: {:d} Dam: {:d} - {:d}"), mana, min, max).c_str());
} else {
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: Dam refers to damage. UI constrains, keep short please.*/ "Mana: %i Dam: n/a"), mana).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: Dam refers to damage. UI constrains, keep short please.*/ "Mana: {:d} Dam: n/a"), mana).c_str());
}
if (sn == SPL_BONESPIRIT) {
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: Dam refers to damage. UI constrains, keep short please.*/ "Mana: %i Dam: 1/3 tgt hp"), mana).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: Dam refers to damage. UI constrains, keep short please.*/ "Mana: {:d} Dam: 1/3 tgt hp"), mana).c_str());
}
PrintSBookStr(out, 10, yp - 1, tempstr);
int lvl = plr[myplr]._pSplLvl[sn] + plr[myplr]._pISplLvlAdd;
@ -1642,7 +1642,7 @@ void DrawSpellBook(const CelOutputBuffer &out)
if (lvl == 0) {
strcpy(tempstr, _("Spell Level 0 - Unusable"));
} else {
sprintf(tempstr, fmt::format(_("Spell Level %i"), lvl).c_str());
sprintf(tempstr, fmt::format(_("Spell Level {:d}"), lvl).c_str());
}
} break;
}

2
Source/cursor.cpp

@ -205,7 +205,7 @@ void CheckTown()
trigflag = true;
ClearPanel();
strcpy(infostr, _("Town Portal"));
sprintf(tempstr, fmt::format(_("from %s"), plr[missile[mx]._misource]._pName).c_str());
sprintf(tempstr, fmt::format(_("from {:s}"), plr[missile[mx]._misource]._pName).c_str());
AddPanelString(tempstr);
cursmx = missile[mx].position.tile.x;
cursmy = missile[mx].position.tile.y;

6
Source/diablo.cpp

@ -283,7 +283,7 @@ static void diablo_parse_flags(int argc, char **argv)
debug_mode_key_w = true;
#endif
} else {
printInConsole(fmt::format(_("unrecognized option '%s'\n"), argv[i]).c_str());
printInConsole(fmt::format(_("unrecognized option '{:s}'\n"), argv[i]).c_str());
print_help_and_exit();
}
}
@ -671,7 +671,7 @@ char gszProductName[64] = "DevilutionX vUnknown";
static void SetApplicationVersions()
{
snprintf(gszProductName, sizeof(gszProductName) / sizeof(char), "%s v%s", PROJECT_NAME, PROJECT_VERSION);
snprintf(gszVersionNumber, sizeof(gszVersionNumber) / sizeof(char), fmt::format(_("version %s"), PROJECT_VERSION).c_str());
snprintf(gszVersionNumber, sizeof(gszVersionNumber) / sizeof(char), fmt::format(_("version {:s}"), PROJECT_VERSION).c_str());
}
static void diablo_init()
@ -2203,7 +2203,7 @@ void initKeymapActions()
_("Nightmare"),
_("Hell"),
};
sprintf(pszStr, fmt::format(_(/* TRANSLATORS: %s means: Character Name, Game Version, Game Difficulty. */ "%s, version = %s, mode = %s"), gszProductName, PROJECT_VERSION, difficulties[sgGameInitInfo.nDifficulty]).c_str());
sprintf(pszStr, fmt::format(_(/* TRANSLATORS: {:s} means: Character Name, Game Version, Game Difficulty. */ "{:s}, version = {:s}, mode = {:s}"), gszProductName, PROJECT_VERSION, difficulties[sgGameInitInfo.nDifficulty]).c_str());
NetSendCmdString(1 << myplr, pszStr);
},
});

126
Source/items.cpp

@ -1526,7 +1526,7 @@ void GetStaffPower(int i, int lvl, int bs, bool onlygood)
sprintf(istr, "%s %s", _(PL_Prefix[preidx].PLName), items[i]._iIName);
strcpy(items[i]._iIName, istr);
}
sprintf(istr, fmt::format(_(/* TRANSLATORS: Constructs item names. Format: <Prefix> <Item> of <Suffix>. Example: King's Long Sword of the Whale */ "%s of %s"), items[i]._iIName, _(spelldata[bs].sNameText)).c_str());
sprintf(istr, fmt::format(_(/* TRANSLATORS: Constructs item names. Format: <Prefix> <Item> of <Suffix>. Example: King's Long Sword of the Whale */ "{:s} of {:s}"), items[i]._iIName, _(spelldata[bs].sNameText)).c_str());
strcpy(items[i]._iIName, istr);
if (items[i]._iMagical == ITEM_QUALITY_NORMAL)
strcpy(items[i]._iName, items[i]._iIName);
@ -1568,8 +1568,8 @@ void GetStaffSpell(int i, int lvl, bool onlygood)
s = SPL_FIREBOLT;
}
if (!control_WriteStringToBuffer(istr))
sprintf(istr, fmt::format(_("%s of %s"), items[i]._iName, _(spelldata[bs].sNameText)).c_str());
sprintf(istr, fmt::format(_("Staff of %s"), _(spelldata[bs].sNameText)).c_str());
sprintf(istr, fmt::format(_("{:s} of {:s}"), items[i]._iName, _(spelldata[bs].sNameText)).c_str());
sprintf(istr, fmt::format(_("Staff of {:s}"), _(spelldata[bs].sNameText)).c_str());
strcpy(items[i]._iName, istr);
strcpy(items[i]._iIName, istr);
@ -2163,7 +2163,7 @@ void GetItemPower(int i, int minlvl, int maxlvl, affix_item_type flgs, bool only
}
if (nl != 0) {
sufidx = l[GenerateRnd(nl)];
sprintf(istr, fmt::format(_("%s of %s"), items[i]._iIName, _(PL_Suffix[sufidx].PLName)).c_str());
sprintf(istr, fmt::format(_("{:s} of {:s}"), items[i]._iIName, _(PL_Suffix[sufidx].PLName)).c_str());
strcpy(items[i]._iIName, istr);
items[i]._iMagical = ITEM_QUALITY_MAGIC;
SaveItemSuffix(i, sufidx);
@ -2182,7 +2182,7 @@ void GetItemPower(int i, int minlvl, int maxlvl, affix_item_type flgs, bool only
strcpy(items[i]._iIName, istr);
}
if (sufidx != -1) {
sprintf(istr, fmt::format(_("%s of %s"), items[i]._iIName, _(PL_Suffix[sufidx].PLName)).c_str());
sprintf(istr, fmt::format(_("{:s} of {:s}"), items[i]._iIName, _(PL_Suffix[sufidx].PLName)).c_str());
strcpy(items[i]._iIName, istr);
}
}
@ -2746,7 +2746,7 @@ void RecreateEar(int ii, uint16_t ic, int iseed, int Id, int dur, int mdur, int
tempstr[14] = (ibuff >> 8) & 0x7F;
tempstr[15] = ibuff & 0x7F;
tempstr[16] = '\0';
sprintf(items[ii]._iName, fmt::format(_(/* TRANSLATORS: %s will be a Character Name */ "Ear of %s"), tempstr).c_str());
sprintf(items[ii]._iName, fmt::format(_(/* TRANSLATORS: {:s} will be a Character Name */ "Ear of {:s}"), tempstr).c_str());
items[ii]._iCurs = ((ivalue >> 6) & 3) + ICURS_EAR_SORCERER;
items[ii]._ivalue = ivalue & 0x3F;
items[ii]._iCreateInfo = ic;
@ -3414,51 +3414,51 @@ void PrintItemPower(char plidx, ItemStruct *x)
switch (plidx) {
case IPL_TOHIT:
case IPL_TOHIT_CURSE:
sprintf(tempstr, fmt::format(_("chance to hit: %+i%%"), x->_iPLToHit).c_str());
sprintf(tempstr, fmt::format(_("chance to hit: {:+d}%"), x->_iPLToHit).c_str());
break;
case IPL_DAMP:
case IPL_DAMP_CURSE:
sprintf(tempstr, fmt::format(_("%+i%% damage"), x->_iPLDam).c_str());
sprintf(tempstr, fmt::format(_("{:+d}% damage"), x->_iPLDam).c_str());
break;
case IPL_TOHIT_DAMP:
case IPL_TOHIT_DAMP_CURSE:
sprintf(tempstr, fmt::format(_("to hit: %+i%%, %+i%% damage"), x->_iPLToHit, x->_iPLDam).c_str());
sprintf(tempstr, fmt::format(_("to hit: {:+d}%, {:+d}% damage"), x->_iPLToHit, x->_iPLDam).c_str());
break;
case IPL_ACP:
case IPL_ACP_CURSE:
sprintf(tempstr, fmt::format(_("%+i%% armor"), x->_iPLAC).c_str());
sprintf(tempstr, fmt::format(_("{:+d}% armor"), x->_iPLAC).c_str());
break;
case IPL_SETAC:
sprintf(tempstr, fmt::format(_("armor class: %i"), x->_iAC).c_str());
sprintf(tempstr, fmt::format(_("armor class: {:d}"), x->_iAC).c_str());
break;
case IPL_AC_CURSE:
sprintf(tempstr, fmt::format(_("armor class: %i"), x->_iAC).c_str());
sprintf(tempstr, fmt::format(_("armor class: {:d}"), x->_iAC).c_str());
break;
case IPL_FIRERES:
case IPL_FIRERES_CURSE:
if (x->_iPLFR < 75)
sprintf(tempstr, fmt::format(_("Resist Fire: %+i%%"), x->_iPLFR).c_str());
sprintf(tempstr, fmt::format(_("Resist Fire: {:+d}%"), x->_iPLFR).c_str());
else
/*xgettext:no-c-format*/ strcpy(tempstr, _("Resist Fire: 75% MAX"));
break;
case IPL_LIGHTRES:
case IPL_LIGHTRES_CURSE:
if (x->_iPLLR < 75)
sprintf(tempstr, fmt::format(_("Resist Lightning: %+i%%"), x->_iPLLR).c_str());
sprintf(tempstr, fmt::format(_("Resist Lightning: {:+d}%"), x->_iPLLR).c_str());
else
/*xgettext:no-c-format*/ strcpy(tempstr, _("Resist Lightning: 75% MAX"));
break;
case IPL_MAGICRES:
case IPL_MAGICRES_CURSE:
if (x->_iPLMR < 75)
sprintf(tempstr, fmt::format(_("Resist Magic: %+i%%"), x->_iPLMR).c_str());
sprintf(tempstr, fmt::format(_("Resist Magic: {:+d}%"), x->_iPLMR).c_str());
else
/*xgettext:no-c-format*/ strcpy(tempstr, _("Resist Magic: 75% MAX"));
break;
case IPL_ALLRES:
case IPL_ALLRES_CURSE:
if (x->_iPLFR < 75)
sprintf(tempstr, fmt::format(_("Resist All: %+i%%"), x->_iPLFR).c_str());
sprintf(tempstr, fmt::format(_("Resist All: {:+d}%"), x->_iPLFR).c_str());
if (x->_iPLFR >= 75)
/*xgettext:no-c-format*/ strcpy(tempstr, _("Resist All: 75% MAX"));
break;
@ -3478,47 +3478,47 @@ void PrintItemPower(char plidx, ItemStruct *x)
break;
case IPL_FIREDAM:
if (x->_iFMinDam == x->_iFMaxDam)
sprintf(tempstr, fmt::format(_("Fire hit damage: %i"), x->_iFMinDam).c_str());
sprintf(tempstr, fmt::format(_("Fire hit damage: {:d}"), x->_iFMinDam).c_str());
else
sprintf(tempstr, fmt::format(_("Fire hit damage: %i-%i"), x->_iFMinDam, x->_iFMaxDam).c_str());
sprintf(tempstr, fmt::format(_("Fire hit damage: {:d}-{:d}"), x->_iFMinDam, x->_iFMaxDam).c_str());
break;
case IPL_LIGHTDAM:
if (x->_iLMinDam == x->_iLMaxDam)
sprintf(tempstr, fmt::format(_("Lightning hit damage: %i"), x->_iLMinDam).c_str());
sprintf(tempstr, fmt::format(_("Lightning hit damage: {:d}"), x->_iLMinDam).c_str());
else
sprintf(tempstr, fmt::format(_("Lightning hit damage: %i-%i"), x->_iLMinDam, x->_iLMaxDam).c_str());
sprintf(tempstr, fmt::format(_("Lightning hit damage: {:d}-{:d}"), x->_iLMinDam, x->_iLMaxDam).c_str());
break;
case IPL_STR:
case IPL_STR_CURSE:
sprintf(tempstr, fmt::format(_("%+i to strength"), x->_iPLStr).c_str());
sprintf(tempstr, fmt::format(_("{:+d} to strength"), x->_iPLStr).c_str());
break;
case IPL_MAG:
case IPL_MAG_CURSE:
sprintf(tempstr, fmt::format(_("%+i to magic"), x->_iPLMag).c_str());
sprintf(tempstr, fmt::format(_("{:+d} to magic"), x->_iPLMag).c_str());
break;
case IPL_DEX:
case IPL_DEX_CURSE:
sprintf(tempstr, fmt::format(_("%+i to dexterity"), x->_iPLDex).c_str());
sprintf(tempstr, fmt::format(_("{:+d} to dexterity"), x->_iPLDex).c_str());
break;
case IPL_VIT:
case IPL_VIT_CURSE:
sprintf(tempstr, fmt::format(_("%+i to vitality"), x->_iPLVit).c_str());
sprintf(tempstr, fmt::format(_("{:+d} to vitality"), x->_iPLVit).c_str());
break;
case IPL_ATTRIBS:
case IPL_ATTRIBS_CURSE:
sprintf(tempstr, fmt::format(_("%+i to all attributes"), x->_iPLStr).c_str());
sprintf(tempstr, fmt::format(_("{:+d} to all attributes"), x->_iPLStr).c_str());
break;
case IPL_GETHIT_CURSE:
case IPL_GETHIT:
sprintf(tempstr, fmt::format(_("%+i damage from enemies"), x->_iPLGetHit).c_str());
sprintf(tempstr, fmt::format(_("{:+d} damage from enemies"), x->_iPLGetHit).c_str());
break;
case IPL_LIFE:
case IPL_LIFE_CURSE:
sprintf(tempstr, fmt::format(_("Hit Points: %+i"), x->_iPLHP >> 6).c_str());
sprintf(tempstr, fmt::format(_("Hit Points: {:+d}"), x->_iPLHP >> 6).c_str());
break;
case IPL_MANA:
case IPL_MANA_CURSE:
sprintf(tempstr, fmt::format(_("Mana: %+i"), x->_iPLMana >> 6).c_str());
sprintf(tempstr, fmt::format(_("Mana: {:+d}"), x->_iPLMana >> 6).c_str());
break;
case IPL_DUR:
strcpy(tempstr, _("high durability"));
@ -3530,31 +3530,31 @@ void PrintItemPower(char plidx, ItemStruct *x)
strcpy(tempstr, _("indestructible"));
break;
case IPL_LIGHT:
sprintf(tempstr, fmt::format(_("+%i%% light radius"), 10 * x->_iPLLight).c_str());
sprintf(tempstr, fmt::format(_("+{:d}% light radius"), 10 * x->_iPLLight).c_str());
break;
case IPL_LIGHT_CURSE:
sprintf(tempstr, fmt::format(_("-%i%% light radius"), -10 * x->_iPLLight).c_str());
sprintf(tempstr, fmt::format(_("-{:d}% light radius"), -10 * x->_iPLLight).c_str());
break;
case IPL_MULT_ARROWS:
strcpy(tempstr, _("multiple arrows per shot"));
break;
case IPL_FIRE_ARROWS:
if (x->_iFMinDam == x->_iFMaxDam)
sprintf(tempstr, fmt::format(_("fire arrows damage: %i"), x->_iFMinDam).c_str());
sprintf(tempstr, fmt::format(_("fire arrows damage: {:d}"), x->_iFMinDam).c_str());
else
sprintf(tempstr, fmt::format(_("fire arrows damage: %i-%i"), x->_iFMinDam, x->_iFMaxDam).c_str());
sprintf(tempstr, fmt::format(_("fire arrows damage: {:d}-{:d}"), x->_iFMinDam, x->_iFMaxDam).c_str());
break;
case IPL_LIGHT_ARROWS:
if (x->_iLMinDam == x->_iLMaxDam)
sprintf(tempstr, fmt::format(_("lightning arrows damage %i"), x->_iLMinDam).c_str());
sprintf(tempstr, fmt::format(_("lightning arrows damage {:d}"), x->_iLMinDam).c_str());
else
sprintf(tempstr, fmt::format(_("lightning arrows damage %i-%i"), x->_iLMinDam, x->_iLMaxDam).c_str());
sprintf(tempstr, fmt::format(_("lightning arrows damage {:d}-{:d}"), x->_iLMinDam, x->_iLMaxDam).c_str());
break;
case IPL_FIREBALL:
if (x->_iFMinDam == x->_iFMaxDam)
sprintf(tempstr, fmt::format(_("fireball damage: %i"), x->_iFMinDam).c_str());
sprintf(tempstr, fmt::format(_("fireball damage: {:d}"), x->_iFMinDam).c_str());
else
sprintf(tempstr, fmt::format(_("fireball damage: %i-%i"), x->_iFMinDam, x->_iFMaxDam).c_str());
sprintf(tempstr, fmt::format(_("fireball damage: {:d}-{:d}"), x->_iFMinDam, x->_iFMaxDam).c_str());
break;
case IPL_THORNS:
strcpy(tempstr, _("attacker takes 1-3 damage"));
@ -3651,9 +3651,9 @@ void PrintItemPower(char plidx, ItemStruct *x)
break;
case IPL_ADDACLIFE:
if (x->_iFMinDam == x->_iFMaxDam)
sprintf(tempstr, fmt::format(_("lightning damage: %i"), x->_iFMinDam).c_str());
sprintf(tempstr, fmt::format(_("lightning damage: {:d}"), x->_iFMinDam).c_str());
else
sprintf(tempstr, fmt::format(_("lightning damage: %i-%i"), x->_iFMinDam, x->_iFMaxDam).c_str());
sprintf(tempstr, fmt::format(_("lightning damage: {:d}-{:d}"), x->_iFMinDam, x->_iFMaxDam).c_str());
break;
case IPL_ADDMANAAC:
strcpy(tempstr, _("charged bolts on hits"));
@ -3662,13 +3662,13 @@ void PrintItemPower(char plidx, ItemStruct *x)
if (x->_iPLFR <= 0)
strcpy(tempstr, " ");
else if (x->_iPLFR >= 1)
sprintf(tempstr, fmt::format(_("Resist Fire: %+i%%"), x->_iPLFR).c_str());
sprintf(tempstr, fmt::format(_("Resist Fire: {:+d}%"), x->_iPLFR).c_str());
break;
case IPL_DEVASTATION:
strcpy(tempstr, _("occasional triple damage"));
break;
case IPL_DECAY:
sprintf(tempstr, fmt::format(_("decaying %+i%% damage"), x->_iPLDam).c_str());
sprintf(tempstr, fmt::format(_("decaying {:+d}% damage"), x->_iPLDam).c_str());
break;
case IPL_PERIL:
strcpy(tempstr, _("2x dmg to monst, 1x to you"));
@ -3677,10 +3677,10 @@ void PrintItemPower(char plidx, ItemStruct *x)
/*xgettext:no-c-format*/ strcpy(tempstr, _("Random 0 - 500% damage"));
break;
case IPL_CRYSTALLINE:
sprintf(tempstr, fmt::format(_("low dur, %+i%% damage"), x->_iPLDam).c_str());
sprintf(tempstr, fmt::format(_("low dur, {:+d}% damage"), x->_iPLDam).c_str());
break;
case IPL_DOPPELGANGER:
sprintf(tempstr, fmt::format(_("to hit: %+i%%, %+i%% damage"), x->_iPLToHit, x->_iPLDam).c_str());
sprintf(tempstr, fmt::format(_("to hit: {:+d}%, {:+d}% damage"), x->_iPLToHit, x->_iPLDam).c_str());
break;
case IPL_ACDEMON:
strcpy(tempstr, _("extra AC vs demons"));
@ -3799,7 +3799,7 @@ void PrintItemMisc(ItemStruct *x)
AddPanelString(tempstr);
}
if (x->_iMiscId == IMISC_EAR) {
sprintf(tempstr, fmt::format(_("Level: %i"), x->_ivalue).c_str());
sprintf(tempstr, fmt::format(_("Level: {:d}"), x->_ivalue).c_str());
AddPanelString(tempstr);
}
if (x->_iMiscId == IMISC_AURIC) {
@ -3817,11 +3817,11 @@ static void PrintItemInfo(ItemStruct *x)
if (str != 0 || mag != 0 || dex != 0) {
strcpy(tempstr, _("Required:"));
if (str)
sprintf(tempstr + strlen(tempstr), fmt::format(_(" %i Str"), str).c_str());
sprintf(tempstr + strlen(tempstr), fmt::format(_(" {:d} Str"), str).c_str());
if (mag)
sprintf(tempstr + strlen(tempstr), fmt::format(_(" %i Mag"), mag).c_str());
sprintf(tempstr + strlen(tempstr), fmt::format(_(" {:d} Mag"), mag).c_str());
if (dex)
sprintf(tempstr + strlen(tempstr), fmt::format(_(" %i Dex"), dex).c_str());
sprintf(tempstr + strlen(tempstr), fmt::format(_(" {:d} Dex"), dex).c_str());
AddPanelString(tempstr);
}
pinfoflag = true;
@ -3832,30 +3832,30 @@ void PrintItemDetails(ItemStruct *x)
if (x->_iClass == ICLASS_WEAPON) {
if (x->_iMinDam == x->_iMaxDam) {
if (x->_iMaxDur == DUR_INDESTRUCTIBLE)
sprintf(tempstr, fmt::format(_("damage: %i Indestructible"), x->_iMinDam).c_str());
sprintf(tempstr, fmt::format(_("damage: {:d} Indestructible"), x->_iMinDam).c_str());
else
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: Dur: is durability */ "damage: %i Dur: %i/%i"), x->_iMinDam, x->_iDurability, x->_iMaxDur).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: Dur: is durability */ "damage: {:d} Dur: {:d}/{:d}"), x->_iMinDam, x->_iDurability, x->_iMaxDur).c_str());
} else {
if (x->_iMaxDur == DUR_INDESTRUCTIBLE)
sprintf(tempstr, fmt::format(_("damage: %i-%i Indestructible"), x->_iMinDam, x->_iMaxDam).c_str());
sprintf(tempstr, fmt::format(_("damage: {:d}-{:d} Indestructible"), x->_iMinDam, x->_iMaxDam).c_str());
else
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: Dur: is durability */ "damage: %i-%i Dur: %i/%i"), x->_iMinDam, x->_iMaxDam, x->_iDurability, x->_iMaxDur).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: Dur: is durability */ "damage: {:d}-{:d} Dur: {:d}/{:d}"), x->_iMinDam, x->_iMaxDam, x->_iDurability, x->_iMaxDur).c_str());
}
AddPanelString(tempstr);
}
if (x->_iClass == ICLASS_ARMOR) {
if (x->_iMaxDur == DUR_INDESTRUCTIBLE)
sprintf(tempstr, fmt::format(_("armor: %i Indestructible"), x->_iAC).c_str());
sprintf(tempstr, fmt::format(_("armor: {:d} Indestructible"), x->_iAC).c_str());
else
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: Dur: is durability */ "armor: %i Dur: %i/%i"), x->_iAC, x->_iDurability, x->_iMaxDur).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: Dur: is durability */ "armor: {:d} Dur: {:d}/{:d}"), x->_iAC, x->_iDurability, x->_iMaxDur).c_str());
AddPanelString(tempstr);
}
if (x->_iMiscId == IMISC_STAFF && x->_iMaxCharges != 0) {
if (x->_iMinDam == x->_iMaxDam)
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: dam: is damage Dur: is durability */ "dam: %i Dur: %i/%i"), x->_iMinDam, x->_iDurability, x->_iMaxDur).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: dam: is damage Dur: is durability */ "dam: {:d} Dur: {:d}/{:d}"), x->_iMinDam, x->_iDurability, x->_iMaxDur).c_str());
else
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: dam: is damage Dur: is durability */ "dam: %i-%i Dur: %i/%i"), x->_iMinDam, x->_iMaxDam, x->_iDurability, x->_iMaxDur).c_str());
sprintf(tempstr, fmt::format(_("Charges: %i/%i"), x->_iCharges, x->_iMaxCharges).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: dam: is damage Dur: is durability */ "dam: {:d}-{:d} Dur: {:d}/{:d}"), x->_iMinDam, x->_iMaxDam, x->_iDurability, x->_iMaxDur).c_str());
sprintf(tempstr, fmt::format(_("Charges: {:d}/{:d}"), x->_iCharges, x->_iMaxCharges).c_str());
AddPanelString(tempstr);
}
if (x->_iPrePower != -1) {
@ -3879,18 +3879,18 @@ void PrintItemDur(ItemStruct *x)
if (x->_iClass == ICLASS_WEAPON) {
if (x->_iMinDam == x->_iMaxDam) {
if (x->_iMaxDur == DUR_INDESTRUCTIBLE)
sprintf(tempstr, fmt::format(_("damage: %i Indestructible"), x->_iMinDam).c_str());
sprintf(tempstr, fmt::format(_("damage: {:d} Indestructible"), x->_iMinDam).c_str());
else
sprintf(tempstr, fmt::format(_("damage: %i Dur: %i/%i"), x->_iMinDam, x->_iDurability, x->_iMaxDur).c_str());
sprintf(tempstr, fmt::format(_("damage: {:d} Dur: {:d}/{:d}"), x->_iMinDam, x->_iDurability, x->_iMaxDur).c_str());
} else {
if (x->_iMaxDur == DUR_INDESTRUCTIBLE)
sprintf(tempstr, fmt::format(_("damage: %i-%i Indestructible"), x->_iMinDam, x->_iMaxDam).c_str());
sprintf(tempstr, fmt::format(_("damage: {:d}-{:d} Indestructible"), x->_iMinDam, x->_iMaxDam).c_str());
else
sprintf(tempstr, fmt::format(_("damage: %i-%i Dur: %i/%i"), x->_iMinDam, x->_iMaxDam, x->_iDurability, x->_iMaxDur).c_str());
sprintf(tempstr, fmt::format(_("damage: {:d}-{:d} Dur: {:d}/{:d}"), x->_iMinDam, x->_iMaxDam, x->_iDurability, x->_iMaxDur).c_str());
}
AddPanelString(tempstr);
if (x->_iMiscId == IMISC_STAFF && x->_iMaxCharges) {
sprintf(tempstr, fmt::format(_("Charges: %i/%i"), x->_iCharges, x->_iMaxCharges).c_str());
sprintf(tempstr, fmt::format(_("Charges: {:d}/{:d}"), x->_iCharges, x->_iMaxCharges).c_str());
AddPanelString(tempstr);
}
if (x->_iMagical != ITEM_QUALITY_NORMAL)
@ -3898,14 +3898,14 @@ void PrintItemDur(ItemStruct *x)
}
if (x->_iClass == ICLASS_ARMOR) {
if (x->_iMaxDur == DUR_INDESTRUCTIBLE)
sprintf(tempstr, fmt::format(_("armor: %i Indestructible"), x->_iAC).c_str());
sprintf(tempstr, fmt::format(_("armor: {:d} Indestructible"), x->_iAC).c_str());
else
sprintf(tempstr, fmt::format(_("armor: %i Dur: %i/%i"), x->_iAC, x->_iDurability, x->_iMaxDur).c_str());
sprintf(tempstr, fmt::format(_("armor: {:d} Dur: {:d}/{:d}"), x->_iAC, x->_iDurability, x->_iMaxDur).c_str());
AddPanelString(tempstr);
if (x->_iMagical != ITEM_QUALITY_NORMAL)
AddPanelString(_("Not Identified"));
if (x->_iMiscId == IMISC_STAFF && x->_iMaxCharges) {
sprintf(tempstr, fmt::format(_("Charges: %i/%i"), x->_iCharges, x->_iMaxCharges).c_str());
sprintf(tempstr, fmt::format(_("Charges: {:d}/{:d}"), x->_iCharges, x->_iMaxCharges).c_str());
AddPanelString(tempstr);
}
}

8
Source/monster.cpp

@ -4965,9 +4965,9 @@ void PrintMonstHistory(int mt)
int minHP, maxHP, res;
if (sgOptions.Gameplay.bShowMonsterType) {
sprintf(tempstr, fmt::format(_("Type: %s Kills: %i"), GetMonsterTypeText(monsterdata[mt])).c_str(), monstkills[mt]);
sprintf(tempstr, fmt::format(_("Type: {:s} Kills: {:d}"), GetMonsterTypeText(monsterdata[mt])).c_str(), monstkills[mt]);
} else {
sprintf(tempstr, fmt::format(_("Total kills: %i"), monstkills[mt]).c_str());
sprintf(tempstr, fmt::format(_("Total kills: {:d}"), monstkills[mt]).c_str());
}
AddPanelString(tempstr);
@ -5000,7 +5000,7 @@ void PrintMonstHistory(int mt)
minHP = 4 * minHP + hpBonusHell;
maxHP = 4 * maxHP + hpBonusHell;
}
sprintf(tempstr, fmt::format(_("Hit Points: %i-%i"), minHP, maxHP).c_str());
sprintf(tempstr, fmt::format(_("Hit Points: {:d}-{:d}"), minHP, maxHP).c_str());
AddPanelString(tempstr);
}
if (monstkills[mt] >= 15) {
@ -5045,7 +5045,7 @@ void PrintUniqueHistory()
int res;
if (sgOptions.Gameplay.bShowMonsterType) {
sprintf(tempstr, fmt::format(_("Type: %s"), GetMonsterTypeText(*monster[pcursmonst].MData)).c_str());
sprintf(tempstr, fmt::format(_("Type: {:s}"), GetMonsterTypeText(*monster[pcursmonst].MData)).c_str());
AddPanelString(tempstr);
}

18
Source/msg.cpp

@ -1393,7 +1393,7 @@ static DWORD On_SBSPELL(TCmd *pCmd, int pnum)
plr[pnum]._pSplFrom = 1;
plr[pnum].destAction = ACTION_SPELL;
} else
msg_errorf(fmt::format(_("%s has cast an illegal spell."), plr[pnum]._pName).c_str());
msg_errorf(fmt::format(_("{:s} has cast an illegal spell."), plr[pnum]._pName).c_str());
}
return sizeof(*p);
@ -1664,7 +1664,7 @@ static DWORD On_SPELLXYD(TCmd *pCmd, int pnum)
plr[pnum]._pSplType = plr[pnum]._pRSplType;
plr[pnum]._pSplFrom = 0;
} else
msg_errorf(fmt::format(_("%s has cast an illegal spell."), plr[pnum]._pName).c_str());
msg_errorf(fmt::format(_("{:s} has cast an illegal spell."), plr[pnum]._pName).c_str());
}
return sizeof(*p);
@ -1686,7 +1686,7 @@ static DWORD On_SPELLXY(TCmd *pCmd, int pnum)
plr[pnum]._pSplType = plr[pnum]._pRSplType;
plr[pnum]._pSplFrom = 0;
} else
msg_errorf(fmt::format(_("%s has cast an illegal spell."), plr[pnum]._pName).c_str());
msg_errorf(fmt::format(_("{:s} has cast an illegal spell."), plr[pnum]._pName).c_str());
}
return sizeof(*p);
@ -1708,7 +1708,7 @@ static DWORD On_TSPELLXY(TCmd *pCmd, int pnum)
plr[pnum]._pSplType = plr[pnum]._pTSplType;
plr[pnum]._pSplFrom = 2;
} else
msg_errorf(fmt::format(_("%s has cast an illegal spell."), plr[pnum]._pName).c_str());
msg_errorf(fmt::format(_("{:s} has cast an illegal spell."), plr[pnum]._pName).c_str());
}
return sizeof(*p);
@ -1828,7 +1828,7 @@ static DWORD On_SPELLID(TCmd *pCmd, int pnum)
plr[pnum]._pSplType = plr[pnum]._pRSplType;
plr[pnum]._pSplFrom = 0;
} else
msg_errorf(fmt::format(_("%s has cast an illegal spell."), plr[pnum]._pName).c_str());
msg_errorf(fmt::format(_("{:s} has cast an illegal spell."), plr[pnum]._pName).c_str());
}
return sizeof(*p);
@ -1849,7 +1849,7 @@ static DWORD On_SPELLPID(TCmd *pCmd, int pnum)
plr[pnum]._pSplType = plr[pnum]._pRSplType;
plr[pnum]._pSplFrom = 0;
} else
msg_errorf(fmt::format(_("%s has cast an illegal spell."), plr[pnum]._pName).c_str());
msg_errorf(fmt::format(_("{:s} has cast an illegal spell."), plr[pnum]._pName).c_str());
}
return sizeof(*p);
@ -1870,7 +1870,7 @@ static DWORD On_TSPELLID(TCmd *pCmd, int pnum)
plr[pnum]._pSplType = plr[pnum]._pTSplType;
plr[pnum]._pSplFrom = 2;
} else
msg_errorf(fmt::format(_("%s has cast an illegal spell."), plr[pnum]._pName).c_str());
msg_errorf(fmt::format(_("{:s} has cast an illegal spell."), plr[pnum]._pName).c_str());
}
return sizeof(*p);
@ -1891,7 +1891,7 @@ static DWORD On_TSPELLPID(TCmd *pCmd, int pnum)
plr[pnum]._pSplType = plr[pnum]._pTSplType;
plr[pnum]._pSplFrom = 2;
} else
msg_errorf(fmt::format(_("%s has cast an illegal spell."), plr[pnum]._pName).c_str());
msg_errorf(fmt::format(_("{:s} has cast an illegal spell."), plr[pnum]._pName).c_str());
}
return sizeof(*p);
@ -2227,7 +2227,7 @@ static DWORD On_PLAYER_JOINLEVEL(TCmd *pCmd, int pnum)
InitPlrGFXMem(plr[pnum]);
plr[pnum].plractive = true;
gbActivePlayers++;
EventPlrMsg(fmt::format(_("Player '%s' (level %i) just joined the game"), plr[pnum]._pName, plr[pnum]._pLevel).c_str());
EventPlrMsg(fmt::format(_("Player '{:s}' (level {:d}) just joined the game"), plr[pnum]._pName, plr[pnum]._pLevel).c_str());
}
if (plr[pnum].plractive && myplr != pnum) {

10
Source/multi.cpp

@ -261,14 +261,14 @@ static void multi_player_left_msg(int pnum, bool left)
delta_close_portal(pnum);
RemovePlrMissiles(pnum);
if (left) {
pszFmt = _("Player '%s' just left the game");
pszFmt = _("Player '{:s}' just left the game");
switch (sgdwPlayerLeftReasonTbl[pnum]) {
case LEAVE_ENDING:
pszFmt = _("Player '%s' killed Diablo and left the game!");
pszFmt = _("Player '{:s}' killed Diablo and left the game!");
gbSomebodyWonGameKludge = true;
break;
case LEAVE_DROP:
pszFmt = _("Player '%s' dropped due to timeout");
pszFmt = _("Player '{:s}' dropped due to timeout");
break;
}
EventPlrMsg(pszFmt, plr[pnum]._pName);
@ -858,9 +858,9 @@ void recv_plrinfo(int pnum, TCmdPlrInfoHdr *p, bool recv)
gbActivePlayers++;
if (sgbPlayerTurnBitTbl[pnum]) {
szEvent = _("Player '%s' (level %i) just joined the game");
szEvent = _("Player '{:s}' (level {:d}) just joined the game");
} else {
szEvent = _("Player '%s' (level %i) is already in the game");
szEvent = _("Player '{:s}' (level {:d}) is already in the game");
}
EventPlrMsg(fmt::format(szEvent, plr[pnum]._pName, plr[pnum]._pLevel).c_str());

6
Source/objects.cpp

@ -5501,7 +5501,7 @@ void GetObjectStr(int i)
break;
case OBJ_SHRINEL:
case OBJ_SHRINER:
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: %s will be a name from the Shrine block above */ "%s Shrine"), _(shrinestrs[object[i]._oVar1])).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: {:s} will be a name from the Shrine block above */ "{:s} Shrine"), _(shrinestrs[object[i]._oVar1])).c_str());
strcpy(infostr, tempstr);
break;
case OBJ_SKELBOOK:
@ -5570,13 +5570,13 @@ void GetObjectStr(int i)
}
if (plr[myplr]._pClass == HeroClass::Rogue) {
if (object[i]._oTrapFlag) {
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: %s will either be a chest or a door */ "Trapped %s"), infostr).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: {:s} will either be a chest or a door */ "Trapped {:s}"), infostr).c_str());
strcpy(infostr, tempstr);
infoclr = UIS_RED;
}
}
if (objectIsDisabled(i)) {
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: If user enabled diablo.ini setting "Disable Crippling Shrines" is set to 1; also used for Na-Kruls leaver */ "%s (disabled)"), infostr).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: If user enabled diablo.ini setting "Disable Crippling Shrines" is set to 1; also used for Na-Kruls leaver */ "{:s} (disabled)"), infostr).c_str());
strcpy(infostr, tempstr);
infoclr = UIS_RED;
}

2
Source/player.cpp

@ -1886,7 +1886,7 @@ StartPlayerKill(int pnum, int earflag)
if (earflag != -1) {
if (earflag != 0) {
SetPlrHandItem(&ear, IDI_EAR);
sprintf(ear._iName, fmt::format(_("Ear of %s"), player._pName).c_str());
sprintf(ear._iName, fmt::format(_("Ear of {:s}"), player._pName).c_str());
if (player._pClass == HeroClass::Sorcerer) {
ear._iCurs = ICURS_EAR_SORCERER;
} else if (player._pClass == HeroClass::Warrior) {

2
Source/plrmsg.cpp

@ -72,7 +72,7 @@ void SendPlrMsg(int pnum, const char *pszStr)
pMsg->time = SDL_GetTicks();
assert(strlen(plr[pnum]._pName) < PLR_NAME_LEN);
assert(strlen(pszStr) < MAX_SEND_STR_LEN);
sprintf(pMsg->str, fmt::format(_(/* TRANSLATORS: Shown if player presses "v" button. %s is player name, %i is level, %s is location */ "%s (lvl %i): %s"), plr[pnum]._pName, plr[pnum]._pLevel, pszStr).c_str());
sprintf(pMsg->str, fmt::format(_(/* TRANSLATORS: Shown if player presses "v" button. {:s} is player name, {:d} is level, {:s} is location */ "{:s} (lvl {:d}): {:s}"), plr[pnum]._pName, plr[pnum]._pLevel, pszStr).c_str());
}
void ClearPlrMsg()

4
Source/qol/xpbar.cpp

@ -123,7 +123,7 @@ bool CheckXPBarInfo()
const int charLevel = player._pLevel;
sprintf(tempstr, fmt::format(_("Level %i"), charLevel).c_str());
sprintf(tempstr, fmt::format(_("Level {:d}"), charLevel).c_str());
AddPanelString(tempstr);
if (charLevel == MAXCHARLEVEL - 1) {
@ -149,7 +149,7 @@ bool CheckXPBarInfo()
PrintWithSeparator(tempstr + SDL_arraysize("Next Level: ") - 1, ExpLvlsTbl[charLevel]);
AddPanelString(tempstr);
sprintf(PrintWithSeparator(tempstr, ExpLvlsTbl[charLevel] - player._pExperience), fmt::format(_(" to Level %i"), charLevel + 1).c_str());
sprintf(PrintWithSeparator(tempstr, ExpLvlsTbl[charLevel] - player._pExperience), fmt::format(_(" to Level {:d}"), charLevel + 1).c_str());
AddPanelString(tempstr);
return true;

2
Source/quests.cpp

@ -281,7 +281,7 @@ bool ForceQuests()
for (j = 0; j < 7; j++) {
if (qx + questxoff[j] == cursmx && qy + questyoff[j] == cursmy) {
sprintf(infostr, fmt::format(_(/* TRANSLATORS: Used for Quest Portals. %s is a Map Name */ "To %s"), _(questtrigstr[ql])).c_str());
sprintf(infostr, fmt::format(_(/* TRANSLATORS: Used for Quest Portals. {:s} is a Map Name */ "To {:s}"), _(questtrigstr[ql])).c_str());
cursmx = qx;
cursmy = qy;
return true;

48
Source/stores.cpp

@ -169,7 +169,7 @@ void PrintStoreItem(ItemStruct *x, int l, uint16_t flags)
}
}
if (x->_iMiscId == IMISC_STAFF && x->_iMaxCharges) {
sprintf(tempstr, fmt::format(_("Charges: %i/%i"), x->_iCharges, x->_iMaxCharges).c_str());
sprintf(tempstr, fmt::format(_("Charges: {:d}/{:d}"), x->_iCharges, x->_iMaxCharges).c_str());
if (sstr[0])
strcat(sstr, _(", "));
strcat(sstr, tempstr);
@ -180,11 +180,11 @@ void PrintStoreItem(ItemStruct *x, int l, uint16_t flags)
}
sstr[0] = '\0';
if (x->_iClass == ICLASS_WEAPON)
sprintf(sstr, fmt::format(_("Damage: %i-%i "), x->_iMinDam, x->_iMaxDam).c_str());
sprintf(sstr, fmt::format(_("Damage: {:d}-{:d} "), x->_iMinDam, x->_iMaxDam).c_str());
if (x->_iClass == ICLASS_ARMOR)
sprintf(sstr, fmt::format(_("Armor: %i "), x->_iAC).c_str());
sprintf(sstr, fmt::format(_("Armor: {:d} "), x->_iAC).c_str());
if (x->_iMaxDur != DUR_INDESTRUCTIBLE && x->_iMaxDur) {
sprintf(tempstr, fmt::format(_("Dur: %i/%i, "), x->_iDurability, x->_iMaxDur).c_str());
sprintf(tempstr, fmt::format(_("Dur: {:d}/{:d}, "), x->_iDurability, x->_iMaxDur).c_str());
strcat(sstr, tempstr);
} else {
strcat(sstr, _("Indestructible, "));
@ -199,11 +199,11 @@ void PrintStoreItem(ItemStruct *x, int l, uint16_t flags)
} else {
strcpy(tempstr, _("Required:"));
if (str)
sprintf(tempstr + strlen(tempstr), fmt::format(_(" %i Str"), str).c_str());
sprintf(tempstr + strlen(tempstr), fmt::format(_(" {:d} Str"), str).c_str());
if (mag)
sprintf(tempstr + strlen(tempstr), fmt::format(_(" %i Mag"), mag).c_str());
sprintf(tempstr + strlen(tempstr), fmt::format(_(" {:d} Mag"), mag).c_str());
if (dex)
sprintf(tempstr + strlen(tempstr), fmt::format(_(" %i Dex"), dex).c_str());
sprintf(tempstr + strlen(tempstr), fmt::format(_(" {:d} Dex"), dex).c_str());
strcat(sstr, tempstr);
}
AddSText(40, l++, sstr, flags, false);
@ -274,7 +274,7 @@ void S_StartSBuy()
stextsize = true;
stextscrl = true;
stextsval = 0;
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "I have these items for sale: Your gold: %i"), plr[myplr]._pGold).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "I have these items for sale: Your gold: {:d}"), plr[myplr]._pGold).c_str());
AddSText(0, 1, tempstr, UIS_GOLD | UIS_CENTER, false);
AddSLine(3);
AddSLine(21);
@ -339,7 +339,7 @@ bool S_StartSPBuy()
stextscrl = true;
stextsval = 0;
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "I have these premium items for sale: Your gold: %i"), plr[myplr]._pGold).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "I have these premium items for sale: Your gold: {:d}"), plr[myplr]._pGold).c_str());
AddSText(0, 1, tempstr, UIS_GOLD | UIS_CENTER, false);
AddSLine(3);
AddSLine(21);
@ -467,7 +467,7 @@ void S_StartSSell()
if (!sellok) {
stextscrl = false;
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "You have nothing I want. Your gold: %i"), plr[myplr]._pGold).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "You have nothing I want. Your gold: {:d}"), plr[myplr]._pGold).c_str());
AddSText(0, 1, tempstr, UIS_GOLD | UIS_CENTER, false);
AddSLine(3);
AddSLine(21);
@ -477,7 +477,7 @@ void S_StartSSell()
stextscrl = true;
stextsval = 0;
stextsmax = plr[myplr]._pNumInv;
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "Which item is for sale? Your gold: %i"), plr[myplr]._pGold).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "Which item is for sale? Your gold: {:d}"), plr[myplr]._pGold).c_str());
AddSText(0, 1, tempstr, UIS_GOLD | UIS_CENTER, false);
AddSLine(3);
AddSLine(21);
@ -537,7 +537,7 @@ void S_StartSRepair()
}
if (!repairok) {
stextscrl = false;
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "You have nothing to repair. Your gold: %i"), plr[myplr]._pGold).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "You have nothing to repair. Your gold: {:d}"), plr[myplr]._pGold).c_str());
AddSText(0, 1, tempstr, UIS_GOLD | UIS_CENTER, false);
AddSLine(3);
AddSLine(21);
@ -549,7 +549,7 @@ void S_StartSRepair()
stextscrl = true;
stextsval = 0;
stextsmax = plr[myplr]._pNumInv;
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "Repair which item? Your gold: %i"), plr[myplr]._pGold).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "Repair which item? Your gold: {:d}"), plr[myplr]._pGold).c_str());
AddSText(0, 1, tempstr, UIS_GOLD | UIS_CENTER, false);
AddSLine(3);
AddSLine(21);
@ -623,7 +623,7 @@ void S_StartWBuy()
stextscrl = true;
stextsval = 0;
stextsmax = 20;
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "I have these items for sale: Your gold: %i"), plr[myplr]._pGold).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "I have these items for sale: Your gold: {:d}"), plr[myplr]._pGold).c_str());
AddSText(0, 1, tempstr, UIS_GOLD | UIS_CENTER, false);
AddSLine(3);
AddSLine(21);
@ -717,7 +717,7 @@ void S_StartWSell()
if (!sellok) {
stextscrl = false;
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "You have nothing I want. Your gold: %i"), plr[myplr]._pGold).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "You have nothing I want. Your gold: {:d}"), plr[myplr]._pGold).c_str());
AddSText(0, 1, tempstr, UIS_GOLD | UIS_CENTER, false);
AddSLine(3);
AddSLine(21);
@ -727,7 +727,7 @@ void S_StartWSell()
stextscrl = true;
stextsval = 0;
stextsmax = plr[myplr]._pNumInv;
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "Which item is for sale? Your gold: %i"), plr[myplr]._pGold).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "Which item is for sale? Your gold: {:d}"), plr[myplr]._pGold).c_str());
AddSText(0, 1, tempstr, UIS_GOLD | UIS_CENTER, false);
AddSLine(3);
AddSLine(21);
@ -793,7 +793,7 @@ void S_StartWRecharge()
if (!rechargeok) {
stextscrl = false;
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "You have nothing to recharge. Your gold: %i"), plr[myplr]._pGold).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "You have nothing to recharge. Your gold: {:d}"), plr[myplr]._pGold).c_str());
AddSText(0, 1, tempstr, UIS_GOLD | UIS_CENTER, false);
AddSLine(3);
AddSLine(21);
@ -803,7 +803,7 @@ void S_StartWRecharge()
stextscrl = true;
stextsval = 0;
stextsmax = plr[myplr]._pNumInv;
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "Recharge which item? Your gold: %i"), plr[myplr]._pGold).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "Recharge which item? Your gold: {:d}"), plr[myplr]._pGold).c_str());
AddSText(0, 1, tempstr, UIS_GOLD | UIS_CENTER, false);
AddSLine(3);
AddSLine(21);
@ -915,7 +915,7 @@ void S_StartBBoy()
{
stextsize = true;
stextscrl = false;
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "I have this item for sale: Your gold: %i"), plr[myplr]._pGold).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "I have this item for sale: Your gold: {:d}"), plr[myplr]._pGold).c_str());
AddSText(0, 1, tempstr, UIS_GOLD | UIS_CENTER, false);
AddSLine(3);
AddSLine(21);
@ -989,7 +989,7 @@ void S_StartHBuy()
stextsize = true;
stextscrl = true;
stextsval = 0;
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "I have these items for sale: Your gold: %i"), plr[myplr]._pGold).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "I have these items for sale: Your gold: {:d}"), plr[myplr]._pGold).c_str());
AddSText(0, 1, tempstr, UIS_GOLD | UIS_CENTER, false);
AddSLine(3);
AddSLine(21);
@ -1090,7 +1090,7 @@ void S_StartSIdentify()
if (!idok) {
stextscrl = false;
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "You have nothing to identify. Your gold: %i"), plr[myplr]._pGold).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "You have nothing to identify. Your gold: {:d}"), plr[myplr]._pGold).c_str());
AddSText(0, 1, tempstr, UIS_GOLD | UIS_CENTER, false);
AddSLine(3);
AddSLine(21);
@ -1100,7 +1100,7 @@ void S_StartSIdentify()
stextscrl = true;
stextsval = 0;
stextsmax = plr[myplr]._pNumInv;
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "Identify which item? Your gold: %i"), plr[myplr]._pGold).c_str());
sprintf(tempstr, fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */ "Identify which item? Your gold: {:d}"), plr[myplr]._pGold).c_str());
AddSText(0, 1, tempstr, UIS_GOLD | UIS_CENTER, false);
AddSLine(3);
AddSLine(21);
@ -1129,11 +1129,11 @@ void S_StartTalk()
stextsize = false;
stextscrl = false;
sprintf(tempstr, fmt::format(_("Talk to %s"), talkname[talker]).c_str());
sprintf(tempstr, fmt::format(_("Talk to {:s}"), talkname[talker]).c_str());
AddSText(0, 2, tempstr, UIS_GOLD | UIS_CENTER, false);
AddSLine(5);
if (gbIsSpawn) {
sprintf(tempstr, fmt::format(_("Talking to %s"), talkname[talker]).c_str());
sprintf(tempstr, fmt::format(_("Talking to {:s}"), talkname[talker]).c_str());
AddSText(0, 10, tempstr, UIS_SILVER | UIS_CENTER, false);
AddSText(0, 12, _("is not available"), UIS_SILVER | UIS_CENTER, false);
AddSText(0, 14, _("in the shareware"), UIS_SILVER | UIS_CENTER, false);

30
Source/trigs.cpp

@ -396,7 +396,7 @@ bool ForceL1Trig()
for (i = 0; L1UpList[i] != -1; i++) {
if (dPiece[cursmx][cursmy] == L1UpList[i]) {
if (currlevel > 1)
sprintf(infostr, fmt::format(_("Up to level %i"), currlevel - 1).c_str());
sprintf(infostr, fmt::format(_("Up to level {:d}"), currlevel - 1).c_str());
else
strcpy(infostr, _("Up to town"));
for (j = 0; j < numtrigs; j++) {
@ -410,7 +410,7 @@ bool ForceL1Trig()
}
for (i = 0; L1DownList[i] != -1; i++) {
if (dPiece[cursmx][cursmy] == L1DownList[i]) {
sprintf(infostr, fmt::format(_("Down to level %i"), currlevel + 1).c_str());
sprintf(infostr, fmt::format(_("Down to level {:d}"), currlevel + 1).c_str());
for (j = 0; j < numtrigs; j++) {
if (trigs[j]._tmsg == WM_DIABNEXTLVL) {
cursmx = trigs[j].position.x;
@ -423,7 +423,7 @@ bool ForceL1Trig()
} else {
for (i = 0; L5UpList[i] != -1; i++) {
if (dPiece[cursmx][cursmy] == L5UpList[i]) {
sprintf(infostr, fmt::format(_("Up to Crypt level %i"), currlevel - 21).c_str());
sprintf(infostr, fmt::format(_("Up to Crypt level {:d}"), currlevel - 21).c_str());
for (j = 0; j < numtrigs; j++) {
if (trigs[j]._tmsg == WM_DIABPREVLVL) {
cursmx = trigs[j].position.x;
@ -439,7 +439,7 @@ bool ForceL1Trig()
}
for (i = 0; L5DownList[i] != -1; i++) {
if (dPiece[cursmx][cursmy] == L5DownList[i]) {
sprintf(infostr, fmt::format(_("Down to Crypt level %i"), currlevel - 19).c_str());
sprintf(infostr, fmt::format(_("Down to Crypt level {:d}"), currlevel - 19).c_str());
for (j = 0; j < numtrigs; j++) {
if (trigs[j]._tmsg == WM_DIABNEXTLVL) {
cursmx = trigs[j].position.x;
@ -483,7 +483,7 @@ bool ForceL2Trig()
dx = abs(trigs[j].position.x - cursmx);
dy = abs(trigs[j].position.y - cursmy);
if (dx < 4 && dy < 4) {
sprintf(infostr, fmt::format(_("Up to level %i"), currlevel - 1).c_str());
sprintf(infostr, fmt::format(_("Up to level {:d}"), currlevel - 1).c_str());
cursmx = trigs[j].position.x;
cursmy = trigs[j].position.y;
return true;
@ -495,7 +495,7 @@ bool ForceL2Trig()
for (i = 0; L2DownList[i] != -1; i++) {
if (dPiece[cursmx][cursmy] == L2DownList[i]) {
sprintf(infostr, fmt::format(_("Down to level %i"), currlevel + 1).c_str());
sprintf(infostr, fmt::format(_("Down to level {:d}"), currlevel + 1).c_str());
for (j = 0; j < numtrigs; j++) {
if (trigs[j]._tmsg == WM_DIABNEXTLVL) {
cursmx = trigs[j].position.x;
@ -535,7 +535,7 @@ bool ForceL3Trig()
if (currlevel < 17) {
for (i = 0; L3UpList[i] != -1; ++i) {
if (dPiece[cursmx][cursmy] == L3UpList[i]) {
sprintf(infostr, fmt::format(_("Up to level %i"), currlevel - 1).c_str());
sprintf(infostr, fmt::format(_("Up to level {:d}"), currlevel - 1).c_str());
for (j = 0; j < numtrigs; j++) {
if (trigs[j]._tmsg == WM_DIABPREVLVL) {
cursmx = trigs[j].position.x;
@ -549,7 +549,7 @@ bool ForceL3Trig()
if (dPiece[cursmx][cursmy] == L3DownList[i]
|| dPiece[cursmx + 1][cursmy] == L3DownList[i]
|| dPiece[cursmx + 2][cursmy] == L3DownList[i]) {
sprintf(infostr, fmt::format(_("Down to level %i"), currlevel + 1).c_str());
sprintf(infostr, fmt::format(_("Down to level {:d}"), currlevel + 1).c_str());
for (j = 0; j < numtrigs; j++) {
if (trigs[j]._tmsg == WM_DIABNEXTLVL) {
cursmx = trigs[j].position.x;
@ -562,7 +562,7 @@ bool ForceL3Trig()
} else {
for (i = 0; L6UpList[i] != -1; ++i) {
if (dPiece[cursmx][cursmy] == L6UpList[i]) {
sprintf(infostr, fmt::format(_("Up to Nest level %i"), currlevel - 17).c_str());
sprintf(infostr, fmt::format(_("Up to Nest level {:d}"), currlevel - 17).c_str());
for (j = 0; j < numtrigs; j++) {
if (trigs[j]._tmsg == WM_DIABPREVLVL) {
cursmx = trigs[j].position.x;
@ -576,7 +576,7 @@ bool ForceL3Trig()
if (dPiece[cursmx][cursmy] == L6DownList[i]
|| dPiece[cursmx + 1][cursmy] == L6DownList[i]
|| dPiece[cursmx + 2][cursmy] == L6DownList[i]) {
sprintf(infostr, fmt::format(_("Down to level %i"), currlevel - 15).c_str());
sprintf(infostr, fmt::format(_("Down to level {:d}"), currlevel - 15).c_str());
for (j = 0; j < numtrigs; j++) {
if (trigs[j]._tmsg == WM_DIABNEXTLVL) {
cursmx = trigs[j].position.x;
@ -634,7 +634,7 @@ bool ForceL4Trig()
for (i = 0; L4UpList[i] != -1; ++i) {
if (dPiece[cursmx][cursmy] == L4UpList[i]) {
sprintf(infostr, fmt::format(_("Up to level %i"), currlevel - 1).c_str());
sprintf(infostr, fmt::format(_("Up to level {:d}"), currlevel - 1).c_str());
for (j = 0; j < numtrigs; j++) {
if (trigs[j]._tmsg == WM_DIABPREVLVL) {
cursmx = trigs[j].position.x;
@ -647,7 +647,7 @@ bool ForceL4Trig()
for (i = 0; L4DownList[i] != -1; i++) {
if (dPiece[cursmx][cursmy] == L4DownList[i]) {
sprintf(infostr, fmt::format(_("Down to level %i"), currlevel + 1).c_str());
sprintf(infostr, fmt::format(_("Down to level {:d}"), currlevel + 1).c_str());
for (j = 0; j < numtrigs; j++) {
if (trigs[j]._tmsg == WM_DIABNEXTLVL) {
cursmx = trigs[j].position.x;
@ -717,7 +717,7 @@ bool ForceSKingTrig()
for (i = 0; L1UpList[i] != -1; i++) {
if (dPiece[cursmx][cursmy] == L1UpList[i]) {
sprintf(infostr, fmt::format(_("Back to Level %i"), quests[Q_SKELKING]._qlevel).c_str());
sprintf(infostr, fmt::format(_("Back to Level {:d}"), quests[Q_SKELKING]._qlevel).c_str());
cursmx = trigs[0].position.x;
cursmy = trigs[0].position.y;
@ -734,7 +734,7 @@ bool ForceSChambTrig()
for (i = 0; L2DownList[i] != -1; i++) {
if (dPiece[cursmx][cursmy] == L2DownList[i]) {
sprintf(infostr, fmt::format(_("Back to Level %i"), quests[Q_SCHAMB]._qlevel).c_str());
sprintf(infostr, fmt::format(_("Back to Level {:d}"), quests[Q_SCHAMB]._qlevel).c_str());
cursmx = trigs[0].position.x;
cursmy = trigs[0].position.y;
@ -751,7 +751,7 @@ bool ForcePWaterTrig()
for (i = 0; L3DownList[i] != -1; i++) {
if (dPiece[cursmx][cursmy] == L3DownList[i]) {
sprintf(infostr, fmt::format(_("Back to Level %i"), quests[Q_PWATER]._qlevel).c_str());
sprintf(infostr, fmt::format(_("Back to Level {:d}"), quests[Q_PWATER]._qlevel).c_str());
cursmx = trigs[0].position.x;
cursmy = trigs[0].position.y;

Loading…
Cancel
Save