mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Allow spaces in captions defined in SOC
This commit is contained in:
parent
c67b52f85d
commit
46e31e45d9
1 changed files with 13 additions and 11 deletions
|
|
@ -2650,26 +2650,28 @@ void readsound(MYFILE *f, INT32 num)
|
||||||
if (s[0] == '\n')
|
if (s[0] == '\n')
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// First remove trailing newline, if there is one
|
||||||
|
tmp = strchr(s, '\n');
|
||||||
|
if (tmp)
|
||||||
|
*tmp = '\0';
|
||||||
|
|
||||||
tmp = strchr(s, '#');
|
tmp = strchr(s, '#');
|
||||||
if (tmp)
|
if (tmp)
|
||||||
*tmp = '\0';
|
*tmp = '\0';
|
||||||
if (s == tmp)
|
if (s == tmp)
|
||||||
continue; // Skip comment lines, but don't break.
|
continue; // Skip comment lines, but don't break.
|
||||||
|
|
||||||
word = strtok(s, " ");
|
// Get the part before the " = "
|
||||||
if (word)
|
tmp = strchr(s, '=');
|
||||||
strupr(word);
|
if (tmp)
|
||||||
|
*(tmp-1) = '\0';
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
|
strupr(word);
|
||||||
|
|
||||||
word2 = strtok(NULL, " ");
|
// Now get the part after
|
||||||
if (word2)
|
word2 = tmp += 2;
|
||||||
value = atoi(word2);
|
value = atoi(word2); // used for numerical settings
|
||||||
else
|
|
||||||
{
|
|
||||||
deh_warning("No value for token %s", word);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fastcmp(word, "SINGULAR"))
|
if (fastcmp(word, "SINGULAR"))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue