mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-18 15:32:10 +00:00
Merge branch 'bump-maxskins' into 'next'
Bump MAXSKINS up to 64 + fix skin overflow error See merge request KartKrew/Kart-Public!29
This commit is contained in:
commit
3597a94e3e
6 changed files with 19 additions and 42 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! ^_^
|
||||
|
|
|
@ -244,7 +244,7 @@ extern FILE *logstream;
|
|||
// NOTE: it needs more than this to increase the number of players...
|
||||
|
||||
#define MAXPLAYERS 16
|
||||
#define MAXSKINS 32
|
||||
#define MAXSKINS 64
|
||||
#define PLAYERSMASK (MAXPLAYERS-1)
|
||||
#define MAXPLAYERNAME 21
|
||||
|
||||
|
|
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
|
||||
{
|
||||
|
|
|
@ -2500,7 +2500,7 @@ void R_DrawMasked(void)
|
|||
// ==========================================================================
|
||||
|
||||
INT32 numskins = 0;
|
||||
skin_t skins[MAXSKINS+1];
|
||||
skin_t skins[MAXSKINS];
|
||||
// FIXTHIS: don't work because it must be inistilised before the config load
|
||||
//#define SKINVALUES
|
||||
#ifdef SKINVALUES
|
||||
|
@ -2771,7 +2771,7 @@ void R_AddSkins(UINT16 wadnum)
|
|||
// advance by default
|
||||
lastlump = lump + 1;
|
||||
|
||||
if (numskins > MAXSKINS)
|
||||
if (numskins >= MAXSKINS)
|
||||
{
|
||||
CONS_Debug(DBG_RENDER, "ignored skin (%d skins maximum)\n", MAXSKINS);
|
||||
continue; // so we know how many skins couldn't be added
|
||||
|
|
|
@ -192,7 +192,7 @@ typedef struct drawnode_s
|
|||
} drawnode_t;
|
||||
|
||||
extern INT32 numskins;
|
||||
extern skin_t skins[MAXSKINS + 1];
|
||||
extern skin_t skins[MAXSKINS];
|
||||
|
||||
void SetPlayerSkin(INT32 playernum,const char *skinname);
|
||||
void SetPlayerSkinByNum(INT32 playernum,INT32 skinnum); // Tails 03-16-2002
|
||||
|
|
Loading…
Reference in a new issue