mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-20 08:20:52 +00:00
Support underscores -> spaces in TextPrompt name
This commit is contained in:
parent
722da815ea
commit
c16c59fd73
1 changed files with 10 additions and 0 deletions
|
@ -1637,6 +1637,8 @@ static void readtextpromptpage(MYFILE *f, INT32 num, INT32 pagenum)
|
||||||
|
|
||||||
if (fastcmp(word, "NAME"))
|
if (fastcmp(word, "NAME"))
|
||||||
{
|
{
|
||||||
|
INT32 i;
|
||||||
|
|
||||||
// HACK: Add yellow control char now
|
// HACK: Add yellow control char now
|
||||||
// so the drawing function doesn't call it repeatedly
|
// so the drawing function doesn't call it repeatedly
|
||||||
char name[32];
|
char name[32];
|
||||||
|
@ -1644,6 +1646,14 @@ static void readtextpromptpage(MYFILE *f, INT32 num, INT32 pagenum)
|
||||||
name[1] = 0;
|
name[1] = 0;
|
||||||
strncat(name, word2, 31);
|
strncat(name, word2, 31);
|
||||||
name[31] = 0;
|
name[31] = 0;
|
||||||
|
|
||||||
|
// Replace _ with ' '
|
||||||
|
for (i = 0; i < 32 && name[i]; i++)
|
||||||
|
{
|
||||||
|
if (name[i] == '_')
|
||||||
|
name[i] = ' ';
|
||||||
|
}
|
||||||
|
|
||||||
strncpy(textprompts[num]->page[pagenum].name, name, 32);
|
strncpy(textprompts[num]->page[pagenum].name, name, 32);
|
||||||
}
|
}
|
||||||
else if (fastcmp(word, "ICON"))
|
else if (fastcmp(word, "ICON"))
|
||||||
|
|
Loading…
Reference in a new issue