mirror of
https://github.com/nillerusr/source-engine.git
synced 2025-01-03 05:56:42 +00:00
fix some undefined behaviors
This commit is contained in:
parent
e453bdd409
commit
7bb2dbdb1e
@ -23,10 +23,6 @@
|
|||||||
|
|
||||||
#define MATERIALVAR_CHAR_BUF_SIZE 512
|
#define MATERIALVAR_CHAR_BUF_SIZE 512
|
||||||
|
|
||||||
/*#if !defined( _X360 )
|
|
||||||
#pragma pack (1)
|
|
||||||
#endif*/
|
|
||||||
|
|
||||||
ConVar mat_texture_tracking( "mat_texture_tracking", IsDebug() ? "1" : "0" );
|
ConVar mat_texture_tracking( "mat_texture_tracking", IsDebug() ? "1" : "0" );
|
||||||
CUtlMap<ITexture*, CInterlockedInt> s_TextureRefList( DefLessFunc( ITexture* ) );
|
CUtlMap<ITexture*, CInterlockedInt> s_TextureRefList( DefLessFunc( ITexture* ) );
|
||||||
CUtlMap<ITexture*, CInterlockedInt> *g_pTextureRefList = &s_TextureRefList;
|
CUtlMap<ITexture*, CInterlockedInt> *g_pTextureRefList = &s_TextureRefList;
|
||||||
|
@ -3499,7 +3499,7 @@ void CShaderAPIDx8::ResetRenderState( bool bFullReset )
|
|||||||
SetRenderState( D3DRS_CULLMODE, D3DCULL_CCW );
|
SetRenderState( D3DRS_CULLMODE, D3DCULL_CCW );
|
||||||
|
|
||||||
// No shade mode yet
|
// No shade mode yet
|
||||||
m_DynamicState.m_ShadeMode = (D3DSHADEMODE)-1;
|
m_DynamicState.m_ShadeMode = NULL;
|
||||||
ShadeMode( SHADER_SMOOTH );
|
ShadeMode( SHADER_SMOOTH );
|
||||||
|
|
||||||
m_DynamicState.m_bHWMorphingEnabled = false;
|
m_DynamicState.m_bHWMorphingEnabled = false;
|
||||||
|
@ -141,7 +141,7 @@ inline unsigned GetEndMask( int numBits )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline int GetBitForBitnum( int bitNum )
|
inline uint GetBitForBitnum( int bitNum )
|
||||||
{
|
{
|
||||||
static int bitsForBitnum[] =
|
static int bitsForBitnum[] =
|
||||||
{
|
{
|
||||||
|
@ -155,7 +155,7 @@ public:
|
|||||||
|
|
||||||
EGLMProgramType m_type; // vertex or pixel
|
EGLMProgramType m_type; // vertex or pixel
|
||||||
|
|
||||||
uint m_nHashTag; // serial number for hashing
|
unsigned long m_nHashTag; // serial number for hashing
|
||||||
|
|
||||||
char *m_text; // copy of text passed into constructor. Can change if editable shaders is enabled.
|
char *m_text; // copy of text passed into constructor. Can change if editable shaders is enabled.
|
||||||
// note - it can contain multiple flavors, so use CGLMTextSectioner to scan it and locate them
|
// note - it can contain multiple flavors, so use CGLMTextSectioner to scan it and locate them
|
||||||
|
@ -114,7 +114,7 @@ public:
|
|||||||
|
|
||||||
for ( unsigned int littleBit=0; littleBit < 32; littleBit++ )
|
for ( unsigned int littleBit=0; littleBit < 32; littleBit++ )
|
||||||
StoreLittleDWord( &g_LittleBits[littleBit], 0, 1u<<littleBit );
|
StoreLittleDWord( &g_LittleBits[littleBit], 0, 1u<<littleBit );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
static CBitWriteMasksInit g_BitWriteMasksInit;
|
static CBitWriteMasksInit g_BitWriteMasksInit;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user