mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-04 04:36:21 +00:00
Menus/Map Select: split map names so only 1 word goes on the bottom
This is the minimum requirement for release, just to stop Mega Collision Chaos from going off the screen. - 2 words - 1 word on top - 1 word below - 3 words - 2 words on top - 1 word below
This commit is contained in:
parent
38811b2e4c
commit
ba50685c6e
1 changed files with 12 additions and 25 deletions
|
|
@ -3338,38 +3338,25 @@ static void M_DrawHighLowLevelTitle(INT16 x, INT16 y, INT16 map)
|
|||
}
|
||||
else
|
||||
{
|
||||
boolean donewithone = false;
|
||||
|
||||
char *ttlsource =
|
||||
mapheaderinfo[map]->menuttl[0]
|
||||
? mapheaderinfo[map]->menuttl
|
||||
: mapheaderinfo[map]->lvlttl;
|
||||
|
||||
for (i = 0; i < 22; i++)
|
||||
// If there are 2 or more words:
|
||||
// - Last word goes on word2
|
||||
// - Everything else on word1
|
||||
char *p = strrchr(ttlsource, ' ');
|
||||
if (p)
|
||||
{
|
||||
if (!ttlsource[i])
|
||||
break;
|
||||
|
||||
if (ttlsource[i] == ' ')
|
||||
{
|
||||
if (!donewithone)
|
||||
{
|
||||
donewithone = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (donewithone)
|
||||
{
|
||||
word2[word2len] = ttlsource[i];
|
||||
word2len++;
|
||||
}
|
||||
else
|
||||
{
|
||||
word1[word1len] = ttlsource[i];
|
||||
word1len++;
|
||||
}
|
||||
word2len = strlen(p + 1);
|
||||
memcpy(word2, p + 1, word2len);
|
||||
}
|
||||
else
|
||||
p = ttlsource + strlen(ttlsource);
|
||||
|
||||
word1len = p - ttlsource;
|
||||
memcpy(word1, ttlsource, word1len);
|
||||
}
|
||||
|
||||
if (!mapheaderinfo[map]->menuttl[0] && mapheaderinfo[map]->actnum)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue