From 78ccac427d3b60aec6d1ac7a7e2c66ad763dfb09 Mon Sep 17 00:00:00 2001 From: Ykkrosh Date: Thu, 20 May 2010 00:55:02 +0000 Subject: [PATCH] Remove -fixedframe mode since it doesn't work at all This was SVN commit r7549. --- binaries/system/readme.txt | 1 - source/main.cpp | 13 ++++--------- source/ps/GameSetup/Config.cpp | 7 +------ source/ps/GameSetup/Config.h | 4 +--- source/ps/GameSetup/GameSetup.cpp | 16 ---------------- source/simulation/Scheduler.h | 4 ---- 6 files changed, 6 insertions(+), 39 deletions(-) diff --git a/binaries/system/readme.txt b/binaries/system/readme.txt index 54994ff75d..82be04ff45 100644 --- a/binaries/system/readme.txt +++ b/binaries/system/readme.txt @@ -4,7 +4,6 @@ COMMAND LINE OPTIONS: -buildarchive ? -conf:KEY=VALUE set a config value (overrides the contents of system.cfg) -entgraph ? --fixedframe enable fixed frame timing; ? -g=F set the gamma correction to 'F' (default 1.0) -listfiles ? -profile=NAME ? diff --git a/source/main.cpp b/source/main.cpp index 2fa3ec4865..9f14d4ff34 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2010 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -278,11 +278,9 @@ static void Frame() g_Game->Update(TimeSinceLastFrame); PROFILE_END( "simulation update" ); - if (!g_FixedFrameTiming) - { - PROFILE( "camera update" ); - g_Game->GetView()->Update(float(TimeSinceLastFrame)); - } + PROFILE_START( "camera update" ); + g_Game->GetView()->Update(float(TimeSinceLastFrame)); + PROFILE_END( "camera update" ); if (!g_UseSimulation2) { @@ -339,9 +337,6 @@ static void Frame() g_Profiler.Frame(); - if(g_FixedFrameTiming && frameCount==100) - kill_mainloop(); - g_TerrainModified = false; g_GameRestarted = false; } diff --git a/source/ps/GameSetup/Config.cpp b/source/ps/GameSetup/Config.cpp index 34d1370ea3..1665454904 100644 --- a/source/ps/GameSetup/Config.cpp +++ b/source/ps/GameSetup/Config.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2010 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -42,8 +42,6 @@ bool g_NoGLFramebufferObject = false; bool g_Shadows = false; bool g_FancyWater = false; -bool g_FixedFrameTiming = false; - float g_LodBias = 0.0f; float g_Gamma = 1.0f; @@ -151,9 +149,6 @@ static void ProcessCommandLineArgs(const CmdLineArgs& args) if (args.Has("entgraph")) g_EntGraph = true; - if (args.Has("fixedframe")) - g_FixedFrameTiming = true; - if (args.Has("g")) { g_Gamma = (float)atof(args.Get("g")); diff --git a/source/ps/GameSetup/Config.h b/source/ps/GameSetup/Config.h index 9c1ef668ed..9ed1e868a0 100644 --- a/source/ps/GameSetup/Config.h +++ b/source/ps/GameSetup/Config.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2010 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -48,8 +48,6 @@ extern bool g_NoGLFramebufferObject; extern bool g_Shadows; // flag to switch on reflective/refractive water extern bool g_FancyWater; -// flag to switch on fixed frame timing (RC: I'm using this for profiling purposes) -extern bool g_FixedFrameTiming; extern float g_LodBias; extern float g_Gamma; diff --git a/source/ps/GameSetup/GameSetup.cpp b/source/ps/GameSetup/GameSetup.cpp index 21ffb1cb74..d31a88ec0b 100644 --- a/source/ps/GameSetup/GameSetup.cpp +++ b/source/ps/GameSetup/GameSetup.cpp @@ -1040,22 +1040,6 @@ void Init(const CmdLineArgs& args, int flags) ogl_WarnIfError(); - if (g_FixedFrameTiming) { - CCamera &camera = *g_Game->GetView()->GetCamera(); -#if 0 // TOPDOWN - camera.SetProjection(1.0f,10000.0f,DEGTORAD(90)); - camera.m_Orientation.SetIdentity(); - camera.m_Orientation.RotateX(DEGTORAD(90)); - camera.m_Orientation.Translate(CELL_SIZE*250*0.5, 250, CELL_SIZE*250*0.5); -#else // std view - camera.SetProjection(1.0f,10000.0f,DEGTORAD(20)); - camera.m_Orientation.SetXRotation(DEGTORAD(30)); - camera.m_Orientation.RotateY(DEGTORAD(-45)); - camera.m_Orientation.Translate(350, 350, -275); -#endif - camera.UpdateFrustum(); - } - if (! g_AutostartMap.empty()) { // Code copied mostly from atlas/GameInterface/Handlers/Map.cpp - diff --git a/source/simulation/Scheduler.h b/source/simulation/Scheduler.h index 655cd8e4d8..57fe37c242 100644 --- a/source/simulation/Scheduler.h +++ b/source/simulation/Scheduler.h @@ -109,10 +109,6 @@ public: static void ScriptingInit(); }; -// made visible to main.cpp's Frame() so that it can abort after 100 frames -// if g_FixedFrameTiming == true (allows measuring performance). -extern int frameCount; - extern const int ORDER_DELAY; #endif