mirror of
https://github.com/ZDoom/Raze.git
synced 2025-04-25 01:01:02 +00:00
- statFPS()
doesn't need to be in GameInterface
.
This commit is contained in:
parent
79504254a2
commit
c989d4c3a4
3 changed files with 8 additions and 21 deletions
|
@ -15,6 +15,8 @@
|
||||||
|
|
||||||
EXTERN_CVAR(Bool, hud_textfont)
|
EXTERN_CVAR(Bool, hud_textfont)
|
||||||
|
|
||||||
|
extern cycle_t drawtime, actortime, thinktime, gameupdatetime;
|
||||||
|
|
||||||
extern bool sendsave;
|
extern bool sendsave;
|
||||||
extern FString savedescription;
|
extern FString savedescription;
|
||||||
extern FString savegamefile;
|
extern FString savegamefile;
|
||||||
|
|
|
@ -246,7 +246,12 @@ CUSTOM_CVARD(Int, r_drawweapon, 1, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disab
|
||||||
|
|
||||||
ADD_STAT(fps)
|
ADD_STAT(fps)
|
||||||
{
|
{
|
||||||
return gi->statFPS();
|
FString output;
|
||||||
|
output.AppendFormat("Actor think time: %.3f ms\n", actortime.TimeMS());
|
||||||
|
output.AppendFormat("Total think time: %.3f ms\n", thinktime.TimeMS());
|
||||||
|
output.AppendFormat("Game Update: %.3f ms\n", gameupdatetime.TimeMS());
|
||||||
|
output.AppendFormat("Draw time: %.3f ms\n", drawtime.TimeMS());
|
||||||
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
CUSTOM_CVARD(Int, r_showfps, 0, 0, "show the frame rate counter")
|
CUSTOM_CVARD(Int, r_showfps, 0, 0, "show the frame rate counter")
|
||||||
|
|
|
@ -43,8 +43,6 @@ enum EMenuSounds : int;
|
||||||
struct MapRecord;
|
struct MapRecord;
|
||||||
struct TilesetBuildInfo;
|
struct TilesetBuildInfo;
|
||||||
|
|
||||||
extern cycle_t drawtime, actortime, thinktime, gameupdatetime;
|
|
||||||
|
|
||||||
struct GeoEffect
|
struct GeoEffect
|
||||||
{
|
{
|
||||||
sectortype** geosectorwarp;
|
sectortype** geosectorwarp;
|
||||||
|
@ -114,24 +112,6 @@ struct GameInterface
|
||||||
virtual void StartSoundEngine() = 0;
|
virtual void StartSoundEngine() = 0;
|
||||||
virtual void doPlayerMovement();
|
virtual void doPlayerMovement();
|
||||||
virtual unsigned getCrouchState() = 0;
|
virtual unsigned getCrouchState() = 0;
|
||||||
|
|
||||||
virtual FString statFPS()
|
|
||||||
{
|
|
||||||
FString output;
|
|
||||||
|
|
||||||
output.AppendFormat("Actor think time: %.3f ms\n", actortime.TimeMS());
|
|
||||||
output.AppendFormat("Total think time: %.3f ms\n", thinktime.TimeMS());
|
|
||||||
output.AppendFormat("Game Update: %.3f ms\n", gameupdatetime.TimeMS());
|
|
||||||
output.AppendFormat("Draw time: %.3f ms\n", drawtime.TimeMS());
|
|
||||||
|
|
||||||
return output;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern GameInterface* gi;
|
extern GameInterface* gi;
|
||||||
|
|
||||||
|
|
||||||
void ImGui_Begin_Frame();
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue