Remove all MSVC __int64 (#742)
This commit is contained in:
@@ -45,8 +45,8 @@
|
||||
CGameNetworkManager g_NetworkManager;
|
||||
CPlatformNetworkManager *CGameNetworkManager::s_pPlatformNetworkManager;
|
||||
|
||||
__int64 CGameNetworkManager::messageQueue[512];
|
||||
__int64 CGameNetworkManager::byteQueue[512];
|
||||
int64_t CGameNetworkManager::messageQueue[512];
|
||||
int64_t CGameNetworkManager::byteQueue[512];
|
||||
int CGameNetworkManager::messageQueuePos = 0;
|
||||
|
||||
CGameNetworkManager::CGameNetworkManager()
|
||||
@@ -194,7 +194,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame
|
||||
ProfileManager.SetDeferredSignoutEnabled(true);
|
||||
#endif
|
||||
|
||||
__int64 seed = 0;
|
||||
int64_t seed = 0;
|
||||
if(lpParameter != NULL)
|
||||
{
|
||||
NetworkGameInitData *param = (NetworkGameInitData *)lpParameter;
|
||||
@@ -287,7 +287,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame
|
||||
}
|
||||
}
|
||||
|
||||
static __int64 sseed = seed; // Create static version so this will be valid until next call to this function & whilst thread is running
|
||||
static int64_t sseed = seed; // Create static version so this will be valid until next call to this function & whilst thread is running
|
||||
ServerStoppedCreate(false);
|
||||
if( g_NetworkManager.IsHost() )
|
||||
{
|
||||
@@ -929,7 +929,7 @@ int CGameNetworkManager::RunNetworkGameThreadProc( void* lpParameter )
|
||||
|
||||
int CGameNetworkManager::ServerThreadProc( void* lpParameter )
|
||||
{
|
||||
__int64 seed = 0;
|
||||
int64_t seed = 0;
|
||||
if(lpParameter != NULL)
|
||||
{
|
||||
NetworkGameInitData *param = (NetworkGameInitData *)lpParameter;
|
||||
|
||||
@@ -100,11 +100,11 @@ public:
|
||||
void SetSessionsUpdatedCallback( void (*SessionsUpdatedCallback)(LPVOID pParam), LPVOID pSearchParam );
|
||||
void GetFullFriendSessionInfo( FriendSessionInfo *foundSession, void (* FriendSessionUpdatedFn)(bool success, void *pParam), void *pParam );
|
||||
void ForceFriendsSessionRefresh();
|
||||
|
||||
|
||||
// Session joining and leaving
|
||||
|
||||
bool JoinGameFromInviteInfo( int userIndex, int userMask, const INVITE_INFO *pInviteInfo);
|
||||
eJoinGameResult JoinGame(FriendSessionInfo *searchResult, int localUsersMask);
|
||||
eJoinGameResult JoinGame(FriendSessionInfo *searchResult, int localUsersMask);
|
||||
static void CancelJoinGame(LPVOID lpParam); // Not part of the shared interface
|
||||
bool LeaveGame(bool bMigrateHost);
|
||||
static int JoinFromInvite_SignInReturned(void *pParam,bool bContinue, int iPad);
|
||||
@@ -113,13 +113,13 @@ public:
|
||||
void ResetLeavingGame();
|
||||
|
||||
// Threads
|
||||
|
||||
|
||||
bool IsNetworkThreadRunning();
|
||||
static int RunNetworkGameThreadProc( void* lpParameter );
|
||||
static int ServerThreadProc( void* lpParameter );
|
||||
static int ExitAndJoinFromInviteThreadProc( void* lpParam );
|
||||
|
||||
#if (defined __PS3__) || (defined __ORBIS__) || (defined __PSVITA__)
|
||||
#if (defined __PS3__) || (defined __ORBIS__) || (defined __PSVITA__)
|
||||
static int MustSignInReturned_0(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int PSNSignInReturned_0(void* pParam, bool bContinue, int iPad);
|
||||
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
static void _LeaveGame();
|
||||
static int ChangeSessionTypeThreadProc( void* lpParam );
|
||||
|
||||
// System flags
|
||||
// System flags
|
||||
|
||||
void SystemFlagSet(INetworkPlayer *pNetworkPlayer, int index);
|
||||
bool SystemFlagGet(INetworkPlayer *pNetworkPlayer, int index);
|
||||
@@ -145,8 +145,8 @@ public:
|
||||
|
||||
void ServerStoppedCreate(bool create); // Create the signal
|
||||
void ServerStopped(); // Signal that we are ready
|
||||
void ServerStoppedWait(); // Wait for the signal
|
||||
void ServerStoppedDestroy(); // Destroy signal
|
||||
void ServerStoppedWait(); // Wait for the signal
|
||||
void ServerStoppedDestroy(); // Destroy signal
|
||||
bool ServerStoppedValid(); // Is non-NULL
|
||||
|
||||
#ifdef __PSVITA__
|
||||
@@ -164,9 +164,9 @@ public:
|
||||
|
||||
// Used for debugging output
|
||||
static const int messageQueue_length = 512;
|
||||
static __int64 messageQueue[messageQueue_length];
|
||||
static int64_t messageQueue[messageQueue_length];
|
||||
static const int byteQueue_length = 512;
|
||||
static __int64 byteQueue[byteQueue_length];
|
||||
static int64_t byteQueue[byteQueue_length];
|
||||
static int messageQueuePos;
|
||||
|
||||
// Methods called from PlatformNetworkManager
|
||||
|
||||
@@ -734,7 +734,7 @@ void CPlatformNetworkManagerStub::SearchForGames()
|
||||
info->data.playerCount = lanSessions[i].playerCount;
|
||||
info->data.maxPlayers = lanSessions[i].maxPlayers;
|
||||
|
||||
info->sessionId = (SessionID)((unsigned __int64)inet_addr(lanSessions[i].hostIP) | ((unsigned __int64)lanSessions[i].hostPort << 32));
|
||||
info->sessionId = (SessionID)((uint64_t)inet_addr(lanSessions[i].hostIP) | ((uint64_t)lanSessions[i].hostPort << 32));
|
||||
|
||||
friendsSessions[0].push_back(info);
|
||||
}
|
||||
|
||||
@@ -132,6 +132,6 @@ int NetworkPlayerSony::GetTimeSinceLastChunkPacket_ms()
|
||||
return INT_MAX;
|
||||
}
|
||||
|
||||
__int64 currentTime = System::currentTimeMillis();
|
||||
int64_t currentTime = System::currentTimeMillis();
|
||||
return (int)( currentTime - m_lastChunkPacketTime );
|
||||
}
|
||||
|
||||
@@ -39,5 +39,5 @@ public:
|
||||
private:
|
||||
SQRNetworkPlayer *m_sqrPlayer;
|
||||
Socket *m_pSocket;
|
||||
__int64 m_lastChunkPacketTime;
|
||||
int64_t m_lastChunkPacketTime;
|
||||
};
|
||||
|
||||
@@ -145,7 +145,7 @@ bool SQRNetworkPlayer::IsReady()
|
||||
{
|
||||
return ( ( m_flags & SNP_FLAG_READY_MASK ) == SNP_FLAG_READY_MASK );
|
||||
}
|
||||
|
||||
|
||||
PlayerUID SQRNetworkPlayer::GetUID()
|
||||
{
|
||||
return m_ISD.m_UID;
|
||||
@@ -224,7 +224,7 @@ void SQRNetworkPlayer::SendData( SQRNetworkPlayer *pPlayerTarget, const void *da
|
||||
{
|
||||
AckFlags ackFlags = ack ? e_flag_AckRequested : e_flag_AckNotRequested;
|
||||
// Our network is connected as a star. If we are the host, then we can send to any remote player. If we're a client, we can send only to the host.
|
||||
// The host can also send to other local players, but this doesn't need to go through Rudp.
|
||||
// The host can also send to other local players, but this doesn't need to go through Rudp.
|
||||
if( m_host )
|
||||
{
|
||||
if( ( m_type == SNP_TYPE_HOST ) && ( pPlayerTarget->m_type == SNP_TYPE_LOCAL ) )
|
||||
@@ -286,7 +286,7 @@ void SQRNetworkPlayer::SendInternal(const void *data, unsigned int dataSize, Ack
|
||||
sendBlock.end = NULL;
|
||||
sendBlock.current = NULL;
|
||||
sendBlock.ack = ackFlags;
|
||||
m_sendQueue.push(sendBlock);
|
||||
m_sendQueue.push(sendBlock);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -299,13 +299,13 @@ void SQRNetworkPlayer::SendInternal(const void *data, unsigned int dataSize, Ack
|
||||
sendBlock.current = sendBlock.start;
|
||||
sendBlock.ack = ackFlags;
|
||||
memcpy( sendBlock.start, dataCurrent, dataSize);
|
||||
m_sendQueue.push(sendBlock);
|
||||
m_sendQueue.push(sendBlock);
|
||||
dataRemaining -= dataSize;
|
||||
dataCurrent += dataSize;
|
||||
}
|
||||
|
||||
}
|
||||
m_totalBytesInSendQueue += dataSize;
|
||||
m_totalBytesInSendQueue += dataSize;
|
||||
|
||||
// if the queue had something in it already, then the UDP callback will fire and call SendMoreInternal
|
||||
// so we don't call it here, to avoid a deadlock
|
||||
@@ -343,7 +343,7 @@ int SQRNetworkPlayer::WriteDataPacket(const void* data, int dataSize, AckFlags a
|
||||
// nothing was sent!
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
assert(ret==packetSize || ret > headerSize); // we must make sure we've sent the entire packet or the header and some data at least
|
||||
ret -= headerSize;
|
||||
if(ackFlags == e_flag_AckRequested)
|
||||
@@ -443,7 +443,7 @@ void SQRNetworkPlayer::ReadAck()
|
||||
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
#ifdef PRINT_ACK_STATS
|
||||
__int64 timeTaken = System::currentTimeMillis() - m_ackStats[0];
|
||||
int64_t timeTaken = System::currentTimeMillis() - m_ackStats[0];
|
||||
if(timeTaken < m_minAckTime)
|
||||
m_minAckTime = timeTaken;
|
||||
if(timeTaken > m_maxAckTime)
|
||||
@@ -525,7 +525,7 @@ void SQRNetworkPlayer::SendMoreInternal()
|
||||
{
|
||||
keepSending = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( ( ret >= 0 ) || ( ret == sc_wouldBlockFlag ) )
|
||||
{
|
||||
|
||||
@@ -543,7 +543,7 @@ void SQRNetworkPlayer::SendMoreInternal()
|
||||
// Is CELL_RUDP_ERROR_WOULDBLOCK, nothing has yet been sent
|
||||
remainingBytes = dataSize;
|
||||
}
|
||||
m_sendQueue.front().current = m_sendQueue.front().end - remainingBytes;
|
||||
m_sendQueue.front().current = m_sendQueue.front().end - remainingBytes;
|
||||
}
|
||||
}
|
||||
} while (keepSending);
|
||||
|
||||
@@ -68,11 +68,11 @@ class SQRNetworkPlayer
|
||||
};
|
||||
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
std::vector<__int64> m_ackStats;
|
||||
std::vector<int64_t> m_ackStats;
|
||||
int m_minAckTime;
|
||||
int m_maxAckTime;
|
||||
int m_totalAcks;
|
||||
__int64 m_totalAckTime;
|
||||
int64_t m_totalAckTime;
|
||||
int m_averageAckTime;
|
||||
#endif
|
||||
|
||||
@@ -89,7 +89,7 @@ class SQRNetworkPlayer
|
||||
{
|
||||
public:
|
||||
unsigned char m_smallId; // Id to uniquely and permanently identify this player between machines - assigned by the server
|
||||
PlayerUID m_UID;
|
||||
PlayerUID m_UID;
|
||||
};
|
||||
|
||||
SQRNetworkPlayer(SQRNetworkManager *manager, eSQRNetworkPlayerType playerType, bool onHost, SceNpMatching2RoomMemberId roomMemberId, int localPlayerIdx, int rudpCtx, PlayerUID *pUID);
|
||||
@@ -114,7 +114,7 @@ class SQRNetworkPlayer
|
||||
int WriteDataPacket(const void* data, int dataSize, AckFlags ackFlags);
|
||||
void ReadAck();
|
||||
void WriteAck();
|
||||
|
||||
|
||||
int GetOutstandingAckCount();
|
||||
int GetSendQueueSizeBytes();
|
||||
int GetSendQueueSizeMessages();
|
||||
|
||||
@@ -25,11 +25,11 @@ static SceRemoteStorageStatus statParams;
|
||||
// {
|
||||
// app.DebugPrintf("remoteStorageGetCallback err : 0x%08x\n");
|
||||
// }
|
||||
//
|
||||
//
|
||||
// void remoteStorageCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int error_code)
|
||||
// {
|
||||
// app.DebugPrintf("remoteStorageCallback err : 0x%08x\n");
|
||||
//
|
||||
//
|
||||
// app.getRemoteStorage()->getRemoteFileInfo(&statParams, remoteStorageGetInfoCallback, NULL);
|
||||
// }
|
||||
|
||||
@@ -193,7 +193,7 @@ ESavePlatform SonyRemoteStorage::getSavePlatform()
|
||||
|
||||
}
|
||||
|
||||
__int64 SonyRemoteStorage::getSaveSeed()
|
||||
int64_t SonyRemoteStorage::getSaveSeed()
|
||||
{
|
||||
if(m_getInfoStatus != e_infoFound)
|
||||
return 0;
|
||||
@@ -223,9 +223,9 @@ const char* SonyRemoteStorage::getRemoteSaveFilename()
|
||||
|
||||
int SonyRemoteStorage::getSaveFilesize()
|
||||
{
|
||||
if(m_getInfoStatus == e_infoFound)
|
||||
if(m_getInfoStatus == e_infoFound)
|
||||
{
|
||||
return m_remoteFileInfo->fileSize;
|
||||
return m_remoteFileInfo->fileSize;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -288,9 +288,9 @@ bool SonyRemoteStorage::saveIsAvailable()
|
||||
if(m_getInfoStatus != e_infoFound)
|
||||
return false;
|
||||
#ifdef __PS3__
|
||||
return (getSavePlatform() == SAVE_FILE_PLATFORM_PSVITA);
|
||||
return (getSavePlatform() == SAVE_FILE_PLATFORM_PSVITA);
|
||||
#elif defined __PSVITA__
|
||||
return (getSavePlatform() == SAVE_FILE_PLATFORM_PS3);
|
||||
return (getSavePlatform() == SAVE_FILE_PLATFORM_PS3);
|
||||
#else // __ORBIS__
|
||||
return true;
|
||||
#endif
|
||||
@@ -320,7 +320,7 @@ int SonyRemoteStorage::getDataProgress()
|
||||
int nextChunk = ((sizeTransferred + chunkSize) * 100) / totalSize;
|
||||
|
||||
|
||||
__int64 time = System::currentTimeMillis();
|
||||
int64_t time = System::currentTimeMillis();
|
||||
int elapsedSecs = (time - m_startTime) / 1000;
|
||||
float estimatedTransfered = float(elapsedSecs * transferRatePerSec);
|
||||
int progVal = m_dataProgress + (estimatedTransfered / float(totalSize)) * 100;
|
||||
@@ -341,15 +341,15 @@ bool SonyRemoteStorage::shutdown()
|
||||
if(m_bInitialised)
|
||||
{
|
||||
int ret = sceRemoteStorageTerm();
|
||||
if(ret >= 0)
|
||||
if(ret >= 0)
|
||||
{
|
||||
app.DebugPrintf("Term request done \n");
|
||||
m_bInitialised = false;
|
||||
free(m_memPoolBuffer);
|
||||
m_memPoolBuffer = NULL;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
app.DebugPrintf("Error in Term request: 0x%x \n", ret);
|
||||
return false;
|
||||
@@ -409,7 +409,7 @@ void SonyRemoteStorage::GetDescriptionData( DescriptionData& descData)
|
||||
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);
|
||||
SetU64HexBytes(descData.m_seed, iSeed);
|
||||
// Save the host options that this world was last played with
|
||||
SetU32HexBytes(descData.m_hostOptions, uiHostOptions);
|
||||
@@ -433,7 +433,7 @@ void SonyRemoteStorage::GetDescriptionData( DescriptionData_V2& descData)
|
||||
char descDataVersion[9];
|
||||
sprintf(descDataVersion,"%08x",sc_CurrentDescDataVersion);
|
||||
memcpy(descData.m_descDataVersion,descDataVersion,8); // Don't copy null
|
||||
|
||||
|
||||
|
||||
descData.m_platform[0] = SAVE_FILE_PLATFORM_LOCAL & 0xff;
|
||||
descData.m_platform[1] = (SAVE_FILE_PLATFORM_LOCAL >> 8) & 0xff;
|
||||
@@ -448,7 +448,7 @@ void SonyRemoteStorage::GetDescriptionData( DescriptionData_V2& descData)
|
||||
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);
|
||||
SetU64HexBytes(descData.m_seed, iSeed);
|
||||
// Save the host options that this world was last played with
|
||||
SetU32HexBytes(descData.m_hostOptions, uiHostOptions);
|
||||
@@ -468,7 +468,7 @@ void SonyRemoteStorage::GetDescriptionData( DescriptionData_V2& descData)
|
||||
uint32_t SonyRemoteStorage::GetU32FromHexBytes(char* hexBytes)
|
||||
{
|
||||
char hexString[9];
|
||||
ZeroMemory(hexString,9);
|
||||
ZeroMemory(hexString,9);
|
||||
memcpy(hexString, hexBytes,8);
|
||||
|
||||
uint32_t u32Val = 0;
|
||||
@@ -481,7 +481,7 @@ uint32_t SonyRemoteStorage::GetU32FromHexBytes(char* hexBytes)
|
||||
uint64_t SonyRemoteStorage::GetU64FromHexBytes(char* hexBytes)
|
||||
{
|
||||
char hexString[17];
|
||||
ZeroMemory(hexString,17);
|
||||
ZeroMemory(hexString,17);
|
||||
memcpy(hexString, hexBytes,16);
|
||||
|
||||
uint64_t u64Val = 0;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
|
||||
#include "..\..\Common\Network\Sony\sceRemoteStorage\header\sceRemoteStorage.h"
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
char m_saveFileDesc[128];
|
||||
|
||||
class DescriptionData
|
||||
{
|
||||
{
|
||||
// this stuff is read from a JSON query, so it all has to be text based, max 256 bytes
|
||||
public:
|
||||
char m_platform[4];
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
};
|
||||
|
||||
class DescriptionData_V2
|
||||
{
|
||||
{
|
||||
// this stuff is read from a JSON query, so it all has to be text based, max 256 bytes
|
||||
public:
|
||||
char m_platformNone[4]; // set to no platform, to indicate we're using the newer version of the data
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
public:
|
||||
int m_descDataVersion;
|
||||
ESavePlatform m_savePlatform;
|
||||
__int64 m_seed;
|
||||
int64_t m_seed;
|
||||
uint32_t m_hostOptions;
|
||||
uint32_t m_texturePack;
|
||||
uint32_t m_saveVersion;
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
const char* getLocalFilename();
|
||||
const char* getSaveNameUTF8();
|
||||
ESavePlatform getSavePlatform();
|
||||
__int64 getSaveSeed();
|
||||
int64_t getSaveSeed();
|
||||
unsigned int getSaveHostOptions();
|
||||
unsigned int getSaveTexturePack();
|
||||
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
static int LoadSaveDataThumbnailReturned(LPVOID lpParam,PBYTE pbThumbnail,DWORD dwThumbnailBytes);
|
||||
static int setDataThread(void* lpParam);
|
||||
|
||||
SonyRemoteStorage() : m_memPoolBuffer(NULL), m_bInitialised(false),m_getInfoStatus(e_noInfoFound) {}
|
||||
SonyRemoteStorage() : m_memPoolBuffer(NULL), m_bInitialised(false),m_getInfoStatus(e_noInfoFound) {}
|
||||
|
||||
protected:
|
||||
const char* getRemoteSaveFilename();
|
||||
@@ -154,7 +154,7 @@ protected:
|
||||
unsigned int m_thumbnailDataSize;
|
||||
C4JThread* m_SetDataThread;
|
||||
PSAVE_INFO m_setDataSaveInfo;
|
||||
__int64 m_startTime;
|
||||
int64_t m_startTime;
|
||||
|
||||
bool m_bAborting;
|
||||
bool m_bTransferStarted;
|
||||
|
||||
Reference in New Issue
Block a user