From cd57c84c5fe34c2ac548d6d119a9828a303923ef Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 3 Apr 2022 17:24:16 +0200 Subject: Removed video stats in Game --- StarsEx/Game.cpp | 60 +------------------------------------------------------- 1 file changed, 1 insertion(+), 59 deletions(-) (limited to 'StarsEx/Game.cpp') 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; -- cgit v1.1