mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-18 15:32:10 +00:00
Update the (unused) SP menu stuff to use MAXSKINS
This commit is contained in:
parent
6ba69e9002
commit
105958d29f
3 changed files with 15 additions and 38 deletions
|
@ -436,11 +436,11 @@ static void readAnimTex(MYFILE *f, INT32 num)
|
|||
static boolean findFreeSlot(INT32 *num)
|
||||
{
|
||||
// Send the character select entry to a free slot.
|
||||
while (*num < 32 && PlayerMenu[*num].status != IT_DISABLED)
|
||||
while (*num < MAXSKINS && PlayerMenu[*num].status != IT_DISABLED)
|
||||
*num = *num+1;
|
||||
|
||||
// No more free slots. :(
|
||||
if (*num >= 32)
|
||||
if (*num >= MAXSKINS)
|
||||
return false;
|
||||
|
||||
// Found one! ^_^
|
||||
|
|
47
src/m_menu.c
47
src/m_menu.c
|
@ -911,41 +911,7 @@ static menuitem_t SP_LevelStatsMenu[] =
|
|||
// External files modify this menu, so we can't call it static.
|
||||
// And I'm too lazy to go through and rename it everywhere. ARRGH!
|
||||
#define M_ChoosePlayer NULL
|
||||
menuitem_t PlayerMenu[32] =
|
||||
{
|
||||
{IT_CALL, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
|
||||
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0}
|
||||
};
|
||||
menuitem_t PlayerMenu[MAXSKINS];
|
||||
|
||||
// -----------------------------------
|
||||
// Multiplayer and all of its submenus
|
||||
|
@ -3188,6 +3154,8 @@ void M_Ticker(void)
|
|||
//
|
||||
void M_Init(void)
|
||||
{
|
||||
UINT8 i;
|
||||
|
||||
COM_AddCommand("manual", Command_Manual_f);
|
||||
|
||||
CV_RegisterVar(&cv_nextmap);
|
||||
|
@ -3235,6 +3203,15 @@ void M_Init(void)
|
|||
quitmsg[QUIT3MSG5] = M_GetText("You'll be back to play soon, though...\n...right?\n\n(Press 'Y' to quit)");
|
||||
quitmsg[QUIT3MSG6] = M_GetText("Aww, is Eggman's Nightclub too\ndifficult for you?\n\n(Press 'Y' to quit)");
|
||||
|
||||
// Setup PlayerMenu table
|
||||
for (i = 0; i < MAXSKINS; i++)
|
||||
{
|
||||
PlayerMenu[i].status = (i == 0 ? IT_CALL : IT_DISABLED);
|
||||
PlayerMenu[i].patch = PlayerMenu[i].text = NULL;
|
||||
PlayerMenu[i].itemaction = M_ChoosePlayer;
|
||||
PlayerMenu[i].alphaKey = 0;
|
||||
}
|
||||
|
||||
#ifdef HWRENDER
|
||||
// Permanently hide some options based on render mode
|
||||
if (rendermode == render_soft)
|
||||
|
|
|
@ -150,7 +150,7 @@ typedef struct menuitem_s
|
|||
UINT8 alphaKey;
|
||||
} menuitem_t;
|
||||
|
||||
extern menuitem_t PlayerMenu[32];
|
||||
extern menuitem_t PlayerMenu[MAXSKINS];
|
||||
|
||||
typedef struct menu_s
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue