Skip to content

Commit 6e9dcd0

Browse files
committed
xrGame: remove DELIMITER from newline operations
1 parent c66c1b2 commit 6e9dcd0

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

src/xrGame/game_news.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ LPCSTR GAME_NEWS_DATA::SingleLineText()
5454
u32 years, months, days, hours, minutes, seconds, milliseconds;
5555
split_time (receive_time, years, months, days, hours, minutes, seconds, milliseconds);
5656
//#pragma todo("Satan->Satan : insert carry-over")
57-
//xr_sprintf(time, "%02i:%02i " DELIMITER "n", hours, minutes);
57+
//xr_sprintf(time, "%02i:%02i \\n", hours, minutes);
5858
xr_sprintf (time, "%02i:%02i, ", hours, minutes);
5959
// strconcat (result, locationName, time, newsPhrase);
6060

src/xrGame/ui/UIInvUpgradeInfo.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,28 +119,28 @@ bool UIInvUpgradeInfo::init_upgrade(Upgrade_type* upgr, CInventoryItem* inv_item
119119
}
120120
else if (upg_res == inventory::upgrade::result_e_unknown)
121121
{
122-
xr_sprintf(str_res, sizeof(str_res), "%s:" DELIMITER "n - %s", CStringTable().translate("st_upgr_disable").c_str(),
122+
xr_sprintf(str_res, sizeof(str_res), "%s:\\n - %s", CStringTable().translate("st_upgr_disable").c_str(),
123123
CStringTable().translate("st_upgr_unknown").c_str());
124124
m_cost->Show(false);
125125
}
126126
else if (upg_res == inventory::upgrade::result_e_group)
127-
xr_sprintf(str_res, sizeof(str_res), "%s:" DELIMITER "n - %s", CStringTable().translate("st_upgr_disable").c_str(),
127+
xr_sprintf(str_res, sizeof(str_res), "%s:\\n - %s", CStringTable().translate("st_upgr_disable").c_str(),
128128
CStringTable().translate("st_upgr_group").c_str());
129129
else if (upg_res_script == inventory::upgrade::result_e_precondition_money)
130-
xr_sprintf(str_res, sizeof(str_res), "%s:" DELIMITER "n - %s", CStringTable().translate("st_upgr_disable").c_str(),
130+
xr_sprintf(str_res, sizeof(str_res), "%s:\\n - %s", CStringTable().translate("st_upgr_disable").c_str(),
131131
CStringTable().translate("st_upgr_cant_do").c_str());
132132
else
133133
{
134134
if (upg_res != inventory::upgrade::result_ok)
135135
{
136-
xr_sprintf(str_res, sizeof(str_res), "%s:" DELIMITER "n%s", CStringTable().translate("st_upgr_disable").c_str(),
136+
xr_sprintf(str_res, sizeof(str_res), "%s:\\n%s", CStringTable().translate("st_upgr_disable").c_str(),
137137
m_upgrade->get_prerequisites());
138138
if (upg_res == inventory::upgrade::result_e_parents)
139-
xr_sprintf(str_res, sizeof(str_res), "%s" DELIMITER "n - %s", str_res,
139+
xr_sprintf(str_res, sizeof(str_res), "%s\\n - %s", str_res,
140140
CStringTable().translate("st_upgr_parents").c_str());
141141

142142
if (upg_res == inventory::upgrade::result_e_precondition_money)
143-
xr_sprintf(str_res, sizeof(str_res), "%s:" DELIMITER "n - %s",
143+
xr_sprintf(str_res, sizeof(str_res), "%s:\\n - %s",
144144
CStringTable().translate("st_upgr_disable").c_str(),
145145
CStringTable().translate("st_upgr_cant_do").c_str());
146146
}

src/xrGame/ui/UILine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void CUILine::ProcessNewLines()
105105
{
106106
for (u32 i = 0; i < m_subLines.size(); i++)
107107
{
108-
StrSize pos = m_subLines[i].m_text.find(DELIMITER "n");
108+
StrSize pos = m_subLines[i].m_text.find("\\n");
109109
// if (pos != npos)
110110
// pos = m_subLines[i].m_text.find('\r');
111111

src/xrGame/ui/UILines.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ void CUILines::ParseText(bool force)
119119
VERIFY(llen < MAX_MB_CHARS);
120120
xr_strcpy(szTempLine, line->m_subLines[i].m_text.c_str());
121121
pszSearch = szTempLine;
122-
while ((pszTemp = strstr(pszSearch, DELIMITER "n")) != NULL)
122+
while ((pszTemp = strstr(pszSearch, "\\n")) != NULL)
123123
{
124124
bNewLines = TRUE;
125125
*pszTemp = '\0';

src/xrGame/ui/UIMapInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void CUIMapInfo::InitMapInfo(Fvector2 pos, Fvector2 size)
3030
text += *str_tbl.translate(ltx.r_string_wb("map_info", y)); \
3131
else \
3232
text += *str_tbl.translate(z); \
33-
text += "%c[default]" DELIMITER "n"; \
33+
text += "%c[default]\\n"; \
3434
st = new CUITextWnd(); \
3535
st->SetTextComplexMode(true); \
3636
st->SetFont(txt_font); \
@@ -116,7 +116,7 @@ void CUIMapInfo::InitMap(LPCSTR map_name, LPCSTR map_ver)
116116
text += *str_tbl.translate("st_artefacthunt");
117117
}
118118

119-
text += "%c[default]" DELIMITER "n";
119+
text += "%c[default]\\n";
120120

121121
st = new CUITextWnd();
122122
st->SetTextComplexMode(true);

src/xrGame/ui/UITalkDialogWnd.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ void CUIAnswerItemIconed::Init(LPCSTR text, LPCSTR name, LPCSTR texture_name)
334334
{
335335
xr_string res;
336336
res += name;
337-
res += DELIMITER "n %c[250,255,232,208]";
337+
res += "\\n %c[250,255,232,208]";
338338
res += text;
339339

340340
inherited::Init(res.c_str(), "");

0 commit comments

Comments
 (0)