"using osdcmdptr_t = osdfuncparm_t const * const" because I'm tired of seeing it everywhere

git-svn-id: https://svn.eduke32.com/eduke32@7154 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-11-18 18:06:15 +00:00
parent ff410796a1
commit f7fac7d9e0
9 changed files with 94 additions and 92 deletions

View file

@ -86,8 +86,8 @@ extern float g_videoGamma, g_videoContrast, g_videoBrightness;
#define GAMMA_CALC ((int32_t)(min(max((float)((g_videoGamma - 1.0f) * 10.0f), 0.f), 15.f)))
#ifdef USE_OPENGL
extern int32_t (*baselayer_osdcmd_vidmode_func)(osdfuncparm_t const * const parm);
extern int osdcmd_glinfo(osdfuncparm_t const * parm);
extern int32_t (*baselayer_osdcmd_vidmode_func)(osdcmdptr_t parm);
extern int osdcmd_glinfo(osdcmdptr_t parm);
struct glinfo_t {
const char *vendor;

View file

@ -18,6 +18,8 @@ typedef struct {
const char *raw;
} osdfuncparm_t;
using osdcmdptr_t = osdfuncparm_t const * const;
const char *OSD_StripColors(char *outBuf, const char *inBuf);
#define OSDDEFAULTMAXLINES 128
@ -56,7 +58,7 @@ typedef struct _symbol
struct _symbol *next;
const char *help;
int32_t(*func)(osdfuncparm_t const * const);
int32_t(*func)(osdcmdptr_t);
} osdsymbol_t;
typedef struct
@ -201,8 +203,8 @@ enum osdflags_t
OSD_PROTECTED = 0x00000080,
};
#define OSD_ALIAS (int32_t (*)(const osdfuncparm_t*))0x1337
#define OSD_UNALIASED (int32_t (*)(const osdfuncparm_t*))0xDEAD
#define OSD_ALIAS (int32_t (*)(osdcmdptr_t))0x1337
#define OSD_UNALIASED (int32_t (*)(osdcmdptr_t))0xDEAD
#define OSDCMD_OK 0
#define OSDCMD_SHOWHELP 1
@ -284,10 +286,10 @@ void OSD_Dispatch(const char *cmd);
// name = name of the function
// help = a short help string
// func = the entry point to the function
int OSD_RegisterFunction(const char *pszName, const char *pszDesc, int32_t (*func)(const osdfuncparm_t *));
int OSD_RegisterFunction(const char *pszName, const char *pszDesc, int32_t (*func)(osdcmdptr_t));
int osdcmd_cvar_set(osdfuncparm_t const * parm);
void OSD_RegisterCvar(osdcvardata_t * cvar, int32_t (*func)(osdfuncparm_t const * const));
int osdcmd_cvar_set(osdcmdptr_t parm);
void OSD_RegisterCvar(osdcvardata_t * cvar, int32_t (*func)(osdcmdptr_t));
void OSD_WriteAliases(FILE *fp);
void OSD_WriteCvars(FILE *fp);
@ -297,7 +299,7 @@ static inline void OSD_SetHistory(int32_t histIdx, const char *src)
Bstrncpyz(osd->history.buf[histIdx], src, OSDEDITLENGTH);
}
extern int osdcmd_restartvid(osdfuncparm_t const * parm);
extern int osdcmd_restartvid(osdcmdptr_t parm);
extern void M32RunScript(const char *s);

View file

@ -282,9 +282,9 @@ struct glinfo_t glinfo =
};
// Used to register the game's / editor's osdcmd_vidmode() functions here.
int32_t (*baselayer_osdcmd_vidmode_func)(osdfuncparm_t const * const parm);
int32_t (*baselayer_osdcmd_vidmode_func)(osdcmdptr_t parm);
static int osdfunc_setrendermode(osdfuncparm_t const * const parm)
static int osdfunc_setrendermode(osdcmdptr_t parm)
{
if (parm->numparms != 1)
return OSDCMD_SHOWHELP;
@ -348,7 +348,7 @@ static int osdfunc_setrendermode(osdfuncparm_t const * const parm)
}
#ifdef DEBUGGINGAIDS
static int osdcmd_hicsetpalettetint(osdfuncparm_t const * const parm)
static int osdcmd_hicsetpalettetint(osdcmdptr_t parm)
{
int32_t parms[8];
@ -367,7 +367,7 @@ static int osdcmd_hicsetpalettetint(osdfuncparm_t const * const parm)
}
#endif
int osdcmd_glinfo(osdfuncparm_t const * const UNUSED(parm))
int osdcmd_glinfo(osdcmdptr_t UNUSED(parm))
{
UNREFERENCED_CONST_PARAMETER(parm);
@ -419,7 +419,7 @@ int osdcmd_glinfo(osdfuncparm_t const * const UNUSED(parm))
}
#endif
static int osdcmd_cvar_set_baselayer(osdfuncparm_t const * const parm)
static int osdcmd_cvar_set_baselayer(osdcmdptr_t parm)
{
int32_t r = osdcmd_cvar_set(parm);

View file

@ -273,7 +273,7 @@ void clearkeys(void)
}
#ifdef USE_OPENGL
int osdcmd_restartvid(osdfuncparm_t const * const UNUSED(parm))
int osdcmd_restartvid(osdcmdptr_t UNUSED(parm))
{
UNREFERENCED_CONST_PARAMETER(parm);
@ -287,7 +287,7 @@ int osdcmd_restartvid(osdfuncparm_t const * const UNUSED(parm))
}
#endif
static int osdcmd_vidmode(osdfuncparm_t const * const parm)
static int osdcmd_vidmode(osdcmdptr_t parm)
{
int32_t newx = xres, newy = yres, newbpp = bpp, newfullscreen = fullscreen;
#ifdef USE_OPENGL

View file

@ -65,7 +65,7 @@ static int32_t (*_getrowheight)(int32_t) = _internal_getrowheight;
static hashtable_t h_cvars = { OSDMAXSYMBOLS >> 1, NULL };
bool m32_osd_tryscript = false; // whether to try executing m32script on unkown command in the osd
void OSD_RegisterCvar(osdcvardata_t * const cvar, int (*func)(osdfuncparm_t const * const))
void OSD_RegisterCvar(osdcvardata_t * const cvar, int (*func)(osdcmdptr_t))
{
if (!osd)
OSD_Init();
@ -249,7 +249,7 @@ void OSD_SetTextMode(int32_t mode)
OSD_ResizeDisplay(xdim, ydim);
}
static int osdfunc_exec(osdfuncparm_t const * const parm)
static int osdfunc_exec(osdcmdptr_t parm)
{
if (parm->numparms != 1)
return OSDCMD_SHOWHELP;
@ -260,14 +260,14 @@ static int osdfunc_exec(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdfunc_echo(osdfuncparm_t const * const parm)
static int osdfunc_echo(osdcmdptr_t parm)
{
OSD_Printf("%s\n", parm->raw + 5);
return OSDCMD_OK;
}
static int osdfunc_fileinfo(osdfuncparm_t const * const parm)
static int osdfunc_fileinfo(osdcmdptr_t parm)
{
if (parm->numparms != 1) return OSDCMD_SHOWHELP;
@ -412,7 +412,7 @@ static void _internal_onshowosd(int32_t a)
////////////////////////////
static int osdfunc_alias(osdfuncparm_t const * const parm)
static int osdfunc_alias(osdcmdptr_t parm)
{
osdsymbol_t *i;
@ -459,7 +459,7 @@ static int osdfunc_alias(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdfunc_unalias(osdfuncparm_t const * const parm)
static int osdfunc_unalias(osdcmdptr_t parm)
{
if (parm->numparms < 1)
return OSDCMD_SHOWHELP;
@ -487,7 +487,7 @@ static int osdfunc_unalias(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdfunc_listsymbols(osdfuncparm_t const * const parm)
static int osdfunc_listsymbols(osdcmdptr_t parm)
{
if (parm->numparms > 1)
return OSDCMD_SHOWHELP;
@ -545,7 +545,7 @@ static int osdfunc_listsymbols(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdfunc_help(osdfuncparm_t const * const parm)
static int osdfunc_help(osdcmdptr_t parm)
{
osdsymbol_t *symb;
@ -562,7 +562,7 @@ static int osdfunc_help(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdfunc_clear(osdfuncparm_t const * const UNUSED(parm))
static int osdfunc_clear(osdcmdptr_t UNUSED(parm))
{
UNREFERENCED_CONST_PARAMETER(parm);
@ -575,7 +575,7 @@ static int osdfunc_clear(osdfuncparm_t const * const UNUSED(parm))
return OSDCMD_OK;
}
static int osdfunc_history(osdfuncparm_t const * const UNUSED(parm))
static int osdfunc_history(osdcmdptr_t UNUSED(parm))
{
int32_t j = 0;
osdhist_t *h = &osd->history;
@ -620,7 +620,7 @@ void OSD_Cleanup(void)
}
static int osdcmd_cvar_set_osd(osdfuncparm_t const * const parm)
static int osdcmd_cvar_set_osd(osdcmdptr_t parm)
{
int const r = osdcmd_cvar_set(parm);
@ -646,7 +646,7 @@ static int osdcmd_cvar_set_osd(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdfunc_toggle(osdfuncparm_t const * const parm)
static int osdfunc_toggle(osdcmdptr_t parm)
{
if (parm->numparms != 1)
return OSDCMD_SHOWHELP;
@ -1902,7 +1902,7 @@ void OSD_Dispatch(const char *cmd)
//
// OSD_RegisterFunction() -- Registers a new function
//
int OSD_RegisterFunction(const char *pszName, const char *pszDesc, int (*func)(const osdfuncparm_t*))
int OSD_RegisterFunction(const char *pszName, const char *pszDesc, int (*func)(osdcmdptr_t))
{
if (!osd)
OSD_Init();
@ -2026,7 +2026,7 @@ static osdsymbol_t * osd_findexactsymbol(const char *pszName)
return (symbolNum >= 0) ? osd->symbptrs[symbolNum] : NULL;
}
int osdcmd_cvar_set(osdfuncparm_t const * const parm)
int osdcmd_cvar_set(osdcmdptr_t parm)
{
int const printValue = (parm->numparms == 0);
int const cvaridx = hash_find(&h_cvars, parm->name);

View file

@ -7795,7 +7795,7 @@ int32_t polymost_printext256(int32_t xpos, int32_t ypos, int16_t col, int16_t ba
}
// Console commands by JBF
static int32_t gltexturemode(osdfuncparm_t const * const parm)
static int32_t gltexturemode(osdcmdptr_t parm)
{
int32_t m;
char *p;
@ -7836,7 +7836,7 @@ static int32_t gltexturemode(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdcmd_cvar_set_polymost(osdfuncparm_t const * const parm)
static int osdcmd_cvar_set_polymost(osdcmdptr_t parm)
{
int32_t r = osdcmd_cvar_set(parm);

View file

@ -416,7 +416,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
}
static int32_t set_maxrefreshfreq(osdfuncparm_t const * const parm)
static int32_t set_maxrefreshfreq(osdcmdptr_t parm)
{
int32_t freq;
if (parm->numparms == 0)

View file

@ -304,7 +304,7 @@ extern int32_t mskip;
//extern int32_t fillsector(int16_t sectnum, char fillcolor);
static int osdcmd_quit(osdfuncparm_t const * parm);
static int osdcmd_quit(osdcmdptr_t parm);
#define M32_NUM_SPRITE_MODES (signed)ARRAY_SIZE(SpriteMode)
@ -8527,7 +8527,7 @@ int32_t ExtPreInit(int32_t argc,char const * const * argv)
return 0;
}
static int osdcmd_quit(osdfuncparm_t const * const UNUSED(parm))
static int osdcmd_quit(osdcmdptr_t UNUSED(parm))
{
UNREFERENCED_CONST_PARAMETER(parm);
@ -8541,7 +8541,7 @@ static int osdcmd_quit(osdfuncparm_t const * const UNUSED(parm))
Bexit(0);
}
static int osdcmd_editorgridextent(osdfuncparm_t const * const parm)
static int osdcmd_editorgridextent(osdcmdptr_t parm)
{
int32_t i;
@ -8566,7 +8566,7 @@ static int osdcmd_editorgridextent(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdcmd_addpath(osdfuncparm_t const * const parm)
static int osdcmd_addpath(osdcmdptr_t parm)
{
char pathname[BMAX_PATH];
@ -8577,7 +8577,7 @@ static int osdcmd_addpath(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdcmd_initgroupfile(osdfuncparm_t const * const parm)
static int osdcmd_initgroupfile(osdcmdptr_t parm)
{
char file[BMAX_PATH];
@ -8588,7 +8588,7 @@ static int osdcmd_initgroupfile(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdcmd_sensitivity(osdfuncparm_t const * const parm)
static int osdcmd_sensitivity(osdcmdptr_t parm)
{
if (parm->numparms != 1)
{
@ -8600,7 +8600,7 @@ static int osdcmd_sensitivity(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdcmd_noclip(osdfuncparm_t const * const UNUSED(parm))
static int osdcmd_noclip(osdcmdptr_t UNUSED(parm))
{
UNREFERENCED_CONST_PARAMETER(parm);
m32_clipping--;
@ -8612,7 +8612,7 @@ static int osdcmd_noclip(osdfuncparm_t const * const UNUSED(parm))
return OSDCMD_OK;
}
static int osdcmd_testplay_addparam(osdfuncparm_t const * const parm)
static int osdcmd_testplay_addparam(osdcmdptr_t parm)
{
int32_t slen;
@ -8648,7 +8648,7 @@ static int osdcmd_testplay_addparam(osdfuncparm_t const * const parm)
//PK vvv ------------
// FIXME: The way the different options are handled is horribly inconsistent.
static int osdcmd_vars_pk(osdfuncparm_t const * const parm)
static int osdcmd_vars_pk(osdcmdptr_t parm)
{
const int32_t setval = (parm->numparms >= 1);
@ -8938,7 +8938,7 @@ static int osdcmd_vars_pk(osdfuncparm_t const * const parm)
}
#ifdef USE_OPENGL
static int osdcmd_tint(osdfuncparm_t const * const parm)
static int osdcmd_tint(osdcmdptr_t parm)
{
int32_t i;
polytint_t *p;
@ -9007,7 +9007,7 @@ static void SaveInHistory(const char *commandstr)
}
#ifdef LUNATIC
static int osdcmd_lua(osdfuncparm_t const * const parm)
static int osdcmd_lua(osdcmdptr_t parm)
{
// Should be used like
// lua "lua code..."
@ -9035,7 +9035,7 @@ static int osdcmd_lua(osdfuncparm_t const * const parm)
#endif
// M32 script vvv
static int osdcmd_include(osdfuncparm_t const * const parm)
static int osdcmd_include(osdcmdptr_t parm)
{
if (parm->numparms != 1)
return OSDCMD_SHOWHELP;
@ -9043,7 +9043,7 @@ static int osdcmd_include(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdcmd_scriptinfo(osdfuncparm_t const * const UNUSED(parm))
static int osdcmd_scriptinfo(osdcmdptr_t UNUSED(parm))
{
UNREFERENCED_CONST_PARAMETER(parm);
C_CompilationInfo();
@ -9053,7 +9053,7 @@ static int osdcmd_scriptinfo(osdfuncparm_t const * const UNUSED(parm))
#ifdef DEBUGGINGAIDS
extern void X_Disasm(ofstype beg, int32_t size);
static int osdcmd_disasm(osdfuncparm_t const * const parm)
static int osdcmd_disasm(osdcmdptr_t parm)
{
int32_t i;
@ -9079,7 +9079,7 @@ static int osdcmd_disasm(osdfuncparm_t const * const parm)
}
#endif
static int osdcmd_do(osdfuncparm_t const * const parm)
static int osdcmd_do(osdcmdptr_t parm)
{
if (parm->numparms==0)
return OSDCMD_SHOWHELP;
@ -9160,7 +9160,7 @@ void M32RunScript(const char *s)
osdcmd_do(&parm);
}
static int osdcmd_endisableevent(osdfuncparm_t const * const parm)
static int osdcmd_endisableevent(osdcmdptr_t parm)
{
int32_t i, j, enable;

View file

@ -42,7 +42,7 @@ float r_ambientlight = 1.0, r_ambientlightrecip = 1.0;
uint32_t cl_cheatmask;
static inline int osdcmd_quit(osdfuncparm_t const * const UNUSED(parm))
static inline int osdcmd_quit(osdcmdptr_t UNUSED(parm))
{
UNREFERENCED_CONST_PARAMETER(parm);
OSD_ShowDisplay(0);
@ -50,7 +50,7 @@ static inline int osdcmd_quit(osdfuncparm_t const * const UNUSED(parm))
return OSDCMD_OK;
}
static int osdcmd_changelevel(osdfuncparm_t const * const parm)
static int osdcmd_changelevel(osdcmdptr_t parm)
{
int32_t volume=0,level;
char *p;
@ -159,7 +159,7 @@ static int osdcmd_changelevel(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdcmd_map(osdfuncparm_t const * const parm)
static int osdcmd_map(osdcmdptr_t parm)
{
int32_t i;
char filename[BMAX_PATH];
@ -300,7 +300,7 @@ static int osdcmd_map(osdfuncparm_t const * const parm)
// the variance of the run times MUST be taken into account (that is, the
// replaying must be performed multiple times for the old and new versions,
// etc.)
static int osdcmd_demo(osdfuncparm_t const * const parm)
static int osdcmd_demo(osdcmdptr_t parm)
{
if (numplayers > 1)
{
@ -327,7 +327,7 @@ static int osdcmd_demo(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdcmd_activatecheat(osdfuncparm_t const * const parm)
static int osdcmd_activatecheat(osdcmdptr_t parm)
{
if (parm->numparms != 1)
return OSDCMD_SHOWHELP;
@ -340,7 +340,7 @@ static int osdcmd_activatecheat(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdcmd_god(osdfuncparm_t const * const UNUSED(parm))
static int osdcmd_god(osdcmdptr_t UNUSED(parm))
{
UNREFERENCED_CONST_PARAMETER(parm);
if (numplayers == 1 && g_player[myconnectindex].ps->gm & MODE_GAME)
@ -351,7 +351,7 @@ static int osdcmd_god(osdfuncparm_t const * const UNUSED(parm))
return OSDCMD_OK;
}
static int osdcmd_noclip(osdfuncparm_t const * const UNUSED(parm))
static int osdcmd_noclip(osdcmdptr_t UNUSED(parm))
{
UNREFERENCED_CONST_PARAMETER(parm);
@ -367,7 +367,7 @@ static int osdcmd_noclip(osdfuncparm_t const * const UNUSED(parm))
return OSDCMD_OK;
}
static int osdcmd_restartsound(osdfuncparm_t const * const UNUSED(parm))
static int osdcmd_restartsound(osdcmdptr_t UNUSED(parm))
{
UNREFERENCED_CONST_PARAMETER(parm);
S_SoundShutdown();
@ -385,7 +385,7 @@ static int osdcmd_restartsound(osdfuncparm_t const * const UNUSED(parm))
return OSDCMD_OK;
}
static int osdcmd_music(osdfuncparm_t const * const parm)
static int osdcmd_music(osdcmdptr_t parm)
{
if (parm->numparms == 1)
{
@ -415,7 +415,7 @@ static int osdcmd_music(osdfuncparm_t const * const parm)
return OSDCMD_SHOWHELP;
}
int osdcmd_restartvid(osdfuncparm_t const * const UNUSED(parm))
int osdcmd_restartvid(osdcmdptr_t UNUSED(parm))
{
UNREFERENCED_CONST_PARAMETER(parm);
videoResetMode();
@ -427,7 +427,7 @@ int osdcmd_restartvid(osdfuncparm_t const * const UNUSED(parm))
return OSDCMD_OK;
}
int osdcmd_restartmap(osdfuncparm_t const * const UNUSED(parm))
int osdcmd_restartmap(osdcmdptr_t UNUSED(parm))
{
UNREFERENCED_CONST_PARAMETER(parm);
@ -437,7 +437,7 @@ int osdcmd_restartmap(osdfuncparm_t const * const UNUSED(parm))
return OSDCMD_OK;
}
static int osdcmd_vidmode(osdfuncparm_t const * const parm)
static int osdcmd_vidmode(osdcmdptr_t parm)
{
int32_t newbpp = ud.config.ScreenBPP, newwidth = ud.config.ScreenWidth,
newheight = ud.config.ScreenHeight, newfs = ud.config.ScreenMode;
@ -490,7 +490,7 @@ static int osdcmd_vidmode(osdfuncparm_t const * const parm)
LUNATIC_CB int32_t (*El_GetLabelValue)(const char *label);
#endif
static int osdcmd_spawn(osdfuncparm_t const * const parm)
static int osdcmd_spawn(osdcmdptr_t parm)
{
int32_t picnum = 0;
uint16_t cstat=0;
@ -592,7 +592,7 @@ static int osdcmd_spawn(osdfuncparm_t const * const parm)
}
#if !defined LUNATIC
static int osdcmd_setvar(osdfuncparm_t const * const parm)
static int osdcmd_setvar(osdcmdptr_t parm)
{
if (parm->numparms != 2)
return OSDCMD_SHOWHELP;
@ -612,7 +612,7 @@ static int osdcmd_setvar(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdcmd_addlogvar(osdfuncparm_t const * const parm)
static int osdcmd_addlogvar(osdcmdptr_t parm)
{
if (parm->numparms != 1)
return OSDCMD_SHOWHELP;
@ -631,7 +631,7 @@ static int osdcmd_addlogvar(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdcmd_setactorvar(osdfuncparm_t const * const parm)
static int osdcmd_setactorvar(osdcmdptr_t parm)
{
if (parm->numparms != 3) return OSDCMD_SHOWHELP;
@ -659,7 +659,7 @@ static int osdcmd_setactorvar(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
#else
static int osdcmd_lua(osdfuncparm_t const * const parm)
static int osdcmd_lua(osdcmdptr_t parm)
{
// Should be used like
// lua "lua code..."
@ -693,7 +693,7 @@ static int osdcmd_lua(osdfuncparm_t const * const parm)
}
#endif
static int osdcmd_addpath(osdfuncparm_t const * const parm)
static int osdcmd_addpath(osdcmdptr_t parm)
{
if (parm->numparms != 1)
return OSDCMD_SHOWHELP;
@ -703,7 +703,7 @@ static int osdcmd_addpath(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdcmd_initgroupfile(osdfuncparm_t const * const parm)
static int osdcmd_initgroupfile(osdcmdptr_t parm)
{
if (parm->numparms != 1)
return OSDCMD_SHOWHELP;
@ -713,7 +713,7 @@ static int osdcmd_initgroupfile(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdcmd_cmenu(osdfuncparm_t const * const parm)
static int osdcmd_cmenu(osdcmdptr_t parm)
{
if (parm->numparms != 1)
return OSDCMD_SHOWHELP;
@ -732,7 +732,7 @@ static int osdcmd_cmenu(osdfuncparm_t const * const parm)
static int osdcmd_crosshaircolor(osdfuncparm_t const * const parm)
static int osdcmd_crosshaircolor(osdcmdptr_t parm)
{
if (parm->numparms != 3)
{
@ -752,7 +752,7 @@ static int osdcmd_crosshaircolor(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdcmd_give(osdfuncparm_t const * const parm)
static int osdcmd_give(osdcmdptr_t parm)
{
int32_t i;
@ -838,7 +838,7 @@ void onvideomodechange(int32_t newmode)
}
#if !defined NETCODE_DISABLE
static int osdcmd_name(osdfuncparm_t const * const parm)
static int osdcmd_name(osdcmdptr_t parm)
{
char namebuf[32];
@ -864,7 +864,7 @@ static int osdcmd_name(osdfuncparm_t const * const parm)
}
#endif
static int osdcmd_button(osdfuncparm_t const * const parm)
static int osdcmd_button(osdcmdptr_t parm)
{
char const *p = parm->name+9; // skip "gamefunc_"
// if (g_player[myconnectindex].ps->gm == MODE_GAME) // only trigger these if in game
@ -985,7 +985,7 @@ const char *const ConsoleButtons[] =
"mwheeldn", "mouse5", "mouse6", "mouse7", "mouse8"
};
static int osdcmd_bind(osdfuncparm_t const * const parm)
static int osdcmd_bind(osdcmdptr_t parm)
{
if (parm->numparms==1 && !Bstrcasecmp(parm->parms[0],"showkeys"))
{
@ -1128,7 +1128,7 @@ static int osdcmd_bind(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdcmd_unbindall(osdfuncparm_t const * const UNUSED(parm))
static int osdcmd_unbindall(osdcmdptr_t UNUSED(parm))
{
UNREFERENCED_CONST_PARAMETER(parm);
@ -1147,7 +1147,7 @@ static int osdcmd_unbindall(osdfuncparm_t const * const UNUSED(parm))
return OSDCMD_OK;
}
static int osdcmd_unbind(osdfuncparm_t const * const parm)
static int osdcmd_unbind(osdcmdptr_t parm)
{
if (parm->numparms != 1)
return OSDCMD_SHOWHELP;
@ -1175,7 +1175,7 @@ static int osdcmd_unbind(osdfuncparm_t const * const parm)
return OSDCMD_SHOWHELP;
}
static int osdcmd_quicksave(osdfuncparm_t const * const UNUSED(parm))
static int osdcmd_quicksave(osdcmdptr_t UNUSED(parm))
{
UNREFERENCED_CONST_PARAMETER(parm);
if (!(g_player[myconnectindex].ps->gm & MODE_GAME))
@ -1184,7 +1184,7 @@ static int osdcmd_quicksave(osdfuncparm_t const * const UNUSED(parm))
return OSDCMD_OK;
}
static int osdcmd_quickload(osdfuncparm_t const * const UNUSED(parm))
static int osdcmd_quickload(osdcmdptr_t UNUSED(parm))
{
UNREFERENCED_CONST_PARAMETER(parm);
if (!(g_player[myconnectindex].ps->gm & MODE_GAME))
@ -1193,7 +1193,7 @@ static int osdcmd_quickload(osdfuncparm_t const * const UNUSED(parm))
return OSDCMD_OK;
}
static int osdcmd_screenshot(osdfuncparm_t const * const parm)
static int osdcmd_screenshot(osdcmdptr_t parm)
{
// KB_ClearKeysDown();
#ifndef EDUKE32_STANDALONE
@ -1210,14 +1210,14 @@ static int osdcmd_screenshot(osdfuncparm_t const * const parm)
}
#if 0
static int osdcmd_savestate(osdfuncparm_t const * const UNUSED(parm))
static int osdcmd_savestate(osdcmdptr_t UNUSED(parm))
{
UNREFERENCED_PARAMETER(parm);
G_SaveMapState();
return OSDCMD_OK;
}
static int osdcmd_restorestate(osdfuncparm_t const * const UNUSED(parm))
static int osdcmd_restorestate(osdcmdptr_t UNUSED(parm))
{
UNREFERENCED_PARAMETER(parm);
G_RestoreMapState();
@ -1226,7 +1226,7 @@ static int osdcmd_restorestate(osdfuncparm_t const * const UNUSED(parm))
#endif
#ifdef DEBUGGINGAIDS
static int osdcmd_inittimer(osdfuncparm_t const * const parm)
static int osdcmd_inittimer(osdcmdptr_t parm)
{
if (parm->numparms != 1)
{
@ -1242,14 +1242,14 @@ static int osdcmd_inittimer(osdfuncparm_t const * const parm)
#endif
#if !defined NETCODE_DISABLE
static int osdcmd_disconnect(osdfuncparm_t const * const UNUSED(parm))
static int osdcmd_disconnect(osdcmdptr_t UNUSED(parm))
{
UNREFERENCED_CONST_PARAMETER(parm);
g_netDisconnect = 1;
return OSDCMD_OK;
}
static int osdcmd_connect(osdfuncparm_t const * const parm)
static int osdcmd_connect(osdcmdptr_t parm)
{
if (parm->numparms != 1)
return OSDCMD_SHOWHELP;
@ -1259,7 +1259,7 @@ static int osdcmd_connect(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdcmd_password(osdfuncparm_t const * const parm)
static int osdcmd_password(osdcmdptr_t parm)
{
if (parm->numparms < 1)
{
@ -1271,7 +1271,7 @@ static int osdcmd_password(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdcmd_listplayers(osdfuncparm_t const * const parm)
static int osdcmd_listplayers(osdcmdptr_t parm)
{
ENetPeer *currentPeer;
char ipaddr[32];
@ -1302,7 +1302,7 @@ static int osdcmd_listplayers(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdcmd_kick(osdfuncparm_t const * const parm)
static int osdcmd_kick(osdcmdptr_t parm)
{
ENetPeer *currentPeer;
uint32_t hexaddr;
@ -1340,7 +1340,7 @@ static int osdcmd_kick(osdfuncparm_t const * const parm)
return OSDCMD_OK;
}
static int osdcmd_kickban(osdfuncparm_t const * const parm)
static int osdcmd_kickban(osdcmdptr_t parm)
{
ENetPeer *currentPeer;
uint32_t hexaddr;
@ -1385,14 +1385,14 @@ static int osdcmd_kickban(osdfuncparm_t const * const parm)
}
#endif
static int osdcmd_purgesaves(osdfuncparm_t const * const UNUSED(parm))
static int osdcmd_purgesaves(osdcmdptr_t UNUSED(parm))
{
UNREFERENCED_CONST_PARAMETER(parm);
G_DeleteOldSaves();
return OSDCMD_OK;
}
static int osdcmd_printtimes(osdfuncparm_t const * const UNUSED(parm))
static int osdcmd_printtimes(osdcmdptr_t UNUSED(parm))
{
UNREFERENCED_CONST_PARAMETER(parm);
@ -1459,7 +1459,7 @@ static int osdcmd_printtimes(osdfuncparm_t const * const UNUSED(parm))
return OSDCMD_OK;
}
static int osdcmd_cvar_set_game(osdfuncparm_t const * const parm)
static int osdcmd_cvar_set_game(osdcmdptr_t parm)
{
int const r = osdcmd_cvar_set(parm);
@ -1583,7 +1583,7 @@ static int osdcmd_cvar_set_game(osdfuncparm_t const * const parm)
return r;
}
static int osdcmd_cvar_set_multi(osdfuncparm_t const * const parm)
static int osdcmd_cvar_set_multi(osdcmdptr_t parm)
{
int const r = osdcmd_cvar_set_game(parm);