mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
Use "int" for OSD command return values and a few trivial globals. Our current usage of the return values would have even worked with bool, but we might want to add error conditions or something later.
git-svn-id: https://svn.eduke32.com/eduke32@7149 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
b1b01c759e
commit
14f1ea1c05
11 changed files with 109 additions and 109 deletions
|
@ -87,7 +87,7 @@ extern float g_videoGamma, g_videoContrast, g_videoBrightness;
|
|||
|
||||
#ifdef USE_OPENGL
|
||||
extern int32_t (*baselayer_osdcmd_vidmode_func)(osdfuncparm_t const * const parm);
|
||||
extern int32_t osdcmd_glinfo(osdfuncparm_t const * parm);
|
||||
extern int osdcmd_glinfo(osdfuncparm_t const * parm);
|
||||
|
||||
struct glinfo_t {
|
||||
const char *vendor;
|
||||
|
|
|
@ -207,10 +207,10 @@ enum osdflags_t
|
|||
#define OSDCMD_OK 0
|
||||
#define OSDCMD_SHOWHELP 1
|
||||
|
||||
int32_t OSD_ParsingScript(void);
|
||||
int OSD_ParsingScript(void);
|
||||
|
||||
int32_t OSD_OSDKey(void);
|
||||
int32_t OSD_GetTextMode(void);
|
||||
int OSD_OSDKey(void);
|
||||
int OSD_GetTextMode(void);
|
||||
void OSD_SetTextMode(int32_t mode);
|
||||
|
||||
int OSD_Exec(const char *szScript);
|
||||
|
@ -218,9 +218,9 @@ int OSD_Exec(const char *szScript);
|
|||
// Get shade and pal index from the OSD format buffer.
|
||||
void OSD_GetShadePal(const char *ch, int32_t *shadeptr, int32_t *palptr);
|
||||
|
||||
int32_t OSD_GetCols(void);
|
||||
int32_t OSD_IsMoving(void);
|
||||
int32_t OSD_GetRowsCur(void);
|
||||
int OSD_GetCols(void);
|
||||
int OSD_IsMoving(void);
|
||||
int OSD_GetRowsCur(void);
|
||||
|
||||
// initializes things
|
||||
void OSD_Init(void);
|
||||
|
@ -284,9 +284,9 @@ void OSD_Dispatch(const char *cmd);
|
|||
// name = name of the function
|
||||
// help = a short help string
|
||||
// func = the entry point to the function
|
||||
int32_t 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)(const osdfuncparm_t *));
|
||||
|
||||
int32_t osdcmd_cvar_set(osdfuncparm_t const * parm);
|
||||
int osdcmd_cvar_set(osdfuncparm_t const * parm);
|
||||
void OSD_RegisterCvar(osdcvardata_t * cvar, int32_t (*func)(osdfuncparm_t const * const));
|
||||
void OSD_WriteAliases(FILE *fp);
|
||||
void OSD_WriteCvars(FILE *fp);
|
||||
|
@ -297,7 +297,7 @@ static inline void OSD_SetHistory(int32_t histIdx, const char *src)
|
|||
Bstrncpyz(osd->history.buf[histIdx], src, OSDEDITLENGTH);
|
||||
}
|
||||
|
||||
extern int32_t osdcmd_restartvid(osdfuncparm_t const * parm);
|
||||
extern int osdcmd_restartvid(osdfuncparm_t const * parm);
|
||||
|
||||
extern void M32RunScript(const char *s);
|
||||
|
||||
|
|
|
@ -284,7 +284,7 @@ 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);
|
||||
|
||||
static int32_t osdfunc_setrendermode(osdfuncparm_t const * const parm)
|
||||
static int osdfunc_setrendermode(osdfuncparm_t const * const parm)
|
||||
{
|
||||
if (parm->numparms != 1)
|
||||
return OSDCMD_SHOWHELP;
|
||||
|
@ -348,7 +348,7 @@ static int32_t osdfunc_setrendermode(osdfuncparm_t const * const parm)
|
|||
}
|
||||
|
||||
#ifdef DEBUGGINGAIDS
|
||||
static int32_t osdcmd_hicsetpalettetint(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_hicsetpalettetint(osdfuncparm_t const * const parm)
|
||||
{
|
||||
int32_t parms[8];
|
||||
|
||||
|
@ -367,7 +367,7 @@ static int32_t osdcmd_hicsetpalettetint(osdfuncparm_t const * const parm)
|
|||
}
|
||||
#endif
|
||||
|
||||
int32_t osdcmd_glinfo(osdfuncparm_t const * const UNUSED(parm))
|
||||
int osdcmd_glinfo(osdfuncparm_t const * const UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
|
||||
|
@ -419,7 +419,7 @@ int32_t osdcmd_glinfo(osdfuncparm_t const * const UNUSED(parm))
|
|||
}
|
||||
#endif
|
||||
|
||||
static int32_t osdcmd_cvar_set_baselayer(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_cvar_set_baselayer(osdfuncparm_t const * const parm)
|
||||
{
|
||||
int32_t r = osdcmd_cvar_set(parm);
|
||||
|
||||
|
|
|
@ -273,7 +273,7 @@ void clearkeys(void)
|
|||
}
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
int32_t osdcmd_restartvid(osdfuncparm_t const * const UNUSED(parm))
|
||||
int osdcmd_restartvid(osdfuncparm_t const * const UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
|
||||
|
@ -287,7 +287,7 @@ int32_t osdcmd_restartvid(osdfuncparm_t const * const UNUSED(parm))
|
|||
}
|
||||
#endif
|
||||
|
||||
static int32_t osdcmd_vidmode(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_vidmode(osdfuncparm_t const * const parm)
|
||||
{
|
||||
int32_t newx = xres, newy = yres, newbpp = bpp, newfullscreen = fullscreen;
|
||||
#ifdef USE_OPENGL
|
||||
|
|
|
@ -32,12 +32,12 @@ static void _internal_onshowosd(int32_t);
|
|||
|
||||
osdmain_t *osd = NULL;
|
||||
|
||||
static int32_t osdrowscur=-1;
|
||||
static int32_t osdmaxrows=20; // maximum number of lines which can fit on the screen
|
||||
BFILE *osdlog; // log filehandle
|
||||
static int osdrowscur = -1;
|
||||
static int osdmaxrows = 20;
|
||||
BFILE *osdlog;
|
||||
const char* osdlogfn;
|
||||
static int32_t osdkeytime=0;
|
||||
static int32_t osdscrtime = 0;
|
||||
static int32_t osdkeytime = 0;
|
||||
static int osdscrtime = 0;
|
||||
|
||||
|
||||
#define OSD_EDIT_LINE_WIDTH (osd->draw.cols - 1 - 3)
|
||||
|
@ -62,10 +62,10 @@ static void (*_drawosdcursor)(int32_t, int32_t, int32_t, int32_t) = _internal_dr
|
|||
static int32_t (*_getcolumnwidth)(int32_t) = _internal_getcolumnwidth;
|
||||
static int32_t (*_getrowheight)(int32_t) = _internal_getrowheight;
|
||||
|
||||
static hashtable_t h_cvars = { OSDMAXSYMBOLS<<1, NULL };
|
||||
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, int32_t (*func)(osdfuncparm_t const * const))
|
||||
void OSD_RegisterCvar(osdcvardata_t * const cvar, int (*func)(osdfuncparm_t const * const))
|
||||
{
|
||||
if (!osd)
|
||||
OSD_Init();
|
||||
|
@ -203,12 +203,12 @@ int OSD_Exec(const char *szScript)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int32_t OSD_ParsingScript(void) { return osd->execdepth; }
|
||||
int32_t OSD_OSDKey(void) { return osd->keycode; }
|
||||
int32_t OSD_GetCols(void) { return osd->draw.cols; }
|
||||
int32_t OSD_IsMoving(void) { return (osdrowscur != -1 && osdrowscur != osd->draw.rows); }
|
||||
int32_t OSD_GetRowsCur(void) { return osdrowscur; }
|
||||
int32_t OSD_GetTextMode(void) { return osd->draw.mode; }
|
||||
int OSD_ParsingScript(void) { return osd->execdepth; }
|
||||
int OSD_OSDKey(void) { return osd->keycode; }
|
||||
int OSD_GetCols(void) { return osd->draw.cols; }
|
||||
int OSD_IsMoving(void) { return (osdrowscur != -1 && osdrowscur != osd->draw.rows); }
|
||||
int OSD_GetRowsCur(void) { return osdrowscur; }
|
||||
int OSD_GetTextMode(void) { return osd->draw.mode; }
|
||||
|
||||
void OSD_GetShadePal(const char *ch, int32_t *shadeptr, int32_t *palptr)
|
||||
{
|
||||
|
@ -246,7 +246,7 @@ void OSD_SetTextMode(int32_t mode)
|
|||
OSD_ResizeDisplay(xdim, ydim);
|
||||
}
|
||||
|
||||
static int32_t osdfunc_exec(osdfuncparm_t const * const parm)
|
||||
static int osdfunc_exec(osdfuncparm_t const * const parm)
|
||||
{
|
||||
if (parm->numparms != 1)
|
||||
return OSDCMD_SHOWHELP;
|
||||
|
@ -261,14 +261,14 @@ static int32_t osdfunc_exec(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdfunc_echo(osdfuncparm_t const * const parm)
|
||||
static int osdfunc_echo(osdfuncparm_t const * const parm)
|
||||
{
|
||||
OSD_Printf("%s\n", parm->raw + 5);
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdfunc_fileinfo(osdfuncparm_t const * const parm)
|
||||
static int osdfunc_fileinfo(osdfuncparm_t const * const parm)
|
||||
{
|
||||
int32_t i,j;
|
||||
|
||||
|
@ -404,7 +404,7 @@ static void _internal_onshowosd(int32_t a)
|
|||
|
||||
////////////////////////////
|
||||
|
||||
static int32_t osdfunc_alias(osdfuncparm_t const * const parm)
|
||||
static int osdfunc_alias(osdfuncparm_t const * const parm)
|
||||
{
|
||||
osdsymbol_t *i;
|
||||
|
||||
|
@ -451,7 +451,7 @@ static int32_t osdfunc_alias(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdfunc_unalias(osdfuncparm_t const * const parm)
|
||||
static int osdfunc_unalias(osdfuncparm_t const * const parm)
|
||||
{
|
||||
if (parm->numparms < 1)
|
||||
return OSDCMD_SHOWHELP;
|
||||
|
@ -479,7 +479,7 @@ static int32_t osdfunc_unalias(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdfunc_listsymbols(osdfuncparm_t const * const parm)
|
||||
static int osdfunc_listsymbols(osdfuncparm_t const * const parm)
|
||||
{
|
||||
if (parm->numparms > 1)
|
||||
return OSDCMD_SHOWHELP;
|
||||
|
@ -537,7 +537,7 @@ static int32_t osdfunc_listsymbols(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdfunc_help(osdfuncparm_t const * const parm)
|
||||
static int osdfunc_help(osdfuncparm_t const * const parm)
|
||||
{
|
||||
osdsymbol_t *symb;
|
||||
|
||||
|
@ -554,7 +554,7 @@ static int32_t osdfunc_help(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdfunc_clear(osdfuncparm_t const * const UNUSED(parm))
|
||||
static int osdfunc_clear(osdfuncparm_t const * const UNUSED(parm))
|
||||
{
|
||||
osdtext_t *t = &osd->text;
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
|
@ -566,7 +566,7 @@ static int32_t osdfunc_clear(osdfuncparm_t const * const UNUSED(parm))
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdfunc_history(osdfuncparm_t const * const UNUSED(parm))
|
||||
static int osdfunc_history(osdfuncparm_t const * const UNUSED(parm))
|
||||
{
|
||||
int32_t j = 0;
|
||||
osdhist_t *h = &osd->history;
|
||||
|
@ -611,7 +611,7 @@ void OSD_Cleanup(void)
|
|||
}
|
||||
|
||||
|
||||
static int32_t osdcmd_cvar_set_osd(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_cvar_set_osd(osdfuncparm_t const * const parm)
|
||||
{
|
||||
int32_t r = osdcmd_cvar_set(parm);
|
||||
|
||||
|
@ -636,7 +636,7 @@ static int32_t osdcmd_cvar_set_osd(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdfunc_toggle(osdfuncparm_t const * const parm)
|
||||
static int osdfunc_toggle(osdfuncparm_t const * const parm)
|
||||
{
|
||||
if (parm->numparms != 1) return OSDCMD_SHOWHELP;
|
||||
|
||||
|
@ -802,7 +802,7 @@ void OSD_CaptureKey(uint8_t scanCode)
|
|||
//
|
||||
// OSD_FindDiffPoint() -- Finds the length of the longest common prefix of 2 strings, stolen from ZDoom
|
||||
//
|
||||
static int32_t OSD_FindDiffPoint(const char *str1, const char *str2)
|
||||
static int OSD_FindDiffPoint(const char *str1, const char *str2)
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
|
@ -893,7 +893,7 @@ static void OSD_HistoryNext(void)
|
|||
// be passed on to the game.
|
||||
//
|
||||
|
||||
int32_t OSD_HandleChar(char ch)
|
||||
int OSD_HandleChar(char ch)
|
||||
{
|
||||
if (!osd || (osd->flags & OSD_CAPTURE) != OSD_CAPTURE)
|
||||
return ch;
|
||||
|
@ -1884,7 +1884,7 @@ void OSD_Dispatch(const char *cmd)
|
|||
//
|
||||
// OSD_RegisterFunction() -- Registers a new function
|
||||
//
|
||||
int32_t OSD_RegisterFunction(const char *pszName, const char *pszDesc, int32_t (*func)(const osdfuncparm_t*))
|
||||
int OSD_RegisterFunction(const char *pszName, const char *pszDesc, int (*func)(const osdfuncparm_t*))
|
||||
{
|
||||
if (!osd)
|
||||
OSD_Init();
|
||||
|
@ -2001,7 +2001,7 @@ static osdsymbol_t * osd_findexactsymbol(const char *pszName)
|
|||
return (symbolNum >= 0) ? osd->symbptrs[symbolNum] : NULL;
|
||||
}
|
||||
|
||||
int32_t osdcmd_cvar_set(osdfuncparm_t const * const parm)
|
||||
int osdcmd_cvar_set(osdfuncparm_t const * const parm)
|
||||
{
|
||||
int const printValue = (parm->numparms == 0);
|
||||
int const cvaridx = hash_find(&h_cvars, parm->name);
|
||||
|
|
|
@ -7836,7 +7836,7 @@ static int32_t gltexturemode(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_cvar_set_polymost(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_cvar_set_polymost(osdfuncparm_t const * const parm)
|
||||
{
|
||||
int32_t r = osdcmd_cvar_set(parm);
|
||||
|
||||
|
|
|
@ -304,7 +304,7 @@ extern int32_t mskip;
|
|||
|
||||
//extern int32_t fillsector(int16_t sectnum, char fillcolor);
|
||||
|
||||
static int32_t osdcmd_quit(osdfuncparm_t const * parm);
|
||||
static int osdcmd_quit(osdfuncparm_t const * 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 int32_t osdcmd_quit(osdfuncparm_t const * const UNUSED(parm))
|
||||
static int osdcmd_quit(osdfuncparm_t const * const UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
|
||||
|
@ -8541,7 +8541,7 @@ static int32_t osdcmd_quit(osdfuncparm_t const * const UNUSED(parm))
|
|||
Bexit(0);
|
||||
}
|
||||
|
||||
static int32_t osdcmd_editorgridextent(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_editorgridextent(osdfuncparm_t const * const parm)
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
|
@ -8566,7 +8566,7 @@ static int32_t osdcmd_editorgridextent(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_addpath(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_addpath(osdfuncparm_t const * const parm)
|
||||
{
|
||||
char pathname[BMAX_PATH];
|
||||
|
||||
|
@ -8577,7 +8577,7 @@ static int32_t osdcmd_addpath(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_initgroupfile(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_initgroupfile(osdfuncparm_t const * const parm)
|
||||
{
|
||||
char file[BMAX_PATH];
|
||||
|
||||
|
@ -8588,7 +8588,7 @@ static int32_t osdcmd_initgroupfile(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_sensitivity(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_sensitivity(osdfuncparm_t const * const parm)
|
||||
{
|
||||
if (parm->numparms != 1)
|
||||
{
|
||||
|
@ -8600,7 +8600,7 @@ static int32_t osdcmd_sensitivity(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_noclip(osdfuncparm_t const * const UNUSED(parm))
|
||||
static int osdcmd_noclip(osdfuncparm_t const * const UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
m32_clipping--;
|
||||
|
@ -8612,7 +8612,7 @@ static int32_t osdcmd_noclip(osdfuncparm_t const * const UNUSED(parm))
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_testplay_addparam(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_testplay_addparam(osdfuncparm_t const * const parm)
|
||||
{
|
||||
int32_t slen;
|
||||
|
||||
|
@ -8648,7 +8648,7 @@ static int32_t osdcmd_testplay_addparam(osdfuncparm_t const * const parm)
|
|||
|
||||
//PK vvv ------------
|
||||
// FIXME: The way the different options are handled is horribly inconsistent.
|
||||
static int32_t osdcmd_vars_pk(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_vars_pk(osdfuncparm_t const * const parm)
|
||||
{
|
||||
const int32_t setval = (parm->numparms >= 1);
|
||||
|
||||
|
@ -8938,7 +8938,7 @@ static int32_t osdcmd_vars_pk(osdfuncparm_t const * const parm)
|
|||
}
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
static int32_t osdcmd_tint(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_tint(osdfuncparm_t const * const parm)
|
||||
{
|
||||
int32_t i;
|
||||
polytint_t *p;
|
||||
|
@ -9007,7 +9007,7 @@ static void SaveInHistory(const char *commandstr)
|
|||
}
|
||||
|
||||
#ifdef LUNATIC
|
||||
static int32_t osdcmd_lua(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_lua(osdfuncparm_t const * const parm)
|
||||
{
|
||||
// Should be used like
|
||||
// lua "lua code..."
|
||||
|
@ -9035,7 +9035,7 @@ static int32_t osdcmd_lua(osdfuncparm_t const * const parm)
|
|||
#endif
|
||||
|
||||
// M32 script vvv
|
||||
static int32_t osdcmd_include(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_include(osdfuncparm_t const * const parm)
|
||||
{
|
||||
if (parm->numparms != 1)
|
||||
return OSDCMD_SHOWHELP;
|
||||
|
@ -9043,7 +9043,7 @@ static int32_t osdcmd_include(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_scriptinfo(osdfuncparm_t const * const UNUSED(parm))
|
||||
static int osdcmd_scriptinfo(osdfuncparm_t const * const UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
C_CompilationInfo();
|
||||
|
@ -9053,7 +9053,7 @@ static int32_t osdcmd_scriptinfo(osdfuncparm_t const * const UNUSED(parm))
|
|||
#ifdef DEBUGGINGAIDS
|
||||
extern void X_Disasm(ofstype beg, int32_t size);
|
||||
|
||||
static int32_t osdcmd_disasm(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_disasm(osdfuncparm_t const * const parm)
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
|
@ -9079,7 +9079,7 @@ static int32_t osdcmd_disasm(osdfuncparm_t const * const parm)
|
|||
}
|
||||
#endif
|
||||
|
||||
static int32_t osdcmd_do(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_do(osdfuncparm_t const * const parm)
|
||||
{
|
||||
if (parm->numparms==0)
|
||||
return OSDCMD_SHOWHELP;
|
||||
|
@ -9160,7 +9160,7 @@ void M32RunScript(const char *s)
|
|||
osdcmd_do(&parm);
|
||||
}
|
||||
|
||||
static int32_t osdcmd_endisableevent(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_endisableevent(osdfuncparm_t const * const parm)
|
||||
{
|
||||
int32_t i, j, enable;
|
||||
|
||||
|
|
|
@ -3964,7 +3964,7 @@ void C_PrintErrorPosition()
|
|||
{
|
||||
const char *b = g_curkwptr, *e=textptr;
|
||||
int32_t i, nchars;
|
||||
int32_t osdcols = OSD_GetCols();
|
||||
int osdcols = OSD_GetCols();
|
||||
|
||||
if (!(b<e+1))
|
||||
return;
|
||||
|
|
|
@ -42,7 +42,7 @@ float r_ambientlight = 1.0, r_ambientlightrecip = 1.0;
|
|||
|
||||
uint32_t cl_cheatmask;
|
||||
|
||||
static inline int32_t osdcmd_quit(osdfuncparm_t const * const UNUSED(parm))
|
||||
static inline int osdcmd_quit(osdfuncparm_t const * const UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
OSD_ShowDisplay(0);
|
||||
|
@ -50,7 +50,7 @@ static inline int32_t osdcmd_quit(osdfuncparm_t const * const UNUSED(parm))
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_changelevel(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_changelevel(osdfuncparm_t const * const parm)
|
||||
{
|
||||
int32_t volume=0,level;
|
||||
char *p;
|
||||
|
@ -159,7 +159,7 @@ static int32_t osdcmd_changelevel(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_map(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_map(osdfuncparm_t const * const parm)
|
||||
{
|
||||
int32_t i;
|
||||
char filename[BMAX_PATH];
|
||||
|
@ -300,7 +300,7 @@ static int32_t 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 int32_t osdcmd_demo(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_demo(osdfuncparm_t const * const parm)
|
||||
{
|
||||
if (numplayers > 1)
|
||||
{
|
||||
|
@ -327,7 +327,7 @@ static int32_t osdcmd_demo(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_activatecheat(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_activatecheat(osdfuncparm_t const * const parm)
|
||||
{
|
||||
if (parm->numparms != 1)
|
||||
return OSDCMD_SHOWHELP;
|
||||
|
@ -340,7 +340,7 @@ static int32_t osdcmd_activatecheat(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_god(osdfuncparm_t const * const UNUSED(parm))
|
||||
static int osdcmd_god(osdfuncparm_t const * const UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
if (numplayers == 1 && g_player[myconnectindex].ps->gm & MODE_GAME)
|
||||
|
@ -351,7 +351,7 @@ static int32_t osdcmd_god(osdfuncparm_t const * const UNUSED(parm))
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_noclip(osdfuncparm_t const * const UNUSED(parm))
|
||||
static int osdcmd_noclip(osdfuncparm_t const * const UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
|
||||
|
@ -367,7 +367,7 @@ static int32_t osdcmd_noclip(osdfuncparm_t const * const UNUSED(parm))
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_restartsound(osdfuncparm_t const * const UNUSED(parm))
|
||||
static int osdcmd_restartsound(osdfuncparm_t const * const UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
S_SoundShutdown();
|
||||
|
@ -385,7 +385,7 @@ static int32_t osdcmd_restartsound(osdfuncparm_t const * const UNUSED(parm))
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_music(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_music(osdfuncparm_t const * const parm)
|
||||
{
|
||||
if (parm->numparms == 1)
|
||||
{
|
||||
|
@ -415,7 +415,7 @@ static int32_t osdcmd_music(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_SHOWHELP;
|
||||
}
|
||||
|
||||
int32_t osdcmd_restartvid(osdfuncparm_t const * const UNUSED(parm))
|
||||
int osdcmd_restartvid(osdfuncparm_t const * const UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
videoResetMode();
|
||||
|
@ -427,7 +427,7 @@ int32_t osdcmd_restartvid(osdfuncparm_t const * const UNUSED(parm))
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
int32_t osdcmd_restartmap(osdfuncparm_t const * const UNUSED(parm))
|
||||
int osdcmd_restartmap(osdfuncparm_t const * const UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
|
||||
|
@ -437,7 +437,7 @@ int32_t osdcmd_restartmap(osdfuncparm_t const * const UNUSED(parm))
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_vidmode(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_vidmode(osdfuncparm_t const * const parm)
|
||||
{
|
||||
int32_t newbpp = ud.config.ScreenBPP, newwidth = ud.config.ScreenWidth,
|
||||
newheight = ud.config.ScreenHeight, newfs = ud.config.ScreenMode;
|
||||
|
@ -490,7 +490,7 @@ static int32_t osdcmd_vidmode(osdfuncparm_t const * const parm)
|
|||
LUNATIC_CB int32_t (*El_GetLabelValue)(const char *label);
|
||||
#endif
|
||||
|
||||
static int32_t osdcmd_spawn(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_spawn(osdfuncparm_t const * const parm)
|
||||
{
|
||||
int32_t picnum = 0;
|
||||
uint16_t cstat=0;
|
||||
|
@ -592,7 +592,7 @@ static int32_t osdcmd_spawn(osdfuncparm_t const * const parm)
|
|||
}
|
||||
|
||||
#if !defined LUNATIC
|
||||
static int32_t osdcmd_setvar(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_setvar(osdfuncparm_t const * const parm)
|
||||
{
|
||||
int32_t i, varval;
|
||||
char varname[256];
|
||||
|
@ -618,7 +618,7 @@ static int32_t osdcmd_setvar(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_addlogvar(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_addlogvar(osdfuncparm_t const * const parm)
|
||||
{
|
||||
int32_t i;
|
||||
char varname[256];
|
||||
|
@ -638,7 +638,7 @@ static int32_t osdcmd_addlogvar(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_setactorvar(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_setactorvar(osdfuncparm_t const * const parm)
|
||||
{
|
||||
if (parm->numparms != 3) return OSDCMD_SHOWHELP;
|
||||
|
||||
|
@ -671,7 +671,7 @@ static int32_t osdcmd_setactorvar(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
#else
|
||||
static int32_t osdcmd_lua(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_lua(osdfuncparm_t const * const parm)
|
||||
{
|
||||
// Should be used like
|
||||
// lua "lua code..."
|
||||
|
@ -705,7 +705,7 @@ static int32_t osdcmd_lua(osdfuncparm_t const * const parm)
|
|||
}
|
||||
#endif
|
||||
|
||||
static int32_t osdcmd_addpath(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_addpath(osdfuncparm_t const * const parm)
|
||||
{
|
||||
char pathname[BMAX_PATH];
|
||||
|
||||
|
@ -716,7 +716,7 @@ static int32_t osdcmd_addpath(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_initgroupfile(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_initgroupfile(osdfuncparm_t const * const parm)
|
||||
{
|
||||
char file[BMAX_PATH];
|
||||
|
||||
|
@ -727,7 +727,7 @@ static int32_t osdcmd_initgroupfile(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_cmenu(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_cmenu(osdfuncparm_t const * const parm)
|
||||
{
|
||||
if (parm->numparms != 1) return OSDCMD_SHOWHELP;
|
||||
if (numplayers > 1)
|
||||
|
@ -746,7 +746,7 @@ static int32_t osdcmd_cmenu(osdfuncparm_t const * const parm)
|
|||
|
||||
|
||||
|
||||
static int32_t osdcmd_crosshaircolor(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_crosshaircolor(osdfuncparm_t const * const parm)
|
||||
{
|
||||
int32_t r, g, b;
|
||||
|
||||
|
@ -766,7 +766,7 @@ static int32_t osdcmd_crosshaircolor(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_give(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_give(osdfuncparm_t const * const parm)
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
|
@ -852,7 +852,7 @@ void onvideomodechange(int32_t newmode)
|
|||
}
|
||||
|
||||
#if !defined NETCODE_DISABLE
|
||||
static int32_t osdcmd_name(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_name(osdfuncparm_t const * const parm)
|
||||
{
|
||||
char namebuf[32];
|
||||
|
||||
|
@ -878,7 +878,7 @@ static int32_t osdcmd_name(osdfuncparm_t const * const parm)
|
|||
}
|
||||
#endif
|
||||
|
||||
static int32_t osdcmd_button(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_button(osdfuncparm_t const * const parm)
|
||||
{
|
||||
char const *p = parm->name+9; // skip "gamefunc_"
|
||||
// if (g_player[myconnectindex].ps->gm == MODE_GAME) // only trigger these if in game
|
||||
|
@ -999,7 +999,7 @@ const char *const ConsoleButtons[] =
|
|||
"mwheeldn", "mouse5", "mouse6", "mouse7", "mouse8"
|
||||
};
|
||||
|
||||
static int32_t osdcmd_bind(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_bind(osdfuncparm_t const * const parm)
|
||||
{
|
||||
if (parm->numparms==1 && !Bstrcasecmp(parm->parms[0],"showkeys"))
|
||||
{
|
||||
|
@ -1142,7 +1142,7 @@ static int32_t osdcmd_bind(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_unbindall(osdfuncparm_t const * const UNUSED(parm))
|
||||
static int osdcmd_unbindall(osdfuncparm_t const * const UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
|
||||
|
@ -1161,7 +1161,7 @@ static int32_t osdcmd_unbindall(osdfuncparm_t const * const UNUSED(parm))
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_unbind(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_unbind(osdfuncparm_t const * const parm)
|
||||
{
|
||||
if (parm->numparms != 1)
|
||||
return OSDCMD_SHOWHELP;
|
||||
|
@ -1189,7 +1189,7 @@ static int32_t osdcmd_unbind(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_SHOWHELP;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_quicksave(osdfuncparm_t const * const UNUSED(parm))
|
||||
static int osdcmd_quicksave(osdfuncparm_t const * const UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
if (!(g_player[myconnectindex].ps->gm & MODE_GAME))
|
||||
|
@ -1198,7 +1198,7 @@ static int32_t osdcmd_quicksave(osdfuncparm_t const * const UNUSED(parm))
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_quickload(osdfuncparm_t const * const UNUSED(parm))
|
||||
static int osdcmd_quickload(osdfuncparm_t const * const UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
if (!(g_player[myconnectindex].ps->gm & MODE_GAME))
|
||||
|
@ -1207,7 +1207,7 @@ static int32_t osdcmd_quickload(osdfuncparm_t const * const UNUSED(parm))
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_screenshot(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_screenshot(osdfuncparm_t const * const parm)
|
||||
{
|
||||
// KB_ClearKeysDown();
|
||||
#ifndef EDUKE32_STANDALONE
|
||||
|
@ -1224,14 +1224,14 @@ static int32_t osdcmd_screenshot(osdfuncparm_t const * const parm)
|
|||
}
|
||||
|
||||
#if 0
|
||||
static int32_t osdcmd_savestate(osdfuncparm_t const * const UNUSED(parm))
|
||||
static int osdcmd_savestate(osdfuncparm_t const * const UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_PARAMETER(parm);
|
||||
G_SaveMapState();
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_restorestate(osdfuncparm_t const * const UNUSED(parm))
|
||||
static int osdcmd_restorestate(osdfuncparm_t const * const UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_PARAMETER(parm);
|
||||
G_RestoreMapState();
|
||||
|
@ -1240,7 +1240,7 @@ static int32_t osdcmd_restorestate(osdfuncparm_t const * const UNUSED(parm))
|
|||
#endif
|
||||
|
||||
#ifdef DEBUGGINGAIDS
|
||||
static int32_t osdcmd_inittimer(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_inittimer(osdfuncparm_t const * const parm)
|
||||
{
|
||||
if (parm->numparms != 1)
|
||||
{
|
||||
|
@ -1256,14 +1256,14 @@ static int32_t osdcmd_inittimer(osdfuncparm_t const * const parm)
|
|||
#endif
|
||||
|
||||
#if !defined NETCODE_DISABLE
|
||||
static int32_t osdcmd_disconnect(osdfuncparm_t const * const UNUSED(parm))
|
||||
static int osdcmd_disconnect(osdfuncparm_t const * const UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
g_netDisconnect = 1;
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_connect(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_connect(osdfuncparm_t const * const parm)
|
||||
{
|
||||
if (parm->numparms != 1)
|
||||
return OSDCMD_SHOWHELP;
|
||||
|
@ -1273,7 +1273,7 @@ static int32_t osdcmd_connect(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_password(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_password(osdfuncparm_t const * const parm)
|
||||
{
|
||||
if (parm->numparms < 1)
|
||||
{
|
||||
|
@ -1285,7 +1285,7 @@ static int32_t osdcmd_password(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_listplayers(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_listplayers(osdfuncparm_t const * const parm)
|
||||
{
|
||||
ENetPeer *currentPeer;
|
||||
char ipaddr[32];
|
||||
|
@ -1316,7 +1316,7 @@ static int32_t osdcmd_listplayers(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_kick(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_kick(osdfuncparm_t const * const parm)
|
||||
{
|
||||
ENetPeer *currentPeer;
|
||||
uint32_t hexaddr;
|
||||
|
@ -1354,7 +1354,7 @@ static int32_t osdcmd_kick(osdfuncparm_t const * const parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_kickban(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_kickban(osdfuncparm_t const * const parm)
|
||||
{
|
||||
ENetPeer *currentPeer;
|
||||
uint32_t hexaddr;
|
||||
|
@ -1399,14 +1399,14 @@ static int32_t osdcmd_kickban(osdfuncparm_t const * const parm)
|
|||
}
|
||||
#endif
|
||||
|
||||
static int32_t osdcmd_purgesaves(osdfuncparm_t const * const UNUSED(parm))
|
||||
static int osdcmd_purgesaves(osdfuncparm_t const * const UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
G_DeleteOldSaves();
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_printtimes(osdfuncparm_t const * const UNUSED(parm))
|
||||
static int osdcmd_printtimes(osdfuncparm_t const * const UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
|
||||
|
@ -1472,7 +1472,7 @@ static int32_t osdcmd_printtimes(osdfuncparm_t const * const UNUSED(parm))
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_cvar_set_game(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_cvar_set_game(osdfuncparm_t const * const parm)
|
||||
{
|
||||
int32_t r = osdcmd_cvar_set(parm);
|
||||
|
||||
|
@ -1596,7 +1596,7 @@ static int32_t osdcmd_cvar_set_game(osdfuncparm_t const * const parm)
|
|||
return r;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_cvar_set_multi(osdfuncparm_t const * const parm)
|
||||
static int osdcmd_cvar_set_multi(osdfuncparm_t const * const parm)
|
||||
{
|
||||
int32_t r = osdcmd_cvar_set_game(parm);
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "osdfuncs.h"
|
||||
#include "premap.h"
|
||||
|
||||
int32_t osdhightile = 1;
|
||||
int32_t osdshown = 0;
|
||||
int osdhightile = 1;
|
||||
int osdshown = 0;
|
||||
|
||||
#ifdef EDUKE32_TOUCH_DEVICES
|
||||
float osdscale = 2.f, osdrscale = 0.5f;
|
||||
|
|
|
@ -28,6 +28,6 @@ int32_t GAME_getrowheight(int32_t h);
|
|||
void GAME_onshowosd(int32_t shown);
|
||||
void GAME_clearbackground(int32_t numcols, int32_t numrows);
|
||||
|
||||
extern int32_t osdhightile;
|
||||
extern int32_t osdshown;
|
||||
extern int osdhightile;
|
||||
extern int osdshown;
|
||||
extern float osdscale, osdrscale;
|
||||
|
|
Loading…
Reference in a new issue