diff --git a/mp/src/dx10sdk/Utilities/dx9_30/dx_proxy.dll b/mp/src/dx10sdk/Utilities/dx9_30/dx_proxy.dll index e1989363..7caf4720 100644 Binary files a/mp/src/dx10sdk/Utilities/dx9_30/dx_proxy.dll and b/mp/src/dx10sdk/Utilities/dx9_30/dx_proxy.dll differ diff --git a/mp/src/dx9sdk/utilities/dx_proxy.dll b/mp/src/dx9sdk/utilities/dx_proxy.dll index 56453730..26aac742 100644 Binary files a/mp/src/dx9sdk/utilities/dx_proxy.dll and b/mp/src/dx9sdk/utilities/dx_proxy.dll differ diff --git a/mp/src/lib/public/linux32/bitmap.a b/mp/src/lib/public/linux32/bitmap.a index 9e9b1385..9e6a44af 100644 Binary files a/mp/src/lib/public/linux32/bitmap.a and b/mp/src/lib/public/linux32/bitmap.a differ diff --git a/mp/src/lib/public/linux32/choreoobjects.a b/mp/src/lib/public/linux32/choreoobjects.a index a24bab3c..5b1da602 100644 Binary files a/mp/src/lib/public/linux32/choreoobjects.a and b/mp/src/lib/public/linux32/choreoobjects.a differ diff --git a/mp/src/lib/public/linux32/dmxloader.a b/mp/src/lib/public/linux32/dmxloader.a index 35530866..e344b19f 100644 Binary files a/mp/src/lib/public/linux32/dmxloader.a and b/mp/src/lib/public/linux32/dmxloader.a differ diff --git a/mp/src/lib/public/linux32/libtier0.so b/mp/src/lib/public/linux32/libtier0.so index 1b821914..0431a837 100644 Binary files a/mp/src/lib/public/linux32/libtier0.so and b/mp/src/lib/public/linux32/libtier0.so differ diff --git a/mp/src/lib/public/linux32/matsys_controls.a b/mp/src/lib/public/linux32/matsys_controls.a index 70222e64..a831c48b 100644 Binary files a/mp/src/lib/public/linux32/matsys_controls.a and b/mp/src/lib/public/linux32/matsys_controls.a differ diff --git a/mp/src/lib/public/linux32/particles.a b/mp/src/lib/public/linux32/particles.a index 2de80570..d0189664 100644 Binary files a/mp/src/lib/public/linux32/particles.a and b/mp/src/lib/public/linux32/particles.a differ diff --git a/mp/src/lib/public/linux32/shaderlib.a b/mp/src/lib/public/linux32/shaderlib.a index 9fa52e09..da93e3f6 100644 Binary files a/mp/src/lib/public/linux32/shaderlib.a and b/mp/src/lib/public/linux32/shaderlib.a differ diff --git a/mp/src/lib/public/linux32/tier2.a b/mp/src/lib/public/linux32/tier2.a index f3cbd890..a2af0ed5 100644 Binary files a/mp/src/lib/public/linux32/tier2.a and b/mp/src/lib/public/linux32/tier2.a differ diff --git a/mp/src/lib/public/linux32/tier3.a b/mp/src/lib/public/linux32/tier3.a index 0ceee4b2..c4eb9880 100644 Binary files a/mp/src/lib/public/linux32/tier3.a and b/mp/src/lib/public/linux32/tier3.a differ diff --git a/mp/src/lib/public/linux32/vtf.a b/mp/src/lib/public/linux32/vtf.a index a5f39932..11713419 100644 Binary files a/mp/src/lib/public/linux32/vtf.a and b/mp/src/lib/public/linux32/vtf.a differ diff --git a/mp/src/lib/public/tier0.lib b/mp/src/lib/public/tier0.lib index 6098e682..fa9c6b79 100644 Binary files a/mp/src/lib/public/tier0.lib and b/mp/src/lib/public/tier0.lib differ diff --git a/mp/src/lib/public/vstdlib.lib b/mp/src/lib/public/vstdlib.lib index ffb8d830..503391aa 100644 Binary files a/mp/src/lib/public/vstdlib.lib and b/mp/src/lib/public/vstdlib.lib differ diff --git a/mp/src/public/engine/IStaticPropMgr.h b/mp/src/public/engine/IStaticPropMgr.h index ca06f8ff..b331fdb2 100644 --- a/mp/src/public/engine/IStaticPropMgr.h +++ b/mp/src/public/engine/IStaticPropMgr.h @@ -63,8 +63,6 @@ public: // Adds decals to static props, returns point of decal in trace_t virtual void AddDecalToStaticProp( const Vector& rayStart, const Vector& rayEnd, int staticPropIndex, int decalIndex, bool doTrace, trace_t& tr ) = 0; - virtual void AddColorDecalToStaticProp( Vector const& rayStart, Vector const& rayEnd, - int staticPropIndex, int decalIndex, bool doTrace, trace_t& tr, bool bUseColor, Color cColor ) = 0; // Adds/removes shadows from static props virtual void AddShadowToStaticProp( unsigned short shadowHandle, IClientRenderable* pRenderable ) = 0; virtual void RemoveAllShadowsFromStaticProp( IClientRenderable* pRenderable ) = 0; @@ -81,6 +79,8 @@ public: //=================================================================== virtual void DrawStaticProps( IClientRenderable **pProps, int count, bool bShadowDepth, bool drawVCollideWireframe ) = 0; + virtual void AddColorDecalToStaticProp( Vector const& rayStart, Vector const& rayEnd, + int staticPropIndex, int decalIndex, bool doTrace, trace_t& tr, bool bUseColor, Color cColor ) = 0; }; class IStaticPropMgrServer : public IStaticPropMgr diff --git a/mp/src/public/engine/ivmodelrender.h b/mp/src/public/engine/ivmodelrender.h index 5b60d893..56aea6c2 100644 --- a/mp/src/public/engine/ivmodelrender.h +++ b/mp/src/public/engine/ivmodelrender.h @@ -138,8 +138,6 @@ public: // radius of the decal to create. virtual void AddDecal( ModelInstanceHandle_t handle, Ray_t const& ray, Vector const& decalUp, int decalIndex, int body, bool noPokeThru = false, int maxLODToDecal = ADDDECAL_TO_ALL_LODS ) = 0; - virtual void AddColoredDecal( ModelInstanceHandle_t handle, Ray_t const& ray, - Vector const& decalUp, int decalIndex, int body, Color cColor, bool noPokeThru = false, int maxLODToDecal = ADDDECAL_TO_ALL_LODS ) = 0; // Removes all the decals on a model instance virtual void RemoveAllDecals( ModelInstanceHandle_t handle ) = 0; @@ -176,6 +174,9 @@ public: virtual void SuppressEngineLighting( bool bSuppress ) = 0; virtual void SetupColorMeshes( int nTotalVerts ) = 0; + + virtual void AddColoredDecal( ModelInstanceHandle_t handle, Ray_t const& ray, + Vector const& decalUp, int decalIndex, int body, Color cColor, bool noPokeThru = false, int maxLODToDecal = ADDDECAL_TO_ALL_LODS ) = 0; }; diff --git a/mp/src/public/gamebspfile.h b/mp/src/public/gamebspfile.h index 242d6ca9..786e0671 100644 --- a/mp/src/public/gamebspfile.h +++ b/mp/src/public/gamebspfile.h @@ -21,12 +21,14 @@ //----------------------------------------------------------------------------- // This enumerations defines all the four-CC codes for the client lump names //----------------------------------------------------------------------------- +// TODO: We may have some endian considerations here! +#define GAMELUMP_MAKE_CODE(a, b, c, d) ((a) << 24 | (b) << 16 | (c) << 8 | (d) << 0) enum { - GAMELUMP_DETAIL_PROPS = 'dprp', - GAMELUMP_DETAIL_PROP_LIGHTING = 'dplt', - GAMELUMP_STATIC_PROPS = 'sprp', - GAMELUMP_DETAIL_PROP_LIGHTING_HDR = 'dplh', + GAMELUMP_DETAIL_PROPS = GAMELUMP_MAKE_CODE('d', 'p', 'r', 'p'), + GAMELUMP_DETAIL_PROP_LIGHTING = GAMELUMP_MAKE_CODE('d', 'p', 'l', 't'), + GAMELUMP_STATIC_PROPS = GAMELUMP_MAKE_CODE('s', 'p', 'r', 'p'), + GAMELUMP_DETAIL_PROP_LIGHTING_HDR = GAMELUMP_MAKE_CODE('d', 'p', 'l', 'h'), }; // Versions... diff --git a/mp/src/utils/common/mstristrip.cpp b/mp/src/utils/common/mstristrip.cpp index 6a66de2f..9e611f94 100644 --- a/mp/src/utils/common/mstristrip.cpp +++ b/mp/src/utils/common/mstristrip.cpp @@ -867,7 +867,7 @@ public: int iFirstUsed; int iOrigIndex; - bool operator<(const SortEntry& rhs) + bool operator<(const SortEntry& rhs) const { return iFirstUsed < rhs.iFirstUsed; } diff --git a/mp/src/utils/vbsp/cubemap.cpp b/mp/src/utils/vbsp/cubemap.cpp index fda41703..2415115b 100644 --- a/mp/src/utils/vbsp/cubemap.cpp +++ b/mp/src/utils/vbsp/cubemap.cpp @@ -286,12 +286,8 @@ void CreateDefaultCubemaps( bool bHDR ) // NOTE: This implementation depends on the fact that all VTF files contain // all mipmap levels const char *pSkyboxBaseName = FindSkyboxMaterialName(); - char skyboxMaterialName[MAX_PATH]; - Q_snprintf( skyboxMaterialName, MAX_PATH, "skybox/%s", pSkyboxBaseName ); - IVTFTexture *pSrcVTFTextures[6]; - - if( !skyboxMaterialName ) + if( !pSkyboxBaseName ) { if( s_DefaultCubemapNames.Count() ) { @@ -300,6 +296,11 @@ void CreateDefaultCubemaps( bool bHDR ) return; } + char skyboxMaterialName[MAX_PATH]; + Q_snprintf( skyboxMaterialName, MAX_PATH, "skybox/%s", pSkyboxBaseName ); + + IVTFTexture *pSrcVTFTextures[6]; + int unionTextureFlags = 0; if( !LoadSrcVTFFiles( pSrcVTFTextures, skyboxMaterialName, &unionTextureFlags, bHDR ) ) { diff --git a/mp/src/utils/vbsp/detailobjects.cpp b/mp/src/utils/vbsp/detailobjects.cpp index 22595781..b110534c 100644 --- a/mp/src/utils/vbsp/detailobjects.cpp +++ b/mp/src/utils/vbsp/detailobjects.cpp @@ -379,7 +379,7 @@ static int SelectDetail( DetailObjectGroup_t const& group ) static int AddDetailDictLump( const char* pModelName ) { DetailObjectDictLump_t dictLump; - strncpy( dictLump.m_Name, pModelName, DETAIL_NAME_LENGTH ); + Q_strncpy( dictLump.m_Name, pModelName, DETAIL_NAME_LENGTH ); for (int i = s_DetailObjectDictLump.Count(); --i >= 0; ) { diff --git a/mp/src/utils/vbsp/ivp.cpp b/mp/src/utils/vbsp/ivp.cpp index 421b1b2e..585f0904 100644 --- a/mp/src/utils/vbsp/ivp.cpp +++ b/mp/src/utils/vbsp/ivp.cpp @@ -432,7 +432,7 @@ public: private: - CPhysConvex *CPlaneList::BuildConvexForBrush( int brushnumber, float shrink, CPhysCollide *pCollideTest, float shrinkMinimum ); + CPhysConvex *BuildConvexForBrush( int brushnumber, float shrink, CPhysCollide *pCollideTest, float shrinkMinimum ); public: CUtlVector m_convex; diff --git a/mp/src/utils/vrad/vrad.cpp b/mp/src/utils/vrad/vrad.cpp index 854956ec..8100dc3f 100644 --- a/mp/src/utils/vrad/vrad.cpp +++ b/mp/src/utils/vrad/vrad.cpp @@ -93,7 +93,7 @@ bool g_bOnlyStaticProps = false; bool g_bShowStaticPropNormals = false; -float gamma = 0.5; +float gamma_value = 0.5; float indirect_sun = 1.0; float reflectivityScale = 1.0; qboolean do_extra = true; diff --git a/mp/src/utils/vrad/vrad.h b/mp/src/utils/vrad/vrad.h index b9dc0a3f..b39d66c8 100644 --- a/mp/src/utils/vrad/vrad.h +++ b/mp/src/utils/vrad/vrad.h @@ -336,7 +336,7 @@ extern dface_t *g_pFaces; extern bool g_bMPIProps; extern byte nodehit[MAX_MAP_NODES]; -extern float gamma; +extern float gamma_value; extern float indirect_sun; extern float smoothing_threshold; extern int dlight_map; diff --git a/mp/src/utils/vrad/vraddetailprops.cpp b/mp/src/utils/vrad/vraddetailprops.cpp index 6712beb1..822bc78c 100644 --- a/mp/src/utils/vrad/vraddetailprops.cpp +++ b/mp/src/utils/vrad/vraddetailprops.cpp @@ -524,7 +524,8 @@ private: bool TestPointAgainstSkySurface( Vector const &pt, dface_t *pFace ) { // Create sky face winding. - winding_t *pWinding = WindingFromFace( pFace, Vector( 0.0f, 0.0f, 0.0f ) ); + Vector v( 0.0f, 0.0f, 0.0f ); + winding_t *pWinding = WindingFromFace( pFace, v ); // Test point in winding. (Since it is at the node, it is in the plane.) bool bRet = PointInWinding( pt, pWinding ); diff --git a/sp/src/devtools/bin/vpc_linux b/sp/src/devtools/bin/vpc_linux index 21679b4f..c5e72b80 100755 Binary files a/sp/src/devtools/bin/vpc_linux and b/sp/src/devtools/bin/vpc_linux differ diff --git a/sp/src/devtools/bin/vpc_osx b/sp/src/devtools/bin/vpc_osx index 0ca6b8c4..1e5dea1c 100755 Binary files a/sp/src/devtools/bin/vpc_osx and b/sp/src/devtools/bin/vpc_osx differ diff --git a/sp/src/dx10sdk/Utilities/dx9_30/dx_proxy.dll b/sp/src/dx10sdk/Utilities/dx9_30/dx_proxy.dll index 4db8fedb..8cd3b73e 100644 Binary files a/sp/src/dx10sdk/Utilities/dx9_30/dx_proxy.dll and b/sp/src/dx10sdk/Utilities/dx9_30/dx_proxy.dll differ diff --git a/sp/src/dx9sdk/utilities/dx_proxy.dll b/sp/src/dx9sdk/utilities/dx_proxy.dll index 4a66f96f..31c9c73b 100644 Binary files a/sp/src/dx9sdk/utilities/dx_proxy.dll and b/sp/src/dx9sdk/utilities/dx_proxy.dll differ diff --git a/sp/src/lib/public/bitmap.lib b/sp/src/lib/public/bitmap.lib index f136ceb8..3f631b59 100644 Binary files a/sp/src/lib/public/bitmap.lib and b/sp/src/lib/public/bitmap.lib differ diff --git a/sp/src/lib/public/linux32/bitmap.a b/sp/src/lib/public/linux32/bitmap.a index 35c6d4b2..53c85947 100644 Binary files a/sp/src/lib/public/linux32/bitmap.a and b/sp/src/lib/public/linux32/bitmap.a differ diff --git a/sp/src/lib/public/linux32/choreoobjects.a b/sp/src/lib/public/linux32/choreoobjects.a index dfd22f5e..1bf42e68 100644 Binary files a/sp/src/lib/public/linux32/choreoobjects.a and b/sp/src/lib/public/linux32/choreoobjects.a differ diff --git a/sp/src/lib/public/linux32/dmxloader.a b/sp/src/lib/public/linux32/dmxloader.a index eda673b5..63ac2548 100644 Binary files a/sp/src/lib/public/linux32/dmxloader.a and b/sp/src/lib/public/linux32/dmxloader.a differ diff --git a/sp/src/lib/public/linux32/libtier0.so b/sp/src/lib/public/linux32/libtier0.so index eb582467..0b856218 100644 Binary files a/sp/src/lib/public/linux32/libtier0.so and b/sp/src/lib/public/linux32/libtier0.so differ diff --git a/sp/src/lib/public/linux32/libvstdlib.so b/sp/src/lib/public/linux32/libvstdlib.so index 66641ae6..ff877923 100644 Binary files a/sp/src/lib/public/linux32/libvstdlib.so and b/sp/src/lib/public/linux32/libvstdlib.so differ diff --git a/sp/src/lib/public/linux32/mathlib.a b/sp/src/lib/public/linux32/mathlib.a new file mode 100644 index 00000000..d4e55884 Binary files /dev/null and b/sp/src/lib/public/linux32/mathlib.a differ diff --git a/sp/src/lib/public/linux32/matsys_controls.a b/sp/src/lib/public/linux32/matsys_controls.a index 5707fa0d..e17d6912 100644 Binary files a/sp/src/lib/public/linux32/matsys_controls.a and b/sp/src/lib/public/linux32/matsys_controls.a differ diff --git a/sp/src/lib/public/linux32/particles.a b/sp/src/lib/public/linux32/particles.a index 15630878..3eff3ec8 100644 Binary files a/sp/src/lib/public/linux32/particles.a and b/sp/src/lib/public/linux32/particles.a differ diff --git a/sp/src/lib/public/linux32/shaderlib.a b/sp/src/lib/public/linux32/shaderlib.a index 9a36a980..152dd01f 100644 Binary files a/sp/src/lib/public/linux32/shaderlib.a and b/sp/src/lib/public/linux32/shaderlib.a differ diff --git a/sp/src/lib/public/linux32/tier1.a b/sp/src/lib/public/linux32/tier1.a new file mode 100644 index 00000000..5ba32663 Binary files /dev/null and b/sp/src/lib/public/linux32/tier1.a differ diff --git a/sp/src/lib/public/linux32/tier2.a b/sp/src/lib/public/linux32/tier2.a index a219abe3..c35eefda 100644 Binary files a/sp/src/lib/public/linux32/tier2.a and b/sp/src/lib/public/linux32/tier2.a differ diff --git a/sp/src/lib/public/linux32/tier3.a b/sp/src/lib/public/linux32/tier3.a index d061038e..85bc5036 100644 Binary files a/sp/src/lib/public/linux32/tier3.a and b/sp/src/lib/public/linux32/tier3.a differ diff --git a/sp/src/lib/public/linux32/vgui_controls.a b/sp/src/lib/public/linux32/vgui_controls.a new file mode 100644 index 00000000..929a7529 Binary files /dev/null and b/sp/src/lib/public/linux32/vgui_controls.a differ diff --git a/sp/src/lib/public/linux32/vtf.a b/sp/src/lib/public/linux32/vtf.a index 19cdceef..668f2554 100644 Binary files a/sp/src/lib/public/linux32/vtf.a and b/sp/src/lib/public/linux32/vtf.a differ diff --git a/sp/src/lib/public/matsys_controls.lib b/sp/src/lib/public/matsys_controls.lib index 5f75e96f..3f508149 100644 Binary files a/sp/src/lib/public/matsys_controls.lib and b/sp/src/lib/public/matsys_controls.lib differ diff --git a/sp/src/lib/public/nvtristrip.lib b/sp/src/lib/public/nvtristrip.lib index d40b3690..1ac1a83a 100644 Binary files a/sp/src/lib/public/nvtristrip.lib and b/sp/src/lib/public/nvtristrip.lib differ diff --git a/sp/src/lib/public/osx32/bitmap.a b/sp/src/lib/public/osx32/bitmap.a new file mode 100644 index 00000000..0e0c885f Binary files /dev/null and b/sp/src/lib/public/osx32/bitmap.a differ diff --git a/sp/src/lib/public/osx32/choreoobjects.a b/sp/src/lib/public/osx32/choreoobjects.a new file mode 100644 index 00000000..38241d5e Binary files /dev/null and b/sp/src/lib/public/osx32/choreoobjects.a differ diff --git a/sp/src/lib/public/osx32/dmxloader.a b/sp/src/lib/public/osx32/dmxloader.a new file mode 100644 index 00000000..8bee889a Binary files /dev/null and b/sp/src/lib/public/osx32/dmxloader.a differ diff --git a/sp/src/lib/public/osx32/matsys_controls.a b/sp/src/lib/public/osx32/matsys_controls.a new file mode 100644 index 00000000..4a9271d1 Binary files /dev/null and b/sp/src/lib/public/osx32/matsys_controls.a differ diff --git a/sp/src/lib/public/osx32/particles.a b/sp/src/lib/public/osx32/particles.a new file mode 100644 index 00000000..a0d3a387 Binary files /dev/null and b/sp/src/lib/public/osx32/particles.a differ diff --git a/sp/src/lib/public/osx32/shaderlib.a b/sp/src/lib/public/osx32/shaderlib.a new file mode 100644 index 00000000..acb84e34 Binary files /dev/null and b/sp/src/lib/public/osx32/shaderlib.a differ diff --git a/sp/src/lib/public/osx32/tier2.a b/sp/src/lib/public/osx32/tier2.a new file mode 100644 index 00000000..8421a097 Binary files /dev/null and b/sp/src/lib/public/osx32/tier2.a differ diff --git a/sp/src/lib/public/osx32/tier3.a b/sp/src/lib/public/osx32/tier3.a new file mode 100644 index 00000000..f16de338 Binary files /dev/null and b/sp/src/lib/public/osx32/tier3.a differ diff --git a/sp/src/lib/public/osx32/vtf.a b/sp/src/lib/public/osx32/vtf.a new file mode 100644 index 00000000..18bd45c8 Binary files /dev/null and b/sp/src/lib/public/osx32/vtf.a differ diff --git a/sp/src/lib/public/tier2.lib b/sp/src/lib/public/tier2.lib index 24d3a987..21e77fef 100644 Binary files a/sp/src/lib/public/tier2.lib and b/sp/src/lib/public/tier2.lib differ diff --git a/sp/src/lib/public/tier3.lib b/sp/src/lib/public/tier3.lib index 2713a561..d68a576f 100644 Binary files a/sp/src/lib/public/tier3.lib and b/sp/src/lib/public/tier3.lib differ diff --git a/sp/src/lib/public/vmpi.lib b/sp/src/lib/public/vmpi.lib index 26f76c58..e67325c2 100644 Binary files a/sp/src/lib/public/vmpi.lib and b/sp/src/lib/public/vmpi.lib differ diff --git a/sp/src/lib/public/vstdlib.lib b/sp/src/lib/public/vstdlib.lib index 425996e9..9c676dce 100644 Binary files a/sp/src/lib/public/vstdlib.lib and b/sp/src/lib/public/vstdlib.lib differ diff --git a/sp/src/public/engine/IStaticPropMgr.h b/sp/src/public/engine/IStaticPropMgr.h index ca06f8ff..b331fdb2 100644 --- a/sp/src/public/engine/IStaticPropMgr.h +++ b/sp/src/public/engine/IStaticPropMgr.h @@ -63,8 +63,6 @@ public: // Adds decals to static props, returns point of decal in trace_t virtual void AddDecalToStaticProp( const Vector& rayStart, const Vector& rayEnd, int staticPropIndex, int decalIndex, bool doTrace, trace_t& tr ) = 0; - virtual void AddColorDecalToStaticProp( Vector const& rayStart, Vector const& rayEnd, - int staticPropIndex, int decalIndex, bool doTrace, trace_t& tr, bool bUseColor, Color cColor ) = 0; // Adds/removes shadows from static props virtual void AddShadowToStaticProp( unsigned short shadowHandle, IClientRenderable* pRenderable ) = 0; virtual void RemoveAllShadowsFromStaticProp( IClientRenderable* pRenderable ) = 0; @@ -81,6 +79,8 @@ public: //=================================================================== virtual void DrawStaticProps( IClientRenderable **pProps, int count, bool bShadowDepth, bool drawVCollideWireframe ) = 0; + virtual void AddColorDecalToStaticProp( Vector const& rayStart, Vector const& rayEnd, + int staticPropIndex, int decalIndex, bool doTrace, trace_t& tr, bool bUseColor, Color cColor ) = 0; }; class IStaticPropMgrServer : public IStaticPropMgr diff --git a/sp/src/public/engine/ivmodelrender.h b/sp/src/public/engine/ivmodelrender.h index 5b60d893..56aea6c2 100644 --- a/sp/src/public/engine/ivmodelrender.h +++ b/sp/src/public/engine/ivmodelrender.h @@ -138,8 +138,6 @@ public: // radius of the decal to create. virtual void AddDecal( ModelInstanceHandle_t handle, Ray_t const& ray, Vector const& decalUp, int decalIndex, int body, bool noPokeThru = false, int maxLODToDecal = ADDDECAL_TO_ALL_LODS ) = 0; - virtual void AddColoredDecal( ModelInstanceHandle_t handle, Ray_t const& ray, - Vector const& decalUp, int decalIndex, int body, Color cColor, bool noPokeThru = false, int maxLODToDecal = ADDDECAL_TO_ALL_LODS ) = 0; // Removes all the decals on a model instance virtual void RemoveAllDecals( ModelInstanceHandle_t handle ) = 0; @@ -176,6 +174,9 @@ public: virtual void SuppressEngineLighting( bool bSuppress ) = 0; virtual void SetupColorMeshes( int nTotalVerts ) = 0; + + virtual void AddColoredDecal( ModelInstanceHandle_t handle, Ray_t const& ray, + Vector const& decalUp, int decalIndex, int body, Color cColor, bool noPokeThru = false, int maxLODToDecal = ADDDECAL_TO_ALL_LODS ) = 0; }; diff --git a/sp/src/public/gamebspfile.h b/sp/src/public/gamebspfile.h index 242d6ca9..786e0671 100644 --- a/sp/src/public/gamebspfile.h +++ b/sp/src/public/gamebspfile.h @@ -21,12 +21,14 @@ //----------------------------------------------------------------------------- // This enumerations defines all the four-CC codes for the client lump names //----------------------------------------------------------------------------- +// TODO: We may have some endian considerations here! +#define GAMELUMP_MAKE_CODE(a, b, c, d) ((a) << 24 | (b) << 16 | (c) << 8 | (d) << 0) enum { - GAMELUMP_DETAIL_PROPS = 'dprp', - GAMELUMP_DETAIL_PROP_LIGHTING = 'dplt', - GAMELUMP_STATIC_PROPS = 'sprp', - GAMELUMP_DETAIL_PROP_LIGHTING_HDR = 'dplh', + GAMELUMP_DETAIL_PROPS = GAMELUMP_MAKE_CODE('d', 'p', 'r', 'p'), + GAMELUMP_DETAIL_PROP_LIGHTING = GAMELUMP_MAKE_CODE('d', 'p', 'l', 't'), + GAMELUMP_STATIC_PROPS = GAMELUMP_MAKE_CODE('s', 'p', 'r', 'p'), + GAMELUMP_DETAIL_PROP_LIGHTING_HDR = GAMELUMP_MAKE_CODE('d', 'p', 'l', 'h'), }; // Versions... diff --git a/sp/src/utils/common/mstristrip.cpp b/sp/src/utils/common/mstristrip.cpp index 6a66de2f..9e611f94 100644 --- a/sp/src/utils/common/mstristrip.cpp +++ b/sp/src/utils/common/mstristrip.cpp @@ -867,7 +867,7 @@ public: int iFirstUsed; int iOrigIndex; - bool operator<(const SortEntry& rhs) + bool operator<(const SortEntry& rhs) const { return iFirstUsed < rhs.iFirstUsed; } diff --git a/sp/src/utils/vbsp/cubemap.cpp b/sp/src/utils/vbsp/cubemap.cpp index fda41703..2415115b 100644 --- a/sp/src/utils/vbsp/cubemap.cpp +++ b/sp/src/utils/vbsp/cubemap.cpp @@ -286,12 +286,8 @@ void CreateDefaultCubemaps( bool bHDR ) // NOTE: This implementation depends on the fact that all VTF files contain // all mipmap levels const char *pSkyboxBaseName = FindSkyboxMaterialName(); - char skyboxMaterialName[MAX_PATH]; - Q_snprintf( skyboxMaterialName, MAX_PATH, "skybox/%s", pSkyboxBaseName ); - IVTFTexture *pSrcVTFTextures[6]; - - if( !skyboxMaterialName ) + if( !pSkyboxBaseName ) { if( s_DefaultCubemapNames.Count() ) { @@ -300,6 +296,11 @@ void CreateDefaultCubemaps( bool bHDR ) return; } + char skyboxMaterialName[MAX_PATH]; + Q_snprintf( skyboxMaterialName, MAX_PATH, "skybox/%s", pSkyboxBaseName ); + + IVTFTexture *pSrcVTFTextures[6]; + int unionTextureFlags = 0; if( !LoadSrcVTFFiles( pSrcVTFTextures, skyboxMaterialName, &unionTextureFlags, bHDR ) ) { diff --git a/sp/src/utils/vbsp/detailobjects.cpp b/sp/src/utils/vbsp/detailobjects.cpp index 22595781..b110534c 100644 --- a/sp/src/utils/vbsp/detailobjects.cpp +++ b/sp/src/utils/vbsp/detailobjects.cpp @@ -379,7 +379,7 @@ static int SelectDetail( DetailObjectGroup_t const& group ) static int AddDetailDictLump( const char* pModelName ) { DetailObjectDictLump_t dictLump; - strncpy( dictLump.m_Name, pModelName, DETAIL_NAME_LENGTH ); + Q_strncpy( dictLump.m_Name, pModelName, DETAIL_NAME_LENGTH ); for (int i = s_DetailObjectDictLump.Count(); --i >= 0; ) { diff --git a/sp/src/utils/vbsp/ivp.cpp b/sp/src/utils/vbsp/ivp.cpp index 421b1b2e..585f0904 100644 --- a/sp/src/utils/vbsp/ivp.cpp +++ b/sp/src/utils/vbsp/ivp.cpp @@ -432,7 +432,7 @@ public: private: - CPhysConvex *CPlaneList::BuildConvexForBrush( int brushnumber, float shrink, CPhysCollide *pCollideTest, float shrinkMinimum ); + CPhysConvex *BuildConvexForBrush( int brushnumber, float shrink, CPhysCollide *pCollideTest, float shrinkMinimum ); public: CUtlVector m_convex; diff --git a/sp/src/utils/vrad/vrad.cpp b/sp/src/utils/vrad/vrad.cpp index 854956ec..8100dc3f 100644 --- a/sp/src/utils/vrad/vrad.cpp +++ b/sp/src/utils/vrad/vrad.cpp @@ -93,7 +93,7 @@ bool g_bOnlyStaticProps = false; bool g_bShowStaticPropNormals = false; -float gamma = 0.5; +float gamma_value = 0.5; float indirect_sun = 1.0; float reflectivityScale = 1.0; qboolean do_extra = true; diff --git a/sp/src/utils/vrad/vrad.h b/sp/src/utils/vrad/vrad.h index b9dc0a3f..b39d66c8 100644 --- a/sp/src/utils/vrad/vrad.h +++ b/sp/src/utils/vrad/vrad.h @@ -336,7 +336,7 @@ extern dface_t *g_pFaces; extern bool g_bMPIProps; extern byte nodehit[MAX_MAP_NODES]; -extern float gamma; +extern float gamma_value; extern float indirect_sun; extern float smoothing_threshold; extern int dlight_map; diff --git a/sp/src/utils/vrad/vraddetailprops.cpp b/sp/src/utils/vrad/vraddetailprops.cpp index 6712beb1..822bc78c 100644 --- a/sp/src/utils/vrad/vraddetailprops.cpp +++ b/sp/src/utils/vrad/vraddetailprops.cpp @@ -524,7 +524,8 @@ private: bool TestPointAgainstSkySurface( Vector const &pt, dface_t *pFace ) { // Create sky face winding. - winding_t *pWinding = WindingFromFace( pFace, Vector( 0.0f, 0.0f, 0.0f ) ); + Vector v( 0.0f, 0.0f, 0.0f ); + winding_t *pWinding = WindingFromFace( pFace, v ); // Test point in winding. (Since it is at the node, it is in the plane.) bool bRet = PointInWinding( pt, pWinding );