diff --git a/src/deh_soc.c b/src/deh_soc.c index 555f91dda..e6645e98a 100644 --- a/src/deh_soc.c +++ b/src/deh_soc.c @@ -3501,7 +3501,16 @@ void readcupheader(MYFILE *f, cupheader_t *cup) i = atoi(word2); // used for numerical settings strupr(word2); - if (fastcmp(word, "ICON")) + if (fastcmp(word, "MONITOR")) + { + if (i > 0 && i < 10) + cup->monitor = i; + else if (!word2[0] || word2[1] != '\0' || word2[0] == '0') + deh_warning("%s Cup: Invalid monitor type \"%s\" (should be 1-9 or A-Z)\n", cup->name, word2); + else + cup->monitor = (word2[0] - 'A') + 10; + } + else if (fastcmp(word, "ICON")) { deh_strlcpy(cup->icon, word2, sizeof(cup->icon), va("%s Cup: icon", cup->name)); diff --git a/src/dehacked.c b/src/dehacked.c index 6943c5c47..3faa7b7e9 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -534,6 +534,7 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile) { cup = Z_Calloc(sizeof (cupheader_t), PU_STATIC, NULL); cup->id = numkartcupheaders; + cup->monitor = 1; deh_strlcpy(cup->name, word2, sizeof(cup->name), va("Cup header %s: name", word2)); if (prev != NULL) diff --git a/src/doomstat.h b/src/doomstat.h index 4e9d297f3..754f85e98 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -357,6 +357,7 @@ struct mapheader_lighting_t struct cupheader_t { UINT16 id; ///< Cup ID + UINT8 monitor; ///< Monitor graphic 1-9 or A-Z char name[15]; ///< Cup title (14 chars) char icon[9]; ///< Name of the icon patch char *levellist[CUPCACHE_MAX]; ///< List of levels that belong to this cup