fix windows build scripts, add windows opus support

This commit is contained in:
HappyDOGE
2022-07-28 14:27:56 +03:00
parent 90cd6e0e15
commit 3faf6a69ac
149 changed files with 396 additions and 170 deletions
+2 -3
View File
@@ -69,12 +69,11 @@ def build(bld):
if bld.env.DEST_OS != 'android':
install_path += '/'+bld.env.GAMES+'/bin'
source = [ 'touch.cpp', 'in_touch.cpp' ]
source = [ 'in_touch.cpp' ]
if bld.env.DEST_OS == 'win32':
source += [ '../../public/tier0/memoverride.cpp' ]
libs += ['USER32']
source += game["sources"]
source += game["sources"] + ['../../public/tier0/memoverride.cpp']
includes += game["includes"]
defines = game["defines"]
+1 -1
View File
@@ -3365,7 +3365,7 @@ void CBaseEntity::FunctionCheck( void *pFunction, const char *name )
// Note, if you crash here and your class is using multiple inheritance, it is
// probably the case that CBaseEntity (or a descendant) is not the first
// class in your list of ancestors, which it must be.
if (pFunction && !UTIL_FunctionToName( GetDataDescMap(), (inputfunc_t *)pFunction ) )
if (pFunction && !UTIL_FunctionToName( GetDataDescMap(), *(inputfunc_t*)pFunction ) )
{
Warning( "FUNCTION NOT IN TABLE!: %s:%s (%08lx)\n", STRING(m_iClassname), name, (unsigned long)pFunction );
Assert(0);
+3 -3
View File
@@ -1108,7 +1108,7 @@ public:
ENTITYFUNCPTR TouchSet( ENTITYFUNCPTR func, char *name )
{
#ifdef GNUC
#ifdef PLATFORM_64BITS
COMPILE_TIME_ASSERT( sizeof(func) == 8 );
#else
COMPILE_TIME_ASSERT( sizeof(func) == 4 );
@@ -1119,7 +1119,7 @@ public:
}
USEPTR UseSet( USEPTR func, char *name )
{
#ifdef GNUC
#ifdef PLATFORM_64BITS
COMPILE_TIME_ASSERT( sizeof(func) == 8 );
#else
COMPILE_TIME_ASSERT( sizeof(func) == 4 );
@@ -1130,7 +1130,7 @@ public:
}
ENTITYFUNCPTR BlockedSet( ENTITYFUNCPTR func, char *name )
{
#ifdef GNUC
#ifdef PLATFORM_64BITS
COMPILE_TIME_ASSERT( sizeof(func) == 8 );
#else
COMPILE_TIME_ASSERT( sizeof(func) == 4 );
+2 -2
View File
@@ -419,7 +419,7 @@ void CEP2GameStats::Event_SaveGame( void )
Q_strlower( name );
Q_FixSlashes( name );
unsigned int uFileTime = filesystem->GetFileTime( name, "GAME" );
time_t uFileTime = filesystem->GetFileTime( name, "GAME" );
// Latch off previous
map->m_SaveGameInfo.Latch( name, uFileTime );
@@ -471,7 +471,7 @@ void CEP2GameStats::Event_LoadGame( void )
if ( pSaveGameInfo->m_nCurrentSaveFileTime == 0 ||
pSaveGameInfo->m_sCurrentSaveFile != name )
{
unsigned int uFileTime = filesystem->GetFileTime( name, "GAME" );
time_t uFileTime = filesystem->GetFileTime( name, "GAME" );
// Latch off previous
StatsLog( "Relatching save game file due to time or filename change (%s : %u)\n", name, uFileTime );
+4 -2
View File
@@ -13,6 +13,8 @@
#include "ep1_gamestats.h"
#include "tier1/utlstring.h"
#include <time.h>
// EP2 Game Stats
enum Ep2GameStatsVersions_t
{
@@ -417,7 +419,7 @@ public:
{
}
void Latch( char const *pchSaveName, unsigned int uFileTime )
void Latch( char const *pchSaveName, time_t uFileTime )
{
m_pCurrentRecord = &m_Records[ m_Records.AddToTail() ];
m_nCurrentSaveFileTime = uFileTime;
@@ -426,7 +428,7 @@ public:
CUtlVector< SaveGameInfoRecord2_t > m_Records;
SaveGameInfoRecord2_t *m_pCurrentRecord;
unsigned int m_nCurrentSaveFileTime;
time_t m_nCurrentSaveFileTime;
CUtlString m_sCurrentSaveFile;
};
+2 -2
View File
@@ -28,9 +28,9 @@ HMODULE win32DLLHandle;
BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
{
// ensure data sizes are stable
if ( sizeof(inputfunc_t) != sizeof(int) )
if ( sizeof(inputfunc_t) != sizeof(uintp) )
{
Assert( sizeof(inputfunc_t) == sizeof(int) );
Assert( sizeof(inputfunc_t) == sizeof(uintp) );
return FALSE;
}
+1 -1
View File
@@ -3339,9 +3339,9 @@ bool CNPC_Strider::ShouldExplodeFromDamage( const CTakeDamageInfo &info )
//---------------------------------------------------------
//---------------------------------------------------------
ConVarRef mat_dxlevel( "mat_dxlevel" );
bool CNPC_Strider::BecomeRagdoll( const CTakeDamageInfo &info, const Vector &forceVector )
{
static ConVarRef mat_dxlevel( "mat_dxlevel" );
// Combine balls make us explode
if ( m_bExploding )
{
+1 -1
View File
@@ -615,7 +615,7 @@ bool UTIL_IsFacingWithinTolerance( CBaseEntity *pViewer, CBaseEntity *pTarget, f
void UTIL_GetDebugColorForRelationship( int nRelationship, int &r, int &g, int &b );
struct datamap_t;
extern const char *UTIL_FunctionToName( datamap_t *pMap, inputfunc_t *function );
extern const char *UTIL_FunctionToName( datamap_t *pMap, inputfunc_t function );
int UTIL_GetCommandClientIndex( void );
CBasePlayer *UTIL_GetCommandClient( void );
+1 -4
View File
@@ -63,13 +63,10 @@ def build(bld):
if bld.env.DEST_OS != 'android':
install_path += '/'+bld.env.GAMES+'/bin'
source = game["sources"]
source = game["sources"] + ['../../public/tier0/memoverride.cpp']
includes += game["includes"]
defines = game["defines"]
if bld.env.DEST_OS == 'win32':
source += ['../../public/tier0/memoverride.cpp']
defines.remove('PROTECTED_THINGS_ENABLE')
bld.shlib(