summaryrefslogtreecommitdiff
path: root/engine/disp_defs.cpp
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /engine/disp_defs.cpp
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'engine/disp_defs.cpp')
-rw-r--r--engine/disp_defs.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/engine/disp_defs.cpp b/engine/disp_defs.cpp
new file mode 100644
index 0000000..9863ece
--- /dev/null
+++ b/engine/disp_defs.cpp
@@ -0,0 +1,41 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#include "disp_defs.h"
+
+// memdbgon must be the last include file in a .cpp file!!!
+#include "tier0/memdbgon.h"
+
+// ---------------------------------------------------------------------- //
+// Global tables.
+// ---------------------------------------------------------------------- //
+
+// These map CCoreDispSurface neighbor orientations (which are actually edge indices)
+// into our 'degrees of rotation' representation.
+int g_CoreDispNeighborOrientationMap[4][4] =
+{
+ {ORIENTATION_CCW_180, ORIENTATION_CCW_270, ORIENTATION_CCW_0, ORIENTATION_CCW_90},
+ {ORIENTATION_CCW_90, ORIENTATION_CCW_180, ORIENTATION_CCW_270, ORIENTATION_CCW_0},
+ {ORIENTATION_CCW_0, ORIENTATION_CCW_90, ORIENTATION_CCW_180, ORIENTATION_CCW_270},
+ {ORIENTATION_CCW_270, ORIENTATION_CCW_0, ORIENTATION_CCW_90, ORIENTATION_CCW_180}
+};
+
+
+
+// ---------------------------------------------------------------------- //
+// Global variables.
+// ---------------------------------------------------------------------- //
+
+CUtlVector<unsigned char> g_DispLMAlpha;
+CUtlVector<unsigned char, CHunkMemory<unsigned char> > g_DispLightmapSamplePositions;
+CUtlVector<CDispGroup*> g_DispGroups;
+
+bool g_bDispOrthoRender = false;
+
+ConVar r_DrawDisp( "r_DrawDisp", "1", FCVAR_CHEAT, "Toggles rendering of displacment maps" );
+ConVar r_DispWalkable( "r_DispWalkable", "0", FCVAR_CHEAT );
+ConVar r_DispBuildable( "r_DispBuildable", "0", FCVAR_CHEAT );