diff options
| author | void_17 <61356189+void2012@users.noreply.github.com> | 2026-03-07 03:31:30 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-07 03:31:30 +0700 |
| commit | 988e3042e00485aa7ed3725fe7bfde1da8cf8519 (patch) | |
| tree | cf712d80b4d03eec73f935e0cce23020ddb6f5ef /Minecraft.Client/Common/Network/Sony | |
| parent | 175fc3824e502ecd701c1da2ecd2061d77495693 (diff) | |
Remove all MSVC `__int64` (#742)
Diffstat (limited to 'Minecraft.Client/Common/Network/Sony')
6 files changed, 38 insertions, 38 deletions
diff --git a/Minecraft.Client/Common/Network/Sony/NetworkPlayerSony.cpp b/Minecraft.Client/Common/Network/Sony/NetworkPlayerSony.cpp index a7a4628b..21cd82aa 100644 --- a/Minecraft.Client/Common/Network/Sony/NetworkPlayerSony.cpp +++ b/Minecraft.Client/Common/Network/Sony/NetworkPlayerSony.cpp @@ -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 ); } diff --git a/Minecraft.Client/Common/Network/Sony/NetworkPlayerSony.h b/Minecraft.Client/Common/Network/Sony/NetworkPlayerSony.h index f3415a41..2c61f78d 100644 --- a/Minecraft.Client/Common/Network/Sony/NetworkPlayerSony.h +++ b/Minecraft.Client/Common/Network/Sony/NetworkPlayerSony.h @@ -39,5 +39,5 @@ public: private: SQRNetworkPlayer *m_sqrPlayer; Socket *m_pSocket; - __int64 m_lastChunkPacketTime; + int64_t m_lastChunkPacketTime; }; diff --git a/Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.cpp b/Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.cpp index a040b28b..79c9835b 100644 --- a/Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.cpp +++ b/Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.cpp @@ -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); diff --git a/Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.h b/Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.h index d0efe635..a72e5a41 100644 --- a/Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.h +++ b/Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.h @@ -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(); diff --git a/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.cpp b/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.cpp index 4468d163..02fc73cf 100644 --- a/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.cpp +++ b/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.cpp @@ -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; diff --git a/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.h b/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.h index d38a06e2..89ecc066 100644 --- a/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.h +++ b/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.h @@ -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; |
