Skip to content

Commit

Permalink
rt_ted.c: Display map author if info is available
Browse files Browse the repository at this point in the history
  • Loading branch information
erysdren committed Dec 13, 2023
1 parent d6a454c commit 034a093
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions source/rt_ted.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,21 @@ void DrawPreCache(void)

US_BufPrint(&temp[0]);

char *author = GetMapAuthor(gamestate.mapon);

if (author)
{
char *author_joined = M_StringJoin("Author: ", author, NULL);
CurrentFont = tinyfont;
US_MeasureStr(&width, &height, "%s", author_joined);
PrintX = (320 - width) >> 1;
PrintY = PRECACHESTRINGY + 16;
VWB_TBar(PrintX - 2, PrintY - 2, width + 4, height + 4);
US_BufPrint(author_joined);
free(author);
free(author_joined);
}

VW_UpdateScreen();

MenuFadeIn();
Expand Down Expand Up @@ -1546,8 +1561,6 @@ void ReadROTTMap(char *filename, int mapnum)
SafeFree(mapinfo_json);
mapinfo_json = GetMapInfoJSON(filehandle);

GetMapAuthor(0);

//
// Load map header
//
Expand Down

0 comments on commit 034a093

Please sign in to comment.