mirror of
https://github.com/Gigaslav/HL2Overcharged.git
synced 2026-09-21 20:15:06 +03:00
161 lines
3.2 KiB
C++
161 lines
3.2 KiB
C++
#include "shaderlib/cshader.h"
|
|
class sdk_lightmappedgeneric_ps11_Static_Index
|
|
{
|
|
private:
|
|
int m_nBASETEXTURE;
|
|
#ifdef _DEBUG
|
|
bool m_bBASETEXTURE;
|
|
#endif
|
|
public:
|
|
void SetBASETEXTURE( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 1 );
|
|
m_nBASETEXTURE = i;
|
|
#ifdef _DEBUG
|
|
m_bBASETEXTURE = true;
|
|
#endif
|
|
}
|
|
void SetBASETEXTURE( bool i )
|
|
{
|
|
m_nBASETEXTURE = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bBASETEXTURE = true;
|
|
#endif
|
|
}
|
|
private:
|
|
int m_nENVMAP;
|
|
#ifdef _DEBUG
|
|
bool m_bENVMAP;
|
|
#endif
|
|
public:
|
|
void SetENVMAP( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 1 );
|
|
m_nENVMAP = i;
|
|
#ifdef _DEBUG
|
|
m_bENVMAP = true;
|
|
#endif
|
|
}
|
|
void SetENVMAP( bool i )
|
|
{
|
|
m_nENVMAP = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bENVMAP = 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_nSELFILLUM;
|
|
#ifdef _DEBUG
|
|
bool m_bSELFILLUM;
|
|
#endif
|
|
public:
|
|
void SetSELFILLUM( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 1 );
|
|
m_nSELFILLUM = i;
|
|
#ifdef _DEBUG
|
|
m_bSELFILLUM = true;
|
|
#endif
|
|
}
|
|
void SetSELFILLUM( bool i )
|
|
{
|
|
m_nSELFILLUM = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bSELFILLUM = 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
|
|
}
|
|
public:
|
|
sdk_lightmappedgeneric_ps11_Static_Index( )
|
|
{
|
|
#ifdef _DEBUG
|
|
m_bBASETEXTURE = false;
|
|
#endif // _DEBUG
|
|
m_nBASETEXTURE = 0;
|
|
#ifdef _DEBUG
|
|
m_bENVMAP = false;
|
|
#endif // _DEBUG
|
|
m_nENVMAP = 0;
|
|
#ifdef _DEBUG
|
|
m_bENVMAPMASK = false;
|
|
#endif // _DEBUG
|
|
m_nENVMAPMASK = 0;
|
|
#ifdef _DEBUG
|
|
m_bSELFILLUM = false;
|
|
#endif // _DEBUG
|
|
m_nSELFILLUM = 0;
|
|
#ifdef _DEBUG
|
|
m_bBASEALPHAENVMAPMASK = false;
|
|
#endif // _DEBUG
|
|
m_nBASEALPHAENVMAPMASK = 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_bBASETEXTURE && m_bENVMAP && m_bENVMAPMASK && m_bSELFILLUM && m_bBASEALPHAENVMAPMASK;
|
|
Assert( bAllStaticVarsDefined );
|
|
#endif // _DEBUG
|
|
return ( 1 * m_nBASETEXTURE ) + ( 2 * m_nENVMAP ) + ( 4 * m_nENVMAPMASK ) + ( 8 * m_nSELFILLUM ) + ( 16 * m_nBASEALPHAENVMAPMASK ) + 0;
|
|
}
|
|
};
|
|
#define shaderStaticTest_sdk_lightmappedgeneric_ps11 psh_forgot_to_set_static_BASETEXTURE + psh_forgot_to_set_static_ENVMAP + psh_forgot_to_set_static_ENVMAPMASK + psh_forgot_to_set_static_SELFILLUM + psh_forgot_to_set_static_BASEALPHAENVMAPMASK + 0
|
|
class sdk_lightmappedgeneric_ps11_Dynamic_Index
|
|
{
|
|
public:
|
|
sdk_lightmappedgeneric_ps11_Dynamic_Index()
|
|
{
|
|
}
|
|
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
|
|
#endif // _DEBUG
|
|
return 0;
|
|
}
|
|
};
|
|
#define shaderDynamicTest_sdk_lightmappedgeneric_ps11 0
|