From: <geo...@us...> - 2012-11-23 07:38:37
|
Revision: 5452 http://freeorion.svn.sourceforge.net/freeorion/revision/?rev=5452&view=rev Author: geoffthemedio Date: 2012-11-23 07:38:31 +0000 (Fri, 23 Nov 2012) Log Message: ----------- -Patch by Dilvish to add option to control core starlane rendering thickness. -A bit of grooming by me. Modified Paths: -------------- trunk/FreeOrion/UI/MapWnd.cpp trunk/FreeOrion/UI/OptionsWnd.cpp Modified: trunk/FreeOrion/UI/MapWnd.cpp =================================================================== --- trunk/FreeOrion/UI/MapWnd.cpp 2012-11-23 07:33:52 UTC (rev 5451) +++ trunk/FreeOrion/UI/MapWnd.cpp 2012-11-23 07:38:31 UTC (rev 5452) @@ -101,6 +101,7 @@ db.Add("UI.show-galaxy-map-zoom-slider", "OPTIONS_DB_GALAXY_MAP_ZOOM_SLIDER", false, Validator<bool>()); db.Add("UI.optimized-system-rendering", "OPTIONS_DB_OPTIMIZED_SYSTEM_RENDERING", true, Validator<bool>()); db.Add("UI.starlane-thickness", "OPTIONS_DB_STARLANE_THICKNESS", 2.0, RangedStepValidator<double>(0.25, 0.25, 10.0)); + db.Add("UI.starlane-core-multiplier", "OPTIONS_DB_STARLANE_CORE", 6.0, RangedStepValidator<double>(1.0, 1.0, 10.0)); db.Add("UI.resource-starlane-colouring", "OPTIONS_DB_RESOURCE_STARLANE_COLOURING", true, Validator<bool>()); db.Add("UI.fleet-supply-lines", "OPTIONS_DB_FLEET_SUPPLY_LINES", true, Validator<bool>()); db.Add("UI.fleet-supply-line-width", "OPTIONS_DB_FLEET_SUPPLY_LINE_WIDTH", 3.0, RangedStepValidator<double>(0.25, 0.25, 10.0)); @@ -1266,7 +1267,8 @@ void MapWnd::RenderStarlanes() { bool coloured = GetOptionsDB().Get<bool>("UI.resource-starlane-colouring"); - RenderStarlanes( m_RC_starlane_vertices, m_RC_starlane_colors, 6.0, coloured, false); + float core_multiplier = static_cast<float>(GetOptionsDB().Get<double>("UI.starlane-core-multiplier")); + RenderStarlanes( m_RC_starlane_vertices, m_RC_starlane_colors, core_multiplier, coloured, false); RenderStarlanes( m_starlane_vertices, m_starlane_colors, 1.0, coloured, true); } void MapWnd::RenderStarlanes(GL2DVertexBuffer& vertices, GLRGBAColorBuffer& colours, @@ -1725,10 +1727,11 @@ Logger().debugStream() << "Initializing turn " << turn_number; ScopedTimer("MapWnd::InitTurn", true); + Logger().debugStream() << "Mapwnd Init -- Setting Accelerators"; SetAccelerators(); Universe& universe = GetUniverse(); - const ObjectMap& objects = universe.Objects(); + const ObjectMap& objects = Objects(); universe.InitializeSystemGraph(HumanClientApp::GetApp()->EmpireID()); @@ -1875,10 +1878,11 @@ m_production_wnd->Refresh(); Logger().debugStream() << "MapWnd::InitTurn m_production_wnd refresh time: " << (timer.elapsed() * 1000.0); - const ResourcePool *research = this_client_empire->GetResourcePool(RE_TRADE); - Logger().debugStream() << "MapWnd::InitTurn research total available :" << research->TotalAvailable() << " production " << research->Production(); + if (this_client_empire) { + const ResourcePool *research = this_client_empire->GetResourcePool(RE_TRADE); + Logger().debugStream() << "MapWnd::InitTurn research total available :" << research->TotalAvailable() << " production " << research->Production(); + } - if (turn_number == 1 && this_client_empire) { // start first turn with player's system selected if (const UniverseObject* obj = objects.Object(this_client_empire->CapitalID())) { @@ -4219,7 +4223,6 @@ } } - void MapWnd::RefreshPopulationIndicator() { Empire *empire = HumanClientApp::GetApp()->Empires().Lookup( HumanClientApp::GetApp()->EmpireID() ); m_population->SetValue(empire->GetPopulationPool().Population()); Modified: trunk/FreeOrion/UI/OptionsWnd.cpp =================================================================== --- trunk/FreeOrion/UI/OptionsWnd.cpp 2012-11-23 07:33:52 UTC (rev 5451) +++ trunk/FreeOrion/UI/OptionsWnd.cpp 2012-11-23 07:38:31 UTC (rev 5452) @@ -800,6 +800,7 @@ BeginSection(UserString("OPTIONS_STARLANES")); DoubleOption("UI.starlane-thickness", UserString("OPTIONS_STARLANE_THICKNESS")); BoolOption("UI.resource-starlane-colouring", UserString("OPTIONS_RESOURCE_STARLANE_COLOURING")); + DoubleOption("UI.starlane-core-multiplier", UserString("OPTIONS_DB_STARLANE_CORE")); BoolOption("UI.fleet-supply-lines", UserString("OPTIONS_FLEET_SUPPLY_LINES")); DoubleOption("UI.fleet-supply-line-width", UserString("OPTIONS_FLEET_SUPPLY_LINE_WIDTH")); IntOption("UI.fleet-supply-line-dot-spacing", UserString("OPTIONS_FLEET_SUPPLY_LINE_DOT_SPACING")); |