Skip to content

Commit 4e4039d

Browse files
MoeModnillerusr
authored andcommitted
arm64 : fix intptr_t size
1 parent 2690e6c commit 4e4039d

File tree

143 files changed

+1016
-675
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+1016
-675
lines changed

bitmap/float_bm4.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ struct SSBumpCalculationContext // what each thread needs to see
4040
};
4141

4242

43-
static unsigned SSBumpCalculationThreadFN( void * ctx1 )
43+
static uintp SSBumpCalculationThreadFN( void * ctx1 )
4444
{
4545
SSBumpCalculationContext *ctx = ( SSBumpCalculationContext * ) ctx1;
4646

bitmap/float_bm_bilateral_filter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct TBFCalculationContext
2424
FloatBitMap_t *dest_bm;
2525
};
2626

27-
static unsigned TBFCalculationThreadFN( void *ctx1 )
27+
static uintp TBFCalculationThreadFN( void *ctx1 )
2828
{
2929
TBFCalculationContext *ctx = (TBFCalculationContext *) ctx1;
3030
for(int y=ctx->min_y; y <= ctx->max_y; y++)

common/GameUI/IGameConsole.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ abstract_class IGameConsole : public IBaseInterface
3333
// return true if the console has focus
3434
virtual bool IsConsoleVisible() = 0;
3535

36-
virtual void SetParent( int parent ) = 0;
36+
virtual void SetParent( intp parent ) = 0;
3737
};
3838

3939
#define GAMECONSOLE_INTERFACE_VERSION "GameConsole004"

common/engine/idownloadsystem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ struct RequestContext_t;
3232
class IDownloadSystem : public IBaseInterface
3333
{
3434
public:
35-
virtual DWORD CreateDownloadThread( RequestContext_t *pContext ) = 0;
35+
virtual uintp CreateDownloadThread( RequestContext_t *pContext ) = 0;
3636
};
3737

3838
//----------------------------------------------------------------------------------------

common/studiobyteswap.cpp

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
#undef ALIGN4
1717
#undef ALIGN16
1818
#undef ALIGN32
19-
#define ALIGN4( a ) a = (byte *)((int)((byte *)a + 3) & ~ 3)
20-
#define ALIGN16( a ) a = (byte *)((int)((byte *)a + 15) & ~ 15)
21-
#define ALIGN32( a ) a = (byte *)((int)((byte *)a + 31) & ~ 31)
22-
#define ALIGN64( a ) a = (byte *)((int)((byte *)a + 63) & ~ 63)
19+
#define ALIGN4( a ) a = (byte *)((intp)((byte *)a + 3) & ~ 3)
20+
#define ALIGN16( a ) a = (byte *)((intp)((byte *)a + 15) & ~ 15)
21+
#define ALIGN32( a ) a = (byte *)((intp)((byte *)a + 31) & ~ 31)
22+
#define ALIGN64( a ) a = (byte *)((intp)((byte *)a + 63) & ~ 63)
2323

2424
// Fixup macros create variables that may not be referenced
2525
#pragma warning( push )
@@ -1228,8 +1228,8 @@ int ByteswapANI( studiohdr_t* pHdr, void *pDestBase, const void *pSrcBase, const
12281228
V_memcpy( pNewDest, pDestBase, pAnimBlock->datastart );
12291229
pNewDest += pAnimBlock->datastart;
12301230

1231-
int padding = AlignValue( (unsigned int)pNewDest - (unsigned int)pNewDestBase, 2048 );
1232-
padding -= (unsigned int)pNewDest - (unsigned int)pNewDestBase;
1231+
int padding = AlignValue( (uintp)pNewDest - (uintp)pNewDestBase, 2048 );
1232+
padding -= (uintp)pNewDest - (uintp)pNewDestBase;
12331233
pNewDest += padding;
12341234

12351235
// iterate and compress anim blocks
@@ -1240,7 +1240,7 @@ int ByteswapANI( studiohdr_t* pHdr, void *pDestBase, const void *pSrcBase, const
12401240
void *pInput = (byte *)pDestBase + pAnimBlock->datastart;
12411241
int inputSize = pAnimBlock->dataend - pAnimBlock->datastart;
12421242

1243-
pAnimBlock->datastart = (unsigned int)pNewDest - (unsigned int)pNewDestBase;
1243+
pAnimBlock->datastart = (uintp)pNewDest - (uintp)pNewDestBase;
12441244

12451245
void *pOutput;
12461246
int outputSize;
@@ -1257,11 +1257,11 @@ int ByteswapANI( studiohdr_t* pHdr, void *pDestBase, const void *pSrcBase, const
12571257
pNewDest += inputSize;
12581258
}
12591259

1260-
padding = AlignValue( (unsigned int)pNewDest - (unsigned int)pNewDestBase, 2048 );
1261-
padding -= (unsigned int)pNewDest - (unsigned int)pNewDestBase;
1260+
padding = AlignValue( (uintp)pNewDest - (uintp)pNewDestBase, 2048 );
1261+
padding -= (uintp)pNewDest - (uintp)pNewDestBase;
12621262
pNewDest += padding;
12631263

1264-
pAnimBlock->dataend = (unsigned int)pNewDest - (unsigned int)pNewDestBase;
1264+
pAnimBlock->dataend = (uintp)pNewDest - (uintp)pNewDestBase;
12651265
}
12661266

12671267
fixedFileSize = pNewDest - pNewDestBase;
@@ -2522,14 +2522,27 @@ BEGIN_BYTESWAP_DATADESC( studiohdr_t )
25222522
DEFINE_FIELD( contents, FIELD_INTEGER ),
25232523
DEFINE_FIELD( numincludemodels, FIELD_INTEGER ),
25242524
DEFINE_INDEX( includemodelindex, FIELD_INTEGER ),
2525+
#ifdef PLATFORM_64BITS
2526+
DEFINE_FIELD( index_ptr_virtualModel, FIELD_INTEGER ), // void*
2527+
#else
25252528
DEFINE_FIELD( virtualModel, FIELD_INTEGER ), // void*
2529+
#endif
25262530
DEFINE_INDEX( szanimblocknameindex, FIELD_INTEGER ),
25272531
DEFINE_FIELD( numanimblocks, FIELD_INTEGER ),
25282532
DEFINE_INDEX( animblockindex, FIELD_INTEGER ),
2533+
#ifdef PLATFORM_64BITS
2534+
DEFINE_FIELD( index_ptr_virtualModel, FIELD_INTEGER ), // void*
2535+
#else
25292536
DEFINE_FIELD( animblockModel, FIELD_INTEGER ), // void*
2537+
#endif
25302538
DEFINE_INDEX( bonetablebynameindex, FIELD_INTEGER ),
2539+
#ifdef PLATFORM_64BITS
2540+
DEFINE_FIELD( index_ptr_pVertexBase, FIELD_INTEGER ), // void*
2541+
DEFINE_FIELD( index_ptr_pVertexBase, FIELD_INTEGER ), // void*
2542+
#else
25312543
DEFINE_FIELD( pVertexBase, FIELD_INTEGER ), // void*
25322544
DEFINE_FIELD( pIndexBase, FIELD_INTEGER ), // void*
2545+
#endif
25332546
DEFINE_FIELD( constdirectionallightdot, FIELD_CHARACTER ), // byte
25342547
DEFINE_FIELD( rootLOD, FIELD_CHARACTER ), // byte
25352548
DEFINE_FIELD( numAllowedRootLODs, FIELD_CHARACTER ), // byte

datacache/datacache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct DataCacheItemData_t
3939

4040
//-------------------------------------
4141

42-
#define DC_NO_NEXT_LOCKED ((DataCacheItem_t *)0xffffffff)
42+
#define DC_NO_NEXT_LOCKED ((DataCacheItem_t *)-1)
4343
#define DC_MAX_THREADS_FRAMELOCKED 4
4444

4545
struct DataCacheItem_t : DataCacheItemData_t

0 commit comments

Comments
 (0)