Changeset View
Changeset View
Standalone View
Standalone View
source/graphics/GameView.cpp
Show All 31 Lines | |||||
#include "graphics/Terrain.h" | #include "graphics/Terrain.h" | ||||
#include "graphics/TerrainTextureManager.h" | #include "graphics/TerrainTextureManager.h" | ||||
#include "graphics/TerritoryTexture.h" | #include "graphics/TerritoryTexture.h" | ||||
#include "graphics/Unit.h" | #include "graphics/Unit.h" | ||||
#include "graphics/UnitManager.h" | #include "graphics/UnitManager.h" | ||||
#include "graphics/scripting/JSInterface_GameView.h" | #include "graphics/scripting/JSInterface_GameView.h" | ||||
#include "lib/input.h" | #include "lib/input.h" | ||||
#include "lib/timer.h" | #include "lib/timer.h" | ||||
#if CONFIG2_LOBBY | |||||
#include "lobby/IXmppClient.h" | #include "lobby/IXmppClient.h" | ||||
#endif | |||||
#include "maths/BoundingBoxAligned.h" | #include "maths/BoundingBoxAligned.h" | ||||
#include "maths/MathUtil.h" | #include "maths/MathUtil.h" | ||||
#include "maths/Matrix3D.h" | #include "maths/Matrix3D.h" | ||||
#include "maths/Quaternion.h" | #include "maths/Quaternion.h" | ||||
#include "ps/ConfigDB.h" | #include "ps/ConfigDB.h" | ||||
#include "ps/Filesystem.h" | #include "ps/Filesystem.h" | ||||
#include "ps/Game.h" | #include "ps/Game.h" | ||||
#include "ps/Globals.h" | #include "ps/Globals.h" | ||||
▲ Show 20 Lines • Show All 985 Lines • ▼ Show 20 Lines | InReaction CGameView::HandleEvent(const SDL_Event_* ev) | ||||
switch(ev->ev.type) | switch(ev->ev.type) | ||||
{ | { | ||||
case SDL_HOTKEYDOWN: | case SDL_HOTKEYDOWN: | ||||
std::string hotkey = static_cast<const char*>(ev->ev.user.data1); | std::string hotkey = static_cast<const char*>(ev->ev.user.data1); | ||||
if (hotkey == "wireframe") | if (hotkey == "wireframe") | ||||
{ | { | ||||
#if CONFIG2_LOBBY | |||||
if (g_XmppClient && g_rankedGame == true) | if (g_XmppClient && g_rankedGame == true) | ||||
break; | break; | ||||
else if (g_Renderer.GetModelRenderMode() == SOLID) | #endif | ||||
if (g_Renderer.GetModelRenderMode() == SOLID) | |||||
{ | { | ||||
g_Renderer.SetTerrainRenderMode(EDGED_FACES); | g_Renderer.SetTerrainRenderMode(EDGED_FACES); | ||||
g_Renderer.SetWaterRenderMode(EDGED_FACES); | g_Renderer.SetWaterRenderMode(EDGED_FACES); | ||||
g_Renderer.SetModelRenderMode(EDGED_FACES); | g_Renderer.SetModelRenderMode(EDGED_FACES); | ||||
} | } | ||||
else if (g_Renderer.GetModelRenderMode() == EDGED_FACES) | else if (g_Renderer.GetModelRenderMode() == EDGED_FACES) | ||||
{ | { | ||||
g_Renderer.SetTerrainRenderMode(WIREFRAME); | g_Renderer.SetTerrainRenderMode(WIREFRAME); | ||||
▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator