mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-29 21:49:20 +00:00
arm64 : fix intptr_t size
This commit is contained in:
+10
-3
@@ -1869,6 +1869,12 @@ void Mod_LoadFaces( void )
|
||||
|
||||
// align these allocations
|
||||
// If you trip one of these, you need to rethink the alignment of the struct
|
||||
#ifdef PLATFORM_64BITS
|
||||
msurface1_t *out1 = Hunk_AllocNameAlignedClear< msurface1_t >( count, alignof(msurface1_t), va( "%s [%s]", lh.GetLoadName(), "surface1" ) );
|
||||
msurface2_t *out2 = Hunk_AllocNameAlignedClear< msurface2_t >( count, alignof(msurface2_t), va( "%s [%s]", lh.GetLoadName(), "surface2" ) );
|
||||
|
||||
msurfacelighting_t *pLighting = Hunk_AllocNameAlignedClear< msurfacelighting_t >( count, alignof(msurfacelighting_t), va( "%s [%s]", lh.GetLoadName(), "surfacelighting" ) );
|
||||
#else
|
||||
Assert( sizeof(msurface1_t) == 16 );
|
||||
Assert( sizeof(msurface2_t) == 32 );
|
||||
Assert( sizeof(msurfacelighting_t) == 32 );
|
||||
@@ -1877,6 +1883,7 @@ void Mod_LoadFaces( void )
|
||||
msurface2_t *out2 = Hunk_AllocNameAlignedClear< msurface2_t >( count, 32, va( "%s [%s]", lh.GetLoadName(), "surface2" ) );
|
||||
|
||||
msurfacelighting_t *pLighting = Hunk_AllocNameAlignedClear< msurfacelighting_t >( count, 32, va( "%s [%s]", lh.GetLoadName(), "surfacelighting" ) );
|
||||
#endif
|
||||
|
||||
lh.GetMap()->surfaces1 = out1;
|
||||
lh.GetMap()->surfaces2 = out2;
|
||||
@@ -2860,7 +2867,7 @@ void Mod_TouchAllData( model_t *pModel, int nServerCount )
|
||||
// skip self, start at children
|
||||
for ( int i=1; i<pVirtualModel->m_group.Count(); ++i )
|
||||
{
|
||||
MDLHandle_t childHandle = (MDLHandle_t)(int)pVirtualModel->m_group[i].cache&0xffff;
|
||||
MDLHandle_t childHandle = (MDLHandle_t)(intp)pVirtualModel->m_group[i].cache&0xffff;
|
||||
model_t *pChildModel = (model_t *)g_pMDLCache->GetUserData( childHandle );
|
||||
if ( pChildModel )
|
||||
{
|
||||
@@ -4325,7 +4332,7 @@ public:
|
||||
m_pShared = pBrush->brush.pShared;
|
||||
m_count = 0;
|
||||
}
|
||||
bool EnumerateLeaf( int leaf, int )
|
||||
bool EnumerateLeaf( int leaf, intp )
|
||||
{
|
||||
// garymcthack - need to test identity brush models
|
||||
int flags = ( m_pShared->leafs[leaf].leafWaterDataID == -1 ) ? SURFDRAW_ABOVEWATER : SURFDRAW_UNDERWATER;
|
||||
@@ -4372,7 +4379,7 @@ static void MarkBrushModelWaterSurfaces( model_t* world,
|
||||
model_t* pTemp = host_state.worldmodel;
|
||||
CBrushBSPIterator brushIterator( world, brush );
|
||||
host_state.SetWorldModel( world );
|
||||
g_pToolBSPTree->EnumerateLeavesInBox( mins, maxs, &brushIterator, (int)brush );
|
||||
g_pToolBSPTree->EnumerateLeavesInBox( mins, maxs, &brushIterator, (intp)brush );
|
||||
brushIterator.CheckSurfaces();
|
||||
host_state.SetWorldModel( pTemp );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user