Remove useless parameter from CFG_GET_VALUE.
This was SVN commit r15984.
This commit is contained in:
parent
3e4c701ab6
commit
9407dbe45e
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2012 Wildfire Games.
|
||||
/* Copyright (C) 2014 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -23,8 +23,8 @@
|
||||
#include "graphics/CinemaTrack.h"
|
||||
#include "graphics/ColladaManager.h"
|
||||
#include "graphics/HFTracer.h"
|
||||
#include "graphics/LightEnv.h"
|
||||
#include "graphics/LOSTexture.h"
|
||||
#include "graphics/LightEnv.h"
|
||||
#include "graphics/Model.h"
|
||||
#include "graphics/ObjectManager.h"
|
||||
#include "graphics/Patch.h"
|
||||
@ -37,6 +37,7 @@
|
||||
#include "graphics/scripting/JSInterface_GameView.h"
|
||||
#include "lib/input.h"
|
||||
#include "lib/timer.h"
|
||||
#include "lobby/IXmppClient.h"
|
||||
#include "maths/BoundingBoxAligned.h"
|
||||
#include "maths/MathUtil.h"
|
||||
#include "maths/Matrix3D.h"
|
||||
@ -58,7 +59,6 @@
|
||||
#include "simulation2/Simulation2.h"
|
||||
#include "simulation2/components/ICmpPosition.h"
|
||||
#include "simulation2/components/ICmpRangeManager.h"
|
||||
#include "lobby/IXmppClient.h"
|
||||
|
||||
extern int g_xres, g_yres;
|
||||
|
||||
@ -410,44 +410,44 @@ CTerritoryTexture& CGameView::GetTerritoryTexture()
|
||||
|
||||
int CGameView::Initialize()
|
||||
{
|
||||
CFG_GET_VAL("view.scroll.speed", Float, m->ViewScrollSpeed);
|
||||
CFG_GET_VAL("view.scroll.speed.modifier", Float, m->ViewScrollSpeedModifier);
|
||||
CFG_GET_VAL("view.rotate.x.speed", Float, m->ViewRotateXSpeed);
|
||||
CFG_GET_VAL("view.rotate.x.min", Float, m->ViewRotateXMin);
|
||||
CFG_GET_VAL("view.rotate.x.max", Float, m->ViewRotateXMax);
|
||||
CFG_GET_VAL("view.rotate.x.default", Float, m->ViewRotateXDefault);
|
||||
CFG_GET_VAL("view.rotate.y.speed", Float, m->ViewRotateYSpeed);
|
||||
CFG_GET_VAL("view.rotate.y.speed.wheel", Float, m->ViewRotateYSpeedWheel);
|
||||
CFG_GET_VAL("view.rotate.y.default", Float, m->ViewRotateYDefault);
|
||||
CFG_GET_VAL("view.rotate.speed.modifier", Float, m->ViewRotateSpeedModifier);
|
||||
CFG_GET_VAL("view.drag.speed", Float, m->ViewDragSpeed);
|
||||
CFG_GET_VAL("view.zoom.speed", Float, m->ViewZoomSpeed);
|
||||
CFG_GET_VAL("view.zoom.speed.wheel", Float, m->ViewZoomSpeedWheel);
|
||||
CFG_GET_VAL("view.zoom.min", Float, m->ViewZoomMin);
|
||||
CFG_GET_VAL("view.zoom.max", Float, m->ViewZoomMax);
|
||||
CFG_GET_VAL("view.zoom.default", Float, m->ViewZoomDefault);
|
||||
CFG_GET_VAL("view.zoom.speed.modifier", Float, m->ViewZoomSpeedModifier);
|
||||
CFG_GET_VAL("view.scroll.speed", m->ViewScrollSpeed);
|
||||
CFG_GET_VAL("view.scroll.speed.modifier", m->ViewScrollSpeedModifier);
|
||||
CFG_GET_VAL("view.rotate.x.speed", m->ViewRotateXSpeed);
|
||||
CFG_GET_VAL("view.rotate.x.min", m->ViewRotateXMin);
|
||||
CFG_GET_VAL("view.rotate.x.max", m->ViewRotateXMax);
|
||||
CFG_GET_VAL("view.rotate.x.default", m->ViewRotateXDefault);
|
||||
CFG_GET_VAL("view.rotate.y.speed", m->ViewRotateYSpeed);
|
||||
CFG_GET_VAL("view.rotate.y.speed.wheel", m->ViewRotateYSpeedWheel);
|
||||
CFG_GET_VAL("view.rotate.y.default", m->ViewRotateYDefault);
|
||||
CFG_GET_VAL("view.rotate.speed.modifier", m->ViewRotateSpeedModifier);
|
||||
CFG_GET_VAL("view.drag.speed", m->ViewDragSpeed);
|
||||
CFG_GET_VAL("view.zoom.speed", m->ViewZoomSpeed);
|
||||
CFG_GET_VAL("view.zoom.speed.wheel", m->ViewZoomSpeedWheel);
|
||||
CFG_GET_VAL("view.zoom.min", m->ViewZoomMin);
|
||||
CFG_GET_VAL("view.zoom.max", m->ViewZoomMax);
|
||||
CFG_GET_VAL("view.zoom.default", m->ViewZoomDefault);
|
||||
CFG_GET_VAL("view.zoom.speed.modifier", m->ViewZoomSpeedModifier);
|
||||
|
||||
CFG_GET_VAL("joystick.camera.pan.x", Int, m->JoystickPanX);
|
||||
CFG_GET_VAL("joystick.camera.pan.y", Int, m->JoystickPanY);
|
||||
CFG_GET_VAL("joystick.camera.rotate.x", Int, m->JoystickRotateX);
|
||||
CFG_GET_VAL("joystick.camera.rotate.y", Int, m->JoystickRotateY);
|
||||
CFG_GET_VAL("joystick.camera.zoom.in", Int, m->JoystickZoomIn);
|
||||
CFG_GET_VAL("joystick.camera.zoom.out", Int, m->JoystickZoomOut);
|
||||
CFG_GET_VAL("joystick.camera.pan.x", m->JoystickPanX);
|
||||
CFG_GET_VAL("joystick.camera.pan.y", m->JoystickPanY);
|
||||
CFG_GET_VAL("joystick.camera.rotate.x", m->JoystickRotateX);
|
||||
CFG_GET_VAL("joystick.camera.rotate.y", m->JoystickRotateY);
|
||||
CFG_GET_VAL("joystick.camera.zoom.in", m->JoystickZoomIn);
|
||||
CFG_GET_VAL("joystick.camera.zoom.out", m->JoystickZoomOut);
|
||||
|
||||
CFG_GET_VAL("view.height.smoothness", Float, m->HeightSmoothness);
|
||||
CFG_GET_VAL("view.height.min", Float, m->HeightMin);
|
||||
CFG_GET_VAL("view.height.smoothness", m->HeightSmoothness);
|
||||
CFG_GET_VAL("view.height.min", m->HeightMin);
|
||||
|
||||
CFG_GET_VAL("view.pos.smoothness", Float, m->PosX.m_Smoothness);
|
||||
CFG_GET_VAL("view.pos.smoothness", Float, m->PosY.m_Smoothness);
|
||||
CFG_GET_VAL("view.pos.smoothness", Float, m->PosZ.m_Smoothness);
|
||||
CFG_GET_VAL("view.zoom.smoothness", Float, m->Zoom.m_Smoothness);
|
||||
CFG_GET_VAL("view.rotate.x.smoothness", Float, m->RotateX.m_Smoothness);
|
||||
CFG_GET_VAL("view.rotate.y.smoothness", Float, m->RotateY.m_Smoothness);
|
||||
CFG_GET_VAL("view.pos.smoothness", m->PosX.m_Smoothness);
|
||||
CFG_GET_VAL("view.pos.smoothness", m->PosY.m_Smoothness);
|
||||
CFG_GET_VAL("view.pos.smoothness", m->PosZ.m_Smoothness);
|
||||
CFG_GET_VAL("view.zoom.smoothness", m->Zoom.m_Smoothness);
|
||||
CFG_GET_VAL("view.rotate.x.smoothness", m->RotateX.m_Smoothness);
|
||||
CFG_GET_VAL("view.rotate.y.smoothness", m->RotateY.m_Smoothness);
|
||||
|
||||
CFG_GET_VAL("view.near", Float, m->ViewNear);
|
||||
CFG_GET_VAL("view.far", Float, m->ViewFar);
|
||||
CFG_GET_VAL("view.fov", Float, m->ViewFOV);
|
||||
CFG_GET_VAL("view.near", m->ViewNear);
|
||||
CFG_GET_VAL("view.far", m->ViewFar);
|
||||
CFG_GET_VAL("view.fov", m->ViewFOV);
|
||||
|
||||
// Convert to radians
|
||||
m->RotateX.SetValue(DEGTORAD(m->ViewRotateXDefault));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2012 Wildfire Games.
|
||||
/* Copyright (C) 2014 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -33,7 +33,7 @@
|
||||
CMaterialManager::CMaterialManager()
|
||||
{
|
||||
qualityLevel = 5.0;
|
||||
CFG_GET_VAL("materialmgr.quality", Float, qualityLevel);
|
||||
CFG_GET_VAL("materialmgr.quality", qualityLevel);
|
||||
qualityLevel = clamp(qualityLevel, 0.0f, 10.0f);
|
||||
}
|
||||
|
||||
@ -133,8 +133,8 @@ CMaterial CMaterialManager::LoadMaterial(const VfsPath& pathname)
|
||||
CStr conf = attrs.GetNamedItem(at_conf);
|
||||
if (!conf.empty())
|
||||
{
|
||||
CFG_GET_VAL("materialmgr." + conf + ".min", Float, valmin);
|
||||
CFG_GET_VAL("materialmgr." + conf + ".max", Float, valmax);
|
||||
CFG_GET_VAL("materialmgr." + conf + ".min", valmin);
|
||||
CFG_GET_VAL("materialmgr." + conf + ".max", valmax);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ CInput::CInput()
|
||||
AddSetting(GUIST_CStrW, "tooltip");
|
||||
AddSetting(GUIST_CStr, "tooltip_style");
|
||||
|
||||
CFG_GET_VAL("gui.cursorblinkrate", Double, m_CursorBlinkRate);
|
||||
CFG_GET_VAL("gui.cursorblinkrate", m_CursorBlinkRate);
|
||||
|
||||
// Add scroll-bar
|
||||
CGUIScrollBarVertical * bar = new CGUIScrollBarVertical();
|
||||
|
@ -122,8 +122,8 @@ CMiniMap::CMiniMap() :
|
||||
// Tests won't have config initialised
|
||||
if (CConfigDB::IsInitialised())
|
||||
{
|
||||
CFG_GET_VAL("gui.session.minimap.pingduration", Double, m_PingDuration);
|
||||
CFG_GET_VAL("gui.session.minimap.blinkduration", Double, blinkDuration);
|
||||
CFG_GET_VAL("gui.session.minimap.pingduration", m_PingDuration);
|
||||
CFG_GET_VAL("gui.session.minimap.blinkduration", blinkDuration);
|
||||
}
|
||||
m_HalfBlinkDuration = blinkDuration/2;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ L10n::L10n()
|
||||
// Determine whether or not to print tinygettext messages to the standard
|
||||
// error output, which it tinygettext’s default behavior, but not ours.
|
||||
bool tinygettext_debug = false;
|
||||
CFG_GET_VAL("tinygettext.debug", Bool, tinygettext_debug);
|
||||
CFG_GET_VAL("tinygettext.debug", tinygettext_debug);
|
||||
if (!tinygettext_debug)
|
||||
{
|
||||
tinygettext::Log::log_info_callback = 0;
|
||||
@ -219,7 +219,7 @@ void L10n::GetDictionaryLocale(std::string configLocaleString, Locale& outLocale
|
||||
void L10n::ReevaluateCurrentLocaleAndReload()
|
||||
{
|
||||
std::string locale;
|
||||
CFG_GET_VAL("locale", String, locale);
|
||||
CFG_GET_VAL("locale", locale);
|
||||
|
||||
if (locale == "long")
|
||||
{
|
||||
|
@ -72,8 +72,8 @@ XmppClient::XmppClient(const std::string& sUsername, const std::string& sPasswor
|
||||
// Read lobby configuration from default.cfg
|
||||
std::string sServer;
|
||||
std::string sXpartamupp;
|
||||
CFG_GET_VAL("lobby.server", String, sServer);
|
||||
CFG_GET_VAL("lobby.xpartamupp", String, sXpartamupp);
|
||||
CFG_GET_VAL("lobby.server", sServer);
|
||||
CFG_GET_VAL("lobby.xpartamupp", sXpartamupp);
|
||||
|
||||
m_xpartamuppId = sXpartamupp + "@" + sServer + "/CC";
|
||||
glooxwrapper::JID clientJid(sUsername + "@" + sServer + "/0ad");
|
||||
|
@ -27,10 +27,10 @@
|
||||
|
||||
#include "lib/external_libraries/enet.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/ConfigDB.h"
|
||||
#include "scriptinterface/ScriptInterface.h"
|
||||
#include "scriptinterface/ScriptRuntime.h"
|
||||
#include "simulation2/Simulation2.h"
|
||||
#include "ps/ConfigDB.h"
|
||||
|
||||
#if CONFIG2_MINIUPNPC
|
||||
#include <miniupnpc/miniwget.h>
|
||||
@ -222,7 +222,7 @@ void* CNetServerWorker::SetupUPnP(void*)
|
||||
|
||||
// Cached root descriptor URL.
|
||||
std::string rootDescURL;
|
||||
CFG_GET_VAL("network.upnprootdescurl", String, rootDescURL);
|
||||
CFG_GET_VAL("network.upnprootdescurl", rootDescURL);
|
||||
if (!rootDescURL.empty())
|
||||
LOGMESSAGE(L"Net server: attempting to use cached root descriptor URL: %hs", rootDescURL.c_str());
|
||||
|
||||
|
@ -140,9 +140,8 @@ public:
|
||||
|
||||
|
||||
// stores the value of the given key into <destination>. this quasi-template
|
||||
// convenience wrapper on top of CConfigValue::Get* simplifies user code and
|
||||
// avoids "assignment within condition expression" warnings.
|
||||
#define CFG_GET_VAL(name, type, destination)\
|
||||
// convenience wrapper on top of GetValue simplifies user code
|
||||
#define CFG_GET_VAL(name, destination)\
|
||||
g_ConfigDB.GetValue(CFG_USER, name, destination)
|
||||
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2012 Wildfire Games.
|
||||
/* Copyright (C) 2014 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -19,11 +19,11 @@
|
||||
|
||||
#include "Config.h"
|
||||
|
||||
#include "ps/ConfigDB.h"
|
||||
#include "lib/timer.h"
|
||||
#include "ps/CConsole.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/ConfigDB.h"
|
||||
#include "ps/GameSetup/CmdLineArgs.h"
|
||||
#include "lib/timer.h"
|
||||
#include "soundmanager/ISoundManager.h"
|
||||
|
||||
// (these variables are documented in the header.)
|
||||
@ -83,27 +83,27 @@ CStr g_AutostartMap = "";
|
||||
// Fill in the globals from the config files.
|
||||
static void LoadGlobals()
|
||||
{
|
||||
CFG_GET_VAL("vsync", Bool, g_VSync);
|
||||
CFG_GET_VAL("vsync", g_VSync);
|
||||
|
||||
CFG_GET_VAL("nos3tc", Bool, g_NoGLS3TC);
|
||||
CFG_GET_VAL("noautomipmap", Bool, g_NoGLAutoMipmap);
|
||||
CFG_GET_VAL("novbo", Bool, g_NoGLVBO);
|
||||
CFG_GET_VAL("pauseonfocusloss", Bool, g_PauseOnFocusLoss);
|
||||
CFG_GET_VAL("renderactors", Bool, g_RenderActors);
|
||||
CFG_GET_VAL("shadows", Bool, g_Shadows);
|
||||
CFG_GET_VAL("shadowpcf", Bool, g_ShadowPCF);
|
||||
CFG_GET_VAL("nos3tc", g_NoGLS3TC);
|
||||
CFG_GET_VAL("noautomipmap", g_NoGLAutoMipmap);
|
||||
CFG_GET_VAL("novbo", g_NoGLVBO);
|
||||
CFG_GET_VAL("pauseonfocusloss", g_PauseOnFocusLoss);
|
||||
CFG_GET_VAL("renderactors", g_RenderActors);
|
||||
CFG_GET_VAL("shadows", g_Shadows);
|
||||
CFG_GET_VAL("shadowpcf", g_ShadowPCF);
|
||||
|
||||
CFG_GET_VAL("waterugly",Bool, g_WaterUgly);
|
||||
CFG_GET_VAL("waterfancyeffects",Bool, g_WaterFancyEffects);
|
||||
CFG_GET_VAL("waterrealdepth",Bool, g_WaterRealDepth);
|
||||
CFG_GET_VAL("waterrefraction",Bool, g_WaterRefraction);
|
||||
CFG_GET_VAL("waterreflection",Bool, g_WaterReflection);
|
||||
CFG_GET_VAL("shadowsonwater",Bool, g_WaterShadows);
|
||||
CFG_GET_VAL("waterugly", g_WaterUgly);
|
||||
CFG_GET_VAL("waterfancyeffects", g_WaterFancyEffects);
|
||||
CFG_GET_VAL("waterrealdepth", g_WaterRealDepth);
|
||||
CFG_GET_VAL("waterrefraction", g_WaterRefraction);
|
||||
CFG_GET_VAL("waterreflection", g_WaterReflection);
|
||||
CFG_GET_VAL("shadowsonwater", g_WaterShadows);
|
||||
|
||||
CFG_GET_VAL("renderpath", String, g_RenderPath);
|
||||
CFG_GET_VAL("particles", Bool, g_Particles);
|
||||
CFG_GET_VAL("silhouettes", Bool, g_Silhouettes);
|
||||
CFG_GET_VAL("showsky", Bool, g_ShowSky);
|
||||
CFG_GET_VAL("renderpath", g_RenderPath);
|
||||
CFG_GET_VAL("particles", g_Particles);
|
||||
CFG_GET_VAL("silhouettes", g_Silhouettes);
|
||||
CFG_GET_VAL("showsky", g_ShowSky);
|
||||
|
||||
if (g_SoundManager)
|
||||
{
|
||||
@ -113,11 +113,11 @@ static void LoadGlobals()
|
||||
float actionGain = 0.5f;
|
||||
float uiGain = 0.5f;
|
||||
|
||||
CFG_GET_VAL("sound.mastergain", Float, gain);
|
||||
CFG_GET_VAL("sound.musicgain", Float, musicGain);
|
||||
CFG_GET_VAL("sound.ambientgain", Float, ambientGain);
|
||||
CFG_GET_VAL("sound.actiongain", Float, actionGain);
|
||||
CFG_GET_VAL("sound.uigain", Float, uiGain);
|
||||
CFG_GET_VAL("sound.mastergain", gain);
|
||||
CFG_GET_VAL("sound.musicgain", musicGain);
|
||||
CFG_GET_VAL("sound.ambientgain", ambientGain);
|
||||
CFG_GET_VAL("sound.actiongain", actionGain);
|
||||
CFG_GET_VAL("sound.uigain", uiGain);
|
||||
|
||||
g_SoundManager->SetMasterGain(gain);
|
||||
g_SoundManager->SetMusicGain(musicGain);
|
||||
@ -127,8 +127,8 @@ static void LoadGlobals()
|
||||
}
|
||||
|
||||
|
||||
CFG_GET_VAL("jsdebugger.enable", Bool, g_JSDebuggerEnabled);
|
||||
CFG_GET_VAL("profiler2.script.enable", Bool, g_ScriptProfilingEnabled);
|
||||
CFG_GET_VAL("jsdebugger.enable", g_JSDebuggerEnabled);
|
||||
CFG_GET_VAL("profiler2.script.enable", g_ScriptProfilingEnabled);
|
||||
|
||||
if (g_JSDebuggerEnabled)
|
||||
LOGERROR(L"JS debugger temporarily disabled during the SpiderMonkey upgrade (check trac ticket #2348 for details)");
|
||||
@ -224,7 +224,7 @@ void CONFIG_Init(const CmdLineArgs& args)
|
||||
|
||||
// Initialise console history file
|
||||
int max_history_lines = 200;
|
||||
CFG_GET_VAL("console.history.size", Int, max_history_lines);
|
||||
CFG_GET_VAL("console.history.size", max_history_lines);
|
||||
g_Console->UseHistoryFile(L"config/console.txt", max_history_lines);
|
||||
|
||||
// Collect information from system.cfg, the profile file,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2013 Wildfire Games.
|
||||
/* Copyright (C) 2014 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -33,11 +33,11 @@ CJoystick::CJoystick() :
|
||||
void CJoystick::Initialise()
|
||||
{
|
||||
bool joystickEnable = false;
|
||||
CFG_GET_VAL("joystick.enable", Bool, joystickEnable);
|
||||
CFG_GET_VAL("joystick.enable", joystickEnable);
|
||||
if (!joystickEnable)
|
||||
return;
|
||||
|
||||
CFG_GET_VAL("joystick.deadzone", Int, m_Deadzone);
|
||||
CFG_GET_VAL("joystick.deadzone", m_Deadzone);
|
||||
|
||||
if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) < 0)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2011 Wildfire Games
|
||||
/* Copyright (c) 2014 Wildfire Games
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@ -776,9 +776,9 @@ CProfiler2GPU::CProfiler2GPU(CProfiler2& profiler) :
|
||||
bool enabledARB = false;
|
||||
bool enabledEXT = false;
|
||||
bool enabledINTEL = false;
|
||||
CFG_GET_VAL("profiler2.gpu.arb.enable", Bool, enabledARB);
|
||||
CFG_GET_VAL("profiler2.gpu.ext.enable", Bool, enabledEXT);
|
||||
CFG_GET_VAL("profiler2.gpu.intel.enable", Bool, enabledINTEL);
|
||||
CFG_GET_VAL("profiler2.gpu.arb.enable", enabledARB);
|
||||
CFG_GET_VAL("profiler2.gpu.ext.enable", enabledEXT);
|
||||
CFG_GET_VAL("profiler2.gpu.intel.enable", enabledINTEL);
|
||||
|
||||
// Only enable either ARB or EXT, not both, because they are redundant
|
||||
// (EXT is only needed for compatibility with older systems), and because
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2013 Wildfire Games.
|
||||
/* Copyright (C) 2014 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -520,7 +520,7 @@ std::string CUserReporter::LoadUserID()
|
||||
std::string userID;
|
||||
|
||||
// Read the user ID from user.cfg (if there is one)
|
||||
CFG_GET_VAL("userreport.id", String, userID);
|
||||
CFG_GET_VAL("userreport.id", userID);
|
||||
|
||||
// If we don't have a validly-formatted user ID, generate a new one
|
||||
if (userID.length() != 16)
|
||||
@ -547,7 +547,7 @@ std::string CUserReporter::LoadUserID()
|
||||
bool CUserReporter::IsReportingEnabled()
|
||||
{
|
||||
int version = -1;
|
||||
CFG_GET_VAL("userreport.enabledversion", Int, version);
|
||||
CFG_GET_VAL("userreport.enabledversion", version);
|
||||
return (version >= REPORTER_VERSION);
|
||||
}
|
||||
|
||||
@ -576,7 +576,7 @@ void CUserReporter::Initialize()
|
||||
|
||||
std::string userID = LoadUserID();
|
||||
std::string url;
|
||||
CFG_GET_VAL("userreport.url", String, url);
|
||||
CFG_GET_VAL("userreport.url", url);
|
||||
|
||||
// Initialise everything except Win32 sockets (because our networking
|
||||
// system already inits those)
|
||||
|
@ -59,14 +59,14 @@ CVideoMode::CVideoMode() :
|
||||
void CVideoMode::ReadConfig()
|
||||
{
|
||||
bool windowed = !m_ConfigFullscreen;
|
||||
CFG_GET_VAL("windowed", Bool, windowed);
|
||||
CFG_GET_VAL("windowed", windowed);
|
||||
m_ConfigFullscreen = !windowed;
|
||||
|
||||
CFG_GET_VAL("xres", Int, m_ConfigW);
|
||||
CFG_GET_VAL("yres", Int, m_ConfigH);
|
||||
CFG_GET_VAL("bpp", Int, m_ConfigBPP);
|
||||
CFG_GET_VAL("display", Int, m_ConfigDisplay);
|
||||
CFG_GET_VAL("force_s3tc_enable", Bool, m_ConfigForceS3TCEnable);
|
||||
CFG_GET_VAL("xres", m_ConfigW);
|
||||
CFG_GET_VAL("yres", m_ConfigH);
|
||||
CFG_GET_VAL("bpp", m_ConfigBPP);
|
||||
CFG_GET_VAL("display", m_ConfigDisplay);
|
||||
CFG_GET_VAL("force_s3tc_enable", m_ConfigForceS3TCEnable);
|
||||
}
|
||||
|
||||
bool CVideoMode::SetVideoMode(int w, int h, int bpp, bool fullscreen)
|
||||
|
@ -445,16 +445,16 @@ CRenderer::CRenderer()
|
||||
m_Options.m_DisplayFrustum = false;
|
||||
|
||||
// TODO: be more consistent in use of the config system
|
||||
CFG_GET_VAL("preferglsl", Bool, m_Options.m_PreferGLSL);
|
||||
CFG_GET_VAL("forcealphatest", Bool, m_Options.m_ForceAlphaTest);
|
||||
CFG_GET_VAL("gpuskinning", Bool, m_Options.m_GPUSkinning);
|
||||
CFG_GET_VAL("gentangents", Bool, m_Options.m_GenTangents);
|
||||
CFG_GET_VAL("smoothlos", Bool, m_Options.m_SmoothLOS);
|
||||
CFG_GET_VAL("postproc", Bool, m_Options.m_Postproc);
|
||||
CFG_GET_VAL("preferglsl", m_Options.m_PreferGLSL);
|
||||
CFG_GET_VAL("forcealphatest", m_Options.m_ForceAlphaTest);
|
||||
CFG_GET_VAL("gpuskinning", m_Options.m_GPUSkinning);
|
||||
CFG_GET_VAL("gentangents", m_Options.m_GenTangents);
|
||||
CFG_GET_VAL("smoothlos", m_Options.m_SmoothLOS);
|
||||
CFG_GET_VAL("postproc", m_Options.m_Postproc);
|
||||
|
||||
CStr skystring = "0 0 0";
|
||||
CColor skycolor;
|
||||
CFG_GET_VAL("skycolor", String, skystring);
|
||||
CFG_GET_VAL("skycolor", skystring);
|
||||
if (skycolor.ParseString(skystring, 255.f))
|
||||
SetClearColor(skycolor.AsSColor4ub());
|
||||
|
||||
|
@ -75,8 +75,8 @@ public:
|
||||
// Tests won't have config initialised
|
||||
if (CConfigDB::IsInitialised())
|
||||
{
|
||||
CFG_GET_VAL("ooslog", Bool, m_EnableOOSLog);
|
||||
CFG_GET_VAL("serializationtest", Bool, m_EnableSerializationTest);
|
||||
CFG_GET_VAL("ooslog", m_EnableOOSLog);
|
||||
CFG_GET_VAL("serializationtest", m_EnableSerializationTest);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user