Maximum length for name strings on level platters. http://i.imgur.com/FFXmVlY.png

This commit is contained in:
toasterbabe 2017-02-02 12:52:39 +00:00
parent 55e736250a
commit 590ffae391
2 changed files with 10 additions and 3 deletions

View file

@ -3809,10 +3809,17 @@ static boolean M_PrepareLevelPlatter(INT32 gt)
}
else
{
char mapname[22+3]; // lvlttl[22] + " 19"
if (actnum)
sprintf(levelselect.rows[row].mapnames[col], "%s %d", mapheaderinfo[mapnum]->lvlttl, actnum);
sprintf(mapname, "%s %d", mapheaderinfo[mapnum]->lvlttl, actnum);
else
sprintf(levelselect.rows[row].mapnames[col], "%s", mapheaderinfo[mapnum]->lvlttl);
sprintf(mapname, "%s", mapheaderinfo[mapnum]->lvlttl);
if (strlen(mapname) >= 17)
sprintf(mapname+17-3, "...");
strcpy(levelselect.rows[row].mapnames[col], (const char *)mapname);
}
}
else

View file

@ -187,7 +187,7 @@ typedef struct
{
char header[22+5]; // mapheader_t lvltttl max length + " ZONE"
INT32 maplist[3];
char mapnames[3][22];
char mapnames[3][17+1];
boolean mapavailable[3];
} levelselectrow_t;