limit localskins to 32
hope this doesent just die lol
This commit is contained in:
1 parent
212b184320
commit
20cdb1c5ec
8 files changed
+31
-22
No files matched your search
@@ -206,6 +206,7 @@ extern char logfilename[1024];
|
||||
|
||||
#define MAXPLAYERS 16
|
||||
#define MAXSKINS 255
|
||||
#define MAXLOCALSKINS 32
|
||||
#define PLAYERSMASK (MAXPLAYERS-1)
|
||||
#define MAXPLAYERNAME 21
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
md2_t md2_models[NUMSPRITES];
|
||||
md2_t md2_playermodels[MAXSKINS];
|
||||
md2_t md2_localplayermodels[MAXSKINS];
|
||||
md2_t md2_localplayermodels[MAXLOCALSKINS];
|
||||
|
||||
|
||||
/*
|
||||
@@ -494,7 +494,9 @@ void HWR_InitMD2(void)
|
||||
md2_playermodels[s].skin = -1;
|
||||
md2_playermodels[s].notfound = true;
|
||||
md2_playermodels[s].error = false;
|
||||
|
||||
}
|
||||
for (s = 0; s < MAXLOCALSKINS; s++)
|
||||
{
|
||||
md2_localplayermodels[s].scale = -1.0f;
|
||||
md2_localplayermodels[s].model = NULL;
|
||||
md2_localplayermodels[s].grpatch = NULL;
|
||||
|
||||
@@ -37,7 +37,7 @@ typedef struct
|
||||
|
||||
extern md2_t md2_models[NUMSPRITES];
|
||||
extern md2_t md2_playermodels[MAXSKINS];
|
||||
extern md2_t md2_localplayermodels[MAXSKINS];
|
||||
extern md2_t md2_localplayermodels[MAXLOCALSKINS];
|
||||
|
||||
void HWR_InitMD2(void);
|
||||
void HWR_DrawMD2(gr_vissprite_t *spr);
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ INT32 *tiltlighting;
|
||||
#define NUM_PALETTE_ENTRIES 256
|
||||
|
||||
static UINT8** translationtablecache[TT_CACHE_SIZE] = {NULL};
|
||||
static UINT8** localtranslationtablecache[MAXSKINS] = {NULL};
|
||||
static UINT8** localtranslationtablecache[MAXLOCALSKINS] = {NULL};
|
||||
|
||||
|
||||
// See also the enum skincolors_t
|
||||
|
||||
+10
-4
@@ -2960,14 +2960,14 @@ UINT8 skinstatscount[9][9] = {
|
||||
{0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
UINT8 skinsorted[MAXSKINS];
|
||||
skin_t localskins[MAXSKINS];
|
||||
skin_t allskins[MAXSKINS*2];
|
||||
skin_t localskins[MAXLOCALSKINS];
|
||||
skin_t allskins[MAXSKINS+MAXLOCALSKINS];
|
||||
|
||||
// FIXTHIS: don't work because it must be inistilised before the config load
|
||||
//#define SKINVALUES
|
||||
#ifdef SKINVALUES
|
||||
CV_PossibleValue_t skin_cons_t[MAXSKINS+1];
|
||||
CV_PossibleValue_t localskin_cons_t[MAXSKINS+1];
|
||||
CV_PossibleValue_t localskin_cons_t[MAXLOCALSKINS+1];
|
||||
#endif
|
||||
|
||||
static void Sk_SetDefaultValue(skin_t *skin, boolean local)
|
||||
@@ -3407,11 +3407,17 @@ void R_AddSkins(UINT16 wadnum, boolean local)
|
||||
// advance by default
|
||||
lastlump = lump + 1;
|
||||
|
||||
if (( (local) ? numlocalskins : numskins ) >= MAXSKINS)
|
||||
if (numskins >= MAXSKINS)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Unable to add skin, too many characters are loaded (%d maximum)\n"), MAXSKINS);
|
||||
continue; // so we know how many skins couldn't be added
|
||||
}
|
||||
if (numlocalskins >= MAXLOCALSKINS)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Unable to add localskin, too many localskins are loaded (%d maximum)\n"), MAXLOCALSKINS);
|
||||
continue; // so we know how many skins couldn't be added
|
||||
}
|
||||
|
||||
buf = W_CacheLumpNumPwad(wadnum, lump, PU_CACHE);
|
||||
size = W_LumpLengthPwad(wadnum, lump);
|
||||
|
||||
|
||||
+2
-2
@@ -221,8 +221,8 @@ extern UINT8 skinstatscount[9][9];
|
||||
extern UINT8 skinsorted[MAXSKINS];
|
||||
|
||||
void sortSkinGrid(void);
|
||||
extern skin_t localskins[MAXSKINS];
|
||||
extern skin_t allskins[MAXSKINS*2];
|
||||
extern skin_t localskins[MAXLOCALSKINS];
|
||||
extern skin_t allskins[MAXSKINS+MAXLOCALSKINS];
|
||||
|
||||
boolean SetPlayerSkin(INT32 playernum,const char *skinname);
|
||||
void SetPlayerSkinByNum(INT32 playernum,INT32 skinnum); // Tails 03-16-2002
|
||||
|
||||
+6
-6
@@ -56,17 +56,17 @@ patch_t *facerankprefix[MAXSKINS]; // ranking
|
||||
patch_t *facewantprefix[MAXSKINS]; // wanted
|
||||
patch_t *facemmapprefix[MAXSKINS]; // minimap
|
||||
|
||||
patch_t *localfacerankprefix[MAXSKINS]; // ranking
|
||||
patch_t *localfacewantprefix[MAXSKINS]; // wanted
|
||||
patch_t *localfacemmapprefix[MAXSKINS]; // minimap
|
||||
patch_t *localfacerankprefix[MAXLOCALSKINS]; // ranking
|
||||
patch_t *localfacewantprefix[MAXLOCALSKINS]; // wanted
|
||||
patch_t *localfacemmapprefix[MAXLOCALSKINS]; // minimap
|
||||
|
||||
char *facerankprefix_name[MAXSKINS]; // ranking
|
||||
char *facewantprefix_name[MAXSKINS]; // wanted
|
||||
char *facemmapprefix_name[MAXSKINS]; // minimap
|
||||
|
||||
char *localfacerankprefix_name[MAXSKINS]; // ranking
|
||||
char *localfacewantprefix_name[MAXSKINS]; // wanted
|
||||
char *localfacemmapprefix_name[MAXSKINS]; // minimap
|
||||
char *localfacerankprefix_name[MAXLOCALSKINS]; // ranking
|
||||
char *localfacewantprefix_name[MAXLOCALSKINS]; // wanted
|
||||
char *localfacemmapprefix_name[MAXLOCALSKINS]; // minimap
|
||||
|
||||
// ------------------------------------------
|
||||
// status bar overlay
|
||||
|
||||
+6
-6
@@ -78,15 +78,15 @@ extern patch_t *sboperiod;
|
||||
extern patch_t *facerankprefix[MAXSKINS]; // ranking
|
||||
extern patch_t *facewantprefix[MAXSKINS]; // wanted
|
||||
extern patch_t *facemmapprefix[MAXSKINS]; // minimap
|
||||
extern patch_t *localfacerankprefix[MAXSKINS]; // ranking
|
||||
extern patch_t *localfacewantprefix[MAXSKINS]; // wanted
|
||||
extern patch_t *localfacemmapprefix[MAXSKINS]; // minimap
|
||||
extern patch_t *localfacerankprefix[MAXLOCALSKINS]; // ranking
|
||||
extern patch_t *localfacewantprefix[MAXLOCALSKINS]; // wanted
|
||||
extern patch_t *localfacemmapprefix[MAXLOCALSKINS]; // minimap
|
||||
extern char *facerankprefix_name[MAXSKINS]; // ranking
|
||||
extern char *facewantprefix_name[MAXSKINS]; // wanted
|
||||
extern char *facemmapprefix_name[MAXSKINS]; // minimap
|
||||
extern char *localfacerankprefix_name[MAXSKINS]; // ranking
|
||||
extern char *localfacewantprefix_name[MAXSKINS]; // wanted
|
||||
extern char *localfacemmapprefix_name[MAXSKINS]; // minimap
|
||||
extern char *localfacerankprefix_name[MAXLOCALSKINS]; // ranking
|
||||
extern char *localfacewantprefix_name[MAXLOCALSKINS]; // wanted
|
||||
extern char *localfacemmapprefix_name[MAXLOCALSKINS]; // minimap
|
||||
extern patch_t *livesback;
|
||||
extern patch_t *ngradeletters[7];
|
||||
|
||||
|
||||
Reference in new issue
Block a user