mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-14 05:41:02 +00:00
Remove FUNCMATH from functions with a void return value or args, or examine variables other than their args (which could be modified)
This commit is contained in:
parent
c47f0045d6
commit
0bdbdd1b1e
12 changed files with 26 additions and 33 deletions
|
@ -7769,7 +7769,7 @@ fixed_t get_number(const char *word)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void FUNCMATH DEH_Check(void)
|
void DEH_Check(void)
|
||||||
{
|
{
|
||||||
#if defined(_DEBUG) || defined(PARANOIA)
|
#if defined(_DEBUG) || defined(PARANOIA)
|
||||||
const size_t dehstates = sizeof(STATE_LIST)/sizeof(const char*);
|
const size_t dehstates = sizeof(STATE_LIST)/sizeof(const char*);
|
||||||
|
|
|
@ -1401,6 +1401,7 @@ void F_StartGameEnd(void)
|
||||||
//
|
//
|
||||||
void F_GameEndDrawer(void)
|
void F_GameEndDrawer(void)
|
||||||
{
|
{
|
||||||
|
// this function does nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -35,7 +35,7 @@ void F_CutsceneTicker(void);
|
||||||
void F_TitleDemoTicker(void);
|
void F_TitleDemoTicker(void);
|
||||||
|
|
||||||
// Called by main loop.
|
// Called by main loop.
|
||||||
FUNCMATH void F_GameEndDrawer(void);
|
void F_GameEndDrawer(void);
|
||||||
void F_IntroDrawer(void);
|
void F_IntroDrawer(void);
|
||||||
void F_TitleScreenDrawer(void);
|
void F_TitleScreenDrawer(void);
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ extern lighttable_t **planezlight;
|
||||||
extern fixed_t *yslope;
|
extern fixed_t *yslope;
|
||||||
extern fixed_t distscale[MAXVIDWIDTH];
|
extern fixed_t distscale[MAXVIDWIDTH];
|
||||||
|
|
||||||
FUNCMATH void R_InitPlanes(void);
|
void R_InitPlanes(void);
|
||||||
void R_PortalStoreClipValues(INT32 start, INT32 end, INT16 *ceil, INT16 *floor, fixed_t *scale);
|
void R_PortalStoreClipValues(INT32 start, INT32 end, INT16 *ceil, INT16 *floor, fixed_t *scale);
|
||||||
void R_PortalRestoreClipValues(INT32 start, INT32 end, INT16 *ceil, INT16 *floor, fixed_t *scale);
|
void R_PortalRestoreClipValues(INT32 start, INT32 end, INT16 *ceil, INT16 *floor, fixed_t *scale);
|
||||||
void R_ClearPlanes(void);
|
void R_ClearPlanes(void);
|
||||||
|
|
|
@ -63,11 +63,7 @@ typedef struct floorsplat_s
|
||||||
fixed_t P_SegLength(seg_t *seg);
|
fixed_t P_SegLength(seg_t *seg);
|
||||||
|
|
||||||
// call at P_SetupLevel()
|
// call at P_SetupLevel()
|
||||||
#if !(defined (WALLSPLATS) || defined (FLOORSPLATS))
|
|
||||||
FUNCMATH void R_ClearLevelSplats(void);
|
|
||||||
#else
|
|
||||||
void R_ClearLevelSplats(void);
|
void R_ClearLevelSplats(void);
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WALLSPLATS
|
#ifdef WALLSPLATS
|
||||||
void R_AddWallSplat(line_t *wallline, INT16 sectorside, const char *patchname, fixed_t top,
|
void R_AddWallSplat(line_t *wallline, INT16 sectorside, const char *patchname, fixed_t top,
|
||||||
|
|
|
@ -71,11 +71,7 @@ consvar_t cv_scr_depth = {"scr_depth", "16 bits", CV_SAVE, scr_depth_cons_t, NUL
|
||||||
#endif
|
#endif
|
||||||
consvar_t cv_renderview = {"renderview", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_renderview = {"renderview", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
#ifdef DIRECTFULLSCREEN
|
|
||||||
static FUNCMATH void SCR_ChangeFullscreen (void);
|
|
||||||
#else
|
|
||||||
static void SCR_ChangeFullscreen (void);
|
static void SCR_ChangeFullscreen (void);
|
||||||
#endif
|
|
||||||
|
|
||||||
consvar_t cv_fullscreen = {"fullscreen", "Yes", CV_SAVE|CV_CALL, CV_YesNo, SCR_ChangeFullscreen, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_fullscreen = {"fullscreen", "Yes", CV_SAVE|CV_CALL, CV_YesNo, SCR_ChangeFullscreen, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
|
|
|
@ -12,19 +12,19 @@ consvar_t cd_volume = {"cd_volume","31",CV_SAVE,soundvolume_cons_t, NULL, 0, NUL
|
||||||
consvar_t cdUpdate = {"cd_update","1",CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cdUpdate = {"cd_update","1",CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
|
|
||||||
FUNCMATH void I_InitCD(void){}
|
void I_InitCD(void){}
|
||||||
|
|
||||||
FUNCMATH void I_StopCD(void){}
|
void I_StopCD(void){}
|
||||||
|
|
||||||
FUNCMATH void I_PauseCD(void){}
|
void I_PauseCD(void){}
|
||||||
|
|
||||||
FUNCMATH void I_ResumeCD(void){}
|
void I_ResumeCD(void){}
|
||||||
|
|
||||||
FUNCMATH void I_ShutdownCD(void){}
|
void I_ShutdownCD(void){}
|
||||||
|
|
||||||
FUNCMATH void I_UpdateCD(void){}
|
void I_UpdateCD(void){}
|
||||||
|
|
||||||
FUNCMATH void I_PlayCD(UINT8 track, UINT8 looping)
|
void I_PlayCD(UINT8 track, UINT8 looping)
|
||||||
{
|
{
|
||||||
(void)track;
|
(void)track;
|
||||||
(void)looping;
|
(void)looping;
|
||||||
|
|
|
@ -1927,14 +1927,14 @@ void I_StartupMouse2(void)
|
||||||
//
|
//
|
||||||
// I_Tactile
|
// I_Tactile
|
||||||
//
|
//
|
||||||
FUNCMATH void I_Tactile(FFType pFFType, const JoyFF_t *FFEffect)
|
void I_Tactile(FFType pFFType, const JoyFF_t *FFEffect)
|
||||||
{
|
{
|
||||||
// UNUSED.
|
// UNUSED.
|
||||||
(void)pFFType;
|
(void)pFFType;
|
||||||
(void)FFEffect;
|
(void)FFEffect;
|
||||||
}
|
}
|
||||||
|
|
||||||
FUNCMATH void I_Tactile2(FFType pFFType, const JoyFF_t *FFEffect)
|
void I_Tactile2(FFType pFFType, const JoyFF_t *FFEffect)
|
||||||
{
|
{
|
||||||
// UNUSED.
|
// UNUSED.
|
||||||
(void)pFFType;
|
(void)pFFType;
|
||||||
|
@ -1945,7 +1945,7 @@ FUNCMATH void I_Tactile2(FFType pFFType, const JoyFF_t *FFEffect)
|
||||||
*/
|
*/
|
||||||
static ticcmd_t emptycmd;
|
static ticcmd_t emptycmd;
|
||||||
|
|
||||||
FUNCMATH ticcmd_t *I_BaseTiccmd(void)
|
ticcmd_t *I_BaseTiccmd(void)
|
||||||
{
|
{
|
||||||
return &emptycmd;
|
return &emptycmd;
|
||||||
}
|
}
|
||||||
|
@ -1954,7 +1954,7 @@ FUNCMATH ticcmd_t *I_BaseTiccmd(void)
|
||||||
*/
|
*/
|
||||||
static ticcmd_t emptycmd2;
|
static ticcmd_t emptycmd2;
|
||||||
|
|
||||||
FUNCMATH ticcmd_t *I_BaseTiccmd2(void)
|
ticcmd_t *I_BaseTiccmd2(void)
|
||||||
{
|
{
|
||||||
return &emptycmd2;
|
return &emptycmd2;
|
||||||
}
|
}
|
||||||
|
@ -2048,7 +2048,7 @@ tic_t I_GetTime (void)
|
||||||
//
|
//
|
||||||
//I_StartupTimer
|
//I_StartupTimer
|
||||||
//
|
//
|
||||||
FUNCMATH void I_StartupTimer(void)
|
void I_StartupTimer(void)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// for win2k time bug
|
// for win2k time bug
|
||||||
|
@ -2147,11 +2147,11 @@ void I_WaitVBL(INT32 count)
|
||||||
SDL_Delay(count);
|
SDL_Delay(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
FUNCMATH void I_BeginRead(void)
|
void I_BeginRead(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
FUNCMATH void I_EndRead(void)
|
void I_EndRead(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2939,5 +2939,5 @@ const CPUInfoFlags *I_CPUInfo(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// note CPUAFFINITY code used to reside here
|
// note CPUAFFINITY code used to reside here
|
||||||
FUNCMATH void I_RegisterSysCommands(void) {}
|
void I_RegisterSysCommands(void) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1053,7 +1053,7 @@ void I_SetPalette(RGBA_t *palette)
|
||||||
}
|
}
|
||||||
|
|
||||||
// return number of fullscreen + X11 modes
|
// return number of fullscreen + X11 modes
|
||||||
FUNCMATH INT32 VID_NumModes(void)
|
INT32 VID_NumModes(void)
|
||||||
{
|
{
|
||||||
if (USE_FULLSCREEN && numVidModes != -1)
|
if (USE_FULLSCREEN && numVidModes != -1)
|
||||||
return numVidModes - firstEntry;
|
return numVidModes - firstEntry;
|
||||||
|
@ -1061,7 +1061,7 @@ FUNCMATH INT32 VID_NumModes(void)
|
||||||
return MAXWINMODES;
|
return MAXWINMODES;
|
||||||
}
|
}
|
||||||
|
|
||||||
FUNCMATH const char *VID_GetModeName(INT32 modeNum)
|
const char *VID_GetModeName(INT32 modeNum)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
if (USE_FULLSCREEN && numVidModes != -1) // fullscreen modes
|
if (USE_FULLSCREEN && numVidModes != -1) // fullscreen modes
|
||||||
|
@ -1091,7 +1091,7 @@ FUNCMATH const char *VID_GetModeName(INT32 modeNum)
|
||||||
return &vidModeName[modeNum][0];
|
return &vidModeName[modeNum][0];
|
||||||
}
|
}
|
||||||
|
|
||||||
FUNCMATH INT32 VID_GetModeForSize(INT32 w, INT32 h)
|
INT32 VID_GetModeForSize(INT32 w, INT32 h)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < MAXWINMODES; i++)
|
for (i = 0; i < MAXWINMODES; i++)
|
||||||
|
|
|
@ -135,7 +135,7 @@ void I_ShutdownSound(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
FUNCMATH void I_UpdateSound(void)
|
void I_UpdateSound(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -504,7 +504,7 @@ static void mix_gme(void *udata, Uint8 *stream, int len)
|
||||||
/// Music System
|
/// Music System
|
||||||
/// ------------------------
|
/// ------------------------
|
||||||
|
|
||||||
FUNCMATH void I_InitMusic(void)
|
void I_InitMusic(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -219,7 +219,7 @@ static void Snd_UnlockAudio(void) //Alam: Unlock audio data and reinstall audio
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
FUNCMATH static inline Uint16 Snd_LowerRate(Uint16 sr)
|
static inline Uint16 Snd_LowerRate(Uint16 sr)
|
||||||
{
|
{
|
||||||
if (sr <= audio.freq) // already lowered rate?
|
if (sr <= audio.freq) // already lowered rate?
|
||||||
return sr; // good then
|
return sr; // good then
|
||||||
|
|
|
@ -236,7 +236,7 @@ static void Snd_UnlockAudio(void) //Alam: Unlock audio data and reinstall audio
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
FUNCMATH static inline Uint16 Snd_LowerRate(Uint16 sr)
|
static inline Uint16 Snd_LowerRate(Uint16 sr)
|
||||||
{
|
{
|
||||||
if (sr <= audio.freq) // already lowered rate?
|
if (sr <= audio.freq) // already lowered rate?
|
||||||
return sr; // good then
|
return sr; // good then
|
||||||
|
|
Loading…
Reference in a new issue