Changeset View
Changeset View
Standalone View
Standalone View
source/ps/GameSetup/GameSetup.cpp
Show All 34 Lines | |||||
#include "graphics/MapReader.h" | #include "graphics/MapReader.h" | ||||
#include "graphics/MaterialManager.h" | #include "graphics/MaterialManager.h" | ||||
#include "graphics/TerrainTextureManager.h" | #include "graphics/TerrainTextureManager.h" | ||||
#include "gui/GUI.h" | #include "gui/GUI.h" | ||||
#include "gui/GUIManager.h" | #include "gui/GUIManager.h" | ||||
#include "gui/scripting/ScriptFunctions.h" | #include "gui/scripting/ScriptFunctions.h" | ||||
#include "i18n/L10n.h" | #include "i18n/L10n.h" | ||||
#include "maths/MathUtil.h" | #include "maths/MathUtil.h" | ||||
#include "network/GeoLite2.h" | |||||
#include "network/NetServer.h" | #include "network/NetServer.h" | ||||
#include "network/NetClient.h" | #include "network/NetClient.h" | ||||
#include "network/NetMessage.h" | #include "network/NetMessage.h" | ||||
#include "network/NetMessages.h" | #include "network/NetMessages.h" | ||||
#include "ps/CConsole.h" | #include "ps/CConsole.h" | ||||
#include "ps/CLogger.h" | #include "ps/CLogger.h" | ||||
#include "ps/ConfigDB.h" | #include "ps/ConfigDB.h" | ||||
▲ Show 20 Lines • Show All 648 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
const bool nonVisual = g_Game && g_Game->IsGraphicsDisabled(); | const bool nonVisual = g_Game && g_Game->IsGraphicsDisabled(); | ||||
if ((flags & SHUTDOWN_FROM_CONFIG)) | if ((flags & SHUTDOWN_FROM_CONFIG)) | ||||
goto from_config; | goto from_config; | ||||
EndGame(); | EndGame(); | ||||
SAFE_DELETE(g_GeoLite2); | |||||
SAFE_DELETE(g_XmppClient); | SAFE_DELETE(g_XmppClient); | ||||
SAFE_DELETE(g_ModIo); | SAFE_DELETE(g_ModIo); | ||||
ShutdownPs(); | ShutdownPs(); | ||||
TIMER_BEGIN(L"shutdown TexMan"); | TIMER_BEGIN(L"shutdown TexMan"); | ||||
delete &g_TexMan; | delete &g_TexMan; | ||||
TIMER_END(L"shutdown TexMan"); | TIMER_END(L"shutdown TexMan"); | ||||
▲ Show 20 Lines • Show All 246 Lines • ▼ Show 20 Lines | if (!modstring.empty()) | ||||
// Abort init and restart | // Abort init and restart | ||||
RestartEngine(); | RestartEngine(); | ||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
new L10n; | new L10n; | ||||
if (GeoLite2::IsEnabled()) | |||||
{ | |||||
// TODO: this ain't proper format | |||||
elexis: f.e. `pt-BR` | |||||
std::string language = g_L10n.GetCurrentLocale().getCountry(); | |||||
g_GeoLite2 = new GeoLite2(language); | |||||
} | |||||
// Optionally start profiler HTTP output automatically | // Optionally start profiler HTTP output automatically | ||||
// (By default it's only enabled by a hotkey, for security/performance) | // (By default it's only enabled by a hotkey, for security/performance) | ||||
bool profilerHTTPEnable = false; | bool profilerHTTPEnable = false; | ||||
CFG_GET_VAL("profiler2.autoenable", profilerHTTPEnable); | CFG_GET_VAL("profiler2.autoenable", profilerHTTPEnable); | ||||
if (profilerHTTPEnable) | if (profilerHTTPEnable) | ||||
g_Profiler2.EnableHTTP(); | g_Profiler2.EnableHTTP(); | ||||
// Initialise everything except Win32 sockets (because our networking | // Initialise everything except Win32 sockets (because our networking | ||||
▲ Show 20 Lines • Show All 686 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
f.e. pt-BR