mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
trivial tweaks: make stuff static, remove unused stuff, formatting...
git-svn-id: https://svn.eduke32.com/eduke32@2265 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
426ef1494e
commit
2e1e2345af
9 changed files with 41 additions and 49 deletions
|
@ -364,7 +364,6 @@ EXTERN char show2dsprite[(MAXSPRITES+7)>>3];
|
||||||
EXTERN char gotpic[(MAXTILES+7)>>3];
|
EXTERN char gotpic[(MAXTILES+7)>>3];
|
||||||
EXTERN char gotsector[(MAXSECTORS+7)>>3];
|
EXTERN char gotsector[(MAXSECTORS+7)>>3];
|
||||||
|
|
||||||
EXTERN char captureformat;
|
|
||||||
EXTERN char editorcolors[256];
|
EXTERN char editorcolors[256];
|
||||||
|
|
||||||
EXTERN int32_t faketilesiz[MAXTILES];
|
EXTERN int32_t faketilesiz[MAXTILES];
|
||||||
|
@ -373,7 +372,6 @@ EXTERN char *faketiledata[MAXTILES];
|
||||||
EXTERN char spritecol2d[MAXTILES][2];
|
EXTERN char spritecol2d[MAXTILES][2];
|
||||||
extern char vgapal16[4*256];
|
extern char vgapal16[4*256];
|
||||||
|
|
||||||
extern char vgapalette[5*256];
|
|
||||||
extern uint32_t drawlinepat;
|
extern uint32_t drawlinepat;
|
||||||
|
|
||||||
extern void faketimerhandler(void);
|
extern void faketimerhandler(void);
|
||||||
|
@ -542,7 +540,7 @@ int32_t loadpics(const char *filename, int32_t askedsize);
|
||||||
void loadtile(int16_t tilenume);
|
void loadtile(int16_t tilenume);
|
||||||
int32_t qloadkvx(int32_t voxindex, const char *filename);
|
int32_t qloadkvx(int32_t voxindex, const char *filename);
|
||||||
int32_t allocatepermanenttile(int16_t tilenume, int32_t xsiz, int32_t ysiz);
|
int32_t allocatepermanenttile(int16_t tilenume, int32_t xsiz, int32_t ysiz);
|
||||||
void copytilepiece(int32_t tilenume1, int32_t sx1, int32_t sy1, int32_t xsiz, int32_t ysiz, int32_t tilenume2, int32_t sx2, int32_t sy2);
|
//void copytilepiece(int32_t tilenume1, int32_t sx1, int32_t sy1, int32_t xsiz, int32_t ysiz, int32_t tilenume2, int32_t sx2, int32_t sy2);
|
||||||
void makepalookup(int32_t palnum, char *remapbuf, int8_t r, int8_t g, int8_t b, char dastat);
|
void makepalookup(int32_t palnum, char *remapbuf, int8_t r, int8_t g, int8_t b, char dastat);
|
||||||
//void setvgapalette(void);
|
//void setvgapalette(void);
|
||||||
void setbasepaltable(uint8_t **basepaltable, uint8_t basepalcount);
|
void setbasepaltable(uint8_t **basepaltable, uint8_t basepalcount);
|
||||||
|
|
|
@ -216,7 +216,7 @@ typedef struct { float xadd, yadd, zadd; int16_t angadd, flags, fov; } hudtyp;
|
||||||
EXTERN hudtyp hudmem[2][MAXTILES];
|
EXTERN hudtyp hudmem[2][MAXTILES];
|
||||||
|
|
||||||
EXTERN int32_t mdpause;
|
EXTERN int32_t mdpause;
|
||||||
EXTERN int32_t nummodelsalloced, nextmodelid;
|
EXTERN int32_t nextmodelid;
|
||||||
EXTERN voxmodel_t *voxmodels[MAXVOXELS];
|
EXTERN voxmodel_t *voxmodels[MAXVOXELS];
|
||||||
|
|
||||||
void voxfree(voxmodel_t *m);
|
void voxfree(voxmodel_t *m);
|
||||||
|
|
|
@ -304,23 +304,6 @@ static int32_t osdcmd_cvar_set_baselayer(const osdfuncparm_t *parm)
|
||||||
|
|
||||||
if (r != OSDCMD_OK) return r;
|
if (r != OSDCMD_OK) return r;
|
||||||
|
|
||||||
/*
|
|
||||||
if (!Bstrcasecmp(parm->name, "r_scrcaptureformat"))
|
|
||||||
{
|
|
||||||
const char *fmts[] = {"TGA", "PCX"};
|
|
||||||
if (showval) { OSD_Printf("r_scrcaptureformat is %s\n", fmts[captureformat]); }
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int32_t j;
|
|
||||||
for (j=0; j<2; j++)
|
|
||||||
if (!Bstrcasecmp(parm->parms[0], fmts[j])) break;
|
|
||||||
if (j == 2) return OSDCMD_SHOWHELP;
|
|
||||||
captureformat = j;
|
|
||||||
}
|
|
||||||
return OSDCMD_OK;
|
|
||||||
}
|
|
||||||
else */
|
|
||||||
|
|
||||||
if (!Bstrcasecmp(parm->name, "vid_gamma") || !Bstrcasecmp(parm->name, "vid_brightness") || !Bstrcasecmp(parm->name, "vid_contrast"))
|
if (!Bstrcasecmp(parm->name, "vid_gamma") || !Bstrcasecmp(parm->name, "vid_brightness") || !Bstrcasecmp(parm->name, "vid_contrast"))
|
||||||
{
|
{
|
||||||
setbrightness(GAMMA_CALC,0,0);
|
setbrightness(GAMMA_CALC,0,0);
|
||||||
|
@ -341,7 +324,6 @@ int32_t baselayer_init(void)
|
||||||
{ "r_screenaspect","r_screenaspect: if using the new aspect code and in fullscreen, screen aspect ratio in the form XXYY, e.g. 1609 for 16:9",(void *) &r_screenxy, CVAR_UINT, 100, 9999 },
|
{ "r_screenaspect","r_screenaspect: if using the new aspect code and in fullscreen, screen aspect ratio in the form XXYY, e.g. 1609 for 16:9",(void *) &r_screenxy, CVAR_UINT, 100, 9999 },
|
||||||
{ "r_novoxmips","r_novoxmips: turn off/on the use of mipmaps when rendering 8-bit voxels",(void *) &novoxmips, CVAR_BOOL, 0, 1 },
|
{ "r_novoxmips","r_novoxmips: turn off/on the use of mipmaps when rendering 8-bit voxels",(void *) &novoxmips, CVAR_BOOL, 0, 1 },
|
||||||
{ "r_voxels","r_voxels: enable/disable automatic sprite->voxel rendering",(void *) &usevoxels, CVAR_BOOL, 0, 1 },
|
{ "r_voxels","r_voxels: enable/disable automatic sprite->voxel rendering",(void *) &usevoxels, CVAR_BOOL, 0, 1 },
|
||||||
/* { "r_scrcaptureformat","r_scrcaptureformat: sets the output format for screenshots (TGA or PCX)",osdcmd_vars, CVAR_FUNCPTR, 0, 0 },*/
|
|
||||||
#ifdef YAX_ENABLE
|
#ifdef YAX_ENABLE
|
||||||
{ "r_tror_nomaskpass", "r_tror_nomaskpass: enable/disable additional pass in TROR software rendering", (void *)&r_tror_nomaskpass, CVAR_BOOL, 0, 1 },
|
{ "r_tror_nomaskpass", "r_tror_nomaskpass: enable/disable additional pass in TROR software rendering", (void *)&r_tror_nomaskpass, CVAR_BOOL, 0, 1 },
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -307,8 +307,8 @@ int32_t m32_numdebuglines=0;
|
||||||
|
|
||||||
static void M32_drawdebug(void)
|
static void M32_drawdebug(void)
|
||||||
{
|
{
|
||||||
int i;
|
int32_t i;
|
||||||
int x=4, y=8;
|
int32_t x=4, y=8;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
{
|
{
|
||||||
|
|
|
@ -7821,7 +7821,7 @@ int32_t initengine(void)
|
||||||
|
|
||||||
searchit = 0; searchstat = -1;
|
searchit = 0; searchstat = -1;
|
||||||
|
|
||||||
for (i=0; i<MAXPALOOKUPS; i++) palookup[i] = NULL;
|
// for (i=0; i<MAXPALOOKUPS; i++) palookup[i] = NULL;
|
||||||
/*
|
/*
|
||||||
clearbuf(&waloff[0],(int32_t)MAXTILES,0L);
|
clearbuf(&waloff[0],(int32_t)MAXTILES,0L);
|
||||||
|
|
||||||
|
@ -7835,8 +7835,6 @@ int32_t initengine(void)
|
||||||
visibility = 512;
|
visibility = 512;
|
||||||
parallaxvisibility = 512;
|
parallaxvisibility = 512;
|
||||||
|
|
||||||
captureformat = 0;
|
|
||||||
|
|
||||||
loadpalette();
|
loadpalette();
|
||||||
#ifdef USE_OPENGL
|
#ifdef USE_OPENGL
|
||||||
if (!hicfirstinit) hicinit();
|
if (!hicfirstinit) hicinit();
|
||||||
|
@ -10397,7 +10395,7 @@ int32_t allocatepermanenttile(int16_t tilenume, int32_t xsiz, int32_t ysiz)
|
||||||
return(waloff[tilenume]);
|
return(waloff[tilenume]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
//
|
//
|
||||||
// copytilepiece
|
// copytilepiece
|
||||||
//
|
//
|
||||||
|
@ -10437,7 +10435,7 @@ void copytilepiece(int32_t tilenume1, int32_t sx1, int32_t sy1, int32_t xsiz, in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// qloadkvx
|
// qloadkvx
|
||||||
|
|
|
@ -36,17 +36,31 @@ static void QuitOnFatalError(const char *msg)
|
||||||
|
|
||||||
static int32_t addtileP(int32_t model,int32_t tile,int32_t pallet)
|
static int32_t addtileP(int32_t model,int32_t tile,int32_t pallet)
|
||||||
{
|
{
|
||||||
|
// tile >= 0 && tile < MAXTILES
|
||||||
|
|
||||||
UNREFERENCED_PARAMETER(model);
|
UNREFERENCED_PARAMETER(model);
|
||||||
if (curextra==MAXTILES+EXTRATILES-2)return curextra;
|
if (curextra==MAXTILES+EXTRATILES-1)
|
||||||
if (tile2model[tile].modelid==-1) {tile2model[tile].pal=pallet; return tile;}
|
return curextra;
|
||||||
if (tile2model[tile].pal==pallet)return tile;
|
|
||||||
|
if (tile2model[tile].modelid==-1)
|
||||||
|
{
|
||||||
|
tile2model[tile].pal=pallet;
|
||||||
|
return tile;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tile2model[tile].pal==pallet)
|
||||||
|
return tile;
|
||||||
|
|
||||||
while (tile2model[tile].next!=-1)
|
while (tile2model[tile].next!=-1)
|
||||||
{
|
{
|
||||||
tile=tile2model[tile].next;
|
tile=tile2model[tile].next;
|
||||||
if (tile2model[tile].pal==pallet)return tile;
|
if (tile2model[tile].pal==pallet)
|
||||||
|
return tile;
|
||||||
}
|
}
|
||||||
|
|
||||||
tile2model[tile].next=curextra;
|
tile2model[tile].next=curextra;
|
||||||
tile2model[curextra].pal=pallet;
|
tile2model[curextra].pal=pallet;
|
||||||
|
|
||||||
return curextra++;
|
return curextra++;
|
||||||
}
|
}
|
||||||
int32_t Ptile2tile(int32_t tile,int32_t pallet)
|
int32_t Ptile2tile(int32_t tile,int32_t pallet)
|
||||||
|
@ -63,7 +77,8 @@ int32_t mdinited=0;
|
||||||
int32_t mdpause=0;
|
int32_t mdpause=0;
|
||||||
|
|
||||||
#define MODELALLOCGROUP 256
|
#define MODELALLOCGROUP 256
|
||||||
int32_t nummodelsalloced = 0, nextmodelid = 0;
|
static int32_t nummodelsalloced = 0;
|
||||||
|
int32_t nextmodelid = 0;
|
||||||
|
|
||||||
static int32_t maxmodelverts = 0, allocmodelverts = 0;
|
static int32_t maxmodelverts = 0, allocmodelverts = 0;
|
||||||
static int32_t maxmodeltris = 0, allocmodeltris = 0;
|
static int32_t maxmodeltris = 0, allocmodeltris = 0;
|
||||||
|
|
|
@ -1947,7 +1947,7 @@ void fadepal(int32_t r, int32_t g, int32_t b, int32_t start, int32_t end, int32_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void fadepaltile(int32_t r, int32_t g, int32_t b, int32_t start, int32_t end, int32_t step, int32_t tile)
|
static void fadepaltile(int32_t r, int32_t g, int32_t b, int32_t start, int32_t end, int32_t step, int32_t tile)
|
||||||
{
|
{
|
||||||
if (step > 0)
|
if (step > 0)
|
||||||
{
|
{
|
||||||
|
@ -3171,9 +3171,9 @@ static int32_t ror_sprite = -1;
|
||||||
extern float r_ambientlight;
|
extern float r_ambientlight;
|
||||||
|
|
||||||
char ror_protectedsectors[MAXSECTORS];
|
char ror_protectedsectors[MAXSECTORS];
|
||||||
int32_t drawing_ror = 0;
|
static int32_t drawing_ror = 0;
|
||||||
|
|
||||||
void G_SE40(int32_t smoothratio)
|
static void G_SE40(int32_t smoothratio)
|
||||||
{
|
{
|
||||||
if (ror_sprite != -1)
|
if (ror_sprite != -1)
|
||||||
{
|
{
|
||||||
|
@ -6802,7 +6802,7 @@ enum cheatindex_t
|
||||||
CHEAT_COMEGETSOME,
|
CHEAT_COMEGETSOME,
|
||||||
};
|
};
|
||||||
|
|
||||||
void G_CheatGetInv(void)
|
static void G_CheatGetInv(void)
|
||||||
{
|
{
|
||||||
Gv_SetVar(g_iReturnVarID, 400, g_player[myconnectindex].ps->i, myconnectindex);
|
Gv_SetVar(g_iReturnVarID, 400, g_player[myconnectindex].ps->i, myconnectindex);
|
||||||
VM_OnEvent(EVENT_CHEATGETSTEROIDS, g_player[myconnectindex].ps->i, myconnectindex, -1);
|
VM_OnEvent(EVENT_CHEATGETSTEROIDS, g_player[myconnectindex].ps->i, myconnectindex, -1);
|
||||||
|
@ -6869,7 +6869,7 @@ void G_CheatGetInv(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int8_t cheatbuf[MAXCHEATLEN],cheatbuflen;
|
static int8_t cheatbuf[MAXCHEATLEN], cheatbuflen;
|
||||||
|
|
||||||
GAME_STATIC void G_DoCheats(void)
|
GAME_STATIC void G_DoCheats(void)
|
||||||
{
|
{
|
||||||
|
@ -9702,7 +9702,7 @@ void G_BackToMenu(void)
|
||||||
wm_setapptitle(tempbuf);
|
wm_setapptitle(tempbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t G_EndOfLevel(void)
|
static int32_t G_EndOfLevel(void)
|
||||||
{
|
{
|
||||||
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0);
|
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0);
|
||||||
P_UpdateScreenPal(g_player[myconnectindex].ps);
|
P_UpdateScreenPal(g_player[myconnectindex].ps);
|
||||||
|
|
|
@ -202,7 +202,7 @@ extern int32_t althud_numberpal;
|
||||||
extern int32_t althud_numbertile;
|
extern int32_t althud_numbertile;
|
||||||
extern int32_t althud_shadows;
|
extern int32_t althud_shadows;
|
||||||
extern int32_t cacnum;
|
extern int32_t cacnum;
|
||||||
extern int32_t drawing_ror;
|
//extern int32_t drawing_ror;
|
||||||
extern int32_t g_Shareware;
|
extern int32_t g_Shareware;
|
||||||
extern int32_t g_cameraClock;
|
extern int32_t g_cameraClock;
|
||||||
extern int32_t g_cameraDistance;
|
extern int32_t g_cameraDistance;
|
||||||
|
@ -228,7 +228,7 @@ extern int32_t ticrandomseed;
|
||||||
extern int32_t vote_map;
|
extern int32_t vote_map;
|
||||||
extern int32_t voting;
|
extern int32_t voting;
|
||||||
|
|
||||||
extern int8_t cheatbuf[MAXCHEATLEN],cheatbuflen;
|
//extern int8_t cheatbuf[MAXCHEATLEN],cheatbuflen;
|
||||||
|
|
||||||
extern palette_t CrosshairColors;
|
extern palette_t CrosshairColors;
|
||||||
extern palette_t DefaultCrosshairColors;
|
extern palette_t DefaultCrosshairColors;
|
||||||
|
@ -246,7 +246,7 @@ int32_t A_CheckInventorySprite(spritetype *s);
|
||||||
int32_t A_InsertSprite(int32_t whatsect,int32_t s_x,int32_t s_y,int32_t s_z,int32_t s_pn,int32_t s_s,int32_t s_xr,int32_t s_yr,int32_t s_a,int32_t s_ve,int32_t s_zv,int32_t s_ow,int32_t s_ss);
|
int32_t A_InsertSprite(int32_t whatsect,int32_t s_x,int32_t s_y,int32_t s_z,int32_t s_pn,int32_t s_s,int32_t s_xr,int32_t s_yr,int32_t s_a,int32_t s_ve,int32_t s_zv,int32_t s_ow,int32_t s_ss);
|
||||||
int32_t A_Spawn(int32_t j,int32_t pn);
|
int32_t A_Spawn(int32_t j,int32_t pn);
|
||||||
int32_t G_DoMoveThings(void);
|
int32_t G_DoMoveThings(void);
|
||||||
int32_t G_EndOfLevel(void);
|
//int32_t G_EndOfLevel(void);
|
||||||
int32_t G_GameTextLen(int32_t x,const char *t);
|
int32_t G_GameTextLen(int32_t x,const char *t);
|
||||||
int32_t G_PrintGameText(int32_t f,int32_t tile,int32_t x,int32_t y,const char *t,int32_t s,int32_t p,int32_t o,int32_t x1,int32_t y1,int32_t x2,int32_t y2,int32_t z);
|
int32_t G_PrintGameText(int32_t f,int32_t tile,int32_t x,int32_t y,const char *t,int32_t s,int32_t p,int32_t o,int32_t x1,int32_t y1,int32_t x2,int32_t y2,int32_t z);
|
||||||
int32_t GetTime(void);
|
int32_t GetTime(void);
|
||||||
|
@ -270,7 +270,7 @@ void A_SpawnWallGlass(int32_t i,int32_t wallnum,int32_t n);
|
||||||
void G_AddUserQuote(const char *daquote);
|
void G_AddUserQuote(const char *daquote);
|
||||||
void G_BackToMenu(void);
|
void G_BackToMenu(void);
|
||||||
void G_BonusScreen(int32_t bonusonly);
|
void G_BonusScreen(int32_t bonusonly);
|
||||||
void G_CheatGetInv(void);
|
//void G_CheatGetInv(void);
|
||||||
void G_DisplayRest(int32_t smoothratio);
|
void G_DisplayRest(int32_t smoothratio);
|
||||||
void G_DoSpriteAnimations(int32_t x,int32_t y,int32_t a,int32_t smoothratio);
|
void G_DoSpriteAnimations(int32_t x,int32_t y,int32_t a,int32_t smoothratio);
|
||||||
void G_DrawBackground(void);
|
void G_DrawBackground(void);
|
||||||
|
@ -289,7 +289,7 @@ void G_GetCrosshairColor(void);
|
||||||
void G_HandleLocalKeys(void);
|
void G_HandleLocalKeys(void);
|
||||||
void G_HandleSpecialKeys(void);
|
void G_HandleSpecialKeys(void);
|
||||||
void G_PrintGameQuotes(void);
|
void G_PrintGameQuotes(void);
|
||||||
void G_SE40(int32_t smoothratio);
|
//void G_SE40(int32_t smoothratio);
|
||||||
#ifdef YAX_ENABLE
|
#ifdef YAX_ENABLE
|
||||||
void G_AnalyzeSprites(void);
|
void G_AnalyzeSprites(void);
|
||||||
#endif
|
#endif
|
||||||
|
@ -303,8 +303,7 @@ void P_SetGamePalette(DukePlayer_t *player,uint8_t palid,int32_t set);
|
||||||
int32_t app_main(int32_t argc,const char **argv);
|
int32_t app_main(int32_t argc,const char **argv);
|
||||||
void computergetinput(int32_t snum,input_t *syn);
|
void computergetinput(int32_t snum,input_t *syn);
|
||||||
void fadepal(int32_t r,int32_t g,int32_t b,int32_t start,int32_t end,int32_t step);
|
void fadepal(int32_t r,int32_t g,int32_t b,int32_t start,int32_t end,int32_t step);
|
||||||
void fadepaltile(int32_t r,int32_t g,int32_t b,int32_t start,int32_t end,int32_t step,int32_t tile);
|
//void fadepaltile(int32_t r,int32_t g,int32_t b,int32_t start,int32_t end,int32_t step,int32_t tile);
|
||||||
void sendscore(const char *s);
|
|
||||||
|
|
||||||
static inline int32_t G_GetTeamPalette(int32_t team)
|
static inline int32_t G_GetTeamPalette(int32_t team)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1918,7 +1918,7 @@ static int32_t C_ParseCommand(void)
|
||||||
|
|
||||||
if (nsize == osize)
|
if (nsize == osize)
|
||||||
{
|
{
|
||||||
int ii, equal=2, linedif = 0, ow, nw;
|
int32_t ii, equal=2, linedif = 0, ow, nw;
|
||||||
|
|
||||||
for (ii=0; ii<nsize; ii++)
|
for (ii=0; ii<nsize; ii++)
|
||||||
{
|
{
|
||||||
|
@ -2129,7 +2129,7 @@ static int32_t C_ParseCommand(void)
|
||||||
|
|
||||||
if (osize == nsize)
|
if (osize == nsize)
|
||||||
{
|
{
|
||||||
int ii, equal=2, linedif=0, nw, ow;
|
int32_t ii, equal=2, linedif=0, nw, ow;
|
||||||
|
|
||||||
for (ii=0; ii<nsize; ii++)
|
for (ii=0; ii<nsize; ii++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue