Remove all MSVC __int64 (#742)
This commit is contained in:
@@ -13,7 +13,7 @@ private:
|
||||
wstring title;
|
||||
wstring desc;
|
||||
Achievement *ach;
|
||||
__int64 startTime;
|
||||
int64_t startTime;
|
||||
ItemRenderer *ir;
|
||||
bool isHelper;
|
||||
|
||||
|
||||
@@ -3791,8 +3791,8 @@ extern "C" {
|
||||
typedef signed int ma_int32;
|
||||
typedef unsigned int ma_uint32;
|
||||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
typedef signed __int64 ma_int64;
|
||||
typedef unsigned __int64 ma_uint64;
|
||||
typedef signed long long ma_int64;
|
||||
typedef unsigned long long ma_uint64;
|
||||
#else
|
||||
#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
|
||||
#pragma GCC diagnostic push
|
||||
@@ -11729,7 +11729,7 @@ IMPLEMENTATION
|
||||
#endif
|
||||
|
||||
#if _MSC_VER >= 1600 && (defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 160040219)
|
||||
static MA_INLINE unsigned __int64 ma_xgetbv(int reg)
|
||||
static MA_INLINE unsigned long long ma_xgetbv(int reg)
|
||||
{
|
||||
return _xgetbv(reg);
|
||||
}
|
||||
|
||||
@@ -5870,7 +5870,7 @@ void CMinecraftApp::GetTPD(int iConfig,PBYTE *ppbData,DWORD *pdwBytes)
|
||||
// // read the local file
|
||||
// File gtsFile( wsFile->c_str() );
|
||||
//
|
||||
// __int64 fileSize = gtsFile.length();
|
||||
// int64_t fileSize = gtsFile.length();
|
||||
//
|
||||
// if(fileSize!=0)
|
||||
// {
|
||||
@@ -6901,7 +6901,7 @@ HRESULT CMinecraftApp::RegisterConfigValues(WCHAR *pType, int iValue)
|
||||
}
|
||||
|
||||
#if (defined _XBOX || defined _WINDOWS64)
|
||||
HRESULT CMinecraftApp::RegisterDLCData(WCHAR *pType, WCHAR *pBannerName, int iGender, __uint64 ullOfferID_Full, __uint64 ullOfferID_Trial, WCHAR *pFirstSkin, unsigned int uiSortIndex, int iConfig, WCHAR *pDataFile)
|
||||
HRESULT CMinecraftApp::RegisterDLCData(WCHAR *pType, WCHAR *pBannerName, int iGender, uint64_t ullOfferID_Full, uint64_t ullOfferID_Trial, WCHAR *pFirstSkin, unsigned int uiSortIndex, int iConfig, WCHAR *pDataFile)
|
||||
{
|
||||
HRESULT hr=S_OK;
|
||||
DLC_INFO *pDLCData=new DLC_INFO;
|
||||
@@ -8282,7 +8282,7 @@ void CMinecraftApp::GetImageTextData(PBYTE pbImageData, DWORD dwImageBytes,unsig
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned int CMinecraftApp::CreateImageTextData(PBYTE bTextMetadata, __int64 seed, bool hasSeed, unsigned int uiHostOptions, unsigned int uiTexturePackId)
|
||||
unsigned int CMinecraftApp::CreateImageTextData(PBYTE bTextMetadata, int64_t seed, bool hasSeed, unsigned int uiHostOptions, unsigned int uiTexturePackId)
|
||||
{
|
||||
int iTextMetadataBytes = 0;
|
||||
if(hasSeed)
|
||||
|
||||
@@ -606,7 +606,7 @@ public:
|
||||
DLC_INFO *GetDLCInfoForFullOfferID(WCHAR *pwchProductId);
|
||||
DLC_INFO *GetDLCInfoForProductName(WCHAR *pwchProductName);
|
||||
#else
|
||||
static HRESULT RegisterDLCData(WCHAR *, WCHAR *, int, __uint64, __uint64, WCHAR *, unsigned int, int, WCHAR *pDataFile);
|
||||
static HRESULT RegisterDLCData(WCHAR *, WCHAR *, int, uint64_t, uint64_t, WCHAR *, unsigned int, int, WCHAR *pDataFile);
|
||||
bool GetDLCFullOfferIDForSkinID(const wstring &FirstSkin,ULONGLONG *pullVal);
|
||||
DLC_INFO *GetDLCInfoForTrialOfferID(ULONGLONG ullOfferID_Trial);
|
||||
DLC_INFO *GetDLCInfoForFullOfferID(ULONGLONG ullOfferID_Full);
|
||||
@@ -729,7 +729,7 @@ public:
|
||||
|
||||
// World seed from png image
|
||||
void GetImageTextData(PBYTE pbImageData, DWORD dwImageBytes,unsigned char *pszSeed,unsigned int &uiHostOptions,bool &bHostOptionsRead,DWORD &uiTexturePack);
|
||||
unsigned int CreateImageTextData(PBYTE bTextMetadata, __int64 seed, bool hasSeed, unsigned int uiHostOptions, unsigned int uiTexturePackId);
|
||||
unsigned int CreateImageTextData(PBYTE bTextMetadata, int64_t seed, bool hasSeed, unsigned int uiHostOptions, unsigned int uiTexturePackId);
|
||||
|
||||
// Game rules
|
||||
GameRuleManager m_gameRules;
|
||||
|
||||
@@ -19,8 +19,8 @@ private:
|
||||
ConsoleSchematicFile::ESchematicRotation m_rotation;
|
||||
int m_dimension;
|
||||
|
||||
__int64 m_totalBlocksChanged;
|
||||
__int64 m_totalBlocksChangedLighting;
|
||||
int64_t m_totalBlocksChanged;
|
||||
int64_t m_totalBlocksChangedLighting;
|
||||
bool m_completed;
|
||||
|
||||
void updateLocationBox();
|
||||
|
||||
@@ -184,7 +184,7 @@ void ConsoleSchematicFile::save_tags(DataOutputStream *dos)
|
||||
delete tag;
|
||||
}
|
||||
|
||||
__int64 ConsoleSchematicFile::applyBlocksAndData(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot)
|
||||
int64_t ConsoleSchematicFile::applyBlocksAndData(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot)
|
||||
{
|
||||
int xStart = static_cast<int>(std::fmax<double>(destinationBox->x0, (double)chunk->x*16));
|
||||
int xEnd = static_cast<int>(std::fmin<double>(destinationBox->x1, (double)((xStart >> 4) << 4) + 16));
|
||||
@@ -323,7 +323,7 @@ __int64 ConsoleSchematicFile::applyBlocksAndData(LevelChunk *chunk, AABB *chunkB
|
||||
|
||||
// At the point that this is called, we have all the neighbouring chunks loaded in (and generally post-processed, apart from this lighting pass), so
|
||||
// we can do the sort of lighting that might propagate out of the chunk.
|
||||
__int64 ConsoleSchematicFile::applyLighting(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot)
|
||||
int64_t ConsoleSchematicFile::applyLighting(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot)
|
||||
{
|
||||
int xStart = max(destinationBox->x0, (double)chunk->x*16);
|
||||
int xEnd = min(destinationBox->x1, (double)((xStart>>4)<<4) + 16);
|
||||
|
||||
@@ -72,8 +72,8 @@ public:
|
||||
void save(DataOutputStream *dos);
|
||||
void load(DataInputStream *dis);
|
||||
|
||||
__int64 applyBlocksAndData(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot);
|
||||
__int64 applyLighting(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot);
|
||||
int64_t applyBlocksAndData(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot);
|
||||
int64_t applyLighting(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot);
|
||||
void applyTileEntities(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot);
|
||||
|
||||
static void generateSchematicFile(DataOutputStream *dos, Level *level, int xStart, int yStart, int zStart, int xEnd, int yEnd, int zEnd, bool bSaveMobs, Compression::ECompressionTypes);
|
||||
|
||||
@@ -14,7 +14,7 @@ public:
|
||||
typedef struct _ValueType
|
||||
{
|
||||
union{
|
||||
__int64 i64;
|
||||
int64_t i64;
|
||||
int i;
|
||||
char c;
|
||||
bool b;
|
||||
|
||||
@@ -385,7 +385,7 @@ bool GameRuleManager::readRuleFile(LevelGenerationOptions *lgo, byte *dIn, UINT
|
||||
// Read File.
|
||||
|
||||
// version_number
|
||||
__int64 version = dis.readShort();
|
||||
int64_t version = dis.readShort();
|
||||
unsigned char compressionType = 0;
|
||||
if(version == 0)
|
||||
{
|
||||
|
||||
@@ -175,7 +175,7 @@ void LevelGenerationOptions::addAttribute(const wstring &attributeName, const ws
|
||||
{
|
||||
if(attributeName.compare(L"seed") == 0)
|
||||
{
|
||||
m_seed = _fromString<__int64>(attributeValue);
|
||||
m_seed = _fromString<int64_t>(attributeValue);
|
||||
app.DebugPrintf("LevelGenerationOptions: Adding parameter m_seed=%I64d\n",m_seed);
|
||||
}
|
||||
else if(attributeName.compare(L"spawnX") == 0)
|
||||
@@ -700,7 +700,7 @@ void LevelGenerationOptions::deleteBaseSaveData() { if(m_pbBaseSaveData) delete
|
||||
bool LevelGenerationOptions::hasLoadedData() { return m_hasLoadedData; }
|
||||
void LevelGenerationOptions::setLoadedData() { m_hasLoadedData = true; }
|
||||
|
||||
__int64 LevelGenerationOptions::getLevelSeed() { return m_seed; }
|
||||
int64_t LevelGenerationOptions::getLevelSeed() { return m_seed; }
|
||||
int LevelGenerationOptions::getLevelHasBeenInCreative() { return m_bHasBeenInCreative; }
|
||||
Pos *LevelGenerationOptions::getSpawnPos() { return m_spawnPos; }
|
||||
bool LevelGenerationOptions::getuseFlatWorld() { return m_useFlatWorld; }
|
||||
|
||||
@@ -146,7 +146,7 @@ public:
|
||||
|
||||
private:
|
||||
// This should match the "MapOptionsRule" definition in the XML schema
|
||||
__int64 m_seed;
|
||||
int64_t m_seed;
|
||||
bool m_useFlatWorld;
|
||||
Pos *m_spawnPos;
|
||||
int m_bHasBeenInCreative;
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
virtual GameRuleDefinition *addChild(ConsoleGameRules::EGameRuleType ruleType);
|
||||
virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue);
|
||||
|
||||
__int64 getLevelSeed();
|
||||
int64_t getLevelSeed();
|
||||
int getLevelHasBeenInCreative();
|
||||
Pos *getSpawnPos();
|
||||
bool getuseFlatWorld();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@ ESavePlatform SonyRemoteStorage::getSavePlatform()
|
||||
|
||||
}
|
||||
|
||||
__int64 SonyRemoteStorage::getSaveSeed()
|
||||
int64_t SonyRemoteStorage::getSaveSeed()
|
||||
{
|
||||
if(m_getInfoStatus != e_infoFound)
|
||||
return 0;
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -47,7 +47,7 @@ void UIComponent_Panorama::tick()
|
||||
EnterCriticalSection(&pMinecraft->m_setLevelCS);
|
||||
if(pMinecraft->level!=NULL)
|
||||
{
|
||||
__int64 i64TimeOfDay =0;
|
||||
int64_t i64TimeOfDay =0;
|
||||
// are we in the Nether? - Leave the time as 0 if we are, so we show daylight
|
||||
if(pMinecraft->level->dimension->id==0)
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ bool UIControl_SpaceIndicatorBar::setupControl(UIScene *scene, IggyValuePath *pa
|
||||
return success;
|
||||
}
|
||||
|
||||
void UIControl_SpaceIndicatorBar::init(UIString label, int id, __int64 min, __int64 max)
|
||||
void UIControl_SpaceIndicatorBar::init(UIString label, int id, int64_t min, int64_t max)
|
||||
{
|
||||
m_label = label;
|
||||
m_id = id;
|
||||
@@ -61,11 +61,11 @@ void UIControl_SpaceIndicatorBar::reset()
|
||||
setSaveGameOffset(0.0f);
|
||||
}
|
||||
|
||||
void UIControl_SpaceIndicatorBar::addSave(__int64 size)
|
||||
void UIControl_SpaceIndicatorBar::addSave(int64_t size)
|
||||
{
|
||||
float startPercent = (float)((m_currentTotal-m_min))/(m_max-m_min);
|
||||
|
||||
m_sizeAndOffsets.push_back( pair<__int64, float>(size, startPercent) );
|
||||
m_sizeAndOffsets.push_back( pair<int64_t, float>(size, startPercent) );
|
||||
|
||||
m_currentTotal += size;
|
||||
setTotalSize(m_currentTotal);
|
||||
@@ -75,7 +75,7 @@ void UIControl_SpaceIndicatorBar::selectSave(int index)
|
||||
{
|
||||
if(index >= 0 && index < m_sizeAndOffsets.size())
|
||||
{
|
||||
pair<__int64,float> values = m_sizeAndOffsets[index];
|
||||
pair<int64_t,float> values = m_sizeAndOffsets[index];
|
||||
setSaveSize(values.first);
|
||||
setSaveGameOffset(values.second);
|
||||
}
|
||||
@@ -86,7 +86,7 @@ void UIControl_SpaceIndicatorBar::selectSave(int index)
|
||||
}
|
||||
}
|
||||
|
||||
void UIControl_SpaceIndicatorBar::setSaveSize(__int64 size)
|
||||
void UIControl_SpaceIndicatorBar::setSaveSize(int64_t size)
|
||||
{
|
||||
m_currentSave = size;
|
||||
|
||||
@@ -99,7 +99,7 @@ void UIControl_SpaceIndicatorBar::setSaveSize(__int64 size)
|
||||
IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath() , m_setSaveSizeFunc , 1 , value );
|
||||
}
|
||||
|
||||
void UIControl_SpaceIndicatorBar::setTotalSize(__int64 size)
|
||||
void UIControl_SpaceIndicatorBar::setTotalSize(int64_t size)
|
||||
{
|
||||
float percent = (float)((m_currentTotal-m_min))/(m_max-m_min);
|
||||
|
||||
|
||||
@@ -6,28 +6,28 @@ class UIControl_SpaceIndicatorBar : public UIControl_Base
|
||||
{
|
||||
private:
|
||||
IggyName m_setSaveSizeFunc, m_setTotalSizeFunc, m_setSaveGameOffsetFunc;
|
||||
__int64 m_min;
|
||||
__int64 m_max;
|
||||
__int64 m_currentSave, m_currentTotal;
|
||||
int64_t m_min;
|
||||
int64_t m_max;
|
||||
int64_t m_currentSave, m_currentTotal;
|
||||
float m_currentOffset;
|
||||
|
||||
vector<pair<__int64,float> > m_sizeAndOffsets;
|
||||
vector<pair<int64_t,float> > m_sizeAndOffsets;
|
||||
|
||||
public:
|
||||
UIControl_SpaceIndicatorBar();
|
||||
|
||||
virtual bool setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName);
|
||||
|
||||
void init(UIString label, int id, __int64 min, __int64 max);
|
||||
void init(UIString label, int id, int64_t min, int64_t max);
|
||||
virtual void ReInit();
|
||||
void reset();
|
||||
|
||||
void addSave(__int64 size);
|
||||
void addSave(int64_t size);
|
||||
void selectSave(int index);
|
||||
|
||||
|
||||
private:
|
||||
void setSaveSize(__int64 size);
|
||||
void setTotalSize(__int64 totalSize);
|
||||
void setSaveSize(int64_t size);
|
||||
void setTotalSize(int64_t totalSize);
|
||||
void setSaveGameOffset(float offset);
|
||||
};
|
||||
@@ -144,7 +144,7 @@ extern "C" void *__real_malloc(size_t t);
|
||||
extern "C" void __real_free(void *t);
|
||||
#endif
|
||||
|
||||
__int64 UIController::iggyAllocCount = 0;
|
||||
int64_t UIController::iggyAllocCount = 0;
|
||||
static unordered_map<void *,size_t> allocations;
|
||||
static void * RADLINK AllocateFunction ( void * alloc_callback_user_data , size_t size_requested , size_t * size_returned )
|
||||
{
|
||||
@@ -502,7 +502,7 @@ void UIController::tick()
|
||||
}
|
||||
|
||||
// Clear out the cached movie file data
|
||||
__int64 currentTime = System::currentTimeMillis();
|
||||
int64_t currentTime = System::currentTimeMillis();
|
||||
for (auto it = m_cachedMovieData.begin(); it != m_cachedMovieData.end();)
|
||||
{
|
||||
if(it->second.m_expiry < currentTime)
|
||||
@@ -622,7 +622,7 @@ IggyLibrary UIController::loadSkin(const wstring &skinPath, const wstring &skinN
|
||||
IggyMemoryUseInfo memoryInfo;
|
||||
rrbool res;
|
||||
int iteration = 0;
|
||||
__int64 totalStatic = 0;
|
||||
int64_t totalStatic = 0;
|
||||
while(res = IggyDebugGetMemoryUseInfo ( NULL ,
|
||||
lib ,
|
||||
"" ,
|
||||
@@ -753,7 +753,7 @@ void UIController::CleanUpSkinReload()
|
||||
byteArray UIController::getMovieData(const wstring &filename)
|
||||
{
|
||||
// Cache everything we load in the current tick
|
||||
__int64 targetTime = System::currentTimeMillis() + (1000LL * 60);
|
||||
int64_t targetTime = System::currentTimeMillis() + (1000LL * 60);
|
||||
auto it = m_cachedMovieData.find(filename);
|
||||
if(it == m_cachedMovieData.end() )
|
||||
{
|
||||
@@ -1441,8 +1441,8 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key)
|
||||
//!(app.GetGameSettingsDebugMask(ProfileManager.GetPrimaryPad())&(1L<<eDebugSetting_ToggleFont)) &&
|
||||
key == ACTION_MENU_STICK_PRESS)
|
||||
{
|
||||
__int64 totalStatic = 0;
|
||||
__int64 totalDynamic = 0;
|
||||
int64_t totalStatic = 0;
|
||||
int64_t totalDynamic = 0;
|
||||
app.DebugPrintf(app.USER_SR, "********************************\n");
|
||||
app.DebugPrintf(app.USER_SR, "BEGIN TOTAL SWF MEMORY USAGE\n\n");
|
||||
for(unsigned int i = 0; i < eUIGroup_COUNT; ++i)
|
||||
@@ -1451,8 +1451,8 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key)
|
||||
}
|
||||
for(unsigned int i = 0; i < eLibrary_Count; ++i)
|
||||
{
|
||||
__int64 libraryStatic = 0;
|
||||
__int64 libraryDynamic = 0;
|
||||
int64_t libraryStatic = 0;
|
||||
int64_t libraryDynamic = 0;
|
||||
|
||||
if(m_iggyLibraries[i] != IGGY_INVALID_LIBRARY)
|
||||
{
|
||||
@@ -2481,7 +2481,7 @@ void UIController::OverrideSFX(int iPad, int iAction,bool bVal)
|
||||
|
||||
void UIController::PlayUISFX(ESoundEffect eSound)
|
||||
{
|
||||
__uint64 time = System::currentTimeMillis();
|
||||
uint64_t time = System::currentTimeMillis();
|
||||
|
||||
// Don't play multiple SFX on the same tick
|
||||
// (prevents horrible sounds when programmatically setting multiple checkboxes)
|
||||
|
||||
@@ -16,7 +16,7 @@ class UIControl;
|
||||
class UIController : public IUIController
|
||||
{
|
||||
public:
|
||||
static __int64 iggyAllocCount;
|
||||
static int64_t iggyAllocCount;
|
||||
|
||||
// MGH - added to prevent crash loading Iggy movies while the skins were being reloaded
|
||||
static CRITICAL_SECTION ms_reloadSkinCS;
|
||||
@@ -149,7 +149,7 @@ private:
|
||||
typedef struct _CachedMovieData
|
||||
{
|
||||
byteArray m_ba;
|
||||
__int64 m_expiry;
|
||||
int64_t m_expiry;
|
||||
} CachedMovieData;
|
||||
unordered_map<wstring, CachedMovieData> m_cachedMovieData;
|
||||
|
||||
@@ -173,7 +173,7 @@ private:
|
||||
C4JThread *m_reloadSkinThread;
|
||||
bool m_navigateToHomeOnReload;
|
||||
int m_accumulatedTicks;
|
||||
__uint64 m_lastUiSfx; // Tracks time (ms) of last UI sound effect
|
||||
uint64_t m_lastUiSfx; // Tracks time (ms) of last UI sound effect
|
||||
|
||||
D3D11_RECT m_customRenderingClearRect;
|
||||
|
||||
|
||||
@@ -390,10 +390,10 @@ unsigned int UIGroup::GetLayerIndex(UILayer* layerPtr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void UIGroup::PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic)
|
||||
void UIGroup::PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic)
|
||||
{
|
||||
__int64 groupStatic = 0;
|
||||
__int64 groupDynamic = 0;
|
||||
int64_t groupStatic = 0;
|
||||
int64_t groupDynamic = 0;
|
||||
app.DebugPrintf(app.USER_SR, "-- BEGIN GROUP %d\n",m_group);
|
||||
for(unsigned int i = 0; i < eUILayer_COUNT; ++i)
|
||||
{
|
||||
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
|
||||
void handleUnlockFullVersion();
|
||||
|
||||
void PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic);
|
||||
void PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic);
|
||||
|
||||
unsigned int GetLayerIndex(UILayer* layerPtr);
|
||||
|
||||
|
||||
@@ -877,10 +877,10 @@ void UILayer::handleUnlockFullVersion()
|
||||
}
|
||||
}
|
||||
|
||||
void UILayer::PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic)
|
||||
void UILayer::PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic)
|
||||
{
|
||||
__int64 layerStatic = 0;
|
||||
__int64 layerDynamic = 0;
|
||||
int64_t layerStatic = 0;
|
||||
int64_t layerDynamic = 0;
|
||||
for(auto& it : m_components)
|
||||
{
|
||||
it->PrintTotalMemoryUsage(layerStatic, layerDynamic);
|
||||
|
||||
@@ -88,6 +88,6 @@ public:
|
||||
void handleUnlockFullVersion();
|
||||
UIScene *FindScene(EUIScene sceneType);
|
||||
|
||||
void PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic);
|
||||
void PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic);
|
||||
|
||||
};
|
||||
|
||||
@@ -329,11 +329,11 @@ void UIScene::loadMovie()
|
||||
}
|
||||
|
||||
byteArray baFile = ui.getMovieData(moviePath.c_str());
|
||||
__int64 beforeLoad = ui.iggyAllocCount;
|
||||
int64_t beforeLoad = ui.iggyAllocCount;
|
||||
swf = IggyPlayerCreateFromMemory ( baFile.data , baFile.length, NULL);
|
||||
__int64 afterLoad = ui.iggyAllocCount;
|
||||
int64_t afterLoad = ui.iggyAllocCount;
|
||||
IggyPlayerInitializeAndTickRS ( swf );
|
||||
__int64 afterTick = ui.iggyAllocCount;
|
||||
int64_t afterTick = ui.iggyAllocCount;
|
||||
|
||||
if(!swf)
|
||||
{
|
||||
@@ -362,8 +362,8 @@ void UIScene::loadMovie()
|
||||
IggyMemoryUseInfo memoryInfo;
|
||||
rrbool res;
|
||||
int iteration = 0;
|
||||
__int64 totalStatic = 0;
|
||||
__int64 totalDynamic = 0;
|
||||
int64_t totalStatic = 0;
|
||||
int64_t totalDynamic = 0;
|
||||
while(res = IggyDebugGetMemoryUseInfo ( swf ,
|
||||
NULL ,
|
||||
0 ,
|
||||
@@ -406,15 +406,15 @@ void UIScene::getDebugMemoryUseRecursive(const wstring &moviePath, IggyMemoryUse
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene::PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic)
|
||||
void UIScene::PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic)
|
||||
{
|
||||
if(!swf) return;
|
||||
|
||||
IggyMemoryUseInfo memoryInfo;
|
||||
rrbool res;
|
||||
int iteration = 0;
|
||||
__int64 sceneStatic = 0;
|
||||
__int64 sceneDynamic = 0;
|
||||
int64_t sceneStatic = 0;
|
||||
int64_t sceneDynamic = 0;
|
||||
while(res = IggyDebugGetMemoryUseInfo ( swf ,
|
||||
NULL ,
|
||||
"" ,
|
||||
|
||||
@@ -134,7 +134,7 @@ private:
|
||||
void getDebugMemoryUseRecursive(const wstring &moviePath, IggyMemoryUseInfo &memoryInfo);
|
||||
|
||||
public:
|
||||
void PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic);
|
||||
void PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic);
|
||||
|
||||
public:
|
||||
UIScene(int iPad, UILayer *parentLayer);
|
||||
|
||||
@@ -1124,14 +1124,14 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD
|
||||
|
||||
// start the game
|
||||
bool isFlat = (pClass->m_MoreOptionsParams.bFlatWorld==TRUE);
|
||||
__int64 seedValue = 0;
|
||||
int64_t seedValue = 0;
|
||||
|
||||
NetworkGameInitData *param = new NetworkGameInitData();
|
||||
param->levelName = wWorldName;
|
||||
|
||||
if (wSeed.length() != 0)
|
||||
{
|
||||
__int64 value = 0;
|
||||
int64_t value = 0;
|
||||
unsigned int len = (unsigned int)wSeed.length();
|
||||
|
||||
//Check if the input string contains a numerical value
|
||||
@@ -1150,7 +1150,7 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD
|
||||
|
||||
//If the input string is a numerical value, convert it to a number
|
||||
if( isNumber )
|
||||
value = _fromString<__int64>(wSeed);
|
||||
value = _fromString<int64_t>(wSeed);
|
||||
|
||||
//If the value is not 0 use it, otherwise use the algorithm from the java String.hashCode() function to hash it
|
||||
if( value != 0 )
|
||||
|
||||
@@ -58,7 +58,7 @@ private:
|
||||
bool m_bRequestQuadrantSignin;
|
||||
bool m_bIsCorrupt;
|
||||
bool m_bThumbnailGetFailed;
|
||||
__int64 m_seed;
|
||||
int64_t m_seed;
|
||||
wstring m_levelName;
|
||||
|
||||
#ifdef __PS3__
|
||||
|
||||
@@ -2171,7 +2171,7 @@ void UIScene_LoadOrJoinMenu::LoadSaveFromDisk(File *saveFile, ESavePlatform save
|
||||
// Make our next save default to the name of the level
|
||||
StorageManager.SetSaveTitle(saveFile->getName().c_str());
|
||||
|
||||
__int64 fileSize = saveFile->length();
|
||||
int64_t fileSize = saveFile->length();
|
||||
FileInputStream fis(*saveFile);
|
||||
byteArray ba(fileSize);
|
||||
fis.read(ba);
|
||||
@@ -2235,7 +2235,7 @@ void UIScene_LoadOrJoinMenu::LoadSaveFromCloud()
|
||||
mbstowcs(wSaveName, app.getRemoteStorage()->getSaveNameUTF8(), strlen(app.getRemoteStorage()->getSaveNameUTF8())+1); // plus null
|
||||
StorageManager.SetSaveTitle(wSaveName);
|
||||
|
||||
__int64 fileSize = cloudFile.length();
|
||||
int64_t fileSize = cloudFile.length();
|
||||
FileInputStream fis(cloudFile);
|
||||
byteArray ba(fileSize);
|
||||
fis.read(ba);
|
||||
@@ -3579,7 +3579,7 @@ int UIScene_LoadOrJoinMenu::DownloadXbox360SaveThreadProc( LPVOID lpParameter )
|
||||
bool bHostOptionsRead = false;
|
||||
unsigned int uiHostOptions = 0;
|
||||
DWORD dwTexturePack;
|
||||
__int64 seedVal;
|
||||
int64_t seedVal;
|
||||
|
||||
char szSeed[50];
|
||||
ZeroMemory(szSeed,50);
|
||||
|
||||
@@ -904,11 +904,11 @@ void CScene_MultiGameCreate::CreateGame(CScene_MultiGameCreate* pClass, DWORD dw
|
||||
|
||||
// start the game
|
||||
bool isFlat = (pClass->m_MoreOptionsParams.bFlatWorld==TRUE);
|
||||
__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_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
|
||||
|
||||
if (wSeed.length() != 0)
|
||||
{
|
||||
__int64 value = 0;
|
||||
int64_t value = 0;
|
||||
unsigned int len = (unsigned int)wSeed.length();
|
||||
|
||||
//Check if the input string contains a numerical value
|
||||
@@ -923,7 +923,7 @@ void CScene_MultiGameCreate::CreateGame(CScene_MultiGameCreate* pClass, DWORD dw
|
||||
|
||||
//If the input string is a numerical value, convert it to a number
|
||||
if( isNumber )
|
||||
value = _fromString<__int64>(wSeed);
|
||||
value = _fromString<int64_t>(wSeed);
|
||||
|
||||
//If the value is not 0 use it, otherwise use the algorithm from the java String.hashCode() function to hash it
|
||||
if( value != 0 )
|
||||
|
||||
@@ -1945,7 +1945,7 @@ void CScene_MultiGameJoinLoad::LoadSaveFromDisk(File *saveFile)
|
||||
// Make our next save default to the name of the level
|
||||
StorageManager.SetSaveTitle(saveFile->getName().c_str());
|
||||
|
||||
__int64 fileSize = saveFile->length();
|
||||
int64_t fileSize = saveFile->length();
|
||||
FileInputStream fis(*saveFile);
|
||||
byteArray ba(fileSize);
|
||||
fis.read(ba);
|
||||
|
||||
@@ -860,7 +860,7 @@ HRESULT CXuiSceneBase::_ShowBackground( unsigned int iPad, BOOL bShow )
|
||||
|
||||
if(bShow && pMinecraft->level!=NULL)
|
||||
{
|
||||
__int64 i64TimeOfDay =0;
|
||||
int64_t i64TimeOfDay =0;
|
||||
// are we in the Nether? - Leave the time as 0 if we are, so we show daylight
|
||||
if(pMinecraft->level->dimension->id==0)
|
||||
{
|
||||
|
||||
@@ -485,7 +485,7 @@ typedef uLong FAR uLongf;
|
||||
# define z_off64_t off64_t
|
||||
#else
|
||||
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
|
||||
# define z_off64_t __int64
|
||||
# define z_off64_t long long
|
||||
# else
|
||||
# define z_off64_t z_off_t
|
||||
# endif
|
||||
|
||||
@@ -97,14 +97,14 @@ void CreateWorldScreen::buttonClicked(Button *button)
|
||||
if (done) return;
|
||||
done = true;
|
||||
|
||||
__int64 seedValue = (new Random())->nextLong();
|
||||
int64_t seedValue = (new Random())->nextLong();
|
||||
wstring seedString = seedEdit->getValue();
|
||||
|
||||
if (seedString.length() != 0)
|
||||
{
|
||||
// try to convert it to a long first
|
||||
// try { // 4J - removed try/catch
|
||||
__int64 value = _fromString<__int64>(seedString);
|
||||
int64_t value = _fromString<int64_t>(seedString);
|
||||
if (value != 0)
|
||||
{
|
||||
seedValue = value;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
class DemoLevel : public Level
|
||||
{
|
||||
private:
|
||||
static const __int64 DEMO_LEVEL_SEED = 0; // 4J - TODO - was "Don't Look Back".hashCode();
|
||||
static const int64_t DEMO_LEVEL_SEED = 0; // 4J - TODO - was "Don't Look Back".hashCode();
|
||||
static const int DEMO_SPAWN_X = 796;
|
||||
static const int DEMO_SPAWN_Y = 72;
|
||||
static const int DEMO_SPAWN_Z = -731;
|
||||
|
||||
@@ -13,8 +13,8 @@ void DemoMode::tick()
|
||||
SurvivalMode::tick();
|
||||
|
||||
/* 4J - TODO - seems unlikely we need this demo mode anyway
|
||||
__int64 time = minecraft->level->getTime();
|
||||
__int64 day = (time / Level::TICKS_PER_DAY) + 1;
|
||||
int64_t time = minecraft->level->getTime();
|
||||
int64_t day = (time / Level::TICKS_PER_DAY) + 1;
|
||||
|
||||
demoHasEnded = (time > (500 + Level::TICKS_PER_DAY * DEMO_DAYS));
|
||||
if (demoHasEnded)
|
||||
|
||||
@@ -269,7 +269,7 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart()
|
||||
StorageManager.SetSaveTitle(wWorldName.c_str());
|
||||
|
||||
bool isFlat = false;
|
||||
__int64 seedValue = 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 = 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
|
||||
|
||||
NetworkGameInitData *param = new NetworkGameInitData();
|
||||
param->seed = seedValue;
|
||||
|
||||
@@ -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
|
||||
@@ -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__)
|
||||
|
||||
|
||||
@@ -326,7 +326,7 @@ RADDEFSTART
|
||||
typedef CHAR *LPSTR, *PSTR;
|
||||
|
||||
#ifdef IS_WIN64
|
||||
typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
|
||||
typedef unsigned long long ULONG_PTR, *PULONG_PTR;
|
||||
#else
|
||||
#ifdef _Wp64
|
||||
#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
|
||||
|
||||
@@ -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
|
||||
@@ -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__)
|
||||
|
||||
|
||||
@@ -1154,7 +1154,7 @@ void DQRNetworkManager::Tick_StateMachine()
|
||||
break;
|
||||
case DNM_INT_STATE_JOINING_SENDING_UNRELIABLE:
|
||||
{
|
||||
__int64 timeNow = System::currentTimeMillis();
|
||||
int64_t timeNow = System::currentTimeMillis();
|
||||
// m_firstUnreliableSendTime of 0 indicates that we haven't tried sending an unreliable packet yet so need to send one and initialise things
|
||||
if( m_firstUnreliableSendTime == 0 )
|
||||
{
|
||||
@@ -1188,7 +1188,7 @@ void DQRNetworkManager::Tick_StateMachine()
|
||||
{
|
||||
// Timeout if we've been waiting for reserved slots for our joining players for too long. This is most likely because the host doesn't have room for all the slots we wanted, and we weren't able to determine this
|
||||
// when we went to join the game (ie someone else was joining at the same time). At this point we need to remove any local players that did already join, from both the session and the party.
|
||||
__int64 timeNow = System::currentTimeMillis();
|
||||
int64_t timeNow = System::currentTimeMillis();
|
||||
if( ( timeNow - m_startedWaitingForReservationsTime ) > JOIN_RESERVATION_WAIT_TIME )
|
||||
{
|
||||
SetState(DNM_INT_STATE_JOINING_FAILED_TIDY_UP);
|
||||
@@ -2742,7 +2742,7 @@ bool DQRNetworkManager::JoinPartyFromSearchResult(SessionSearchResult *searchRes
|
||||
if( sessionRef != nullptr )
|
||||
{
|
||||
// Allow 2 seconds before we let the player cancel
|
||||
__int64 allowCancelTime = System::currentTimeMillis() + (1000 * 2);
|
||||
int64_t allowCancelTime = System::currentTimeMillis() + (1000 * 2);
|
||||
|
||||
// Now leave the game session. We need to do this for each player in turn, writing each time. Consider that any of the joining
|
||||
// members *may* have a slot (reserved or active) depending on how far progressed the joining got.
|
||||
@@ -2814,7 +2814,7 @@ bool DQRNetworkManager::JoinPartyFromSearchResult(SessionSearchResult *searchRes
|
||||
break;
|
||||
}
|
||||
|
||||
__int64 currentTime = System::currentTimeMillis();
|
||||
int64_t currentTime = System::currentTimeMillis();
|
||||
if( currentTime > allowCancelTime)
|
||||
{
|
||||
shownCancelScreen = true;
|
||||
|
||||
@@ -339,9 +339,9 @@ private:
|
||||
static const eDQRNetworkManagerState m_INTtoEXTStateMappings[DNM_INT_STATE_COUNT];
|
||||
eDQRNetworkManagerInternalState m_state;
|
||||
eDQRNetworkManagerState m_stateExternal;
|
||||
__int64 m_lastUnreliableSendTime;
|
||||
__int64 m_firstUnreliableSendTime;
|
||||
__int64 m_startedWaitingForReservationsTime;
|
||||
int64_t m_lastUnreliableSendTime;
|
||||
int64_t m_firstUnreliableSendTime;
|
||||
int64_t m_startedWaitingForReservationsTime;
|
||||
unsigned char *m_customSessionData;
|
||||
unsigned int m_customSessionDataSize;
|
||||
int m_customDataDirtyUpdateTicks;
|
||||
@@ -491,7 +491,7 @@ public:
|
||||
void SetDisplayName(PlayerUID xuid, wstring displayName);
|
||||
|
||||
private:
|
||||
__int64 m_playersLeftPartyTime;
|
||||
int64_t m_playersLeftPartyTime;
|
||||
int m_playersLeftParty;
|
||||
|
||||
bool GetBestPartyUserIndex();
|
||||
|
||||
@@ -69,7 +69,7 @@ VOID XMLParser::FillBuffer()
|
||||
}
|
||||
|
||||
m_dwCharsConsumed += NChars;
|
||||
__int64 iProgress = m_dwCharsTotal ? (( (__int64)m_dwCharsConsumed * 1000 ) / (__int64)m_dwCharsTotal) : 0;
|
||||
int64_t iProgress = m_dwCharsTotal ? (( (int64_t)m_dwCharsConsumed * 1000 ) / (int64_t)m_dwCharsTotal) : 0;
|
||||
m_pISAXCallback->SetParseProgress( (DWORD)iProgress );
|
||||
|
||||
m_pReadBuf[ NChars ] = '\0';
|
||||
|
||||
@@ -1350,7 +1350,7 @@ void GameRenderer::DisableUpdateThread()
|
||||
#endif
|
||||
}
|
||||
|
||||
void GameRenderer::renderLevel(float a, __int64 until)
|
||||
void GameRenderer::renderLevel(float a, int64_t until)
|
||||
{
|
||||
// if (updateLightTexture) updateLightTexture(); // 4J - TODO - Java 1.0.1 has this line enabled, should check why - don't want to put it in now in case it breaks split-screen
|
||||
|
||||
@@ -1433,7 +1433,7 @@ void GameRenderer::renderLevel(float a, __int64 until)
|
||||
|
||||
if (until == 0) break;
|
||||
|
||||
__int64 diff = until - System::nanoTime();
|
||||
int64_t diff = until - System::nanoTime();
|
||||
if (diff < 0) break;
|
||||
if (diff > 1000000000) break;
|
||||
} while (true);
|
||||
|
||||
@@ -115,8 +115,8 @@ public:
|
||||
void setupCamera(float a, int eye);
|
||||
private:
|
||||
void renderItemInHand(float a, int eye);
|
||||
__int64 lastActiveTime;
|
||||
__int64 lastNsTime;
|
||||
int64_t lastActiveTime;
|
||||
int64_t lastNsTime;
|
||||
// 4J - changes brought forward from 1.8.2
|
||||
bool _updateLightTexture;
|
||||
public:
|
||||
@@ -133,7 +133,7 @@ private:
|
||||
public:
|
||||
void render(float a, bool bFirst); // 4J added bFirst
|
||||
void renderLevel(float a);
|
||||
void renderLevel(float a, __int64 until);
|
||||
void renderLevel(float a, int64_t until);
|
||||
private:
|
||||
Random *random;
|
||||
int rainSoundTime;
|
||||
|
||||
@@ -1448,7 +1448,7 @@ void Gui::displayClientMessage(int messageId, int iPad)
|
||||
}
|
||||
|
||||
// 4J Added
|
||||
void Gui::renderGraph(int dataLength, int dataPos, __int64 *dataA, float dataAScale, int dataAWarning, __int64 *dataB, float dataBScale, int dataBWarning)
|
||||
void Gui::renderGraph(int dataLength, int dataPos, int64_t *dataA, float dataAScale, int dataAWarning, int64_t *dataB, float dataBScale, int dataBWarning)
|
||||
{
|
||||
int height = minecraft->height;
|
||||
// This causes us to cover xScale*dataLength pixels in the horizontal
|
||||
@@ -1487,7 +1487,7 @@ void Gui::renderGraph(int dataLength, int dataPos, __int64 *dataA, float dataASc
|
||||
t->color(0xff000000 + cc * 256);
|
||||
}
|
||||
|
||||
__int64 aVal = dataA[i] / dataAScale;
|
||||
int64_t aVal = dataA[i] / dataAScale;
|
||||
|
||||
t->vertex((float)(xScale*i + 0.5f), (float)( height - aVal + 0.5f), (float)( 0));
|
||||
t->vertex((float)(xScale*i + 0.5f), (float)( height + 0.5f), (float)( 0));
|
||||
@@ -1504,7 +1504,7 @@ void Gui::renderGraph(int dataLength, int dataPos, __int64 *dataA, float dataASc
|
||||
t->color(0xff808080 + cc/2 * 256);
|
||||
}
|
||||
|
||||
__int64 bVal = dataB[i] / dataBScale;
|
||||
int64_t bVal = dataB[i] / dataBScale;
|
||||
|
||||
t->vertex((float)(xScale*i + (xScale - 1) + 0.5f), (float)( height - bVal + 0.5f), (float)( 0));
|
||||
t->vertex((float)(xScale*i + (xScale - 1) + 0.5f), (float)( height + 0.5f), (float)( 0));
|
||||
@@ -1515,7 +1515,7 @@ void Gui::renderGraph(int dataLength, int dataPos, __int64 *dataA, float dataASc
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
void Gui::renderStackedGraph(int dataPos, int dataLength, int dataSources, __int64 (*func)(unsigned int dataPos, unsigned int dataSource) )
|
||||
void Gui::renderStackedGraph(int dataPos, int dataLength, int dataSources, int64_t (*func)(unsigned int dataPos, unsigned int dataSource) )
|
||||
{
|
||||
int height = minecraft->height;
|
||||
|
||||
@@ -1532,8 +1532,8 @@ void Gui::renderStackedGraph(int dataPos, int dataLength, int dataSources, __int
|
||||
Tesselator *t = Tesselator::getInstance();
|
||||
|
||||
t->begin(GL_LINES);
|
||||
__int64 thisVal = 0;
|
||||
__int64 topVal = 0;
|
||||
int64_t thisVal = 0;
|
||||
int64_t topVal = 0;
|
||||
for (int i = 0; i < dataLength; i++)
|
||||
{
|
||||
thisVal = 0;
|
||||
|
||||
@@ -67,6 +67,6 @@ public:
|
||||
float getJukeboxOpacity(int iPad);
|
||||
|
||||
// 4J Added
|
||||
void renderGraph(int dataLength, int dataPos, __int64 *dataA, float dataAScale, int dataAWarning, __int64 *dataB, float dataBScale, int dataBWarning);
|
||||
void renderStackedGraph(int dataPos, int dataLength, int dataSources, __int64 (*func)(unsigned int dataPos, unsigned int dataSource) );
|
||||
void renderGraph(int dataLength, int dataPos, int64_t *dataA, float dataAScale, int dataAWarning, int64_t *dataB, float dataBScale, int dataBWarning);
|
||||
void renderStackedGraph(int dataPos, int dataLength, int dataSources, int64_t (*func)(unsigned int dataPos, unsigned int dataSource) );
|
||||
};
|
||||
|
||||
@@ -2076,9 +2076,9 @@ bool LevelRenderer::updateDirtyChunks()
|
||||
if( bAtomic || (index == 0) )
|
||||
{
|
||||
//PIXBeginNamedEvent(0,"Rebuilding near chunk %d %d %d",chunk->x, chunk->y, chunk->z);
|
||||
// static __int64 totalTime = 0;
|
||||
// static __int64 countTime = 0;
|
||||
// __int64 startTime = System::currentTimeMillis();
|
||||
// static int64_t totalTime = 0;
|
||||
// static int64_t countTime = 0;
|
||||
// int64_t startTime = System::currentTimeMillis();
|
||||
|
||||
//app.DebugPrintf("Rebuilding permaChunk %d\n", index);
|
||||
|
||||
@@ -2087,7 +2087,7 @@ bool LevelRenderer::updateDirtyChunks()
|
||||
if(index !=0)
|
||||
s_rebuildCompleteEvents->Set(index-1); // MGH - this rebuild happening on the main thread instead, mark the thread it should have been running on as complete
|
||||
|
||||
// __int64 endTime = System::currentTimeMillis();
|
||||
// int64_t endTime = System::currentTimeMillis();
|
||||
// totalTime += (endTime - startTime);
|
||||
// countTime++;
|
||||
// printf("%d : %f\n", countTime, (float)totalTime / (float)countTime);
|
||||
@@ -2126,11 +2126,11 @@ bool LevelRenderer::updateDirtyChunks()
|
||||
static Chunk permaChunk;
|
||||
permaChunk.makeCopyForRebuild(chunk);
|
||||
LeaveCriticalSection(&m_csDirtyChunks);
|
||||
// static __int64 totalTime = 0;
|
||||
// static __int64 countTime = 0;
|
||||
// __int64 startTime = System::currentTimeMillis();
|
||||
// static int64_t totalTime = 0;
|
||||
// static int64_t countTime = 0;
|
||||
// int64_t startTime = System::currentTimeMillis();
|
||||
permaChunk.rebuild();
|
||||
// __int64 endTime = System::currentTimeMillis();
|
||||
// int64_t endTime = System::currentTimeMillis();
|
||||
// totalTime += (endTime - startTime);
|
||||
// countTime++;
|
||||
// printf("%d : %f\n", countTime, (float)totalTime / (float)countTime);
|
||||
|
||||
@@ -271,7 +271,7 @@ public:
|
||||
XLockFreeStack<int> dirtyChunksLockFreeStack;
|
||||
|
||||
bool dirtyChunkPresent;
|
||||
__int64 lastDirtyChunkFound;
|
||||
int64_t lastDirtyChunkFound;
|
||||
static const int FORCE_DIRTY_CHUNK_CHECK_PERIOD_MS = 125; // decreased from 250 to 125 - updated by detectiveren
|
||||
|
||||
#ifdef _LARGE_WORLDS
|
||||
|
||||
@@ -52,12 +52,12 @@ public:
|
||||
virtual ~LocalPlayer();
|
||||
|
||||
int m_iScreenSection; // assuming 4player splitscreen for now, or -1 for single player
|
||||
__uint64 ullButtonsPressed; // Stores the button presses, since the inputmanager can be ticked faster than the minecraft
|
||||
uint64_t ullButtonsPressed; // Stores the button presses, since the inputmanager can be ticked faster than the minecraft
|
||||
// player tick, and a button press and release combo can be missed in the minecraft::tick
|
||||
|
||||
__uint64 ullDpad_last;
|
||||
__uint64 ullDpad_this;
|
||||
__uint64 ullDpad_filtered;
|
||||
uint64_t ullDpad_last;
|
||||
uint64_t ullDpad_this;
|
||||
uint64_t ullDpad_filtered;
|
||||
|
||||
// 4J-PB - moved these in from the minecraft structure, since they are per player things for splitscreen
|
||||
//int ticks;
|
||||
|
||||
@@ -23,7 +23,7 @@ void MinecartRenderer::render(shared_ptr<Entity> _cart, double x, double y, doub
|
||||
|
||||
bindTexture(cart);
|
||||
|
||||
__int64 seed = cart->entityId * 493286711l;
|
||||
int64_t seed = cart->entityId * 493286711l;
|
||||
seed = seed * seed * 4392167121l + seed * 98761;
|
||||
|
||||
float xo = ((((seed >> 16) & 0x7) + 0.5f) / 8.0f - 0.5f) * 0.004f;
|
||||
|
||||
@@ -85,10 +85,10 @@
|
||||
#define DISABLE_LEVELTICK_THREAD
|
||||
|
||||
Minecraft *Minecraft::m_instance = NULL;
|
||||
__int64 Minecraft::frameTimes[512];
|
||||
__int64 Minecraft::tickTimes[512];
|
||||
int64_t Minecraft::frameTimes[512];
|
||||
int64_t Minecraft::tickTimes[512];
|
||||
int Minecraft::frameTimePos = 0;
|
||||
__int64 Minecraft::warezTime = 0;
|
||||
int64_t Minecraft::warezTime = 0;
|
||||
File Minecraft::workDir = File(L"");
|
||||
|
||||
#ifdef __PSVITA__
|
||||
@@ -635,7 +635,7 @@ void Minecraft::run()
|
||||
return;
|
||||
}
|
||||
|
||||
__int64 lastTime = System::currentTimeMillis();
|
||||
int64_t lastTime = System::currentTimeMillis();
|
||||
int frames = 0;
|
||||
|
||||
while (running)
|
||||
@@ -660,7 +660,7 @@ void Minecraft::run()
|
||||
timer->advanceTime();
|
||||
}
|
||||
|
||||
__int64 beforeTickTime = System::nanoTime();
|
||||
int64_t beforeTickTime = System::nanoTime();
|
||||
for (int i = 0; i < timer->ticks; i++)
|
||||
{
|
||||
ticks++;
|
||||
@@ -672,7 +672,7 @@ void Minecraft::run()
|
||||
// setScreen(new LevelConflictScreen());
|
||||
// }
|
||||
}
|
||||
__int64 tickDuraction = System::nanoTime() - beforeTickTime;
|
||||
int64_t tickDuraction = System::nanoTime() - beforeTickTime;
|
||||
checkGlError(L"Pre render");
|
||||
|
||||
TileRenderer::fancy = options->fancyGraphics;
|
||||
@@ -1240,7 +1240,7 @@ void Minecraft::applyFrameMouseLook()
|
||||
|
||||
void Minecraft::run_middle()
|
||||
{
|
||||
static __int64 lastTime = 0;
|
||||
static int64_t lastTime = 0;
|
||||
static bool bFirstTimeIntoGame = true;
|
||||
static bool bAutosaveTimerSet=false;
|
||||
static unsigned int uiAutosaveTimer=0;
|
||||
@@ -1804,7 +1804,7 @@ void Minecraft::run_middle()
|
||||
timer->advanceTime();
|
||||
}
|
||||
|
||||
//__int64 beforeTickTime = System::nanoTime();
|
||||
//int64_t beforeTickTime = System::nanoTime();
|
||||
for (int i = 0; i < timer->ticks; i++)
|
||||
{
|
||||
bool bLastTimerTick = ( i == ( timer->ticks - 1 ) );
|
||||
@@ -1890,7 +1890,7 @@ void Minecraft::run_middle()
|
||||
// CompressedTileStorage::tick(); // 4J added
|
||||
// SparseDataStorage::tick(); // 4J added
|
||||
}
|
||||
//__int64 tickDuraction = System::nanoTime() - beforeTickTime;
|
||||
//int64_t tickDuraction = System::nanoTime() - beforeTickTime;
|
||||
MemSect(31);
|
||||
checkGlError(L"Pre render");
|
||||
MemSect(0);
|
||||
@@ -2095,14 +2095,14 @@ void Minecraft::emergencySave()
|
||||
setLevel(NULL);
|
||||
}
|
||||
|
||||
void Minecraft::renderFpsMeter(__int64 tickTime)
|
||||
void Minecraft::renderFpsMeter(int64_t tickTime)
|
||||
{
|
||||
int nsPer60Fps = 1000000000l / 60;
|
||||
if (lastTimer == -1)
|
||||
{
|
||||
lastTimer = System::nanoTime();
|
||||
}
|
||||
__int64 now = System::nanoTime();
|
||||
int64_t now = System::nanoTime();
|
||||
Minecraft::tickTimes[(Minecraft::frameTimePos) & (Minecraft::frameTimes_length - 1)] = tickTime;
|
||||
Minecraft::frameTimes[(Minecraft::frameTimePos++) & (Minecraft::frameTimes_length - 1)] = now - lastTimer;
|
||||
lastTimer = now;
|
||||
@@ -2134,7 +2134,7 @@ void Minecraft::renderFpsMeter(__int64 tickTime)
|
||||
t->vertex((float)(Minecraft::frameTimes_length), (float)( height - hh1 * 2), (float)( 0));
|
||||
|
||||
t->end();
|
||||
__int64 totalTime = 0;
|
||||
int64_t totalTime = 0;
|
||||
for (int i = 0; i < Minecraft::frameTimes_length; i++)
|
||||
{
|
||||
totalTime += Minecraft::frameTimes[i];
|
||||
@@ -2164,8 +2164,8 @@ void Minecraft::renderFpsMeter(__int64 tickTime)
|
||||
t->color(0xff000000 + cc * 256);
|
||||
}
|
||||
|
||||
__int64 time = Minecraft::frameTimes[i] / 200000;
|
||||
__int64 time2 = Minecraft::tickTimes[i] / 200000;
|
||||
int64_t time = Minecraft::frameTimes[i] / 200000;
|
||||
int64_t time2 = Minecraft::tickTimes[i] / 200000;
|
||||
|
||||
t->vertex((float)(i + 0.5f), (float)( height - time + 0.5f), (float)( 0));
|
||||
t->vertex((float)(i + 0.5f), (float)( height + 0.5f), (float)( 0));
|
||||
@@ -3759,7 +3759,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
|
||||
player->drop();
|
||||
}
|
||||
|
||||
__uint64 ullButtonsPressed=player->ullButtonsPressed;
|
||||
uint64_t ullButtonsPressed=player->ullButtonsPressed;
|
||||
|
||||
bool selected = false;
|
||||
#ifdef __PSVITA__
|
||||
@@ -4815,7 +4815,7 @@ void Minecraft::delayTextureReload()
|
||||
reloadTextures = true;
|
||||
}
|
||||
|
||||
__int64 Minecraft::currentTimeMillis()
|
||||
int64_t Minecraft::currentTimeMillis()
|
||||
{
|
||||
return System::currentTimeMillis();//(Sys.getTime() * 1000) / Sys.getTimerResolution();
|
||||
}
|
||||
|
||||
@@ -170,11 +170,11 @@ private:
|
||||
LevelStorageSource *levelSource;
|
||||
public:
|
||||
static const int frameTimes_length = 512;
|
||||
static __int64 frameTimes[frameTimes_length];
|
||||
static int64_t frameTimes[frameTimes_length];
|
||||
static const int tickTimes_length = 512;
|
||||
static __int64 tickTimes[tickTimes_length];
|
||||
static int64_t tickTimes[tickTimes_length];
|
||||
static int frameTimePos;
|
||||
static __int64 warezTime;
|
||||
static int64_t warezTime;
|
||||
private:
|
||||
int rightClickDelay;
|
||||
public:
|
||||
@@ -230,9 +230,9 @@ private:
|
||||
// String grabHugeScreenshot(File workDir2, int width, int height, int ssWidth, int ssHeight); // 4J - removed
|
||||
|
||||
// 4J - per player thing?
|
||||
__int64 lastTimer;
|
||||
int64_t lastTimer;
|
||||
|
||||
void renderFpsMeter(__int64 tickTime);
|
||||
void renderFpsMeter(int64_t tickTime);
|
||||
public:
|
||||
void stop();
|
||||
// 4J removed
|
||||
@@ -253,7 +253,7 @@ public:
|
||||
//bool isRaining ;
|
||||
|
||||
// 4J - Moved to per player
|
||||
//__int64 lastTickTime;
|
||||
//int64_t lastTickTime;
|
||||
|
||||
private:
|
||||
// 4J- per player?
|
||||
@@ -300,7 +300,7 @@ public:
|
||||
|
||||
static int maxSupportedTextureSize();
|
||||
void delayTextureReload();
|
||||
static __int64 currentTimeMillis();
|
||||
static int64_t currentTimeMillis();
|
||||
|
||||
#ifdef _DURANGO
|
||||
static void inGameSignInCheckAllPrivilegesCallback(LPVOID lpParam, bool hasPrivileges, int iPad);
|
||||
|
||||
@@ -68,15 +68,15 @@
|
||||
//4J Added
|
||||
MinecraftServer *MinecraftServer::server = NULL;
|
||||
bool MinecraftServer::setTimeAtEndOfTick = false;
|
||||
__int64 MinecraftServer::setTime = 0;
|
||||
int64_t MinecraftServer::setTime = 0;
|
||||
bool MinecraftServer::setTimeOfDayAtEndOfTick = false;
|
||||
__int64 MinecraftServer::setTimeOfDay = 0;
|
||||
int64_t MinecraftServer::setTimeOfDay = 0;
|
||||
bool MinecraftServer::m_bPrimaryPlayerSignedOut=false;
|
||||
bool MinecraftServer::s_bServerHalted=false;
|
||||
bool MinecraftServer::s_bSaveOnExitAnswered=false;
|
||||
#ifdef _ACK_CHUNK_SEND_THROTTLING
|
||||
bool MinecraftServer::s_hasSentEnoughPackets = false;
|
||||
__int64 MinecraftServer::s_tickStartTime = 0;
|
||||
int64_t MinecraftServer::s_tickStartTime = 0;
|
||||
vector<INetworkPlayer *> MinecraftServer::s_sentTo;
|
||||
#else
|
||||
int MinecraftServer::s_slowQueuePlayerIndex = 0;
|
||||
@@ -581,7 +581,7 @@ MinecraftServer::~MinecraftServer()
|
||||
DeleteCriticalSection(&m_consoleInputCS);
|
||||
}
|
||||
|
||||
bool MinecraftServer::initServer(__int64 seed, NetworkGameInitData *initData, DWORD initSettings, bool findSeed)
|
||||
bool MinecraftServer::initServer(int64_t seed, NetworkGameInitData *initData, DWORD initSettings, bool findSeed)
|
||||
{
|
||||
// 4J - removed
|
||||
#if 0
|
||||
@@ -692,7 +692,7 @@ bool MinecraftServer::initServer(__int64 seed, NetworkGameInitData *initData, DW
|
||||
// TODO: Stop loading, add error message.
|
||||
}
|
||||
|
||||
__int64 levelNanoTime = System::nanoTime();
|
||||
int64_t levelNanoTime = System::nanoTime();
|
||||
|
||||
wstring levelName = (initData && !initData->levelName.empty()) ? initData->levelName : GetDedicatedServerString(settings, L"level-name", L"world");
|
||||
wstring levelTypeString;
|
||||
@@ -736,10 +736,10 @@ bool MinecraftServer::initServer(__int64 seed, NetworkGameInitData *initData, DW
|
||||
|
||||
#if 0
|
||||
wstring levelSeedString = settings->getString(L"level-seed", L"");
|
||||
__int64 levelSeed = (new Random())->nextLong();
|
||||
int64_t levelSeed = (new Random())->nextLong();
|
||||
if (levelSeedString.length() > 0)
|
||||
{
|
||||
long newSeed = _fromString<__int64>(levelSeedString);
|
||||
long newSeed = _fromString<int64_t>(levelSeedString);
|
||||
if (newSeed != 0) {
|
||||
levelSeed = newSeed;
|
||||
}
|
||||
@@ -866,7 +866,7 @@ void MinecraftServer::postProcessTerminate(ProgressRenderer *mcprogress)
|
||||
DeleteCriticalSection(&m_postProcessCS);
|
||||
}
|
||||
|
||||
bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring& name, __int64 levelSeed, LevelType *pLevelType, NetworkGameInitData *initData)
|
||||
bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring& name, int64_t levelSeed, LevelType *pLevelType, NetworkGameInitData *initData)
|
||||
{
|
||||
// 4J - TODO - do with new save stuff
|
||||
// if (storageSource->requiresConversion(name))
|
||||
@@ -1016,7 +1016,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring
|
||||
m_postUpdateThread->SetPriority(THREAD_PRIORITY_ABOVE_NORMAL);
|
||||
m_postUpdateThread->Run();
|
||||
|
||||
__int64 startTime = System::currentTimeMillis();
|
||||
int64_t startTime = System::currentTimeMillis();
|
||||
|
||||
// 4J Stu - Added this to temporarily make starting games on vita faster
|
||||
#ifdef __PSVITA__
|
||||
@@ -1046,7 +1046,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring
|
||||
csf->closeHandle(fe);
|
||||
}
|
||||
|
||||
__int64 lastTime = System::currentTimeMillis();
|
||||
int64_t lastTime = System::currentTimeMillis();
|
||||
#ifdef _LARGE_WORLDS
|
||||
if(app.GetGameNewWorldSize() > levels[0]->getLevelData()->getXZSizeOld())
|
||||
{
|
||||
@@ -1074,7 +1074,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring
|
||||
}
|
||||
|
||||
#if 0
|
||||
__int64 lastStorageTickTime = System::currentTimeMillis();
|
||||
int64_t lastStorageTickTime = System::currentTimeMillis();
|
||||
|
||||
// Test code to enable full creation of levels at start up
|
||||
int halfsidelen = ( i == 0 ) ? 27 : 9;
|
||||
@@ -1097,7 +1097,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring
|
||||
}
|
||||
}
|
||||
#else
|
||||
__int64 lastStorageTickTime = System::currentTimeMillis();
|
||||
int64_t lastStorageTickTime = System::currentTimeMillis();
|
||||
Pos *spawnPos = level->getSharedSpawnPos();
|
||||
|
||||
int twoRPlusOne = r*2 + 1;
|
||||
@@ -1114,7 +1114,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring
|
||||
return false;
|
||||
}
|
||||
// printf(">>>%d %d %d\n",i,x,z);
|
||||
// __int64 now = System::currentTimeMillis();
|
||||
// int64_t now = System::currentTimeMillis();
|
||||
// if (now < lastTime) lastTime = now;
|
||||
// if (now > lastTime + 1000)
|
||||
{
|
||||
@@ -1679,7 +1679,7 @@ bool MinecraftServer::getForceGameType()
|
||||
return forceGameType;
|
||||
}
|
||||
|
||||
__int64 MinecraftServer::getCurrentTimeMillis()
|
||||
int64_t MinecraftServer::getCurrentTimeMillis()
|
||||
{
|
||||
return System::currentTimeMillis();
|
||||
}
|
||||
@@ -1695,7 +1695,7 @@ void MinecraftServer::setPlayerIdleTimeout(int playerIdleTimeout)
|
||||
}
|
||||
|
||||
extern int c0a, c0b, c1a, c1b, c1c, c2a, c2b;
|
||||
void MinecraftServer::run(__int64 seed, void *lpParameter)
|
||||
void MinecraftServer::run(int64_t seed, void *lpParameter)
|
||||
{
|
||||
NetworkGameInitData *initData = NULL;
|
||||
DWORD initSettings = 0;
|
||||
@@ -1728,18 +1728,18 @@ void MinecraftServer::run(__int64 seed, void *lpParameter)
|
||||
}
|
||||
}
|
||||
|
||||
__int64 lastTime = getCurrentTimeMillis();
|
||||
__int64 unprocessedTime = 0;
|
||||
int64_t lastTime = getCurrentTimeMillis();
|
||||
int64_t unprocessedTime = 0;
|
||||
while (running && !s_bServerHalted)
|
||||
{
|
||||
__int64 now = getCurrentTimeMillis();
|
||||
int64_t now = getCurrentTimeMillis();
|
||||
|
||||
// 4J Stu - When we pause the server, we don't want to count that as time passed
|
||||
// 4J Stu - TU-1 hotifx - Remove this line. We want to make sure that we tick connections at the proper rate when paused
|
||||
//Fix for #13191 - The host of a game can get a message informing them that the connection to the server has been lost
|
||||
//if(m_isServerPaused) lastTime = now;
|
||||
|
||||
__int64 passedTime = now - lastTime;
|
||||
int64_t passedTime = now - lastTime;
|
||||
if (passedTime > MS_PER_TICK * 40)
|
||||
{
|
||||
// logger.warning("Can't keep up! Did the system time change, or is the server overloaded?");
|
||||
@@ -1765,19 +1765,19 @@ void MinecraftServer::run(__int64 seed, void *lpParameter)
|
||||
else
|
||||
{
|
||||
// int tickcount = 0;
|
||||
// __int64 beforeall = System::currentTimeMillis();
|
||||
// int64_t beforeall = System::currentTimeMillis();
|
||||
while (unprocessedTime > MS_PER_TICK)
|
||||
{
|
||||
unprocessedTime -= MS_PER_TICK;
|
||||
chunkPacketManagement_PreTick();
|
||||
// __int64 before = System::currentTimeMillis();
|
||||
// int64_t before = System::currentTimeMillis();
|
||||
tick();
|
||||
// __int64 after = System::currentTimeMillis();
|
||||
// int64_t after = System::currentTimeMillis();
|
||||
// PIXReportCounter(L"Server time",(float)(after-before));
|
||||
|
||||
chunkPacketManagement_PostTick();
|
||||
}
|
||||
// __int64 afterall = System::currentTimeMillis();
|
||||
// int64_t afterall = System::currentTimeMillis();
|
||||
// PIXReportCounter(L"Server time all",(float)(afterall-beforeall));
|
||||
// PIXReportCounter(L"Server ticks",(float)tickcount);
|
||||
}
|
||||
@@ -2119,15 +2119,15 @@ void MinecraftServer::tick()
|
||||
players->broadcastAll( shared_ptr<SetTimePacket>( new SetTimePacket(level->getGameTime(), level->getDayTime(), level->getGameRules()->getBoolean(GameRules::RULE_DAYLIGHT) ) ), level->dimension->id);
|
||||
}
|
||||
// #ifndef __PS3__
|
||||
static __int64 stc = 0;
|
||||
__int64 st0 = System::currentTimeMillis();
|
||||
static int64_t stc = 0;
|
||||
int64_t st0 = System::currentTimeMillis();
|
||||
PIXBeginNamedEvent(0,"Level tick %d",i);
|
||||
((Level *)level)->tick();
|
||||
__int64 st1 = System::currentTimeMillis();
|
||||
int64_t st1 = System::currentTimeMillis();
|
||||
PIXEndNamedEvent();
|
||||
PIXBeginNamedEvent(0,"Update lights %d",i);
|
||||
|
||||
__int64 st2 = System::currentTimeMillis();
|
||||
int64_t st2 = System::currentTimeMillis();
|
||||
PIXEndNamedEvent();
|
||||
PIXBeginNamedEvent(0,"Entity tick %d",i);
|
||||
// 4J added to stop ticking entities in levels when players are not in those levels.
|
||||
@@ -2155,7 +2155,7 @@ void MinecraftServer::tick()
|
||||
level->getTracker()->tick();
|
||||
PIXEndNamedEvent();
|
||||
|
||||
__int64 st3 = System::currentTimeMillis();
|
||||
int64_t st3 = System::currentTimeMillis();
|
||||
// printf(">>>>>>>>>>>>>>>>>>>>>> Tick %d %d %d : %d\n", st1 - st0, st2 - st1, st3 - st2, st0 - stc );
|
||||
stc = st0;
|
||||
// #endif// __PS3__
|
||||
@@ -2206,7 +2206,7 @@ void MinecraftServer::handleConsoleInputs()
|
||||
}
|
||||
}
|
||||
|
||||
void MinecraftServer::main(__int64 seed, void *lpParameter)
|
||||
void MinecraftServer::main(int64_t seed, void *lpParameter)
|
||||
{
|
||||
#if __PS3__
|
||||
ShutdownManager::HasStarted(ShutdownManager::eServerThread );
|
||||
@@ -2286,7 +2286,7 @@ bool MinecraftServer::chunkPacketManagement_CanSendTo(INetworkPlayer *player)
|
||||
|
||||
void MinecraftServer::chunkPacketManagement_DidSendTo(INetworkPlayer *player)
|
||||
{
|
||||
__int64 currentTime = System::currentTimeMillis();
|
||||
int64_t currentTime = System::currentTimeMillis();
|
||||
|
||||
if( ( currentTime - s_tickStartTime ) >= MAX_TICK_TIME_FOR_PACKET_SENDS )
|
||||
{
|
||||
|
||||
@@ -27,14 +27,14 @@ class CommandDispatcher;
|
||||
typedef struct _LoadSaveDataThreadParam
|
||||
{
|
||||
LPVOID data;
|
||||
__int64 fileSize;
|
||||
int64_t fileSize;
|
||||
const wstring saveName;
|
||||
_LoadSaveDataThreadParam(LPVOID data, __int64 filesize, const wstring &saveName) : data( data ), fileSize( filesize ), saveName( saveName ) {}
|
||||
_LoadSaveDataThreadParam(LPVOID data, int64_t filesize, const wstring &saveName) : data( data ), fileSize( filesize ), saveName( saveName ) {}
|
||||
} LoadSaveDataThreadParam;
|
||||
|
||||
typedef struct _NetworkGameInitData
|
||||
{
|
||||
__int64 seed;
|
||||
int64_t seed;
|
||||
LoadSaveDataThreadParam *saveData;
|
||||
DWORD settings;
|
||||
LevelGenerationOptions *levelGen;
|
||||
@@ -133,9 +133,9 @@ public:
|
||||
~MinecraftServer();
|
||||
private:
|
||||
// 4J Added - LoadSaveDataThreadParam
|
||||
bool initServer(__int64 seed, NetworkGameInitData *initData, DWORD initSettings, bool findSeed);
|
||||
bool initServer(int64_t seed, NetworkGameInitData *initData, DWORD initSettings, bool findSeed);
|
||||
void postProcessTerminate(ProgressRenderer *mcprogress);
|
||||
bool loadLevel(LevelStorageSource *storageSource, const wstring& name, __int64 levelSeed, LevelType *pLevelType, NetworkGameInitData *initData);
|
||||
bool loadLevel(LevelStorageSource *storageSource, const wstring& name, int64_t levelSeed, LevelType *pLevelType, NetworkGameInitData *initData);
|
||||
void setProgress(const wstring& status, int progress);
|
||||
void endProgress();
|
||||
void saveAllChunks();
|
||||
@@ -171,13 +171,13 @@ public:
|
||||
bool isUnderSpawnProtection(Level *level, int x, int y, int z, shared_ptr<Player> player);
|
||||
void setForceGameType(bool forceGameType);
|
||||
bool getForceGameType();
|
||||
static __int64 getCurrentTimeMillis();
|
||||
static int64_t getCurrentTimeMillis();
|
||||
int getPlayerIdleTimeout();
|
||||
void setPlayerIdleTimeout(int playerIdleTimeout);
|
||||
|
||||
public:
|
||||
void halt();
|
||||
void run(__int64 seed, void *lpParameter);
|
||||
void run(int64_t seed, void *lpParameter);
|
||||
|
||||
void broadcastStartSavingPacket();
|
||||
void broadcastStopSavingPacket();
|
||||
@@ -188,7 +188,7 @@ public:
|
||||
void handleConsoleInput(const wstring& msg, ConsoleInputSource *source);
|
||||
void handleConsoleInputs();
|
||||
// void addTickable(Tickable tickable); // 4J removed
|
||||
static void main(__int64 seed, void *lpParameter);
|
||||
static void main(int64_t seed, void *lpParameter);
|
||||
static void HaltServer(bool bPrimaryPlayerSignedOut=false);
|
||||
|
||||
File *getFile(const wstring& name);
|
||||
@@ -208,9 +208,9 @@ private:
|
||||
static MinecraftServer *server;
|
||||
|
||||
static bool setTimeOfDayAtEndOfTick;
|
||||
static __int64 setTimeOfDay;
|
||||
static int64_t setTimeOfDay;
|
||||
static bool setTimeAtEndOfTick;
|
||||
static __int64 setTime;
|
||||
static int64_t setTime;
|
||||
|
||||
static bool m_bPrimaryPlayerSignedOut; // 4J-PB added to tell the stopserver not to save the game - another player may have signed in in their place, so ProfileManager.IsSignedIn isn't enough
|
||||
static bool s_bServerHalted; // 4J Stu Added so that we can halt the server even before it's been created properly
|
||||
@@ -234,8 +234,8 @@ public:
|
||||
|
||||
public:
|
||||
static PlayerList *getPlayerList() { if( server != NULL ) return server->players; else return NULL; }
|
||||
static void SetTimeOfDay(__int64 time) { setTimeOfDayAtEndOfTick = true; setTimeOfDay = time; }
|
||||
static void SetTime(__int64 time) { setTimeAtEndOfTick = true; setTime = time; }
|
||||
static void SetTimeOfDay(int64_t time) { setTimeOfDayAtEndOfTick = true; setTimeOfDay = time; }
|
||||
static void SetTime(int64_t time) { setTimeAtEndOfTick = true; setTime = time; }
|
||||
|
||||
C4JThread::Event* m_serverPausedEvent;
|
||||
private:
|
||||
@@ -245,7 +245,7 @@ private:
|
||||
// 4J Added - A static that stores the QNet index of the player that is next allowed to send a packet in the slow queue
|
||||
#ifdef _ACK_CHUNK_SEND_THROTTLING
|
||||
static bool s_hasSentEnoughPackets;
|
||||
static __int64 s_tickStartTime;
|
||||
static int64_t s_tickStartTime;
|
||||
static vector<INetworkPlayer *> s_sentTo;
|
||||
static const int MAX_TICK_TIME_FOR_PACKET_SENDS = 35;
|
||||
#else
|
||||
|
||||
@@ -789,7 +789,7 @@ void MultiPlayerLevel::setScoreboard(Scoreboard *scoreboard)
|
||||
this->scoreboard = scoreboard;
|
||||
}
|
||||
|
||||
void MultiPlayerLevel::setDayTime(__int64 newTime)
|
||||
void MultiPlayerLevel::setDayTime(int64_t newTime)
|
||||
{
|
||||
// 4J: We send daylight cycle rule with host options so don't need this
|
||||
/*if (newTime < 0)
|
||||
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
|
||||
virtual void createFireworks(double x, double y, double z, double xd, double yd, double zd, CompoundTag *infoTag);
|
||||
virtual void setScoreboard(Scoreboard *scoreboard);
|
||||
virtual void setDayTime(__int64 newTime);
|
||||
virtual void setDayTime(int64_t newTime);
|
||||
|
||||
// 4J Stu - Added so we can have multiple local connections
|
||||
void addClientConnection(ClientConnection *c) { connections.push_back( c ); }
|
||||
|
||||
@@ -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
|
||||
@@ -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__)
|
||||
|
||||
|
||||
@@ -326,7 +326,7 @@ RADDEFSTART
|
||||
typedef CHAR *LPSTR, *PSTR;
|
||||
|
||||
#ifdef IS_WIN64
|
||||
typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
|
||||
typedef unsigned long long ULONG_PTR, *PULONG_PTR;
|
||||
#else
|
||||
#ifdef _Wp64
|
||||
#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
|
||||
|
||||
@@ -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
|
||||
@@ -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__)
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ int (* SQRNetworkManager_Orbis::s_SignInCompleteCallbackFn)(void *pParam, bool b
|
||||
void * SQRNetworkManager_Orbis::s_SignInCompleteParam = NULL;
|
||||
sce::Toolkit::NP::PresenceDetails SQRNetworkManager_Orbis::s_lastPresenceInfo;
|
||||
|
||||
__int64 SQRNetworkManager_Orbis::s_lastPresenceTime = 0;
|
||||
__int64 SQRNetworkManager_Orbis::s_resendPresenceTime = 0;
|
||||
int64_t SQRNetworkManager_Orbis::s_lastPresenceTime = 0;
|
||||
int64_t SQRNetworkManager_Orbis::s_resendPresenceTime = 0;
|
||||
|
||||
bool SQRNetworkManager_Orbis::s_presenceStatusDirty = false;
|
||||
bool SQRNetworkManager_Orbis::s_presenceDataDirty = false;
|
||||
|
||||
@@ -325,8 +325,8 @@ private:
|
||||
static sce::Toolkit::NP::PresenceDetails s_lastPresenceInfo;
|
||||
|
||||
static const int MIN_PRESENCE_RESEND_TIME = 30 * 1000; // Minimum presence send rate - doesn't seem possible to find out what this actually should be
|
||||
static __int64 s_lastPresenceTime;
|
||||
static __int64 s_resendPresenceTime;
|
||||
static int64_t s_lastPresenceTime;
|
||||
static int64_t s_resendPresenceTime;
|
||||
|
||||
static bool s_presenceStatusDirty;
|
||||
static bool s_presenceDataDirty;
|
||||
|
||||
@@ -696,7 +696,7 @@ HANDLE FindFirstFileA(LPCSTR lpFileName, LPWIN32_FIND_DATA lpFindFileData) { ORB
|
||||
BOOL FindNextFileA(HANDLE hFindFile, LPWIN32_FIND_DATAA lpFindFileData) { ORBIS_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; }
|
||||
|
||||
DWORD XGetLanguage()
|
||||
{
|
||||
|
||||
@@ -356,7 +356,7 @@ 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);
|
||||
|
||||
#define __declspec(a)
|
||||
extern "C" int _wcsicmp (const wchar_t * dst, const wchar_t * src);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
//#include "winerror.h"
|
||||
#include <cstdint>
|
||||
|
||||
typedef unsigned int DWORD;
|
||||
typedef int BOOL;
|
||||
@@ -34,8 +34,6 @@ typedef unsigned int *PUINT;
|
||||
|
||||
|
||||
typedef unsigned char byte;
|
||||
typedef long __int64;
|
||||
typedef unsigned long __uint64;
|
||||
typedef unsigned int DWORD;
|
||||
typedef int INT;
|
||||
typedef unsigned long ULONG_PTR, *PULONG_PTR;
|
||||
|
||||
@@ -400,7 +400,7 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart()
|
||||
StorageManager.SetSaveTitle(wWorldName.c_str());
|
||||
|
||||
bool isFlat = false;
|
||||
__int64 seedValue = 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 = 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
|
||||
|
||||
NetworkGameInitData *param = new NetworkGameInitData();
|
||||
param->seed = seedValue;
|
||||
|
||||
@@ -106,10 +106,10 @@ void *user_malloc(size_t size)
|
||||
{
|
||||
#if 0
|
||||
static int throttle = 0;
|
||||
static __int64 lasttime = 0;
|
||||
static int64_t lasttime = 0;
|
||||
if( ( throttle % 100 ) == 0 )
|
||||
{
|
||||
__int64 nowtime = System::currentTimeMillis();
|
||||
int64_t nowtime = System::currentTimeMillis();
|
||||
if( ( nowtime - lasttime ) > 20000 )
|
||||
{
|
||||
lasttime = nowtime;
|
||||
|
||||
@@ -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
|
||||
@@ -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__)
|
||||
|
||||
|
||||
@@ -326,7 +326,7 @@ RADDEFSTART
|
||||
typedef CHAR *LPSTR, *PSTR;
|
||||
|
||||
#ifdef IS_WIN64
|
||||
typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
|
||||
typedef unsigned long long ULONG_PTR, *PULONG_PTR;
|
||||
#else
|
||||
#ifdef _Wp64
|
||||
#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
|
||||
|
||||
@@ -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
|
||||
@@ -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__)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -364,7 +364,7 @@ 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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
@@ -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__)
|
||||
|
||||
|
||||
@@ -326,7 +326,7 @@ RADDEFSTART
|
||||
typedef CHAR *LPSTR, *PSTR;
|
||||
|
||||
#ifdef IS_WIN64
|
||||
typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
|
||||
typedef unsigned long long ULONG_PTR, *PULONG_PTR;
|
||||
#else
|
||||
#ifdef _Wp64
|
||||
#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
|
||||
|
||||
@@ -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
|
||||
@@ -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__)
|
||||
|
||||
|
||||
@@ -403,7 +403,7 @@ 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(long long _Val, char * _DstBuf, size_t _Size, int _Radix);
|
||||
|
||||
#define __declspec(a)
|
||||
extern "C" int _wcsicmp (const wchar_t * dst, const wchar_t * src);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
//#include "winerror.h"
|
||||
#include <cstdint>
|
||||
|
||||
typedef unsigned int DWORD;
|
||||
typedef int BOOL;
|
||||
@@ -34,14 +34,12 @@ typedef unsigned int *PUINT;
|
||||
|
||||
|
||||
typedef unsigned char byte;
|
||||
typedef long long __int64;
|
||||
typedef unsigned long long __uint64;
|
||||
typedef unsigned int 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;
|
||||
|
||||
@@ -933,7 +933,7 @@ BOOL FindNextFileA(HANDLE hFindFile, LPWIN32_FIND_DATAA lpFindFileData)
|
||||
}
|
||||
|
||||
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(long long _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)
|
||||
{
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
#if ! LIBDIVIDE_HAS_STDINT_TYPES
|
||||
typedef __int32 int32_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
typedef long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
typedef __int8 int8_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
#endif
|
||||
|
||||
@@ -485,7 +485,7 @@ typedef uLong FAR uLongf;
|
||||
# define z_off64_t off64_t
|
||||
#else
|
||||
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
|
||||
# define z_off64_t __int64
|
||||
# define z_off64_t long long
|
||||
# else
|
||||
# define z_off64_t z_off_t
|
||||
# endif
|
||||
|
||||
@@ -318,7 +318,7 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart()
|
||||
wstring wWorldName = L"TestWorld";
|
||||
|
||||
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_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
|
||||
|
||||
NetworkGameInitData *param = new NetworkGameInitData();
|
||||
param->seed = seedValue;
|
||||
|
||||
@@ -102,7 +102,7 @@ void PlayerChunkMap::PlayerChunk::remove(shared_ptr<ServerPlayer> player)
|
||||
auto it = find(parent->knownChunks.begin(), parent->knownChunks.end(), this);
|
||||
if(it != parent->knownChunks.end()) parent->knownChunks.erase(it);
|
||||
}
|
||||
__int64 id = (pos.x + 0x7fffffffLL) | ((pos.z + 0x7fffffffLL) << 32);
|
||||
int64_t id = (pos.x + 0x7fffffffLL) | ((pos.z + 0x7fffffffLL) << 32);
|
||||
auto it = parent->chunks.find(id);
|
||||
if( it != parent->chunks.end() )
|
||||
{
|
||||
@@ -421,7 +421,7 @@ ServerLevel *PlayerChunkMap::getLevel()
|
||||
|
||||
void PlayerChunkMap::tick()
|
||||
{
|
||||
__int64 time = level->getGameTime();
|
||||
int64_t time = level->getGameTime();
|
||||
|
||||
if (time - lastInhabitedUpdate > Level::TICKS_PER_DAY / 3)
|
||||
{
|
||||
@@ -474,13 +474,13 @@ void PlayerChunkMap::tick()
|
||||
|
||||
bool PlayerChunkMap::hasChunk(int x, int z)
|
||||
{
|
||||
__int64 id = (x + 0x7fffffffLL) | ((z + 0x7fffffffLL) << 32);
|
||||
int64_t id = (x + 0x7fffffffLL) | ((z + 0x7fffffffLL) << 32);
|
||||
return chunks.find(id) != chunks.end();
|
||||
}
|
||||
|
||||
PlayerChunkMap::PlayerChunk *PlayerChunkMap::getChunk(int x, int z, bool create)
|
||||
{
|
||||
__int64 id = (x + 0x7fffffffLL) | ((z + 0x7fffffffLL) << 32);
|
||||
int64_t id = (x + 0x7fffffffLL) | ((z + 0x7fffffffLL) << 32);
|
||||
auto it = chunks.find(id);
|
||||
|
||||
PlayerChunk *chunk = nullptr;
|
||||
@@ -502,7 +502,7 @@ PlayerChunkMap::PlayerChunk *PlayerChunkMap::getChunk(int x, int z, bool create)
|
||||
// queue a request for it to be created.
|
||||
void PlayerChunkMap::getChunkAndAddPlayer(int x, int z, shared_ptr<ServerPlayer> player)
|
||||
{
|
||||
__int64 id = (x + 0x7fffffffLL) | ((z + 0x7fffffffLL) << 32);
|
||||
int64_t id = (x + 0x7fffffffLL) | ((z + 0x7fffffffLL) << 32);
|
||||
auto it = chunks.find(id);
|
||||
|
||||
if( it != chunks.end() )
|
||||
@@ -529,7 +529,7 @@ void PlayerChunkMap::getChunkAndRemovePlayer(int x, int z, shared_ptr<ServerPlay
|
||||
return;
|
||||
}
|
||||
}
|
||||
__int64 id = (x + 0x7fffffffLL) | ((z + 0x7fffffffLL) << 32);
|
||||
int64_t id = (x + 0x7fffffffLL) | ((z + 0x7fffffffLL) << 32);
|
||||
auto it = chunks.find(id);
|
||||
|
||||
if( it != chunks.end() )
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
int zChangeMin, zChangeMax;
|
||||
int ticksToNextRegionUpdate; // 4J added
|
||||
bool prioritised; // 4J added
|
||||
__int64 firstInhabitedTime;
|
||||
int64_t firstInhabitedTime;
|
||||
|
||||
public:
|
||||
PlayerChunk(int x, int z, PlayerChunkMap *pcm);
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
vector<shared_ptr<ServerPlayer> > players;
|
||||
void flagEntitiesToBeRemoved(unsigned int *flags, bool *removedFound); // 4J added
|
||||
private:
|
||||
unordered_map<__int64,PlayerChunk *,LongKeyHash,LongKeyEq> chunks; // 4J - was LongHashMap
|
||||
unordered_map<int64_t,PlayerChunk *,LongKeyHash,LongKeyEq> chunks; // 4J - was LongHashMap
|
||||
vector<PlayerChunk *> changedChunks;
|
||||
vector<PlayerChunk *> knownChunks;
|
||||
vector<PlayerChunkAddRequest> addRequests; // 4J added
|
||||
@@ -82,7 +82,7 @@ private:
|
||||
ServerLevel *level;
|
||||
int radius;
|
||||
int dimension;
|
||||
__int64 lastInhabitedUpdate;
|
||||
int64_t lastInhabitedUpdate;
|
||||
|
||||
public:
|
||||
PlayerChunkMap(ServerLevel *level, int dimension, int radius);
|
||||
|
||||
@@ -30,9 +30,9 @@ private:
|
||||
|
||||
bool didTick;
|
||||
int lastKeepAliveId;
|
||||
__int64 lastKeepAliveTime;
|
||||
int64_t lastKeepAliveTime;
|
||||
static Random random;
|
||||
__int64 lastKeepAliveTick;
|
||||
int64_t lastKeepAliveTick;
|
||||
int chatSpamTickCount;
|
||||
int dropSpamTickCount;
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ void ProgressRenderer::progressStagePercentage(int i)
|
||||
}
|
||||
|
||||
|
||||
__int64 now = System::currentTimeMillis();
|
||||
int64_t now = System::currentTimeMillis();
|
||||
if (now - lastTime < 20) return;
|
||||
lastTime = now;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ private:
|
||||
int status;
|
||||
Minecraft *minecraft;
|
||||
int title;
|
||||
__int64 lastTime;
|
||||
int64_t lastTime;
|
||||
bool noAbort;
|
||||
wstring m_wstrText;
|
||||
eProgressStringType m_eType;
|
||||
|
||||
@@ -28,7 +28,7 @@ private:
|
||||
float yo;
|
||||
|
||||
int lastSelection;
|
||||
__int64 lastSelectionTime ;
|
||||
int64_t lastSelectionTime ;
|
||||
|
||||
bool renderSelection;
|
||||
bool _renderHeader;
|
||||
|
||||
@@ -294,7 +294,7 @@ void SelectWorldScreen::WorldSelectionList::renderItem(int i, int x, int y, int
|
||||
swprintf(buffer,20,L"%d/%d/%d %d:%02d",time.wDay, time.wMonth, time.wYear, time.wHour, time.wMinute); // 4J - TODO Localise this
|
||||
id = id + L" (" + buffer;
|
||||
|
||||
__int64 size = levelSummary->getSizeOnDisk();
|
||||
int64_t size = levelSummary->getSizeOnDisk();
|
||||
id = id + L", " + std::to_wstring(static_cast<float>(size / 1024 * 100 / 1024 / 100.0f)) + L" MB)";
|
||||
wstring info;
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ void ServerLevel::tick()
|
||||
if (getGameRules()->getBoolean(GameRules::RULE_DAYLIGHT))
|
||||
{
|
||||
// skip time until new day
|
||||
__int64 newTime = levelData->getDayTime() + TICKS_PER_DAY;
|
||||
int64_t newTime = levelData->getDayTime() + TICKS_PER_DAY;
|
||||
|
||||
// 4J : WESTY : Changed so that time update goes through stats tracking update code.
|
||||
//levelData->setTime(newTime - (newTime % TICKS_PER_DAY));
|
||||
@@ -248,7 +248,7 @@ void ServerLevel::tick()
|
||||
|
||||
//4J - temporarily disabling saves as they are causing gameplay to generally stutter quite a lot
|
||||
|
||||
__int64 time = levelData->getGameTime() + 1;
|
||||
int64_t time = levelData->getGameTime() + 1;
|
||||
// 4J Stu - Putting this back in, but I have reduced the number of chunks that save when not forced
|
||||
#ifdef _LARGE_WORLDS
|
||||
if (time % (saveInterval) == (dimension->id + 1))
|
||||
@@ -1232,9 +1232,9 @@ EntityTracker *ServerLevel::getTracker()
|
||||
return tracker;
|
||||
}
|
||||
|
||||
void ServerLevel::setTimeAndAdjustTileTicks(__int64 newTime)
|
||||
void ServerLevel::setTimeAndAdjustTileTicks(int64_t newTime)
|
||||
{
|
||||
__int64 delta = newTime - levelData->getGameTime();
|
||||
int64_t delta = newTime - levelData->getGameTime();
|
||||
// 4J - can't directly adjust m_delay in a set as it has a const interator, since changing values in here might change the ordering of the elements in the set.
|
||||
// Instead move to a vector, do the adjustment, put back in the set.
|
||||
vector<TickNextTickData> temp;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user