summaryrefslogtreecommitdiffhomepage
path: root/StarsEx/Game.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-04-03 17:24:16 +0200
committerAki <please@ignore.pl>2022-04-03 17:24:16 +0200
commitcd57c84c5fe34c2ac548d6d119a9828a303923ef (patch)
treeaac3545bcb95bf0d30b8b356c91adc492c07d3a6 /StarsEx/Game.cpp
parent150bd957db8eb19b1a07643317767ff5c3007f48 (diff)
downloadstarshatter-cd57c84c5fe34c2ac548d6d119a9828a303923ef.zip
starshatter-cd57c84c5fe34c2ac548d6d119a9828a303923ef.tar.gz
starshatter-cd57c84c5fe34c2ac548d6d119a9828a303923ef.tar.bz2
Removed video stats in Game
Diffstat (limited to 'StarsEx/Game.cpp')
-rw-r--r--StarsEx/Game.cpp60
1 files changed, 1 insertions, 59 deletions
diff --git a/StarsEx/Game.cpp b/StarsEx/Game.cpp
index f9bf31d..b7a4fb1 100644
--- a/StarsEx/Game.cpp
+++ b/StarsEx/Game.cpp
@@ -33,7 +33,7 @@ const double MAX_FRAME_TIME_NORMAL = 1.0 / 5.0;
Game::Game()
: world(0), video_factory(0), video(0), video_settings(0), soundcard(0),
- screen(0), totaltime(0),
+ screen(0),
status(Game::OK), exit_code(0)
{
Clock::Init();
@@ -67,9 +67,6 @@ Game::~Game()
delete video;
delete soundcard;
delete video_settings;
-
- if (status == EXIT)
- ShowStats();
}
// +--------------------------------------------------------------------+
@@ -175,7 +172,6 @@ Game::GameLoop()
if (!server) {
UpdateScreen();
- CollectStats();
}
wait_for_windows_events = false;
@@ -232,60 +228,6 @@ Game::GetInstance()
// +--------------------------------------------------------------------+
-void
-Game::CollectStats()
-{
- if (!totaltime) totaltime = Clock::GetInstance()->RealTime();
-
- if (video) {
- stats.nframe = video->GetStats().nframe;
- stats.nverts = video->GetStats().nverts;
- stats.npolys = video->GetStats().npolys;
- stats.nlines = video->GetStats().nlines;
- stats.ncalls += video->GetStats().ncalls;
-
- stats.total_verts += stats.nverts;
- stats.total_polys += stats.npolys;
- stats.total_lines += stats.nlines;
- }
-}
-
-// +--------------------------------------------------------------------+
-
-void
-Game::ShowStats()
-{
- if (server) return;
-
- totaltime = Clock::GetInstance()->RealTime() - totaltime;
-
- Print("\n");
- Print("Performance Data:\n");
- Print("-----------------\n");
-
- Print(" Time: %d msec\n", totaltime);
- Print(" Frames: %d\n", stats.nframe);
- Print(" Polys Rendered: %d\n", stats.total_polys);
- Print(" Lines Rendered: %d\n", stats.total_lines);
- Print(" Verts Rendered: %d\n", stats.total_verts);
- Print(" Render Calls: %d\n", stats.ncalls);
- Print("\n");
-
- Print("Performance Statistics:\n");
- Print("-----------------------\n");
-
- Print(" Frames/Second: %.2f\n", (stats.nframe * 1000.0) / totaltime);
- Print(" Polys/Frame: %.2f\n", (double) stats.total_polys / (double) stats.nframe);
- Print(" Polys/Call: %.2f\n", (double) stats.total_polys / (double) stats.ncalls);
- Print(" Polys/Second: %.2f\n", (stats.total_polys * 1000.0) / totaltime);
- Print(" Lines/Second: %.2f\n", (stats.total_lines * 1000.0) / totaltime);
- Print(" Verts/Second: %.2f\n", (stats.total_verts * 1000.0) / totaltime);
-
- Print("\n");
-}
-
-// +====================================================================+
-
DWORD Game::Frame()
{
return frame_number;