touch: add new commands

This commit is contained in:
nillerusr
2021-11-16 23:46:29 +03:00
parent f7cdca7ad2
commit d2f3cc44db
138 changed files with 46564 additions and 1231 deletions

View File

@@ -12,6 +12,7 @@
#include "wchartypes.h"
#include "tier0/valve_off.h"
#include <string.h>
#ifdef _WIN32
#pragma once
@@ -182,7 +183,9 @@ inline unsigned long const& FloatBits( vec_t const& f )
inline vec_t BitsToFloat( unsigned long i )
{
return *reinterpret_cast<vec_t*>(&i);
vec_t f;
memcpy( &f, &i, sizeof(f));
return f;
}
inline bool IsFinite( vec_t f )

View File

@@ -996,7 +996,7 @@ inline T QWordSwapC( T dw )
// The typically used methods.
//-------------------------------------
#if defined(__i386__) && !defined(VALVE_LITTLE_ENDIAN)
#if (defined(__i386__) || (defined(__arm__) && defined(ANDROID))) && !defined(VALVE_LITTLE_ENDIAN)
#define VALVE_LITTLE_ENDIAN 1
#endif
@@ -1055,19 +1055,21 @@ inline T QWordSwapC( T dw )
// @Note (toml 05-02-02): this technique expects the compiler to
// optimize the expression and eliminate the other path. On any new
// platform/compiler this should be tested.
inline short BigShort( short val ) { int test = 1; return ( *(char *)&test == 1 ) ? WordSwap( val ) : val; }
inline uint16 BigWord( uint16 val ) { int test = 1; return ( *(char *)&test == 1 ) ? WordSwap( val ) : val; }
inline long BigLong( long val ) { int test = 1; return ( *(char *)&test == 1 ) ? DWordSwap( val ) : val; }
#define BigShort( val ) BigWord( val )
inline uint32 BigDWord( uint32 val ) { int test = 1; return ( *(char *)&test == 1 ) ? DWordSwap( val ) : val; }
inline short LittleShort( short val ) { int test = 1; return ( *(char *)&test == 1 ) ? val : WordSwap( val ); }
#define BigLong( val ) BigDWord( val )
inline uint16 LittleWord( uint16 val ) { int test = 1; return ( *(char *)&test == 1 ) ? val : WordSwap( val ); }
inline long LittleLong( long val ) { int test = 1; return ( *(char *)&test == 1 ) ? val : DWordSwap( val ); }
#define LittleShort( val ) LittleWord( val )
inline uint32 LittleDWord( uint32 val ) { int test = 1; return ( *(char *)&test == 1 ) ? val : DWordSwap( val ); }
#define LittleLong( val ) LittleDWord( val )
inline uint64 LittleQWord( uint64 val ) { int test = 1; return ( *(char *)&test == 1 ) ? val : QWordSwap( val ); }
inline short SwapShort( short val ) { return WordSwap( val ); }
inline uint16 SwapWord( uint16 val ) { return WordSwap( val ); }
inline long SwapLong( long val ) { return DWordSwap( val ); }
#define SwapShort( val ) SwapWord( val )
inline uint32 SwapDWord( uint32 val ) { return DWordSwap( val ); }
#define SwapLong( val ) SwapDWord( val )
// Pass floats by pointer for swapping to avoid truncation in the fpu
inline void BigFloat( float *pOut, const float *pIn ) { int test = 1; ( *(char *)&test == 1 ) ? SafeSwapFloat( pOut, pIn ) : ( *pOut = *pIn ); }

View File

@@ -382,12 +382,13 @@ private:
#endif
unsigned m_nCurFrameCalls;
unsigned m_nPrevFrameCalls;
int m_nRecursions;
unsigned m_nCurFrameCalls;
CCycleCount m_CurFrameTime;
unsigned m_nPrevFrameCalls;
CCycleCount m_PrevFrameTime;
unsigned m_nTotalCalls;
@@ -631,13 +632,14 @@ protected:
int m_GroupIDStack[MAX_GROUP_STACK_DEPTH];
int m_GroupIDStackDepth;
#endif
int m_enabled;
bool m_fAtRoot; // tracked for efficiency of the "not profiling" case
CVProfNode *m_pCurNode;
CVProfNode m_Root;
CVProfNode *m_pCurNode;
int m_nFrames;
int m_ProfileDetailLevel;
int m_enabled;
int m_pausedEnabledDepth;
bool m_fAtRoot; // tracked for efficiency of the "not profiling" case
int m_ProfileDetailLevel;
class CBudgetGroup
{

View File

@@ -295,9 +295,10 @@ protected:
void Link( I elem );
// Used for sorting.
M m_Elements;
LessFunc_t m_LessFunc;
M m_Elements;
I m_Root;
I m_NumElements;
I m_FirstFree;