Blixibon a7e23e46e9 Mapbase v4.0
- Fixed SDK_Refract and SDK_Water not using new cubemap method
- Added missing .inc files for SDK_ShatteredGlass
- Updated gitignore
- Fixed parallax corrected cubemaps sometimes causing VBSP to crash
- Added spawnflag to npc_headcrab which can prevent a headcrab from drowning
- Added spawnflag to npc_headcrab which can prevent a headcrab from instantly dying to a melee weapon
2020-06-13 20:45:37 +00:00

213 lines
4.3 KiB
C++

#include "shaderlib/cshader.h"
class sdk_shatteredglass_ps20b_Static_Index
{
private:
int m_nCUBEMAP;
#ifdef _DEBUG
bool m_bCUBEMAP;
#endif
public:
void SetCUBEMAP( int i )
{
Assert( i >= 0 && i <= 1 );
m_nCUBEMAP = i;
#ifdef _DEBUG
m_bCUBEMAP = true;
#endif
}
void SetCUBEMAP( bool i )
{
m_nCUBEMAP = i ? 1 : 0;
#ifdef _DEBUG
m_bCUBEMAP = true;
#endif
}
private:
int m_nVERTEXCOLOR;
#ifdef _DEBUG
bool m_bVERTEXCOLOR;
#endif
public:
void SetVERTEXCOLOR( int i )
{
Assert( i >= 0 && i <= 1 );
m_nVERTEXCOLOR = i;
#ifdef _DEBUG
m_bVERTEXCOLOR = true;
#endif
}
void SetVERTEXCOLOR( bool i )
{
m_nVERTEXCOLOR = i ? 1 : 0;
#ifdef _DEBUG
m_bVERTEXCOLOR = true;
#endif
}
private:
int m_nENVMAPMASK;
#ifdef _DEBUG
bool m_bENVMAPMASK;
#endif
public:
void SetENVMAPMASK( int i )
{
Assert( i >= 0 && i <= 1 );
m_nENVMAPMASK = i;
#ifdef _DEBUG
m_bENVMAPMASK = true;
#endif
}
void SetENVMAPMASK( bool i )
{
m_nENVMAPMASK = i ? 1 : 0;
#ifdef _DEBUG
m_bENVMAPMASK = true;
#endif
}
private:
int m_nBASEALPHAENVMAPMASK;
#ifdef _DEBUG
bool m_bBASEALPHAENVMAPMASK;
#endif
public:
void SetBASEALPHAENVMAPMASK( int i )
{
Assert( i >= 0 && i <= 1 );
m_nBASEALPHAENVMAPMASK = i;
#ifdef _DEBUG
m_bBASEALPHAENVMAPMASK = true;
#endif
}
void SetBASEALPHAENVMAPMASK( bool i )
{
m_nBASEALPHAENVMAPMASK = i ? 1 : 0;
#ifdef _DEBUG
m_bBASEALPHAENVMAPMASK = true;
#endif
}
private:
int m_nHDRTYPE;
#ifdef _DEBUG
bool m_bHDRTYPE;
#endif
public:
void SetHDRTYPE( int i )
{
Assert( i >= 0 && i <= 2 );
m_nHDRTYPE = i;
#ifdef _DEBUG
m_bHDRTYPE = true;
#endif
}
void SetHDRTYPE( bool i )
{
m_nHDRTYPE = i ? 1 : 0;
#ifdef _DEBUG
m_bHDRTYPE = true;
#endif
}
private:
int m_nPARALLAXCORRECT;
#ifdef _DEBUG
bool m_bPARALLAXCORRECT;
#endif
public:
void SetPARALLAXCORRECT( int i )
{
Assert( i >= 0 && i <= 1 );
m_nPARALLAXCORRECT = i;
#ifdef _DEBUG
m_bPARALLAXCORRECT = true;
#endif
}
void SetPARALLAXCORRECT( bool i )
{
m_nPARALLAXCORRECT = i ? 1 : 0;
#ifdef _DEBUG
m_bPARALLAXCORRECT = true;
#endif
}
public:
sdk_shatteredglass_ps20b_Static_Index( )
{
#ifdef _DEBUG
m_bCUBEMAP = false;
#endif // _DEBUG
m_nCUBEMAP = 0;
#ifdef _DEBUG
m_bVERTEXCOLOR = false;
#endif // _DEBUG
m_nVERTEXCOLOR = 0;
#ifdef _DEBUG
m_bENVMAPMASK = false;
#endif // _DEBUG
m_nENVMAPMASK = 0;
#ifdef _DEBUG
m_bBASEALPHAENVMAPMASK = false;
#endif // _DEBUG
m_nBASEALPHAENVMAPMASK = 0;
#ifdef _DEBUG
m_bHDRTYPE = false;
#endif // _DEBUG
m_nHDRTYPE = 0;
#ifdef _DEBUG
m_bPARALLAXCORRECT = false;
#endif // _DEBUG
m_nPARALLAXCORRECT = 0;
}
int GetIndex()
{
// Asserts to make sure that we aren't using any skipped combinations.
// Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG
bool bAllStaticVarsDefined = m_bCUBEMAP && m_bVERTEXCOLOR && m_bENVMAPMASK && m_bBASEALPHAENVMAPMASK && m_bHDRTYPE && m_bPARALLAXCORRECT;
Assert( bAllStaticVarsDefined );
#endif // _DEBUG
return ( 2 * m_nCUBEMAP ) + ( 4 * m_nVERTEXCOLOR ) + ( 8 * m_nENVMAPMASK ) + ( 16 * m_nBASEALPHAENVMAPMASK ) + ( 32 * m_nHDRTYPE ) + ( 96 * m_nPARALLAXCORRECT ) + 0;
}
};
#define shaderStaticTest_sdk_shatteredglass_ps20b psh_forgot_to_set_static_CUBEMAP + psh_forgot_to_set_static_VERTEXCOLOR + psh_forgot_to_set_static_ENVMAPMASK + psh_forgot_to_set_static_BASEALPHAENVMAPMASK + psh_forgot_to_set_static_HDRTYPE + psh_forgot_to_set_static_PARALLAXCORRECT + 0
class sdk_shatteredglass_ps20b_Dynamic_Index
{
private:
int m_nPIXELFOGTYPE;
#ifdef _DEBUG
bool m_bPIXELFOGTYPE;
#endif
public:
void SetPIXELFOGTYPE( int i )
{
Assert( i >= 0 && i <= 1 );
m_nPIXELFOGTYPE = i;
#ifdef _DEBUG
m_bPIXELFOGTYPE = true;
#endif
}
void SetPIXELFOGTYPE( bool i )
{
m_nPIXELFOGTYPE = i ? 1 : 0;
#ifdef _DEBUG
m_bPIXELFOGTYPE = true;
#endif
}
public:
sdk_shatteredglass_ps20b_Dynamic_Index()
{
#ifdef _DEBUG
m_bPIXELFOGTYPE = false;
#endif // _DEBUG
m_nPIXELFOGTYPE = 0;
}
int GetIndex()
{
// Asserts to make sure that we aren't using any skipped combinations.
// Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG
bool bAllDynamicVarsDefined = m_bPIXELFOGTYPE;
Assert( bAllDynamicVarsDefined );
#endif // _DEBUG
return ( 1 * m_nPIXELFOGTYPE ) + 0;
}
};
#define shaderDynamicTest_sdk_shatteredglass_ps20b psh_forgot_to_set_dynamic_PIXELFOGTYPE + 0