mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
- r_drawweapon, r_showfps, r_showfpsperiod
This commit is contained in:
parent
e5d38b2d30
commit
5dec4736ce
17 changed files with 63 additions and 69 deletions
|
@ -286,7 +286,6 @@ void CONFIG_SetDefaults(void)
|
||||||
//ud.default_skill = 1;
|
//ud.default_skill = 1;
|
||||||
gUpscaleFactor = 0;
|
gUpscaleFactor = 0;
|
||||||
//ud.display_bonus_screen = 1;
|
//ud.display_bonus_screen = 1;
|
||||||
//ud.drawweapon = 1;
|
|
||||||
//ud.hudontop = 0; = 1;
|
//ud.hudontop = 0; = 1;
|
||||||
gPowerupDuration = 1;
|
gPowerupDuration = 1;
|
||||||
//ud.lockout = 0;
|
//ud.lockout = 0;
|
||||||
|
|
|
@ -744,7 +744,7 @@ void CCheatMgr::Process(CCheatMgr::CHEATCODE nCheatCode, char* pzArgs)
|
||||||
if (gDemo.at0) return;
|
if (gDemo.at0) return;
|
||||||
if (nCheatCode == kCheatRate)
|
if (nCheatCode == kCheatRate)
|
||||||
{
|
{
|
||||||
gShowFps = !gShowFps;
|
r_showfps = !r_showfps;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (gGameOptions.nGameType != 0)
|
if (gGameOptions.nGameType != 0)
|
||||||
|
|
|
@ -3738,8 +3738,6 @@ void viewResetCrosshairToDefault(void)
|
||||||
|
|
||||||
#define FPS_COLOR(x) ((x) ? COLOR_RED : COLOR_WHITE)
|
#define FPS_COLOR(x) ((x) ? COLOR_RED : COLOR_WHITE)
|
||||||
|
|
||||||
int32_t gShowFps, gFramePeriod;
|
|
||||||
|
|
||||||
void viewPrintFPS(void)
|
void viewPrintFPS(void)
|
||||||
{
|
{
|
||||||
char tempbuf[128];
|
char tempbuf[128];
|
||||||
|
@ -3757,7 +3755,7 @@ void viewPrintFPS(void)
|
||||||
{
|
{
|
||||||
int32_t x = (xdim <= 640);
|
int32_t x = (xdim <= 640);
|
||||||
|
|
||||||
if (gShowFps)
|
if (r_showfps)
|
||||||
{
|
{
|
||||||
int32_t chars = Bsprintf(tempbuf, "%.1f ms, %5.1f fps", frameDelay, lastFPS);
|
int32_t chars = Bsprintf(tempbuf, "%.1f ms, %5.1f fps", frameDelay, lastFPS);
|
||||||
|
|
||||||
|
@ -3765,7 +3763,7 @@ void viewPrintFPS(void)
|
||||||
printext256(windowxy2.x-(chars<<(3-x)), windowxy1.y+1+FPS_YOFFSET,
|
printext256(windowxy2.x-(chars<<(3-x)), windowxy1.y+1+FPS_YOFFSET,
|
||||||
FPS_COLOR(lastFPS < LOW_FPS), -1, tempbuf, x);
|
FPS_COLOR(lastFPS < LOW_FPS), -1, tempbuf, x);
|
||||||
|
|
||||||
if (gShowFps > 1)
|
if (r_showfps > 1)
|
||||||
{
|
{
|
||||||
chars = Bsprintf(tempbuf, "max: %5.1f fps", maxFPS);
|
chars = Bsprintf(tempbuf, "max: %5.1f fps", maxFPS);
|
||||||
|
|
||||||
|
@ -3779,7 +3777,7 @@ void viewPrintFPS(void)
|
||||||
printext256(windowxy2.x-(chars<<(3-x)), windowxy1.y+20+FPS_YOFFSET,
|
printext256(windowxy2.x-(chars<<(3-x)), windowxy1.y+20+FPS_YOFFSET,
|
||||||
FPS_COLOR(minFPS < LOW_FPS), -1, tempbuf, x);
|
FPS_COLOR(minFPS < LOW_FPS), -1, tempbuf, x);
|
||||||
}
|
}
|
||||||
if (gShowFps > 2)
|
if (r_showfps > 2)
|
||||||
{
|
{
|
||||||
if (g_gameUpdateTime > maxGameUpdate) maxGameUpdate = g_gameUpdateTime;
|
if (g_gameUpdateTime > maxGameUpdate) maxGameUpdate = g_gameUpdateTime;
|
||||||
if (g_gameUpdateTime < minGameUpdate) minGameUpdate = g_gameUpdateTime;
|
if (g_gameUpdateTime < minGameUpdate) minGameUpdate = g_gameUpdateTime;
|
||||||
|
@ -3835,14 +3833,14 @@ void viewPrintFPS(void)
|
||||||
frameCount = 0;
|
frameCount = 0;
|
||||||
cumulativeFrameDelay = 0.0;
|
cumulativeFrameDelay = 0.0;
|
||||||
|
|
||||||
if (gShowFps > 1)
|
if (r_showfps > 1)
|
||||||
{
|
{
|
||||||
if (lastFPS > maxFPS) maxFPS = lastFPS;
|
if (lastFPS > maxFPS) maxFPS = lastFPS;
|
||||||
if (lastFPS < minFPS) minFPS = lastFPS;
|
if (lastFPS < minFPS) minFPS = lastFPS;
|
||||||
|
|
||||||
static int secondCounter;
|
static int secondCounter;
|
||||||
|
|
||||||
if (++secondCounter >= gFramePeriod)
|
if (++secondCounter >= r_showfpsperiod)
|
||||||
{
|
{
|
||||||
maxFPS = (lastFPS + maxFPS) * .5f;
|
maxFPS = (lastFPS + maxFPS) * .5f;
|
||||||
minFPS = (lastFPS + minFPS) * .5f;
|
minFPS = (lastFPS + minFPS) * .5f;
|
||||||
|
|
|
@ -103,7 +103,6 @@ extern int32_t r_maxfpsoffset;
|
||||||
extern double g_frameDelay;
|
extern double g_frameDelay;
|
||||||
extern float r_ambientlight, r_ambientlightrecip;
|
extern float r_ambientlight, r_ambientlightrecip;
|
||||||
extern int gLastPal;
|
extern int gLastPal;
|
||||||
extern int32_t gShowFps, gFramePeriod;
|
|
||||||
|
|
||||||
|
|
||||||
static inline double calcFrameDelay(int maxFPS) { return maxFPS ? ((double)timerGetFreqU64() / (double)(maxFPS)) : 0.0; }
|
static inline double calcFrameDelay(int maxFPS) { return maxFPS ? ((double)timerGetFreqU64() / (double)(maxFPS)) : 0.0; }
|
||||||
|
|
|
@ -250,20 +250,27 @@ CUSTOM_CVARD(Bool, in_mousesmoothing, false, CVAR_GLOBALCONFIG|CVAR_ARCHIVE, "en
|
||||||
CONTROL_SmoothMouse = self;
|
CONTROL_SmoothMouse = self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CUSTOM_CVARD(Int, r_drawweapon, 1, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disable weapon drawing")
|
||||||
|
{
|
||||||
|
if (self < 0 || self > 2) self = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
CUSTOM_CVARD(Int, r_showfps, 0, 0, "show the frame rate counter")
|
||||||
|
{
|
||||||
|
if (self < 0 || self > 3) self = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
CUSTOM_CVARD(Int, r_showfpsperiod, 0, 0, "time in seconds before averaging min and max stats for r_showfps 2+")
|
||||||
|
{
|
||||||
|
if (self < 0 || self > 5) self = 1;
|
||||||
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
||||||
{ "in_mousesmoothing", , (void *)&in_mousesmoothing.Value, CVAR_BOOL, 0, 1 },
|
|
||||||
|
|
||||||
{ "in_mousesmoothing", "enable/disable mouse input smoothing", (void *)&in_mousesmoothing.Value, CVAR_BOOL, 0, 1 },
|
|
||||||
|
|
||||||
// DN3D
|
// DN3D
|
||||||
static osdcvardata_t cvars_game[] =
|
static osdcvardata_t cvars_game[] =
|
||||||
{
|
{
|
||||||
|
|
||||||
{ "r_camrefreshdelay", "minimum delay between security camera sprite updates, 120 = 1 second", (void *)&ud.camera_time, CVAR_INT, 1, 240 },
|
|
||||||
{ "r_drawweapon", "enable/disable weapon drawing", (void *)&ud.drawweapon, CVAR_INT, 0, 2 },
|
|
||||||
{ "r_showfps", "show the frame rate counter", (void *)&ud.showfps, CVAR_INT, 0, 3 },
|
|
||||||
{ "r_showfpsperiod", "time in seconds before averaging min and max stats for r_showfps 2+", (void *)&ud.frameperiod, CVAR_INT, 0, 5 },
|
|
||||||
{ "r_shadows", "enable/disable sprite and model shadows", (void *)&ud.shadows, CVAR_BOOL, 0, 1 },
|
{ "r_shadows", "enable/disable sprite and model shadows", (void *)&ud.shadows, CVAR_BOOL, 0, 1 },
|
||||||
{ "r_rotatespritenowidescreen", "pass bit 1024 to all CON rotatesprite calls", (void *)&g_rotatespriteNoWidescreen, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
{ "r_rotatespritenowidescreen", "pass bit 1024 to all CON rotatesprite calls", (void *)&g_rotatespriteNoWidescreen, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
||||||
{ "r_precache", "enable/disable the pre-level caching routine", (void *)&ud.config.useprecache, CVAR_BOOL, 0, 1 },
|
{ "r_precache", "enable/disable the pre-level caching routine", (void *)&ud.config.useprecache, CVAR_BOOL, 0, 1 },
|
||||||
|
@ -301,10 +308,6 @@ CUSTOM_CVARD(Bool, in_mousesmoothing, false, CVAR_GLOBALCONFIG|CVAR_ARCHIVE, "en
|
||||||
|
|
||||||
static osdcvardata_t cvars_game[] =
|
static osdcvardata_t cvars_game[] =
|
||||||
{
|
{
|
||||||
{ "r_camrefreshdelay", "minimum delay between security camera sprite updates, 120 = 1 second", (void *)&ud.camera_time, CVAR_INT, 1, 240 },
|
|
||||||
{ "r_drawweapon", "enable/disable weapon drawing", (void *)&ud.drawweapon, CVAR_INT, 0, 2 },
|
|
||||||
{ "r_showfps", "show the frame rate counter", (void *)&ud.showfps, CVAR_INT, 0, 3 },
|
|
||||||
{ "r_showfpsperiod", "time in seconds before averaging min and max stats for r_showfps 2+", (void *)&ud.frameperiod, CVAR_INT, 0, 5 },
|
|
||||||
{ "r_shadows", "enable/disable sprite and model shadows", (void *)&ud.shadows, CVAR_BOOL, 0, 1 },
|
{ "r_shadows", "enable/disable sprite and model shadows", (void *)&ud.shadows, CVAR_BOOL, 0, 1 },
|
||||||
{ "r_rotatespritenowidescreen", "pass bit 1024 to all CON rotatesprite calls", (void *)&g_rotatespriteNoWidescreen, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
{ "r_rotatespritenowidescreen", "pass bit 1024 to all CON rotatesprite calls", (void *)&g_rotatespriteNoWidescreen, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
||||||
{ "r_precache", "enable/disable the pre-level caching routine", (void *)&ud.config.useprecache, CVAR_BOOL, 0, 1 },
|
{ "r_precache", "enable/disable the pre-level caching routine", (void *)&ud.config.useprecache, CVAR_BOOL, 0, 1 },
|
||||||
|
@ -345,11 +348,7 @@ int32_t registerosdcommands(void)
|
||||||
char buffer[256];
|
char buffer[256];
|
||||||
static osdcvardata_t cvars_game[] =
|
static osdcvardata_t cvars_game[] =
|
||||||
{
|
{
|
||||||
//
|
|
||||||
// { "r_camrefreshdelay", "minimum delay between security camera sprite updates, 120 = 1 second", (void *)&ud.camera_time, CVAR_INT, 1, 240 },
|
|
||||||
// { "r_drawweapon", "enable/disable weapon drawing", (void *)&ud.drawweapon, CVAR_INT, 0, 2 },
|
|
||||||
{ "r_showfps", "show the frame rate counter", (void *)&gShowFps, CVAR_INT, 0, 3 },
|
|
||||||
{ "r_showfpsperiod", "time in seconds before averaging min and max stats for r_showfps 2+", (void *)&gFramePeriod, CVAR_INT, 0, 5 },
|
|
||||||
// { "r_shadows", "enable/disable sprite and model shadows", (void *)&ud.shadows, CVAR_BOOL, 0, 1 },
|
// { "r_shadows", "enable/disable sprite and model shadows", (void *)&ud.shadows, CVAR_BOOL, 0, 1 },
|
||||||
// { "r_rotatespritenowidescreen", "pass bit 1024 to all CON rotatesprite calls", (void *)&g_rotatespriteNoWidescreen, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
// { "r_rotatespritenowidescreen", "pass bit 1024 to all CON rotatesprite calls", (void *)&g_rotatespriteNoWidescreen, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
||||||
},
|
},
|
||||||
|
@ -412,5 +411,8 @@ int32_t registerosdcommands(void)
|
||||||
{ "in_mousemode", "toggles vertical mouse view", (void *)&in_mousemode.Value, CVAR_BOOL, 0, 1 },
|
{ "in_mousemode", "toggles vertical mouse view", (void *)&in_mousemode.Value, CVAR_BOOL, 0, 1 },
|
||||||
{ "in_mousemode", "toggles vertical mouse view", (void *)&gMouseAim, CVAR_BOOL, 0, 1 },
|
{ "in_mousemode", "toggles vertical mouse view", (void *)&gMouseAim, CVAR_BOOL, 0, 1 },
|
||||||
|
|
||||||
|
// This option is not really useful anymore
|
||||||
|
{ "r_camrefreshdelay", "minimum delay between security camera sprite updates, 120 = 1 second", (void *)&ud.camera_time, CVAR_INT, 1, 240 },
|
||||||
|
|
||||||
*/
|
*/
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -57,6 +57,9 @@ EXTERN_CVAR(Bool, hud_showmapname)
|
||||||
EXTERN_CVAR(Int, r_fov)
|
EXTERN_CVAR(Int, r_fov)
|
||||||
|
|
||||||
EXTERN_CVAR(Bool, r_horizcenter)
|
EXTERN_CVAR(Bool, r_horizcenter)
|
||||||
|
EXTERN_CVAR(Int, r_drawweapon)
|
||||||
|
EXTERN_CVAR(Int, r_showfps)
|
||||||
|
EXTERN_CVAR(Int, r_showfpsperiod)
|
||||||
|
|
||||||
EXTERN_CVAR(Bool, in_joystick)
|
EXTERN_CVAR(Bool, in_joystick)
|
||||||
EXTERN_CVAR(Bool, in_mouse)
|
EXTERN_CVAR(Bool, in_mouse)
|
||||||
|
|
|
@ -666,8 +666,9 @@ void G_DoCheats(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_RATE:
|
case CHEAT_RATE:
|
||||||
if (++ud.showfps > 3)
|
r_showfps = r_showfps+1;
|
||||||
ud.showfps = 0;
|
if (ud.showfps > 3)
|
||||||
|
r_showfps = 0;
|
||||||
|
|
||||||
end_cheat(pPlayer);
|
end_cheat(pPlayer);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -224,11 +224,8 @@ void CONFIG_SetDefaults(void)
|
||||||
ud.setup.bpp = 8;
|
ud.setup.bpp = 8;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined GEKKO || defined __OPENDINGUX__
|
|
||||||
ud.camera_time = 11;
|
ud.camera_time = 0;//4;
|
||||||
#else
|
|
||||||
ud.camera_time = 4;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
g_myAimMode = 1;
|
g_myAimMode = 1;
|
||||||
g_player[0].ps->aim_mode = 1;
|
g_player[0].ps->aim_mode = 1;
|
||||||
|
@ -250,7 +247,7 @@ void CONFIG_SetDefaults(void)
|
||||||
ud.default_skill = 1;
|
ud.default_skill = 1;
|
||||||
ud.detail = 0;
|
ud.detail = 0;
|
||||||
ud.display_bonus_screen = 1;
|
ud.display_bonus_screen = 1;
|
||||||
ud.drawweapon = 1;
|
|
||||||
ud.hudontop = 0;
|
ud.hudontop = 0;
|
||||||
ud.lockout = 0;
|
ud.lockout = 0;
|
||||||
ud.m_marker = 1;
|
ud.m_marker = 1;
|
||||||
|
|
|
@ -175,7 +175,7 @@ typedef struct {
|
||||||
int32_t camera_time,folfvel,folavel,folx,foly,fola;
|
int32_t camera_time,folfvel,folavel,folx,foly,fola;
|
||||||
int32_t reccnt;
|
int32_t reccnt;
|
||||||
|
|
||||||
int32_t runkey_mode,statusbarscale,weaponswitch,drawweapon; // JBF 20031125
|
int32_t runkey_mode,statusbarscale,weaponswitch; // JBF 20031125
|
||||||
int32_t color,msgdisptime,statusbarmode;
|
int32_t color,msgdisptime,statusbarmode;
|
||||||
int32_t m_noexits,noexits;
|
int32_t m_noexits,noexits;
|
||||||
int32_t team, althud, weaponscale, textscale;
|
int32_t team, althud, weaponscale, textscale;
|
||||||
|
@ -185,7 +185,7 @@ typedef struct {
|
||||||
int32_t menu_scrollbartilenum, menu_scrollbarz, menu_scrollcursorz;
|
int32_t menu_scrollbartilenum, menu_scrollbarz, menu_scrollcursorz;
|
||||||
|
|
||||||
int32_t entered_name,screen_tilting,shadows,fta_on,executions;
|
int32_t entered_name,screen_tilting,shadows,fta_on,executions;
|
||||||
int32_t showfps,m_coop,coop,screen_size,lockout;
|
int32_t m_coop,coop,screen_size,lockout;
|
||||||
int32_t playerai,angleinterpolation;
|
int32_t playerai,angleinterpolation;
|
||||||
|
|
||||||
int32_t respawn_monsters,respawn_items,respawn_inventory,recstat,monsters_off,brightness;
|
int32_t respawn_monsters,respawn_items,respawn_inventory,recstat,monsters_off,brightness;
|
||||||
|
@ -196,7 +196,7 @@ typedef struct {
|
||||||
|
|
||||||
int32_t playerbest;
|
int32_t playerbest;
|
||||||
|
|
||||||
int32_t configversion, bgstretch, frameperiod;
|
int32_t configversion, bgstretch;
|
||||||
|
|
||||||
int32_t default_volume, default_skill;
|
int32_t default_volume, default_skill;
|
||||||
|
|
||||||
|
|
|
@ -1413,7 +1413,7 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2)
|
||||||
case USERDEFS_EXECUTIONS: labelNum = ud.executions; break;
|
case USERDEFS_EXECUTIONS: labelNum = ud.executions; break;
|
||||||
case USERDEFS_AUTO_RUN: labelNum = cl_autorun; break;
|
case USERDEFS_AUTO_RUN: labelNum = cl_autorun; break;
|
||||||
case USERDEFS_COORDS: labelNum = cl_showcoords; break;
|
case USERDEFS_COORDS: labelNum = cl_showcoords; break;
|
||||||
case USERDEFS_TICKRATE: labelNum = ud.showfps; break;
|
case USERDEFS_TICKRATE: labelNum = r_showfps; break;
|
||||||
case USERDEFS_M_COOP: labelNum = ud.m_coop; break;
|
case USERDEFS_M_COOP: labelNum = ud.m_coop; break;
|
||||||
case USERDEFS_COOP: labelNum = ud.coop; break;
|
case USERDEFS_COOP: labelNum = ud.coop; break;
|
||||||
case USERDEFS_SCREEN_SIZE: labelNum = ud.screen_size; break;
|
case USERDEFS_SCREEN_SIZE: labelNum = ud.screen_size; break;
|
||||||
|
@ -1447,7 +1447,7 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2)
|
||||||
case USERDEFS_MARKER: labelNum = ud.marker; break;
|
case USERDEFS_MARKER: labelNum = ud.marker; break;
|
||||||
case USERDEFS_MOUSEFLIP: labelNum = !in_mouseflip; break;
|
case USERDEFS_MOUSEFLIP: labelNum = !in_mouseflip; break;
|
||||||
case USERDEFS_STATUSBARSCALE: labelNum = ud.statusbarscale; break;
|
case USERDEFS_STATUSBARSCALE: labelNum = ud.statusbarscale; break;
|
||||||
case USERDEFS_DRAWWEAPON: labelNum = ud.drawweapon; break;
|
case USERDEFS_DRAWWEAPON: labelNum = r_drawweapon; break;
|
||||||
case USERDEFS_MOUSEAIMING: labelNum = in_aimmode; break;
|
case USERDEFS_MOUSEAIMING: labelNum = in_aimmode; break;
|
||||||
case USERDEFS_WEAPONSWITCH: labelNum = cl_weaponswitch; break;
|
case USERDEFS_WEAPONSWITCH: labelNum = cl_weaponswitch; break;
|
||||||
case USERDEFS_DEMOCAMS: labelNum = cl_democams; break;
|
case USERDEFS_DEMOCAMS: labelNum = cl_democams; break;
|
||||||
|
@ -1609,7 +1609,7 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons
|
||||||
case USERDEFS_EXECUTIONS: ud.executions = iSet; break;
|
case USERDEFS_EXECUTIONS: ud.executions = iSet; break;
|
||||||
case USERDEFS_AUTO_RUN: cl_autorun = iSet; break; //!!!
|
case USERDEFS_AUTO_RUN: cl_autorun = iSet; break; //!!!
|
||||||
case USERDEFS_COORDS: cl_showcoords = iSet; break; //!!!
|
case USERDEFS_COORDS: cl_showcoords = iSet; break; //!!!
|
||||||
case USERDEFS_TICKRATE: ud.showfps = iSet; break;
|
case USERDEFS_TICKRATE: r_showfps = iSet; break;
|
||||||
case USERDEFS_M_COOP: ud.m_coop = iSet; break;
|
case USERDEFS_M_COOP: ud.m_coop = iSet; break;
|
||||||
case USERDEFS_COOP: ud.coop = iSet; break;
|
case USERDEFS_COOP: ud.coop = iSet; break;
|
||||||
case USERDEFS_SCREEN_SIZE:
|
case USERDEFS_SCREEN_SIZE:
|
||||||
|
@ -1648,7 +1648,7 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons
|
||||||
case USERDEFS_MARKER: ud.marker = iSet; break;
|
case USERDEFS_MARKER: ud.marker = iSet; break;
|
||||||
case USERDEFS_MOUSEFLIP: in_mouseflip = !iSet; break;//!!!
|
case USERDEFS_MOUSEFLIP: in_mouseflip = !iSet; break;//!!!
|
||||||
case USERDEFS_STATUSBARSCALE: ud.statusbarscale = iSet; break;
|
case USERDEFS_STATUSBARSCALE: ud.statusbarscale = iSet; break;
|
||||||
case USERDEFS_DRAWWEAPON: ud.drawweapon = iSet; break;
|
case USERDEFS_DRAWWEAPON: r_drawweapon = iSet; break;//!!!
|
||||||
case USERDEFS_MOUSEAIMING: in_aoimmode = iSet; break;//!!!
|
case USERDEFS_MOUSEAIMING: in_aoimmode = iSet; break;//!!!
|
||||||
case USERDEFS_WEAPONSWITCH: cl_weaponswitch = iSet; break; //!!!
|
case USERDEFS_WEAPONSWITCH: cl_weaponswitch = iSet; break; //!!!
|
||||||
case USERDEFS_DEMOCAMS: cl_democams = iSet; break;
|
case USERDEFS_DEMOCAMS: cl_democams = iSet; break;
|
||||||
|
|
|
@ -2190,7 +2190,7 @@ void P_DisplayWeapon(void)
|
||||||
#ifndef EDUKE32_STANDALONE
|
#ifndef EDUKE32_STANDALONE
|
||||||
int const quickKickFrame = 14 - pPlayer->quick_kick;
|
int const quickKickFrame = 14 - pPlayer->quick_kick;
|
||||||
|
|
||||||
if (!FURY && (quickKickFrame != 14 || pPlayer->last_quick_kick) && ud.drawweapon == 1)
|
if (!FURY && (quickKickFrame != 14 || pPlayer->last_quick_kick) && r_drawweapon == 1)
|
||||||
{
|
{
|
||||||
int const weaponPal = P_GetKneePal(pPlayer);
|
int const weaponPal = P_GetKneePal(pPlayer);
|
||||||
|
|
||||||
|
@ -2229,7 +2229,7 @@ void P_DisplayWeapon(void)
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
switch (ud.drawweapon)
|
switch (r_drawweapon)
|
||||||
{
|
{
|
||||||
case 1: break;
|
case 1: break;
|
||||||
#ifndef EDUKE32_STANDALONE
|
#ifndef EDUKE32_STANDALONE
|
||||||
|
|
|
@ -734,7 +734,7 @@ static void G_PrintFPS(void)
|
||||||
{
|
{
|
||||||
int32_t x = (xdim <= 640);
|
int32_t x = (xdim <= 640);
|
||||||
|
|
||||||
if (ud.showfps)
|
if (r_showfps)
|
||||||
{
|
{
|
||||||
int32_t chars = Bsprintf(tempbuf, "%.1f ms, %5.1f fps", frameDelay, lastFPS);
|
int32_t chars = Bsprintf(tempbuf, "%.1f ms, %5.1f fps", frameDelay, lastFPS);
|
||||||
|
|
||||||
|
@ -742,7 +742,7 @@ static void G_PrintFPS(void)
|
||||||
printext256(windowxy2.x-(chars<<(3-x)), windowxy1.y+1+FPS_YOFFSET,
|
printext256(windowxy2.x-(chars<<(3-x)), windowxy1.y+1+FPS_YOFFSET,
|
||||||
FPS_COLOR(lastFPS < LOW_FPS), -1, tempbuf, x);
|
FPS_COLOR(lastFPS < LOW_FPS), -1, tempbuf, x);
|
||||||
|
|
||||||
if (ud.showfps > 1)
|
if (r_showfps > 1)
|
||||||
{
|
{
|
||||||
chars = Bsprintf(tempbuf, "max: %5.1f fps", maxFPS);
|
chars = Bsprintf(tempbuf, "max: %5.1f fps", maxFPS);
|
||||||
|
|
||||||
|
@ -756,7 +756,7 @@ static void G_PrintFPS(void)
|
||||||
printext256(windowxy2.x-(chars<<(3-x)), windowxy1.y+20+FPS_YOFFSET,
|
printext256(windowxy2.x-(chars<<(3-x)), windowxy1.y+20+FPS_YOFFSET,
|
||||||
FPS_COLOR(minFPS < LOW_FPS), -1, tempbuf, x);
|
FPS_COLOR(minFPS < LOW_FPS), -1, tempbuf, x);
|
||||||
}
|
}
|
||||||
if (ud.showfps > 2)
|
if (r_showfps > 2)
|
||||||
{
|
{
|
||||||
if (g_gameUpdateTime > maxGameUpdate) maxGameUpdate = g_gameUpdateTime;
|
if (g_gameUpdateTime > maxGameUpdate) maxGameUpdate = g_gameUpdateTime;
|
||||||
if (g_gameUpdateTime < minGameUpdate) minGameUpdate = g_gameUpdateTime;
|
if (g_gameUpdateTime < minGameUpdate) minGameUpdate = g_gameUpdateTime;
|
||||||
|
@ -804,14 +804,14 @@ static void G_PrintFPS(void)
|
||||||
frameCount = 0;
|
frameCount = 0;
|
||||||
cumulativeFrameDelay = 0.0;
|
cumulativeFrameDelay = 0.0;
|
||||||
|
|
||||||
if (ud.showfps > 1)
|
if (r_showfps > 1)
|
||||||
{
|
{
|
||||||
if (lastFPS > maxFPS) maxFPS = lastFPS;
|
if (lastFPS > maxFPS) maxFPS = lastFPS;
|
||||||
if (lastFPS < minFPS) minFPS = lastFPS;
|
if (lastFPS < minFPS) minFPS = lastFPS;
|
||||||
|
|
||||||
static int secondCounter;
|
static int secondCounter;
|
||||||
|
|
||||||
if (++secondCounter >= ud.frameperiod)
|
if (++secondCounter >= r_showfpsperiod)
|
||||||
{
|
{
|
||||||
maxFPS = (lastFPS + maxFPS) * .5f;
|
maxFPS = (lastFPS + maxFPS) * .5f;
|
||||||
minFPS = (lastFPS + minFPS) * .5f;
|
minFPS = (lastFPS + minFPS) * .5f;
|
||||||
|
|
|
@ -673,8 +673,9 @@ void G_DoCheats(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_RATE:
|
case CHEAT_RATE:
|
||||||
if (++ud.showfps > 3)
|
r_showfps = r_showfps+1;
|
||||||
ud.showfps = 0;
|
if (r_showfps > 3)
|
||||||
|
r_showfps = 0;
|
||||||
|
|
||||||
end_cheat(pPlayer);
|
end_cheat(pPlayer);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -220,17 +220,11 @@ void CONFIG_SetDefaults(void)
|
||||||
ud.brightness = 8;
|
ud.brightness = 8;
|
||||||
ud.camerasprite = -1;
|
ud.camerasprite = -1;
|
||||||
|
|
||||||
#if defined GEKKO || defined __OPENDINGUX__
|
ud.camera_time = 0;//4;
|
||||||
ud.camera_time = 11;
|
|
||||||
#elif defined(__ANDROID__)
|
|
||||||
ud.camera_time = 7;
|
|
||||||
#else
|
|
||||||
ud.camera_time = 4;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ud.color = 0;
|
ud.color = 0;
|
||||||
ud.detail = 0;
|
ud.detail = 0;
|
||||||
ud.drawweapon = 1;
|
r_drawweapon = 1;
|
||||||
ud.lockout = 0;
|
ud.lockout = 0;
|
||||||
ud.m_ffire = 1;
|
ud.m_ffire = 1;
|
||||||
ud.m_marker = 1;
|
ud.m_marker = 1;
|
||||||
|
|
|
@ -154,7 +154,7 @@ typedef struct {
|
||||||
int32_t camera_time,folfvel,folavel,folx,foly,fola;
|
int32_t camera_time,folfvel,folavel,folx,foly,fola;
|
||||||
int32_t reccnt;
|
int32_t reccnt;
|
||||||
|
|
||||||
int32_t runkey_mode,statusbarscale,weaponswitch,drawweapon; // JBF 20031125
|
int32_t runkey_mode,statusbarscale,weaponswitch; // JBF 20031125
|
||||||
int32_t color,msgdisptime,statusbarmode;
|
int32_t color,msgdisptime,statusbarmode;
|
||||||
int32_t m_noexits,noexits,automsg;
|
int32_t m_noexits,noexits,automsg;
|
||||||
int32_t team, althud, weaponscale, textscale;
|
int32_t team, althud, weaponscale, textscale;
|
||||||
|
@ -164,7 +164,7 @@ typedef struct {
|
||||||
int32_t menu_scrollbartilenum, menu_scrollbarz, menu_scrollcursorz;
|
int32_t menu_scrollbartilenum, menu_scrollbarz, menu_scrollcursorz;
|
||||||
|
|
||||||
int32_t entered_name,screen_tilting,shadows,fta_on,executions;
|
int32_t entered_name,screen_tilting,shadows,fta_on,executions;
|
||||||
int32_t showfps,m_coop,coop,screen_size,lockout,crosshair;
|
int32_t m_coop,coop,screen_size,lockout,crosshair;
|
||||||
int32_t playerai,angleinterpolation;
|
int32_t playerai,angleinterpolation;
|
||||||
|
|
||||||
int32_t respawn_monsters,respawn_items,respawn_inventory,recstat,monsters_off,brightness;
|
int32_t respawn_monsters,respawn_items,respawn_inventory,recstat,monsters_off,brightness;
|
||||||
|
@ -175,7 +175,7 @@ typedef struct {
|
||||||
|
|
||||||
int32_t playerbest;
|
int32_t playerbest;
|
||||||
|
|
||||||
int32_t configversion, bgstretch, frameperiod;
|
int32_t configversion, bgstretch;
|
||||||
|
|
||||||
int32_t default_volume, default_skill;
|
int32_t default_volume, default_skill;
|
||||||
|
|
||||||
|
|
|
@ -1761,7 +1761,7 @@ void P_DisplayWeapon(void)
|
||||||
|
|
||||||
quickKickFrame = 14 - pPlayer->quick_kick;
|
quickKickFrame = 14 - pPlayer->quick_kick;
|
||||||
|
|
||||||
if (!RR && (quickKickFrame != 14 || pPlayer->last_quick_kick) && ud.drawweapon == 1)
|
if (!RR && (quickKickFrame != 14 || pPlayer->last_quick_kick) && r_drawweapon == 1)
|
||||||
{
|
{
|
||||||
int const weaponPal = P_GetKneePal(pPlayer);
|
int const weaponPal = P_GetKneePal(pPlayer);
|
||||||
|
|
||||||
|
@ -1910,7 +1910,7 @@ void P_DisplayWeapon(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch (ud.drawweapon)
|
switch (r_drawweapon)
|
||||||
{
|
{
|
||||||
case 1: break;
|
case 1: break;
|
||||||
case 2:
|
case 2:
|
||||||
|
|
|
@ -731,7 +731,7 @@ static void G_PrintFPS(void)
|
||||||
{
|
{
|
||||||
int32_t x = (xdim <= 640);
|
int32_t x = (xdim <= 640);
|
||||||
|
|
||||||
if (ud.showfps)
|
if (r_showfps)
|
||||||
{
|
{
|
||||||
int32_t chars = Bsprintf(tempbuf, "%.1f ms, %5.1f fps", frameDelay, lastFPS);
|
int32_t chars = Bsprintf(tempbuf, "%.1f ms, %5.1f fps", frameDelay, lastFPS);
|
||||||
|
|
||||||
|
@ -739,7 +739,7 @@ static void G_PrintFPS(void)
|
||||||
printext256(windowxy2.x-(chars<<(3-x)), windowxy1.y+1+FPS_YOFFSET,
|
printext256(windowxy2.x-(chars<<(3-x)), windowxy1.y+1+FPS_YOFFSET,
|
||||||
FPS_COLOR(lastFPS < LOW_FPS), -1, tempbuf, x);
|
FPS_COLOR(lastFPS < LOW_FPS), -1, tempbuf, x);
|
||||||
|
|
||||||
if (ud.showfps > 1)
|
if (r_showfps > 1)
|
||||||
{
|
{
|
||||||
chars = Bsprintf(tempbuf, "max: %5.1f fps", maxFPS);
|
chars = Bsprintf(tempbuf, "max: %5.1f fps", maxFPS);
|
||||||
|
|
||||||
|
@ -753,7 +753,7 @@ static void G_PrintFPS(void)
|
||||||
printext256(windowxy2.x-(chars<<(3-x)), windowxy1.y+20+FPS_YOFFSET,
|
printext256(windowxy2.x-(chars<<(3-x)), windowxy1.y+20+FPS_YOFFSET,
|
||||||
FPS_COLOR(minFPS < LOW_FPS), -1, tempbuf, x);
|
FPS_COLOR(minFPS < LOW_FPS), -1, tempbuf, x);
|
||||||
}
|
}
|
||||||
if (ud.showfps > 2)
|
if (r_showfps > 2)
|
||||||
{
|
{
|
||||||
if (g_gameUpdateTime > maxGameUpdate) maxGameUpdate = g_gameUpdateTime;
|
if (g_gameUpdateTime > maxGameUpdate) maxGameUpdate = g_gameUpdateTime;
|
||||||
if (g_gameUpdateTime < minGameUpdate) minGameUpdate = g_gameUpdateTime;
|
if (g_gameUpdateTime < minGameUpdate) minGameUpdate = g_gameUpdateTime;
|
||||||
|
@ -801,14 +801,14 @@ static void G_PrintFPS(void)
|
||||||
frameCount = 0;
|
frameCount = 0;
|
||||||
cumulativeFrameDelay = 0.0;
|
cumulativeFrameDelay = 0.0;
|
||||||
|
|
||||||
if (ud.showfps > 1)
|
if (r_showfps > 1)
|
||||||
{
|
{
|
||||||
if (lastFPS > maxFPS) maxFPS = lastFPS;
|
if (lastFPS > maxFPS) maxFPS = lastFPS;
|
||||||
if (lastFPS < minFPS) minFPS = lastFPS;
|
if (lastFPS < minFPS) minFPS = lastFPS;
|
||||||
|
|
||||||
static int secondCounter;
|
static int secondCounter;
|
||||||
|
|
||||||
if (++secondCounter >= ud.frameperiod)
|
if (++secondCounter >= r_showfpsperiod)
|
||||||
{
|
{
|
||||||
maxFPS = (lastFPS + maxFPS) * .5f;
|
maxFPS = (lastFPS + maxFPS) * .5f;
|
||||||
minFPS = (lastFPS + minFPS) * .5f;
|
minFPS = (lastFPS + minFPS) * .5f;
|
||||||
|
|
Loading…
Reference in a new issue