mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
"Monitor" parameter for cups
- Defaults to 1, AKA Sonic 1/2 monitor - Set to 2 for Sonic 3k monitor - Supports a range of 1-9 and A-Z - Permits fine-grained rapid-prototype stretch goal Chaotix monitor stuff later in development
This commit is contained in:
parent
07f7be03a1
commit
1d3b5adfdf
4 changed files with 28 additions and 7 deletions
|
|
@ -3432,7 +3432,16 @@ void readcupheader(MYFILE *f, cupheader_t *cup)
|
||||||
i = atoi(word2); // used for numerical settings
|
i = atoi(word2); // used for numerical settings
|
||||||
strupr(word2);
|
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,
|
deh_strlcpy(cup->icon, word2,
|
||||||
sizeof(cup->icon), va("%s Cup: icon", cup->name));
|
sizeof(cup->icon), va("%s Cup: icon", cup->name));
|
||||||
|
|
|
||||||
|
|
@ -486,6 +486,7 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
|
||||||
{
|
{
|
||||||
cup = Z_Calloc(sizeof (cupheader_t), PU_STATIC, NULL);
|
cup = Z_Calloc(sizeof (cupheader_t), PU_STATIC, NULL);
|
||||||
cup->id = numkartcupheaders;
|
cup->id = numkartcupheaders;
|
||||||
|
cup->monitor = 1;
|
||||||
deh_strlcpy(cup->name, word2,
|
deh_strlcpy(cup->name, word2,
|
||||||
sizeof(cup->name), va("Cup header %s: name", word2));
|
sizeof(cup->name), va("Cup header %s: name", word2));
|
||||||
if (prev != NULL)
|
if (prev != NULL)
|
||||||
|
|
|
||||||
|
|
@ -375,6 +375,7 @@ struct customoption_t
|
||||||
struct cupheader_t
|
struct cupheader_t
|
||||||
{
|
{
|
||||||
UINT16 id; ///< Cup ID
|
UINT16 id; ///< Cup ID
|
||||||
|
UINT8 monitor; ///< Monitor graphic 1-9 or A-Z
|
||||||
char name[15]; ///< Cup title (14 chars)
|
char name[15]; ///< Cup title (14 chars)
|
||||||
char icon[9]; ///< Name of the icon patch
|
char icon[9]; ///< Name of the icon patch
|
||||||
char *levellist[CUPCACHE_MAX]; ///< List of levels that belong to this cup
|
char *levellist[CUPCACHE_MAX]; ///< List of levels that belong to this cup
|
||||||
|
|
|
||||||
|
|
@ -2134,7 +2134,7 @@ void M_DrawCupSelect(void)
|
||||||
INT16 x, y;
|
INT16 x, y;
|
||||||
INT16 icony = 7;
|
INT16 icony = 7;
|
||||||
char status = 'A';
|
char status = 'A';
|
||||||
UINT8 monitor = 1;
|
char monitor;
|
||||||
INT32 rankx = 0;
|
INT32 rankx = 0;
|
||||||
|
|
||||||
if (!cupgrid.builtgrid[id])
|
if (!cupgrid.builtgrid[id])
|
||||||
|
|
@ -2176,14 +2176,24 @@ void M_DrawCupSelect(void)
|
||||||
colormap = NULL;
|
colormap = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (templevelsearch.cup->emeraldnum > 7)
|
|
||||||
{
|
{
|
||||||
monitor = 2;
|
if (templevelsearch.cup->monitor < 10)
|
||||||
icony = 5;
|
{
|
||||||
rankx = 2;
|
monitor = '0' + templevelsearch.cup->monitor;
|
||||||
|
|
||||||
|
if (templevelsearch.cup->monitor == '2')
|
||||||
|
{
|
||||||
|
icony = 5;
|
||||||
|
rankx = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
monitor = 'A' + (templevelsearch.cup->monitor - 10);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
patch = W_CachePatchName(va("CUPMON%d%c", monitor, status), PU_CACHE);
|
patch = W_CachePatchName(va("CUPMON%c%c", monitor, status), PU_CACHE);
|
||||||
|
|
||||||
x = 14 + (i*42);
|
x = 14 + (i*42);
|
||||||
y = 20 + (j*44) - (30*menutransition.tics);
|
y = 20 + (j*44) - (30*menutransition.tics);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue