mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-29 17:56:21 +00:00
Update new menus to use long names
This commit is contained in:
parent
2fddc9f343
commit
524eff9fde
3 changed files with 36 additions and 14 deletions
|
|
@ -460,10 +460,10 @@ typedef struct cupheader_s
|
|||
UINT16 id; ///< Cup ID
|
||||
char name[15]; ///< Cup title (14 chars)
|
||||
char icon[9]; ///< Name of the icon patch
|
||||
char * levellist[MAXLEVELLIST]; ///< List of levels that belong to this cup
|
||||
char *levellist[MAXLEVELLIST]; ///< List of levels that belong to this cup
|
||||
UINT8 numlevels; ///< Number of levels defined in levellist
|
||||
char * bonusgame; ///< Map number to use for bonus game
|
||||
char * specialstage; ///< Map number to use for special stage
|
||||
char *bonusgame; ///< Map name to use for bonus game
|
||||
char *specialstage; ///< Map name to use for special stage
|
||||
UINT8 emeraldnum; ///< ID of Emerald to use for special stage (1-7 for Chaos Emeralds, 8-14 for Super Emeralds, 0 for no emerald)
|
||||
SINT8 unlockrequired; ///< An unlockable is required to select this cup. -1 for no unlocking required.
|
||||
struct cupheader_s *next; ///< Next cup in linked list
|
||||
|
|
|
|||
|
|
@ -1846,10 +1846,15 @@ static void M_DrawCupPreview(INT16 y, cupheader_t *cup)
|
|||
i = (cupgrid.previewanim / 82) % cup->numlevels;
|
||||
while (x < BASEVIDWIDTH + pad)
|
||||
{
|
||||
lumpnum_t lumpnum;
|
||||
INT32 cupLevelNum = G_MapNumber(cup->levellist[i]);
|
||||
lumpnum_t lumpnum = LUMPERROR;
|
||||
patch_t *PictureOfLevel;
|
||||
|
||||
lumpnum = W_CheckNumForName(va("%sP", G_BuildMapName(cup->levellist[i]+1)));
|
||||
if (mapheaderinfo[cupLevelNum])
|
||||
{
|
||||
lumpnum = W_CheckNumForLongName(mapheaderinfo[cupLevelNum]->thumbnailLump);
|
||||
}
|
||||
|
||||
if (lumpnum != LUMPERROR)
|
||||
PictureOfLevel = W_CachePatchNum(lumpnum, PU_CACHE);
|
||||
else
|
||||
|
|
@ -2073,14 +2078,18 @@ static void M_DrawHighLowLevelTitle(INT16 x, INT16 y, INT16 map)
|
|||
|
||||
static void M_DrawLevelSelectBlock(INT16 x, INT16 y, INT16 map, boolean redblink, boolean greyscale)
|
||||
{
|
||||
lumpnum_t lumpnum;
|
||||
lumpnum_t lumpnum = LUMPERROR;
|
||||
patch_t *PictureOfLevel;
|
||||
UINT8 *colormap = NULL;
|
||||
|
||||
if (greyscale)
|
||||
colormap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_GREY, GTC_MENUCACHE);
|
||||
|
||||
lumpnum = W_CheckNumForName(va("%sP", G_BuildMapName(map+1)));
|
||||
if (mapheaderinfo[map])
|
||||
{
|
||||
lumpnum = W_CheckNumForLongName(mapheaderinfo[map]->thumbnailLump);
|
||||
}
|
||||
|
||||
if (lumpnum != LUMPERROR)
|
||||
PictureOfLevel = W_CachePatchNum(lumpnum, PU_CACHE);
|
||||
else
|
||||
|
|
@ -2146,7 +2155,7 @@ void M_DrawTimeAttack(void)
|
|||
INT16 rightedge = 149+t+155;
|
||||
INT16 opty = 140;
|
||||
INT32 w;
|
||||
lumpnum_t lumpnum;
|
||||
lumpnum_t lumpnum = LUMPERROR;
|
||||
UINT8 i;
|
||||
consvar_t *cv;
|
||||
|
||||
|
|
@ -2158,7 +2167,11 @@ void M_DrawTimeAttack(void)
|
|||
|
||||
if (currentMenu == &PLAY_TimeAttackDef)
|
||||
{
|
||||
lumpnum = W_CheckNumForName(va("%sR", G_BuildMapName(map+1)));
|
||||
if (mapheaderinfo[map])
|
||||
{
|
||||
lumpnum = W_CheckNumForName(mapheaderinfo[map]->minimapLump);
|
||||
}
|
||||
|
||||
if (lumpnum != LUMPERROR)
|
||||
V_DrawScaledPatch(24-t, 82, 0, W_CachePatchNum(lumpnum, PU_CACHE));
|
||||
|
||||
|
|
@ -3825,7 +3838,7 @@ void M_DrawPlaybackMenu(void)
|
|||
#define SCALEDVIEWHEIGHT (vid.height/vid.dupy)
|
||||
void M_DrawReplayHutReplayInfo(void)
|
||||
{
|
||||
lumpnum_t lumpnum;
|
||||
lumpnum_t lumpnum = LUMPERROR;
|
||||
patch_t *patch;
|
||||
UINT8 *colormap;
|
||||
INT32 x, y, w, h;
|
||||
|
|
@ -3852,7 +3865,12 @@ void M_DrawReplayHutReplayInfo(void)
|
|||
|
||||
// A 160x100 image of the level as entry MAPxxP
|
||||
//CONS_Printf("%d %s\n", extrasmenu.demolist[dir_on[menudepthleft]].map, G_BuildMapName(extrasmenu.demolist[dir_on[menudepthleft]].map));
|
||||
lumpnum = W_CheckNumForName(va("%sP", G_BuildMapName(extrasmenu.demolist[dir_on[menudepthleft]].map)));
|
||||
|
||||
if (mapheaderinfo[extrasmenu.demolist[dir_on[menudepthleft]].map])
|
||||
{
|
||||
lumpnum = W_CheckNumForName(mapheaderinfo[extrasmenu.demolist[dir_on[menudepthleft]].map]->thumbnailLump);
|
||||
}
|
||||
|
||||
if (lumpnum != LUMPERROR)
|
||||
patch = W_CachePatchNum(lumpnum, PU_CACHE);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -3208,7 +3208,9 @@ boolean M_CanShowLevelInList(INT16 mapnum, UINT8 gt)
|
|||
|
||||
for (i = 0; i < levellist.selectedcup->numlevels; i++)
|
||||
{
|
||||
if (mapnum == levellist.selectedcup->levellist[i])
|
||||
const INT32 cupLevelNum = G_MapNumber(levellist.selectedcup->levellist[i]);
|
||||
|
||||
if (mapnum == cupLevelNum)
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -3414,7 +3416,7 @@ void M_CupSelectHandler(INT32 choice)
|
|||
|
||||
if (cupgrid.grandprix == true)
|
||||
{
|
||||
|
||||
INT32 levelNum;
|
||||
UINT8 ssplayers = cv_splitplayers.value-1;
|
||||
|
||||
S_StartSound(NULL, sfx_s3k63);
|
||||
|
|
@ -3458,8 +3460,10 @@ void M_CupSelectHandler(INT32 choice)
|
|||
netgame = levellist.netgame; // ^ ditto.
|
||||
}
|
||||
|
||||
levelNum = G_MapNumber(grandprixinfo.cup->levellist[0]);
|
||||
|
||||
D_MapChange(
|
||||
grandprixinfo.cup->levellist[0] + 1,
|
||||
levelNum + 1,
|
||||
GT_RACE,
|
||||
grandprixinfo.encore,
|
||||
true,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue