Remove all MSVC __int64 (#742)

This commit is contained in:
void_17
2026-03-07 03:31:30 +07:00
committed by GitHub
parent 175fc3824e
commit 988e3042e0
277 changed files with 3672 additions and 3684 deletions

View File

@@ -114,8 +114,8 @@
#define __RADLITTLEENDIAN__
#ifdef __i386__
#define __RADX86__
#else
#define __RADARM__
#else
#define __RADARM__
#endif
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -132,7 +132,7 @@
#define __RADX86__
#else
#error Unknown processor
#endif
#endif
#define __RADLITTLEENDIAN__
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -155,7 +155,7 @@
#define __RADNACL__
#define __RAD32__
#define __RADLITTLEENDIAN__
#define __RADX86__
#define __RADX86__
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -196,7 +196,7 @@
#define __RAD64REGS__
#define __RADLITTLEENDIAN__
#define RADINLINE inline
#define RADRESTRICT __restrict
#define RADRESTRICT __restrict
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
@@ -265,7 +265,7 @@
#endif
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
#elif defined(CAFE) // has to be before HOLLYWOOD_REV since it also defines it
#define __RADWIIU__
@@ -480,7 +480,7 @@
#undef RADRESTRICT /* could have been defined above... */
#define RADRESTRICT __restrict
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
#endif
@@ -885,7 +885,7 @@
#define RAD_ALIGN(type,var,num) type __declspec(align(num)) var
#else
// NOTE: / / is a guaranteed parse error in C/C++.
#define RAD_ALIGN(type,var,num) RAD_ALIGN_USED_BUT_NOT_DEFINED / /
#define RAD_ALIGN(type,var,num) RAD_ALIGN_USED_BUT_NOT_DEFINED / /
#endif
// WARNING : RAD_TLS should really only be used for debug/tools stuff
@@ -917,8 +917,8 @@
#define RAD_S32 signed int
// But pointers are 64 bits.
#if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 )
#define RAD_SINTa __w64 signed __int64
#define RAD_UINTa __w64 unsigned __int64
#define RAD_SINTa __w64 signed long long
#define RAD_UINTa __w64 unsigned long long
#else // non-vc.net compiler or /Wp64 turned off
#define RAD_UINTa unsigned long long
#define RAD_SINTa signed long long
@@ -976,8 +976,8 @@
#define RAD_U64 unsigned long long
#define RAD_S64 signed long long
#elif defined(__RADX64__) || defined(__RAD32__)
#define RAD_U64 unsigned __int64
#define RAD_S64 signed __int64
#define RAD_U64 unsigned long long
#define RAD_S64 signed long long
#else
// 16-bit
typedef RADSTRUCT RAD_U64 // do this so that we don't accidentally use U64s
@@ -1134,7 +1134,7 @@
// helpers for doing an if ( ) with expect :
// if ( RAD_LIKELY(expr) ) { ... }
#define RAD_LIKELY(expr) RAD_EXPECT(expr,1)
#define RAD_UNLIKELY(expr) RAD_EXPECT(expr,0)
@@ -1324,7 +1324,7 @@
__pragma(warning(push)) \
__pragma(warning(disable:4127)) \
} while(0) \
__pragma(warning(pop))
__pragma(warning(pop))
#define RAD_STATEMENT_END_TRUE \
__pragma(warning(push)) \
@@ -1333,10 +1333,10 @@
__pragma(warning(pop))
#else
#define RAD_USE_STANDARD_LOOP_CONSTRUCT
#define RAD_USE_STANDARD_LOOP_CONSTRUCT
#endif
#else
#define RAD_USE_STANDARD_LOOP_CONSTRUCT
#define RAD_USE_STANDARD_LOOP_CONSTRUCT
#endif
#ifdef RAD_USE_STANDARD_LOOP_CONSTRUCT
@@ -1345,7 +1345,7 @@
#define RAD_STATEMENT_END_FALSE \
} while ( (void)0,0 )
#define RAD_STATEMENT_END_TRUE \
} while ( (void)1,1 )
@@ -1355,7 +1355,7 @@
RAD_STATEMENT_START \
code \
RAD_STATEMENT_END_FALSE
#define RAD_INFINITE_LOOP( code ) \
RAD_STATEMENT_START \
code \
@@ -1363,7 +1363,7 @@
// Must be placed after variable declarations for code compiled as .c
#if defined(_MSC_VER) && _MSC_VER >= 1700 // in 2012 aka 11.0 and later
#if defined(_MSC_VER) && _MSC_VER >= 1700 // in 2012 aka 11.0 and later
# define RR_UNUSED_VARIABLE(x) (void) x
#else
# define RR_UNUSED_VARIABLE(x) (void)(sizeof(x))
@@ -1473,7 +1473,7 @@
// just to make gcc shut up about derefing null :
#define RR_MEMBER_OFFSET_PTR(type,member,ptr) ( (SINTa) &(((type *)(ptr))->member) - (SINTa)(ptr) )
#define RR_MEMBER_SIZE_PTR(type,member,ptr) ( sizeof( ((type *) (ptr))->member) )
// MEMBER_TO_OWNER takes a pointer to a member and gives you back the base of the object
// you should then RR_ASSERT( &(ret->member) == ptr );
#define RR_MEMBER_TO_OWNER(type,member,ptr) (type *)( ((char *)(ptr)) - RR_MEMBER_OFFSET_PTR(type,member,ptr) )
@@ -1482,7 +1482,7 @@
// Cache / prefetch macros :
// RR_PREFETCH for various platforms :
//
//
// RR_PREFETCH_SEQUENTIAL : prefetch memory for reading in a sequential scan
// platforms that automatically prefetch sequential (eg. PC) should be a no-op here
// RR_PREFETCH_WRITE_INVALIDATE : prefetch memory for writing - contents of memory are undefined
@@ -1707,7 +1707,7 @@ extern fp_rrDisplayAssertion * g_fp_rrDisplayAssertion;
#define rrDisplayAssertion(i,n,l,f,m) ( ( g_fp_rrDisplayAssertion ) ? (*g_fp_rrDisplayAssertion)(i,n,l,f,m) : 1 )
//-----------------------------------------------------------
// RAD_NO_BREAK : option if you don't like your assert to break
// CB : RR_BREAK is *always* a break ; RR_ASSERT_BREAK is optional
#ifdef RAD_NO_BREAK
@@ -1725,7 +1725,7 @@ extern fp_rrDisplayAssertion * g_fp_rrDisplayAssertion;
#define RR_ASSERT_LITE_ALWAYS(exp) RAD_STATEMENT_WRAPPER( if ( ! (exp) ) { RR_ASSERT_BREAK(); } )
//-----------------------------------
#ifdef RR_DO_ASSERTS
#ifdef RR_DO_ASSERTS
#define RR_ASSERT(exp) RR_ASSERT_ALWAYS(exp)
#define RR_ASSERT_LITE(exp) RR_ASSERT_LITE_ALWAYS(exp)
@@ -1883,7 +1883,7 @@ unsigned long __cdecl _byteswap_ulong (unsigned long _Long);
#define RR_BSWAP16 _byteswap_ushort
#define RR_BSWAP32 _byteswap_ulong
unsigned __int64 __cdecl _byteswap_uint64 (unsigned __int64 val);
unsigned long long __cdecl _byteswap_uint64 (unsigned long long val);
#pragma intrinsic(_byteswap_uint64)
#define RR_BSWAP64 _byteswap_uint64
@@ -1909,7 +1909,7 @@ RADFORCEINLINE unsigned long RR_BSWAP32 (unsigned long _Long)
return _Long;
}
RADFORCEINLINE unsigned __int64 RR_BSWAP64 (unsigned __int64 _Long)
RADFORCEINLINE unsigned long long RR_BSWAP64 (unsigned long long _Long)
{
__asm {
mov eax, DWORD PTR _Long
@@ -2250,10 +2250,10 @@ void __storewordbytereverse (unsigned int val, int offset, void *bas
#if ( defined(_MSC_VER) && _MSC_VER >= 1300)
unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
unsigned long long __cdecl _rotl64(unsigned long long _Val, int _Shift);
#pragma intrinsic(_rotl64)
#define RR_ROTL64(x,k) _rotl64((unsigned __int64)(x),(int)(k))
#define RR_ROTL64(x,k) _rotl64((unsigned long long)(x),(int)(k))
#elif defined(__RADCELL__)
@@ -2262,7 +2262,7 @@ unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
#elif defined(__RADLINUX__) || defined(__RADMACAPI__)
//APTODO: Just to compile linux. Should we be doing better than this? If not, combine with above.
//APTODO: Just to compile linux. Should we be doing better than this? If not, combine with above.
#define RR_ROTL64(u64,num) ( ( (u64) << (num) ) | ( (u64) >> (64 - (num))) )
#else

File diff suppressed because it is too large Load Diff

View File

@@ -114,8 +114,8 @@
#define __RADLITTLEENDIAN__
#ifdef __i386__
#define __RADX86__
#else
#define __RADARM__
#else
#define __RADARM__
#endif
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -132,7 +132,7 @@
#define __RADX86__
#else
#error Unknown processor
#endif
#endif
#define __RADLITTLEENDIAN__
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -155,7 +155,7 @@
#define __RADNACL__
#define __RAD32__
#define __RADLITTLEENDIAN__
#define __RADX86__
#define __RADX86__
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -196,7 +196,7 @@
#define __RAD64REGS__
#define __RADLITTLEENDIAN__
#define RADINLINE inline
#define RADRESTRICT __restrict
#define RADRESTRICT __restrict
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
@@ -265,7 +265,7 @@
#endif
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
#elif defined(CAFE) // has to be before HOLLYWOOD_REV since it also defines it
#define __RADWIIU__
@@ -480,7 +480,7 @@
#undef RADRESTRICT /* could have been defined above... */
#define RADRESTRICT __restrict
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
#endif
@@ -885,7 +885,7 @@
#define RAD_ALIGN(type,var,num) type __declspec(align(num)) var
#else
// NOTE: / / is a guaranteed parse error in C/C++.
#define RAD_ALIGN(type,var,num) RAD_ALIGN_USED_BUT_NOT_DEFINED / /
#define RAD_ALIGN(type,var,num) RAD_ALIGN_USED_BUT_NOT_DEFINED / /
#endif
// WARNING : RAD_TLS should really only be used for debug/tools stuff
@@ -917,8 +917,8 @@
#define RAD_S32 signed int
// But pointers are 64 bits.
#if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 )
#define RAD_SINTa __w64 signed __int64
#define RAD_UINTa __w64 unsigned __int64
#define RAD_SINTa __w64 signed long long
#define RAD_UINTa __w64 unsigned long long
#else // non-vc.net compiler or /Wp64 turned off
#define RAD_UINTa unsigned long long
#define RAD_SINTa signed long long
@@ -976,8 +976,8 @@
#define RAD_U64 unsigned long long
#define RAD_S64 signed long long
#elif defined(__RADX64__) || defined(__RAD32__)
#define RAD_U64 unsigned __int64
#define RAD_S64 signed __int64
#define RAD_U64 unsigned long long
#define RAD_S64 signed long long
#else
// 16-bit
typedef RADSTRUCT RAD_U64 // do this so that we don't accidentally use U64s
@@ -1134,7 +1134,7 @@
// helpers for doing an if ( ) with expect :
// if ( RAD_LIKELY(expr) ) { ... }
#define RAD_LIKELY(expr) RAD_EXPECT(expr,1)
#define RAD_UNLIKELY(expr) RAD_EXPECT(expr,0)
@@ -1324,7 +1324,7 @@
__pragma(warning(push)) \
__pragma(warning(disable:4127)) \
} while(0) \
__pragma(warning(pop))
__pragma(warning(pop))
#define RAD_STATEMENT_END_TRUE \
__pragma(warning(push)) \
@@ -1333,10 +1333,10 @@
__pragma(warning(pop))
#else
#define RAD_USE_STANDARD_LOOP_CONSTRUCT
#define RAD_USE_STANDARD_LOOP_CONSTRUCT
#endif
#else
#define RAD_USE_STANDARD_LOOP_CONSTRUCT
#define RAD_USE_STANDARD_LOOP_CONSTRUCT
#endif
#ifdef RAD_USE_STANDARD_LOOP_CONSTRUCT
@@ -1345,7 +1345,7 @@
#define RAD_STATEMENT_END_FALSE \
} while ( (void)0,0 )
#define RAD_STATEMENT_END_TRUE \
} while ( (void)1,1 )
@@ -1355,7 +1355,7 @@
RAD_STATEMENT_START \
code \
RAD_STATEMENT_END_FALSE
#define RAD_INFINITE_LOOP( code ) \
RAD_STATEMENT_START \
code \
@@ -1363,7 +1363,7 @@
// Must be placed after variable declarations for code compiled as .c
#if defined(_MSC_VER) && _MSC_VER >= 1700 // in 2012 aka 11.0 and later
#if defined(_MSC_VER) && _MSC_VER >= 1700 // in 2012 aka 11.0 and later
# define RR_UNUSED_VARIABLE(x) (void) x
#else
# define RR_UNUSED_VARIABLE(x) (void)(sizeof(x))
@@ -1473,7 +1473,7 @@
// just to make gcc shut up about derefing null :
#define RR_MEMBER_OFFSET_PTR(type,member,ptr) ( (SINTa) &(((type *)(ptr))->member) - (SINTa)(ptr) )
#define RR_MEMBER_SIZE_PTR(type,member,ptr) ( sizeof( ((type *) (ptr))->member) )
// MEMBER_TO_OWNER takes a pointer to a member and gives you back the base of the object
// you should then RR_ASSERT( &(ret->member) == ptr );
#define RR_MEMBER_TO_OWNER(type,member,ptr) (type *)( ((char *)(ptr)) - RR_MEMBER_OFFSET_PTR(type,member,ptr) )
@@ -1482,7 +1482,7 @@
// Cache / prefetch macros :
// RR_PREFETCH for various platforms :
//
//
// RR_PREFETCH_SEQUENTIAL : prefetch memory for reading in a sequential scan
// platforms that automatically prefetch sequential (eg. PC) should be a no-op here
// RR_PREFETCH_WRITE_INVALIDATE : prefetch memory for writing - contents of memory are undefined
@@ -1707,7 +1707,7 @@ extern fp_rrDisplayAssertion * g_fp_rrDisplayAssertion;
#define rrDisplayAssertion(i,n,l,f,m) ( ( g_fp_rrDisplayAssertion ) ? (*g_fp_rrDisplayAssertion)(i,n,l,f,m) : 1 )
//-----------------------------------------------------------
// RAD_NO_BREAK : option if you don't like your assert to break
// CB : RR_BREAK is *always* a break ; RR_ASSERT_BREAK is optional
#ifdef RAD_NO_BREAK
@@ -1725,7 +1725,7 @@ extern fp_rrDisplayAssertion * g_fp_rrDisplayAssertion;
#define RR_ASSERT_LITE_ALWAYS(exp) RAD_STATEMENT_WRAPPER( if ( ! (exp) ) { RR_ASSERT_BREAK(); } )
//-----------------------------------
#ifdef RR_DO_ASSERTS
#ifdef RR_DO_ASSERTS
#define RR_ASSERT(exp) RR_ASSERT_ALWAYS(exp)
#define RR_ASSERT_LITE(exp) RR_ASSERT_LITE_ALWAYS(exp)
@@ -1883,7 +1883,7 @@ unsigned long __cdecl _byteswap_ulong (unsigned long _Long);
#define RR_BSWAP16 _byteswap_ushort
#define RR_BSWAP32 _byteswap_ulong
unsigned __int64 __cdecl _byteswap_uint64 (unsigned __int64 val);
unsigned long long __cdecl _byteswap_uint64 (unsigned long long val);
#pragma intrinsic(_byteswap_uint64)
#define RR_BSWAP64 _byteswap_uint64
@@ -1909,7 +1909,7 @@ RADFORCEINLINE unsigned long RR_BSWAP32 (unsigned long _Long)
return _Long;
}
RADFORCEINLINE unsigned __int64 RR_BSWAP64 (unsigned __int64 _Long)
RADFORCEINLINE unsigned long long RR_BSWAP64 (unsigned long long _Long)
{
__asm {
mov eax, DWORD PTR _Long
@@ -2250,10 +2250,10 @@ void __storewordbytereverse (unsigned int val, int offset, void *bas
#if ( defined(_MSC_VER) && _MSC_VER >= 1300)
unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
unsigned long long __cdecl _rotl64(unsigned long long _Val, int _Shift);
#pragma intrinsic(_rotl64)
#define RR_ROTL64(x,k) _rotl64((unsigned __int64)(x),(int)(k))
#define RR_ROTL64(x,k) _rotl64((unsigned long long)(x),(int)(k))
#elif defined(__RADCELL__)
@@ -2262,7 +2262,7 @@ unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
#elif defined(__RADLINUX__) || defined(__RADMACAPI__)
//APTODO: Just to compile linux. Should we be doing better than this? If not, combine with above.
//APTODO: Just to compile linux. Should we be doing better than this? If not, combine with above.
#define RR_ROTL64(u64,num) ( ( (u64) << (num) ) | ( (u64) >> (64 - (num))) )
#else

View File

@@ -27,21 +27,21 @@
void SonyRemoteStorage_PS3::npauthhandler(int event, int result, void *arg)
{
#ifdef __PS3__
if (event != SCE_NP_MANAGER_EVENT_GOT_TICKET || result <= 0)
if (event != SCE_NP_MANAGER_EVENT_GOT_TICKET || result <= 0)
{
app.DebugPrintf("Could not retrieve ticket: 0x%x\n", result);
}
else
}
else
{
psnTicketSize = result;
psnTicket = malloc(psnTicketSize);
if (psnTicket == NULL)
if (psnTicket == NULL)
{
app.DebugPrintf("Failed to allocate for ticket\n");
}
int ret = sceNpManagerGetTicket(psnTicket, &psnTicketSize);
if (ret < 0)
if (ret < 0)
{
app.DebugPrintf("Could not retrieve ticket: 0x%x\n", ret);
free(psnTicket);
@@ -60,7 +60,7 @@ int SonyRemoteStorage_PS3::initPreconditions()
SceNpId npId;
ret = sceNpManagerGetNpId(&npId);
if(ret < 0)
if(ret < 0)
{
return ret;
}
@@ -68,12 +68,12 @@ int SonyRemoteStorage_PS3::initPreconditions()
ticketVersion.major = 3;
ticketVersion.minor = 0;
ret = sceNpManagerRequestTicket2(&npId, &ticketVersion, TICKETING_SERVICE_ID, NULL, 0, NULL, 0);
if(ret < 0)
if(ret < 0)
{
return ret;
}
m_waitingForTicket = true;
while(m_waitingForTicket)
while(m_waitingForTicket)
{
cellSysutilCheckCallback();
sys_timer_usleep(50000); //50 milliseconds.
@@ -104,12 +104,12 @@ void SonyRemoteStorage_PS3::internalCallback(const SceRemoteStorageEvent event,
break;
case GET_DATA_RESULT:
if(retCode >= 0)
if(retCode >= 0)
{
app.DebugPrintf("Get Data success \n");
m_status = e_getDataSucceeded;
}
else
}
else
{
app.DebugPrintf("An error occurred while Get Data was being processed. retCode: 0x%x \n", retCode);
m_status = e_error;
@@ -126,12 +126,12 @@ void SonyRemoteStorage_PS3::internalCallback(const SceRemoteStorageEvent event,
break;
case GET_STATUS_RESULT:
if(retCode >= 0)
if(retCode >= 0)
{
app.DebugPrintf("Get Status success \n");
app.DebugPrintf("Remaining Syncs for this user: %llu\n", outputGetStatus->remainingSyncs);
app.DebugPrintf("Number of files on the cloud: %d\n", outputGetStatus->numFiles);
for(int i = 0; i < outputGetStatus->numFiles; i++)
for(int i = 0; i < outputGetStatus->numFiles; i++)
{
app.DebugPrintf("\n*** File %d information: ***\n", (i + 1));
app.DebugPrintf("File name: %s \n", outputGetStatus->data[i].fileName);
@@ -142,8 +142,8 @@ void SonyRemoteStorage_PS3::internalCallback(const SceRemoteStorageEvent event,
app.DebugPrintf("Visibility: \"%s\" \n", (outputGetStatus->data[i].visibility == 0)?"Private":((outputGetStatus->data[i].visibility == 1)?"Public read only":"Public read and write"));
}
m_status = e_getStatusSucceeded;
}
else
}
else
{
app.DebugPrintf("An error occurred while Get Status was being processed. retCode: 0x%x \n", retCode);
m_status = e_error;
@@ -158,12 +158,12 @@ void SonyRemoteStorage_PS3::internalCallback(const SceRemoteStorageEvent event,
break;
case SET_DATA_RESULT:
if(retCode >= 0)
if(retCode >= 0)
{
app.DebugPrintf("Set Data success \n");
m_status = e_setDataSucceeded;
}
else
}
else
{
app.DebugPrintf("An error occurred while Set Data was being processed. retCode: 0x%x \n", retCode);
m_status = e_error;
@@ -230,7 +230,7 @@ bool SonyRemoteStorage_PS3::init(CallbackFunc cb, LPVOID lpParam)
params.callback = staticInternalCallback;
params.userData = this;
params.thread.threadAffinity = 0; //Not used in PS3
params.thread.threadPriority = 1000; //Must be between [0-3071], being 0 the highest.
params.thread.threadPriority = 1000; //Must be between [0-3071], being 0 the highest.
params.psnTicket = psnTicket;
params.psnTicketSize = psnTicketSize;
strcpy(params.clientId, CLIENT_ID);
@@ -246,20 +246,20 @@ bool SonyRemoteStorage_PS3::init(CallbackFunc cb, LPVOID lpParam)
// SceRemoteStorageAbortReqParams abortParams;
ret = sceRemoteStorageInit(params);
if(ret >= 0 || ret == SCE_REMOTE_STORAGE_ERROR_ALREADY_INITIALISED)
if(ret >= 0 || ret == SCE_REMOTE_STORAGE_ERROR_ALREADY_INITIALISED)
{
// abortParams.requestId = ret;
//ret = sceRemoteStorageAbort(abortParams);
app.DebugPrintf("Session will be created \n");
//if(ret >= 0)
//if(ret >= 0)
//{
// printf("Session aborted \n");
//} else
//} else
//{
// printf("Error aborting session: 0x%x \n", ret);
//}
}
else
}
else
{
app.DebugPrintf("Error creating session: 0x%x \n", ret);
return false;
@@ -279,12 +279,12 @@ bool SonyRemoteStorage_PS3::getRemoteFileInfo(SceRemoteStorageStatus* pInfo, Cal
reqId = sceRemoteStorageGetStatus(params, outputGetStatus);
m_status = e_getStatusInProgress;
if(reqId >= 0)
if(reqId >= 0)
{
app.DebugPrintf("Get Status request sent \n");
return true;
}
else
}
else
{
app.DebugPrintf("Error sending Get Status request: 0x%x \n", reqId);
return false;
@@ -303,11 +303,11 @@ void SonyRemoteStorage_PS3::abort()
params.requestId = reqId;
int ret = sceRemoteStorageAbort(params);
if(ret >= 0)
if(ret >= 0)
{
app.DebugPrintf("Abort request done \n");
}
else
}
else
{
app.DebugPrintf("Error in Abort request: 0x%x \n", ret);
}
@@ -345,7 +345,7 @@ bool SonyRemoteStorage_PS3::setDataInternal()
char seed[22];
app.GetImageTextData(m_thumbnailData, m_thumbnailDataSize,(unsigned char *)seed, uiHostOptions, bHostOptionsRead, uiTexturePack);
__int64 iSeed = strtoll(seed,NULL,10);
int64_t iSeed = strtoll(seed,NULL,10);
char seedHex[17];
sprintf(seedHex,"%016llx",iSeed);
memcpy(descData.m_seed,seedHex,16); // Don't copy null
@@ -377,14 +377,14 @@ bool SonyRemoteStorage_PS3::setDataInternal()
reqId = sceRemoteStorageSetData(params);
app.DebugPrintf("\n*******************************\n");
if(reqId >= 0)
if(reqId >= 0)
{
app.DebugPrintf("Set Data request sent \n");
m_bTransferStarted = true;
m_status = e_setDataInProgress;
return true;
}
else
}
else
{
app.DebugPrintf("Error sending Set Data request: 0x%x \n", reqId);
return false;
@@ -406,12 +406,12 @@ bool SonyRemoteStorage_PS3::getData( const char* remotePath, const char* localPa
reqId = sceRemoteStorageGetData(params, &outputGetData);
app.DebugPrintf("\n*******************************\n");
if(reqId >= 0)
if(reqId >= 0)
{
app.DebugPrintf("Get Data request sent \n");
m_bTransferStarted = true;
m_status = e_getDataInProgress;
} else
} else
{
app.DebugPrintf("Error sending Get Data request: 0x%x \n", reqId);
}

View File

@@ -16,8 +16,8 @@ typedef unsigned int uint32;
typedef unsigned long long uint64;
typedef long long int64;
#else
typedef unsigned __int64 uint64;
typedef __int64 int64;
typedef unsigned long long uint64;
typedef long long int64;
#endif
typedef char int8;

View File

@@ -671,7 +671,7 @@ HANDLE FindFirstFileA(LPCSTR lpFileName, LPWIN32_FIND_DATA lpFindFileData) { PS3
BOOL FindNextFileA(HANDLE hFindFile, LPWIN32_FIND_DATAA lpFindFileData) { PS3_STUBBED; return false;}
errno_t _itoa_s(int _Value, char * _DstBuf, size_t _Size, int _Radix) { if(_Radix==10) sprintf(_DstBuf,"%d",_Value); else if(_Radix==16) sprintf(_DstBuf,"%lx",_Value); else return -1; return 0; }
errno_t _i64toa_s(__int64 _Val, char * _DstBuf, size_t _Size, int _Radix) { if(_Radix==10) sprintf(_DstBuf,"%lld",_Val); else return -1; return 0; }
errno_t _i64toa_s(int64_t _Val, char * _DstBuf, size_t _Size, int _Radix) { if(_Radix==10) sprintf(_DstBuf,"%lld",_Val); else return -1; return 0; }
int _wtoi(const wchar_t *_Str)
{

View File

@@ -29,7 +29,7 @@ LPVOID TlsGetValue(DWORD dwTlsIndex);
BOOL TlsSetValue(DWORD dwTlsIndex, LPVOID lpTlsValue);
typedef struct _RECT
typedef struct _RECT
{
LONG left;
LONG top;
@@ -53,16 +53,16 @@ typedef int errno_t;
// // The following field is used for blocking when there is contention for
// // the resource
// //
//
//
// union {
// ULONG_PTR RawEvent[4];
// } Synchronization;
//
//
// //
// // The following three fields control entering and exiting the critical
// // section for the resource
// //
//
//
// LONG LockCount;
// LONG RecursionCount;
// HANDLE OwningThread;
@@ -219,7 +219,7 @@ typedef struct _MEMORYSTATUS {
#define THREAD_PRIORITY_IDLE THREAD_BASE_PRIORITY_IDLE
#define WAIT_TIMEOUT 258L
#define STATUS_ABANDONED_WAIT_0 ((DWORD )0x00000080L)
#define STATUS_ABANDONED_WAIT_0 ((DWORD )0x00000080L)
#define WAIT_ABANDONED ((STATUS_ABANDONED_WAIT_0 ) + 0 )
#define MAXUINT_PTR (~((UINT_PTR)0))
@@ -261,17 +261,17 @@ typedef struct _MEMORYSTATUS {
#define GENERIC_EXECUTE (0x20000000L)
#define GENERIC_ALL (0x10000000L)
#define FILE_SHARE_READ 0x00000001
#define FILE_SHARE_WRITE 0x00000002
#define FILE_SHARE_DELETE 0x00000004
#define FILE_ATTRIBUTE_READONLY 0x00000001
#define FILE_ATTRIBUTE_HIDDEN 0x00000002
#define FILE_ATTRIBUTE_SYSTEM 0x00000004
#define FILE_ATTRIBUTE_DIRECTORY 0x00000010
#define FILE_ATTRIBUTE_ARCHIVE 0x00000020
#define FILE_ATTRIBUTE_DEVICE 0x00000040
#define FILE_ATTRIBUTE_NORMAL 0x00000080
#define FILE_ATTRIBUTE_TEMPORARY 0x00000100
#define FILE_SHARE_READ 0x00000001
#define FILE_SHARE_WRITE 0x00000002
#define FILE_SHARE_DELETE 0x00000004
#define FILE_ATTRIBUTE_READONLY 0x00000001
#define FILE_ATTRIBUTE_HIDDEN 0x00000002
#define FILE_ATTRIBUTE_SYSTEM 0x00000004
#define FILE_ATTRIBUTE_DIRECTORY 0x00000010
#define FILE_ATTRIBUTE_ARCHIVE 0x00000020
#define FILE_ATTRIBUTE_DEVICE 0x00000040
#define FILE_ATTRIBUTE_NORMAL 0x00000080
#define FILE_ATTRIBUTE_TEMPORARY 0x00000100
#define FILE_FLAG_WRITE_THROUGH 0x80000000
#define FILE_FLAG_OVERLAPPED 0x40000000
@@ -291,38 +291,38 @@ typedef struct _MEMORYSTATUS {
#define OPEN_ALWAYS 4
#define TRUNCATE_EXISTING 5
#define PAGE_NOACCESS 0x01
#define PAGE_READONLY 0x02
#define PAGE_READWRITE 0x04
#define PAGE_WRITECOPY 0x08
#define PAGE_EXECUTE 0x10
#define PAGE_EXECUTE_READ 0x20
#define PAGE_EXECUTE_READWRITE 0x40
#define PAGE_EXECUTE_WRITECOPY 0x80
#define PAGE_GUARD 0x100
#define PAGE_NOCACHE 0x200
#define PAGE_WRITECOMBINE 0x400
#define PAGE_USER_READONLY 0x1000
#define PAGE_USER_READWRITE 0x2000
#define MEM_COMMIT 0x1000
#define MEM_RESERVE 0x2000
#define MEM_DECOMMIT 0x4000
#define MEM_RELEASE 0x8000
#define MEM_FREE 0x10000
#define MEM_PRIVATE 0x20000
#define MEM_RESET 0x80000
#define MEM_TOP_DOWN 0x100000
#define MEM_NOZERO 0x800000
#define MEM_LARGE_PAGES 0x20000000
#define MEM_HEAP 0x40000000
#define MEM_16MB_PAGES 0x80000000
#define PAGE_NOACCESS 0x01
#define PAGE_READONLY 0x02
#define PAGE_READWRITE 0x04
#define PAGE_WRITECOPY 0x08
#define PAGE_EXECUTE 0x10
#define PAGE_EXECUTE_READ 0x20
#define PAGE_EXECUTE_READWRITE 0x40
#define PAGE_EXECUTE_WRITECOPY 0x80
#define PAGE_GUARD 0x100
#define PAGE_NOCACHE 0x200
#define PAGE_WRITECOMBINE 0x400
#define PAGE_USER_READONLY 0x1000
#define PAGE_USER_READWRITE 0x2000
#define MEM_COMMIT 0x1000
#define MEM_RESERVE 0x2000
#define MEM_DECOMMIT 0x4000
#define MEM_RELEASE 0x8000
#define MEM_FREE 0x10000
#define MEM_PRIVATE 0x20000
#define MEM_RESET 0x80000
#define MEM_TOP_DOWN 0x100000
#define MEM_NOZERO 0x800000
#define MEM_LARGE_PAGES 0x20000000
#define MEM_HEAP 0x40000000
#define MEM_16MB_PAGES 0x80000000
#define IGNORE 0 // Ignore signal
#define INFINITE 0xFFFFFFFF // Infinite timeout
#define WAIT_FAILED ((DWORD)0xFFFFFFFF)
#define STATUS_WAIT_0 ((DWORD )0x00000000L)
#define STATUS_WAIT_0 ((DWORD )0x00000000L)
#define WAIT_OBJECT_0 ((STATUS_WAIT_0 ) + 0 )
#define STATUS_PENDING ((DWORD )0x00000103L)
#define STATUS_PENDING ((DWORD )0x00000103L)
#define STILL_ACTIVE STATUS_PENDING
DWORD GetLastError(VOID);
@@ -364,11 +364,11 @@ VOID OutputDebugString(LPCSTR lpOutputString);
VOID OutputDebugStringA(LPCSTR lpOutputString);
errno_t _itoa_s(int _Value, char * _DstBuf, size_t _Size, int _Radix);
errno_t _i64toa_s(__int64 _Val, char * _DstBuf, size_t _Size, int _Radix);
errno_t _i64toa_s(int64_t _Val, char * _DstBuf, size_t _Size, int _Radix);
int _wtoi(const wchar_t *_Str);
#define __declspec(a)
#define __declspec(a)
extern "C" int _wcsicmp (const wchar_t * dst, const wchar_t * src);
size_t wcsnlen(const wchar_t *wcs, size_t maxsize);

View File

@@ -7,7 +7,8 @@
#define BOOST_ENABLE_ASSERT_HANDLER
#include <typeinfo>
#include <stddef.h>
#include <cstdint>
#include <cstddef>
#include <boost/typeof/typeof.hpp>
#include <boost/tr1/memory.hpp>
#include "boost/tr1/unordered_map.hpp"
@@ -110,21 +111,19 @@ typedef unsigned int *PUINT;
typedef unsigned char byte;
typedef long long __int64;
typedef unsigned long long __uint64;
typedef unsigned long DWORD;
typedef int INT;
typedef unsigned long ULONG_PTR, *PULONG_PTR;
typedef ULONG_PTR SIZE_T, *PSIZE_T;
typedef __int64 LONG64, *PLONG64;
typedef long long LONG64, *PLONG64;
#define VOID void
typedef char CHAR;
typedef short SHORT;
typedef long LONG;
typedef __int64 LONGLONG;
typedef __uint64 ULONGLONG;
typedef int64_t LONGLONG;
typedef uint64_t ULONGLONG;
#define CONST const

View File

@@ -469,7 +469,7 @@ void CConsoleMinecraftApp::FreeLocalTMSFiles(eTMSFileType eType)
LoadSaveDataThreadParam* LoadSaveFromDisk(const wstring& pathName)
{
File saveFile(pathName);
__int64 fileSize = saveFile.length();
int64_t fileSize = saveFile.length();
FileInputStream fis(saveFile);
byteArray ba(fileSize);
fis.read(ba);
@@ -507,8 +507,8 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart()
StorageManager.SetSaveTitle(wWorldName.c_str());
bool isFlat = false;
__int64 seedValue = 0;//BiomeSource::findSeed(isFlat?LevelType::lvl_flat:LevelType::lvl_normal); // 4J - was (new Random())->nextLong() - now trying to actually find a seed to suit our requirements
// __int64 seedValue = 0xfd97203ebdbf5c6f;
int64_t seedValue = 0;//BiomeSource::findSeed(isFlat?LevelType::lvl_flat:LevelType::lvl_normal); // 4J - was (new Random())->nextLong() - now trying to actually find a seed to suit our requirements
// int64_t seedValue = 0xfd97203ebdbf5c6f;
unsigned int seedLow = (unsigned int )(seedValue & 0xffffffff);
unsigned int seedHigh = (unsigned int )(seedValue>>32);
#ifndef _CONTENT_PACKAGE

View File

@@ -17,9 +17,9 @@
// To meet these requirements, this class is now implemented using a lock-free system, implemented using a read-copy-update (RCU) type algorithm. Some details...
// (1) The storage details for the class are now packed into a single __int64, which contains both a pointer to the data that is required and a count of how many planes worth
// (1) The storage details for the class are now packed into a single int64_t, which contains both a pointer to the data that is required and a count of how many planes worth
// of storage are allocated. This allows the full storage to be updated atomically using compare and exchange operations (implemented with InterlockedCompareExchangeRelease64).
// (2) The data pointer referenced in this __int64 points to an area of memory which is 128 + 128 * plane_count bytes long, where the first 128 bytes stoere the plane indices, and
// (2) The data pointer referenced in this int64_t points to an area of memory which is 128 + 128 * plane_count bytes long, where the first 128 bytes stoere the plane indices, and
// the rest of the data is variable in size to accomodate however many planes are required to be stored
// (3) The RCU bit of the algorithm means that any read operations don't need to do any checks or locks at all. When the data needs to be updated, a copy of it is made and updated,
// then an attempt is made to swap the new data in - if this succeeds then the old data pointer is deleted later at some point where we know nothing will be reading from it anymore.
@@ -33,7 +33,7 @@ class SparseDataStorage_SPU
{
private:
// unsigned char planeIndices[128];
unsigned char* m_pData;
unsigned char* m_pData;
// unsigned char *data;
// unsigned int allocatedPlaneCount;

View File

@@ -20,9 +20,9 @@
// To meet these requirements, this class is now implemented using a lock-free system, implemented using a read-copy-update (RCU) type algorithm. Some details...
// (1) The storage details for the class are now packed into a single __int64, which contains both a pointer to the data that is required and a count of how many planes worth
// (1) The storage details for the class are now packed into a single int64_t, which contains both a pointer to the data that is required and a count of how many planes worth
// of storage are allocated. This allows the full storage to be updated atomically using compare and exchange operations (implemented with InterlockedCompareExchangeRelease64).
// (2) The data pointer referenced in this __int64 points to an area of memory which is 128 + 128 * plane_count bytes long, where the first 128 bytes stoere the plane indices, and
// (2) The data pointer referenced in this int64_t points to an area of memory which is 128 + 128 * plane_count bytes long, where the first 128 bytes stoere the plane indices, and
// the rest of the data is variable in size to accomodate however many planes are required to be stored
// (3) The RCU bit of the algorithm means that any read operations don't need to do any checks or locks at all. When the data needs to be updated, a copy of it is made and updated,
// then an attempt is made to swap the new data in - if this succeeds then the old data pointer is deleted later at some point where we know nothing will be reading from it anymore.
@@ -36,7 +36,7 @@ class SparseLightStorage_SPU
{
private:
// unsigned char planeIndices[128];
unsigned char* m_pData;
unsigned char* m_pData;
// unsigned char *data;
// unsigned int allocatedPlaneCount;