Revert "Get rid of MSVC's __int64"

This reverts commit d63f79325f.
This commit is contained in:
void_17 2026-03-02 17:39:35 +07:00
parent 119bff3514
commit b9a2951901
308 changed files with 5368 additions and 5360 deletions

View file

@ -13,7 +13,7 @@ private:
wstring title; wstring title;
wstring desc; wstring desc;
Achievement *ach; Achievement *ach;
int64_t startTime; __int64 startTime;
ItemRenderer *ir; ItemRenderer *ir;
bool isHelper; bool isHelper;

View file

@ -5577,7 +5577,7 @@ void CMinecraftApp::GetTPD(int iConfig,PBYTE *ppbData,DWORD *pdwBytes)
// // read the local file // // read the local file
// File gtsFile( wsFile->c_str() ); // File gtsFile( wsFile->c_str() );
// //
// int64_t fileSize = gtsFile.length(); // __int64 fileSize = gtsFile.length();
// //
// if(fileSize!=0) // if(fileSize!=0)
// { // {
@ -6510,7 +6510,7 @@ HRESULT CMinecraftApp::RegisterConfigValues(WCHAR *pType, int iValue)
} }
#if (defined _XBOX || defined _WINDOWS64) #if (defined _XBOX || defined _WINDOWS64)
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 CMinecraftApp::RegisterDLCData(WCHAR *pType, WCHAR *pBannerName, int iGender, __uint64 ullOfferID_Full, __uint64 ullOfferID_Trial, WCHAR *pFirstSkin, unsigned int uiSortIndex, int iConfig, WCHAR *pDataFile)
{ {
HRESULT hr=S_OK; HRESULT hr=S_OK;
DLC_INFO *pDLCData=new DLC_INFO; DLC_INFO *pDLCData=new DLC_INFO;
@ -7763,7 +7763,7 @@ void CMinecraftApp::GetImageTextData(PBYTE pbImageData, DWORD dwImageBytes,unsig
return; return;
} }
unsigned int CMinecraftApp::CreateImageTextData(PBYTE bTextMetadata, int64_t seed, bool hasSeed, unsigned int uiHostOptions, unsigned int uiTexturePackId) unsigned int CMinecraftApp::CreateImageTextData(PBYTE bTextMetadata, __int64 seed, bool hasSeed, unsigned int uiHostOptions, unsigned int uiTexturePackId)
{ {
int iTextMetadataBytes = 0; int iTextMetadataBytes = 0;
if(hasSeed) if(hasSeed)

View file

@ -590,7 +590,7 @@ public:
DLC_INFO *GetDLCInfoForFullOfferID(WCHAR *pwchProductId); DLC_INFO *GetDLCInfoForFullOfferID(WCHAR *pwchProductId);
DLC_INFO *GetDLCInfoForProductName(WCHAR *pwchProductName); DLC_INFO *GetDLCInfoForProductName(WCHAR *pwchProductName);
#else #else
static HRESULT RegisterDLCData(WCHAR *, WCHAR *, int, uint64_t, uint64_t, WCHAR *, unsigned int, int, WCHAR *pDataFile); static HRESULT RegisterDLCData(WCHAR *, WCHAR *, int, __uint64, __uint64, WCHAR *, unsigned int, int, WCHAR *pDataFile);
bool GetDLCFullOfferIDForSkinID(const wstring &FirstSkin,ULONGLONG *pullVal); bool GetDLCFullOfferIDForSkinID(const wstring &FirstSkin,ULONGLONG *pullVal);
DLC_INFO *GetDLCInfoForTrialOfferID(ULONGLONG ullOfferID_Trial); DLC_INFO *GetDLCInfoForTrialOfferID(ULONGLONG ullOfferID_Trial);
DLC_INFO *GetDLCInfoForFullOfferID(ULONGLONG ullOfferID_Full); DLC_INFO *GetDLCInfoForFullOfferID(ULONGLONG ullOfferID_Full);
@ -701,7 +701,7 @@ public:
// World seed from png image // World seed from png image
void GetImageTextData(PBYTE pbImageData, DWORD dwImageBytes,unsigned char *pszSeed,unsigned int &uiHostOptions,bool &bHostOptionsRead,DWORD &uiTexturePack); void GetImageTextData(PBYTE pbImageData, DWORD dwImageBytes,unsigned char *pszSeed,unsigned int &uiHostOptions,bool &bHostOptionsRead,DWORD &uiTexturePack);
unsigned int CreateImageTextData(PBYTE bTextMetadata, int64_t seed, bool hasSeed, unsigned int uiHostOptions, unsigned int uiTexturePackId); unsigned int CreateImageTextData(PBYTE bTextMetadata, __int64 seed, bool hasSeed, unsigned int uiHostOptions, unsigned int uiTexturePackId);
// Game rules // Game rules
GameRuleManager m_gameRules; GameRuleManager m_gameRules;

View file

@ -19,8 +19,8 @@ private:
ConsoleSchematicFile::ESchematicRotation m_rotation; ConsoleSchematicFile::ESchematicRotation m_rotation;
int m_dimension; int m_dimension;
int64_t m_totalBlocksChanged; __int64 m_totalBlocksChanged;
int64_t m_totalBlocksChangedLighting; __int64 m_totalBlocksChangedLighting;
bool m_completed; bool m_completed;
void updateLocationBox(); void updateLocationBox();

View file

@ -184,7 +184,7 @@ void ConsoleSchematicFile::save_tags(DataOutputStream *dos)
delete tag; delete tag;
} }
int64_t ConsoleSchematicFile::applyBlocksAndData(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot) __int64 ConsoleSchematicFile::applyBlocksAndData(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot)
{ {
int xStart = max(destinationBox->x0, (double)chunk->x*16); int xStart = max(destinationBox->x0, (double)chunk->x*16);
int xEnd = min(destinationBox->x1, (double)((xStart>>4)<<4) + 16); int xEnd = min(destinationBox->x1, (double)((xStart>>4)<<4) + 16);
@ -323,7 +323,7 @@ int64_t 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 // 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. // we can do the sort of lighting that might propagate out of the chunk.
int64_t ConsoleSchematicFile::applyLighting(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot) __int64 ConsoleSchematicFile::applyLighting(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot)
{ {
int xStart = max(destinationBox->x0, (double)chunk->x*16); int xStart = max(destinationBox->x0, (double)chunk->x*16);
int xEnd = min(destinationBox->x1, (double)((xStart>>4)<<4) + 16); int xEnd = min(destinationBox->x1, (double)((xStart>>4)<<4) + 16);

View file

@ -72,8 +72,8 @@ public:
void save(DataOutputStream *dos); void save(DataOutputStream *dos);
void load(DataInputStream *dis); void load(DataInputStream *dis);
int64_t applyBlocksAndData(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot); __int64 applyBlocksAndData(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot);
int64_t applyLighting(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot); __int64 applyLighting(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot);
void applyTileEntities(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); static void generateSchematicFile(DataOutputStream *dos, Level *level, int xStart, int yStart, int zStart, int xEnd, int yEnd, int zEnd, bool bSaveMobs, Compression::ECompressionTypes);

View file

@ -14,7 +14,7 @@ public:
typedef struct _ValueType typedef struct _ValueType
{ {
union{ union{
int64_t i64; __int64 i64;
int i; int i;
char c; char c;
bool b; bool b;

View file

@ -391,7 +391,7 @@ bool GameRuleManager::readRuleFile(LevelGenerationOptions *lgo, byte *dIn, UINT
// Read File. // Read File.
// version_number // version_number
int64_t version = dis.readShort(); __int64 version = dis.readShort();
unsigned char compressionType = 0; unsigned char compressionType = 0;
if(version == 0) if(version == 0)
{ {

View file

@ -162,7 +162,7 @@ void LevelGenerationOptions::addAttribute(const wstring &attributeName, const ws
{ {
if(attributeName.compare(L"seed") == 0) if(attributeName.compare(L"seed") == 0)
{ {
m_seed = _fromString<int64_t>(attributeValue); m_seed = _fromString<__int64>(attributeValue);
app.DebugPrintf("LevelGenerationOptions: Adding parameter m_seed=%I64d\n",m_seed); app.DebugPrintf("LevelGenerationOptions: Adding parameter m_seed=%I64d\n",m_seed);
} }
else if(attributeName.compare(L"spawnX") == 0) else if(attributeName.compare(L"spawnX") == 0)
@ -505,7 +505,7 @@ void LevelGenerationOptions::deleteBaseSaveData() { if(m_pbBaseSaveData) delete
bool LevelGenerationOptions::hasLoadedData() { return m_hasLoadedData; } bool LevelGenerationOptions::hasLoadedData() { return m_hasLoadedData; }
void LevelGenerationOptions::setLoadedData() { m_hasLoadedData = true; } void LevelGenerationOptions::setLoadedData() { m_hasLoadedData = true; }
int64_t LevelGenerationOptions::getLevelSeed() { return m_seed; } __int64 LevelGenerationOptions::getLevelSeed() { return m_seed; }
Pos *LevelGenerationOptions::getSpawnPos() { return m_spawnPos; } Pos *LevelGenerationOptions::getSpawnPos() { return m_spawnPos; }
bool LevelGenerationOptions::getuseFlatWorld() { return m_useFlatWorld; } bool LevelGenerationOptions::getuseFlatWorld() { return m_useFlatWorld; }

View file

@ -146,7 +146,7 @@ public:
private: private:
// This should match the "MapOptionsRule" definition in the XML schema // This should match the "MapOptionsRule" definition in the XML schema
int64_t m_seed; __int64 m_seed;
bool m_useFlatWorld; bool m_useFlatWorld;
Pos *m_spawnPos; Pos *m_spawnPos;
vector<ApplySchematicRuleDefinition *> m_schematicRules; vector<ApplySchematicRuleDefinition *> m_schematicRules;
@ -173,7 +173,7 @@ public:
virtual GameRuleDefinition *addChild(ConsoleGameRules::EGameRuleType ruleType); virtual GameRuleDefinition *addChild(ConsoleGameRules::EGameRuleType ruleType);
virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue);
int64_t getLevelSeed(); __int64 getLevelSeed();
Pos *getSpawnPos(); Pos *getSpawnPos();
bool getuseFlatWorld(); bool getuseFlatWorld();

View file

@ -44,8 +44,8 @@
CGameNetworkManager g_NetworkManager; CGameNetworkManager g_NetworkManager;
CPlatformNetworkManager *CGameNetworkManager::s_pPlatformNetworkManager; CPlatformNetworkManager *CGameNetworkManager::s_pPlatformNetworkManager;
int64_t CGameNetworkManager::messageQueue[512]; __int64 CGameNetworkManager::messageQueue[512];
int64_t CGameNetworkManager::byteQueue[512]; __int64 CGameNetworkManager::byteQueue[512];
int CGameNetworkManager::messageQueuePos = 0; int CGameNetworkManager::messageQueuePos = 0;
CGameNetworkManager::CGameNetworkManager() CGameNetworkManager::CGameNetworkManager()
@ -188,7 +188,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame
ProfileManager.SetDeferredSignoutEnabled(true); ProfileManager.SetDeferredSignoutEnabled(true);
#endif #endif
int64_t seed = 0; __int64 seed = 0;
if(lpParameter != NULL) if(lpParameter != NULL)
{ {
NetworkGameInitData *param = (NetworkGameInitData *)lpParameter; NetworkGameInitData *param = (NetworkGameInitData *)lpParameter;
@ -209,7 +209,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame
} }
} }
static int64_t sseed = seed; // Create static version so this will be valid until next call to this function & whilst thread is running static __int64 sseed = seed; // Create static version so this will be valid until next call to this function & whilst thread is running
ServerStoppedCreate(false); ServerStoppedCreate(false);
if( g_NetworkManager.IsHost() ) if( g_NetworkManager.IsHost() )
{ {
@ -850,7 +850,7 @@ int CGameNetworkManager::RunNetworkGameThreadProc( void* lpParameter )
int CGameNetworkManager::ServerThreadProc( void* lpParameter ) int CGameNetworkManager::ServerThreadProc( void* lpParameter )
{ {
int64_t seed = 0; __int64 seed = 0;
if(lpParameter != NULL) if(lpParameter != NULL)
{ {
NetworkGameInitData *param = (NetworkGameInitData *)lpParameter; NetworkGameInitData *param = (NetworkGameInitData *)lpParameter;

View file

@ -163,9 +163,9 @@ public:
// Used for debugging output // Used for debugging output
static const int messageQueue_length = 512; static const int messageQueue_length = 512;
static int64_t messageQueue[messageQueue_length]; static __int64 messageQueue[messageQueue_length];
static const int byteQueue_length = 512; static const int byteQueue_length = 512;
static int64_t byteQueue[byteQueue_length]; static __int64 byteQueue[byteQueue_length];
static int messageQueuePos; static int messageQueuePos;
// Methods called from PlatformNetworkManager // Methods called from PlatformNetworkManager

View file

@ -161,7 +161,7 @@ ESavePlatform SonyRemoteStorage::getSavePlatform()
} }
int64_t SonyRemoteStorage::getSaveSeed() __int64 SonyRemoteStorage::getSaveSeed()
{ {
if(m_getInfoStatus != e_infoFound) if(m_getInfoStatus != e_infoFound)
return 0; return 0;
@ -171,7 +171,7 @@ int64_t SonyRemoteStorage::getSaveSeed()
ZeroMemory(seedString,17); ZeroMemory(seedString,17);
memcpy(seedString, pDescData->m_seed,16); memcpy(seedString, pDescData->m_seed,16);
uint64_t seed = 0; __uint64 seed = 0;
std::stringstream ss; std::stringstream ss;
ss << seedString; ss << seedString;
ss >> std::hex >> seed; ss >> std::hex >> seed;
@ -294,7 +294,7 @@ bool SonyRemoteStorage::saveIsAvailable()
int SonyRemoteStorage::getDataProgress() int SonyRemoteStorage::getDataProgress()
{ {
int64_t time = System::currentTimeMillis(); __int64 time = System::currentTimeMillis();
int elapsedSecs = (time - m_startTime) / 1000; int elapsedSecs = (time - m_startTime) / 1000;
int progVal = m_dataProgress + (elapsedSecs/3); int progVal = m_dataProgress + (elapsedSecs/3);
if(progVal > 95) if(progVal > 95)

View file

@ -72,7 +72,7 @@ public:
const char* getLocalFilename(); const char* getLocalFilename();
const char* getSaveNameUTF8(); const char* getSaveNameUTF8();
ESavePlatform getSavePlatform(); ESavePlatform getSavePlatform();
int64_t getSaveSeed(); __int64 getSaveSeed();
unsigned int getSaveHostOptions(); unsigned int getSaveHostOptions();
unsigned int getSaveTexturePack(); unsigned int getSaveTexturePack();
@ -111,7 +111,7 @@ protected:
unsigned int m_thumbnailDataSize; unsigned int m_thumbnailDataSize;
C4JThread* m_SetDataThread; C4JThread* m_SetDataThread;
PSAVE_INFO m_setDataSaveInfo; PSAVE_INFO m_setDataSaveInfo;
int64_t m_startTime; __int64 m_startTime;
bool m_bAborting; bool m_bAborting;
bool m_bTransferStarted; bool m_bTransferStarted;

View file

@ -1208,7 +1208,7 @@ void Tutorial::tick()
} }
else if(m_freezeTime && m_timeFrozen && m_fullTutorialComplete) else if(m_freezeTime && m_timeFrozen && m_fullTutorialComplete)
{ {
int64_t currentTime = pMinecraft->level->getTime(); __int64 currentTime = pMinecraft->level->getTime();
int currentDayTime = (currentTime % Level::TICKS_PER_DAY); int currentDayTime = (currentTime % Level::TICKS_PER_DAY);
int timeToAdd = 0; int timeToAdd = 0;
if(currentDayTime > m_iTutorialFreezeTimeValue) if(currentDayTime > m_iTutorialFreezeTimeValue)
@ -1219,7 +1219,7 @@ void Tutorial::tick()
{ {
timeToAdd = m_iTutorialFreezeTimeValue - currentDayTime; timeToAdd = m_iTutorialFreezeTimeValue - currentDayTime;
} }
int64_t targetTime = currentTime + timeToAdd; __int64 targetTime = currentTime + timeToAdd;
MinecraftServer::SetTimeOfDay(-1); MinecraftServer::SetTimeOfDay(-1);
MinecraftServer::SetTime(targetTime); MinecraftServer::SetTime(targetTime);
pMinecraft->level->setOverrideTimeOfDay(-1); pMinecraft->level->setOverrideTimeOfDay(-1);

View file

@ -47,7 +47,7 @@ void UIComponent_Panorama::tick()
EnterCriticalSection(&pMinecraft->m_setLevelCS); EnterCriticalSection(&pMinecraft->m_setLevelCS);
if(pMinecraft->level!=NULL) if(pMinecraft->level!=NULL)
{ {
int64_t i64TimeOfDay =0; __int64 i64TimeOfDay =0;
// are we in the Nether? - Leave the time as 0 if we are, so we show daylight // are we in the Nether? - Leave the time as 0 if we are, so we show daylight
if(pMinecraft->level->dimension->id==0) if(pMinecraft->level->dimension->id==0)
{ {

View file

@ -24,7 +24,7 @@ bool UIControl_SpaceIndicatorBar::setupControl(UIScene *scene, IggyValuePath *pa
return success; return success;
} }
void UIControl_SpaceIndicatorBar::init(const wstring &label, int id, int64_t min, int64_t max) void UIControl_SpaceIndicatorBar::init(const wstring &label, int id, __int64 min, __int64 max)
{ {
m_label = label; m_label = label;
m_id = id; m_id = id;
@ -61,11 +61,11 @@ void UIControl_SpaceIndicatorBar::reset()
setSaveGameOffset(0.0f); setSaveGameOffset(0.0f);
} }
void UIControl_SpaceIndicatorBar::addSave(int64_t size) void UIControl_SpaceIndicatorBar::addSave(__int64 size)
{ {
float startPercent = (float)((m_currentTotal-m_min))/(m_max-m_min); float startPercent = (float)((m_currentTotal-m_min))/(m_max-m_min);
m_sizeAndOffsets.push_back( pair<int64_t, float>(size, startPercent) ); m_sizeAndOffsets.push_back( pair<__int64, float>(size, startPercent) );
m_currentTotal += size; m_currentTotal += size;
setTotalSize(m_currentTotal); setTotalSize(m_currentTotal);
@ -75,7 +75,7 @@ void UIControl_SpaceIndicatorBar::selectSave(int index)
{ {
if(index >= 0 && index < m_sizeAndOffsets.size()) if(index >= 0 && index < m_sizeAndOffsets.size())
{ {
pair<int64_t,float> values = m_sizeAndOffsets[index]; pair<__int64,float> values = m_sizeAndOffsets[index];
setSaveSize(values.first); setSaveSize(values.first);
setSaveGameOffset(values.second); setSaveGameOffset(values.second);
} }
@ -86,7 +86,7 @@ void UIControl_SpaceIndicatorBar::selectSave(int index)
} }
} }
void UIControl_SpaceIndicatorBar::setSaveSize(int64_t size) void UIControl_SpaceIndicatorBar::setSaveSize(__int64 size)
{ {
m_currentSave = size; m_currentSave = size;
@ -99,7 +99,7 @@ void UIControl_SpaceIndicatorBar::setSaveSize(int64_t size)
IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath() , m_setSaveSizeFunc , 1 , value ); IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath() , m_setSaveSizeFunc , 1 , value );
} }
void UIControl_SpaceIndicatorBar::setTotalSize(int64_t size) void UIControl_SpaceIndicatorBar::setTotalSize(__int64 size)
{ {
float percent = (float)((m_currentTotal-m_min))/(m_max-m_min); float percent = (float)((m_currentTotal-m_min))/(m_max-m_min);

View file

@ -6,28 +6,28 @@ class UIControl_SpaceIndicatorBar : public UIControl_Base
{ {
private: private:
IggyName m_setSaveSizeFunc, m_setTotalSizeFunc, m_setSaveGameOffsetFunc; IggyName m_setSaveSizeFunc, m_setTotalSizeFunc, m_setSaveGameOffsetFunc;
int64_t m_min; __int64 m_min;
int64_t m_max; __int64 m_max;
int64_t m_currentSave, m_currentTotal; __int64 m_currentSave, m_currentTotal;
float m_currentOffset; float m_currentOffset;
vector<pair<int64_t,float> > m_sizeAndOffsets; vector<pair<__int64,float> > m_sizeAndOffsets;
public: public:
UIControl_SpaceIndicatorBar(); UIControl_SpaceIndicatorBar();
virtual bool setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName); virtual bool setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName);
void init(const wstring &label, int id, int64_t min, int64_t max); void init(const wstring &label, int id, __int64 min, __int64 max);
virtual void ReInit(); virtual void ReInit();
void reset(); void reset();
void addSave(int64_t size); void addSave(__int64 size);
void selectSave(int index); void selectSave(int index);
private: private:
void setSaveSize(int64_t size); void setSaveSize(__int64 size);
void setTotalSize(int64_t totalSize); void setTotalSize(__int64 totalSize);
void setSaveGameOffset(float offset); void setSaveGameOffset(float offset);
}; };

View file

@ -124,7 +124,7 @@ extern "C" void *__real_malloc(size_t t);
extern "C" void __real_free(void *t); extern "C" void __real_free(void *t);
#endif #endif
int64_t UIController::iggyAllocCount = 0; __int64 UIController::iggyAllocCount = 0;
static unordered_map<void *,size_t> allocations; static unordered_map<void *,size_t> allocations;
static void * RADLINK AllocateFunction ( void * alloc_callback_user_data , size_t size_requested , size_t * size_returned ) static void * RADLINK AllocateFunction ( void * alloc_callback_user_data , size_t size_requested , size_t * size_returned )
{ {
@ -402,7 +402,7 @@ void UIController::tick()
EnderDragonRenderer::bossInstance = nullptr; EnderDragonRenderer::bossInstance = nullptr;
// Clear out the cached movie file data // Clear out the cached movie file data
int64_t currentTime = System::currentTimeMillis(); __int64 currentTime = System::currentTimeMillis();
for(AUTO_VAR(it, m_cachedMovieData.begin()); it != m_cachedMovieData.end();) for(AUTO_VAR(it, m_cachedMovieData.begin()); it != m_cachedMovieData.end();)
{ {
if(it->second.m_expiry < currentTime) if(it->second.m_expiry < currentTime)
@ -522,7 +522,7 @@ IggyLibrary UIController::loadSkin(const wstring &skinPath, const wstring &skinN
IggyMemoryUseInfo memoryInfo; IggyMemoryUseInfo memoryInfo;
rrbool res; rrbool res;
int iteration = 0; int iteration = 0;
int64_t totalStatic = 0; __int64 totalStatic = 0;
while(res = IggyDebugGetMemoryUseInfo ( NULL , while(res = IggyDebugGetMemoryUseInfo ( NULL ,
lib , lib ,
"" , "" ,
@ -653,7 +653,7 @@ void UIController::CleanUpSkinReload()
byteArray UIController::getMovieData(const wstring &filename) byteArray UIController::getMovieData(const wstring &filename)
{ {
// Cache everything we load in the current tick // Cache everything we load in the current tick
int64_t targetTime = System::currentTimeMillis() + (1000LL * 60); __int64 targetTime = System::currentTimeMillis() + (1000LL * 60);
AUTO_VAR(it,m_cachedMovieData.find(filename)); AUTO_VAR(it,m_cachedMovieData.find(filename));
if(it == m_cachedMovieData.end() ) if(it == m_cachedMovieData.end() )
{ {
@ -1006,8 +1006,8 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key)
//!(app.GetGameSettingsDebugMask(ProfileManager.GetPrimaryPad())&(1L<<eDebugSetting_ToggleFont)) && //!(app.GetGameSettingsDebugMask(ProfileManager.GetPrimaryPad())&(1L<<eDebugSetting_ToggleFont)) &&
key == ACTION_MENU_STICK_PRESS) key == ACTION_MENU_STICK_PRESS)
{ {
int64_t totalStatic = 0; __int64 totalStatic = 0;
int64_t totalDynamic = 0; __int64 totalDynamic = 0;
app.DebugPrintf(app.USER_SR, "********************************\n"); app.DebugPrintf(app.USER_SR, "********************************\n");
app.DebugPrintf(app.USER_SR, "BEGIN TOTAL SWF MEMORY USAGE\n\n"); app.DebugPrintf(app.USER_SR, "BEGIN TOTAL SWF MEMORY USAGE\n\n");
for(unsigned int i = 0; i < eUIGroup_COUNT; ++i) for(unsigned int i = 0; i < eUIGroup_COUNT; ++i)
@ -1016,8 +1016,8 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key)
} }
for(unsigned int i = 0; i < eLibrary_Count; ++i) for(unsigned int i = 0; i < eLibrary_Count; ++i)
{ {
int64_t libraryStatic = 0; __int64 libraryStatic = 0;
int64_t libraryDynamic = 0; __int64 libraryDynamic = 0;
if(m_iggyLibraries[i] != IGGY_INVALID_LIBRARY) if(m_iggyLibraries[i] != IGGY_INVALID_LIBRARY)
{ {

View file

@ -15,7 +15,7 @@ class UIControl;
class UIController : public IUIController class UIController : public IUIController
{ {
public: public:
static int64_t iggyAllocCount; static __int64 iggyAllocCount;
// MGH - added to prevent crash loading Iggy movies while the skins were being reloaded // MGH - added to prevent crash loading Iggy movies while the skins were being reloaded
static CRITICAL_SECTION ms_reloadSkinCS; static CRITICAL_SECTION ms_reloadSkinCS;
@ -118,7 +118,7 @@ private:
typedef struct _CachedMovieData typedef struct _CachedMovieData
{ {
byteArray m_ba; byteArray m_ba;
int64_t m_expiry; __int64 m_expiry;
} CachedMovieData; } CachedMovieData;
unordered_map<wstring, CachedMovieData> m_cachedMovieData; unordered_map<wstring, CachedMovieData> m_cachedMovieData;

View file

@ -380,10 +380,10 @@ unsigned int UIGroup::GetLayerIndex(UILayer* layerPtr)
return 0; return 0;
} }
void UIGroup::PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic) void UIGroup::PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic)
{ {
int64_t groupStatic = 0; __int64 groupStatic = 0;
int64_t groupDynamic = 0; __int64 groupDynamic = 0;
app.DebugPrintf(app.USER_SR, "-- BEGIN GROUP %d\n",m_group); app.DebugPrintf(app.USER_SR, "-- BEGIN GROUP %d\n",m_group);
for(unsigned int i = 0; i < eUILayer_COUNT; ++i) for(unsigned int i = 0; i < eUILayer_COUNT; ++i)
{ {

View file

@ -100,7 +100,7 @@ public:
void handleUnlockFullVersion(); void handleUnlockFullVersion();
void PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic); void PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic);
unsigned int GetLayerIndex(UILayer* layerPtr); unsigned int GetLayerIndex(UILayer* layerPtr);

View file

@ -842,10 +842,10 @@ void UILayer::handleUnlockFullVersion()
} }
} }
void UILayer::PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic) void UILayer::PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic)
{ {
int64_t layerStatic = 0; __int64 layerStatic = 0;
int64_t layerDynamic = 0; __int64 layerDynamic = 0;
for(AUTO_VAR(it,m_components.begin()); it != m_components.end(); ++it) for(AUTO_VAR(it,m_components.begin()); it != m_components.end(); ++it)
{ {
(*it)->PrintTotalMemoryUsage(layerStatic, layerDynamic); (*it)->PrintTotalMemoryUsage(layerStatic, layerDynamic);

View file

@ -86,6 +86,6 @@ public:
void handleUnlockFullVersion(); void handleUnlockFullVersion();
UIScene *FindScene(EUIScene sceneType); UIScene *FindScene(EUIScene sceneType);
void PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic); void PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic);
}; };

View file

@ -328,11 +328,11 @@ void UIScene::loadMovie()
} }
byteArray baFile = ui.getMovieData(moviePath.c_str()); byteArray baFile = ui.getMovieData(moviePath.c_str());
int64_t beforeLoad = ui.iggyAllocCount; __int64 beforeLoad = ui.iggyAllocCount;
swf = IggyPlayerCreateFromMemory ( baFile.data , baFile.length, NULL); swf = IggyPlayerCreateFromMemory ( baFile.data , baFile.length, NULL);
int64_t afterLoad = ui.iggyAllocCount; __int64 afterLoad = ui.iggyAllocCount;
IggyPlayerInitializeAndTickRS ( swf ); IggyPlayerInitializeAndTickRS ( swf );
int64_t afterTick = ui.iggyAllocCount; __int64 afterTick = ui.iggyAllocCount;
if(!swf) if(!swf)
{ {
@ -361,8 +361,8 @@ void UIScene::loadMovie()
IggyMemoryUseInfo memoryInfo; IggyMemoryUseInfo memoryInfo;
rrbool res; rrbool res;
int iteration = 0; int iteration = 0;
int64_t totalStatic = 0; __int64 totalStatic = 0;
int64_t totalDynamic = 0; __int64 totalDynamic = 0;
while(res = IggyDebugGetMemoryUseInfo ( swf , while(res = IggyDebugGetMemoryUseInfo ( swf ,
NULL , NULL ,
0 , 0 ,
@ -405,15 +405,15 @@ void UIScene::getDebugMemoryUseRecursive(const wstring &moviePath, IggyMemoryUse
} }
} }
void UIScene::PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic) void UIScene::PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic)
{ {
if(!swf) return; if(!swf) return;
IggyMemoryUseInfo memoryInfo; IggyMemoryUseInfo memoryInfo;
rrbool res; rrbool res;
int iteration = 0; int iteration = 0;
int64_t sceneStatic = 0; __int64 sceneStatic = 0;
int64_t sceneDynamic = 0; __int64 sceneDynamic = 0;
while(res = IggyDebugGetMemoryUseInfo ( swf , while(res = IggyDebugGetMemoryUseInfo ( swf ,
NULL , NULL ,
"" , "" ,

View file

@ -127,7 +127,7 @@ private:
void getDebugMemoryUseRecursive(const wstring &moviePath, IggyMemoryUseInfo &memoryInfo); void getDebugMemoryUseRecursive(const wstring &moviePath, IggyMemoryUseInfo &memoryInfo);
public: public:
void PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic); void PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic);
public: public:
UIScene(int iPad, UILayer *parentLayer); UIScene(int iPad, UILayer *parentLayer);

View file

@ -1107,13 +1107,13 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD
// start the game // start the game
bool isFlat = (pClass->m_MoreOptionsParams.bFlatWorld==TRUE); bool isFlat = (pClass->m_MoreOptionsParams.bFlatWorld==TRUE);
int64_t seedValue = 0; __int64 seedValue = 0;
NetworkGameInitData *param = new NetworkGameInitData(); NetworkGameInitData *param = new NetworkGameInitData();
if (wSeed.length() != 0) if (wSeed.length() != 0)
{ {
int64_t value = 0; __int64 value = 0;
unsigned int len = (unsigned int)wSeed.length(); unsigned int len = (unsigned int)wSeed.length();
//Check if the input string contains a numerical value //Check if the input string contains a numerical value
@ -1132,7 +1132,7 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD
//If the input string is a numerical value, convert it to a number //If the input string is a numerical value, convert it to a number
if( isNumber ) if( isNumber )
value = _fromString<int64_t>(wSeed); value = _fromString<__int64>(wSeed);
//If the value is not 0 use it, otherwise use the algorithm from the java String.hashCode() function to hash it //If the value is not 0 use it, otherwise use the algorithm from the java String.hashCode() function to hash it
if( value != 0 ) if( value != 0 )

View file

@ -61,7 +61,7 @@ private:
bool m_bRequestQuadrantSignin; bool m_bRequestQuadrantSignin;
bool m_bIsCorrupt; bool m_bIsCorrupt;
bool m_bThumbnailGetFailed; bool m_bThumbnailGetFailed;
int64_t m_seed; __int64 m_seed;
#ifdef __PS3__ #ifdef __PS3__
std::vector<SonyCommerce::ProductInfo>*m_pvProductInfo; std::vector<SonyCommerce::ProductInfo>*m_pvProductInfo;

View file

@ -1896,7 +1896,7 @@ void UIScene_LoadOrJoinMenu::LoadSaveFromDisk(File *saveFile, ESavePlatform save
// Make our next save default to the name of the level // Make our next save default to the name of the level
StorageManager.SetSaveTitle(saveFile->getName().c_str()); StorageManager.SetSaveTitle(saveFile->getName().c_str());
int64_t fileSize = saveFile->length(); __int64 fileSize = saveFile->length();
FileInputStream fis(*saveFile); FileInputStream fis(*saveFile);
byteArray ba(fileSize); byteArray ba(fileSize);
fis.read(ba); fis.read(ba);
@ -1960,7 +1960,7 @@ void UIScene_LoadOrJoinMenu::LoadSaveFromCloud()
mbstowcs(wSaveName, app.getRemoteStorage()->getSaveNameUTF8(), strlen(app.getRemoteStorage()->getSaveNameUTF8())+1); // plus null mbstowcs(wSaveName, app.getRemoteStorage()->getSaveNameUTF8(), strlen(app.getRemoteStorage()->getSaveNameUTF8())+1); // plus null
StorageManager.SetSaveTitle(wSaveName); StorageManager.SetSaveTitle(wSaveName);
int64_t fileSize = cloudFile.length(); __int64 fileSize = cloudFile.length();
FileInputStream fis(cloudFile); FileInputStream fis(cloudFile);
byteArray ba(fileSize); byteArray ba(fileSize);
fis.read(ba); fis.read(ba);

View file

@ -904,11 +904,11 @@ void CScene_MultiGameCreate::CreateGame(CScene_MultiGameCreate* pClass, DWORD dw
// start the game // start the game
bool isFlat = (pClass->m_MoreOptionsParams.bFlatWorld==TRUE); bool isFlat = (pClass->m_MoreOptionsParams.bFlatWorld==TRUE);
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 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) if (wSeed.length() != 0)
{ {
int64_t value = 0; __int64 value = 0;
unsigned int len = (unsigned int)wSeed.length(); unsigned int len = (unsigned int)wSeed.length();
//Check if the input string contains a numerical value //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 the input string is a numerical value, convert it to a number
if( isNumber ) if( isNumber )
value = _fromString<int64_t>(wSeed); value = _fromString<__int64>(wSeed);
//If the value is not 0 use it, otherwise use the algorithm from the java String.hashCode() function to hash it //If the value is not 0 use it, otherwise use the algorithm from the java String.hashCode() function to hash it
if( value != 0 ) if( value != 0 )

View file

@ -1947,7 +1947,7 @@ void CScene_MultiGameJoinLoad::LoadSaveFromDisk(File *saveFile)
// Make our next save default to the name of the level // Make our next save default to the name of the level
StorageManager.SetSaveTitle(saveFile->getName().c_str()); StorageManager.SetSaveTitle(saveFile->getName().c_str());
int64_t fileSize = saveFile->length(); __int64 fileSize = saveFile->length();
FileInputStream fis(*saveFile); FileInputStream fis(*saveFile);
byteArray ba(fileSize); byteArray ba(fileSize);
fis.read(ba); fis.read(ba);

View file

@ -860,7 +860,7 @@ HRESULT CXuiSceneBase::_ShowBackground( unsigned int iPad, BOOL bShow )
if(bShow && pMinecraft->level!=NULL) if(bShow && pMinecraft->level!=NULL)
{ {
int64_t i64TimeOfDay =0; __int64 i64TimeOfDay =0;
// are we in the Nether? - Leave the time as 0 if we are, so we show daylight // are we in the Nether? - Leave the time as 0 if we are, so we show daylight
if(pMinecraft->level->dimension->id==0) if(pMinecraft->level->dimension->id==0)
{ {

View file

@ -485,7 +485,7 @@ typedef uLong FAR uLongf;
# define z_off64_t off64_t # define z_off64_t off64_t
#else #else
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) # if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
# define z_off64_t long long # define z_off64_t __int64
# else # else
# define z_off64_t z_off_t # define z_off64_t z_off_t
# endif # endif

View file

@ -97,14 +97,14 @@ void CreateWorldScreen::buttonClicked(Button *button)
if (done) return; if (done) return;
done = true; done = true;
int64_t seedValue = (new Random())->nextLong(); __int64 seedValue = (new Random())->nextLong();
wstring seedString = seedEdit->getValue(); wstring seedString = seedEdit->getValue();
if (seedString.length() != 0) if (seedString.length() != 0)
{ {
// try to convert it to a long first // try to convert it to a long first
// try { // 4J - removed try/catch // try { // 4J - removed try/catch
int64_t value = _fromString<int64_t>(seedString); __int64 value = _fromString<__int64>(seedString);
if (value != 0) if (value != 0)
{ {
seedValue = value; seedValue = value;

View file

@ -4,7 +4,7 @@
class DemoLevel : public Level class DemoLevel : public Level
{ {
private: private:
static const int64_t DEMO_LEVEL_SEED = 0; // 4J - TODO - was "Don't Look Back".hashCode(); static const __int64 DEMO_LEVEL_SEED = 0; // 4J - TODO - was "Don't Look Back".hashCode();
static const int DEMO_SPAWN_X = 796; static const int DEMO_SPAWN_X = 796;
static const int DEMO_SPAWN_Y = 72; static const int DEMO_SPAWN_Y = 72;
static const int DEMO_SPAWN_Z = -731; static const int DEMO_SPAWN_Z = -731;

View file

@ -13,8 +13,8 @@ void DemoMode::tick()
SurvivalMode::tick(); SurvivalMode::tick();
/* 4J - TODO - seems unlikely we need this demo mode anyway /* 4J - TODO - seems unlikely we need this demo mode anyway
int64_t time = minecraft->level->getTime(); __int64 time = minecraft->level->getTime();
int64_t day = (time / Level::TICKS_PER_DAY) + 1; __int64 day = (time / Level::TICKS_PER_DAY) + 1;
demoHasEnded = (time > (500 + Level::TICKS_PER_DAY * DEMO_DAYS)); demoHasEnded = (time > (500 + Level::TICKS_PER_DAY * DEMO_DAYS));
if (demoHasEnded) if (demoHasEnded)
@ -26,7 +26,7 @@ void DemoMode::tick()
{ {
if (day <= (DEMO_DAYS + 1)) if (day <= (DEMO_DAYS + 1))
{ {
minecraft->gui->displayClientMessage(L"demo.day." + _toString<int64_t>(day)); minecraft->gui->displayClientMessage(L"demo.day." + _toString<__int64>(day));
} }
} }
else if (day == 1) else if (day == 1)

View file

@ -269,7 +269,7 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart()
StorageManager.SetSaveTitle(wWorldName.c_str()); StorageManager.SetSaveTitle(wWorldName.c_str());
bool isFlat = false; bool isFlat = false;
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 __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
NetworkGameInitData *param = new NetworkGameInitData(); NetworkGameInitData *param = new NetworkGameInitData();
param->seed = seedValue; param->seed = seedValue;

View file

@ -917,8 +917,8 @@
#define RAD_S32 signed int #define RAD_S32 signed int
// But pointers are 64 bits. // But pointers are 64 bits.
#if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 ) #if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 )
#define RAD_SINTa __w64 signed long long #define RAD_SINTa __w64 signed __int64
#define RAD_UINTa __w64 unsigned long long #define RAD_UINTa __w64 unsigned __int64
#else // non-vc.net compiler or /Wp64 turned off #else // non-vc.net compiler or /Wp64 turned off
#define RAD_UINTa unsigned long long #define RAD_UINTa unsigned long long
#define RAD_SINTa signed long long #define RAD_SINTa signed long long
@ -976,8 +976,8 @@
#define RAD_U64 unsigned long long #define RAD_U64 unsigned long long
#define RAD_S64 signed long long #define RAD_S64 signed long long
#elif defined(__RADX64__) || defined(__RAD32__) #elif defined(__RADX64__) || defined(__RAD32__)
#define RAD_U64 unsigned long long #define RAD_U64 unsigned __int64
#define RAD_S64 signed long long #define RAD_S64 signed __int64
#else #else
// 16-bit // 16-bit
typedef RADSTRUCT RAD_U64 // do this so that we don't accidentally use U64s 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_BSWAP16 _byteswap_ushort
#define RR_BSWAP32 _byteswap_ulong #define RR_BSWAP32 _byteswap_ulong
unsigned long long __cdecl _byteswap_uint64 (unsigned long long val); unsigned __int64 __cdecl _byteswap_uint64 (unsigned __int64 val);
#pragma intrinsic(_byteswap_uint64) #pragma intrinsic(_byteswap_uint64)
#define RR_BSWAP64 _byteswap_uint64 #define RR_BSWAP64 _byteswap_uint64
@ -1909,7 +1909,7 @@ RADFORCEINLINE unsigned long RR_BSWAP32 (unsigned long _Long)
return _Long; return _Long;
} }
RADFORCEINLINE unsigned long long RR_BSWAP64 (unsigned long long _Long) RADFORCEINLINE unsigned __int64 RR_BSWAP64 (unsigned __int64 _Long)
{ {
__asm { __asm {
mov eax, DWORD PTR _Long 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) #if ( defined(_MSC_VER) && _MSC_VER >= 1300)
unsigned long long __cdecl _rotl64(unsigned long long _Val, int _Shift); unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
#pragma intrinsic(_rotl64) #pragma intrinsic(_rotl64)
#define RR_ROTL64(x,k) _rotl64((unsigned long long)(x),(int)(k)) #define RR_ROTL64(x,k) _rotl64((unsigned __int64)(x),(int)(k))
#elif defined(__RADCELL__) #elif defined(__RADCELL__)

View file

@ -326,7 +326,7 @@ RADDEFSTART
typedef CHAR *LPSTR, *PSTR; typedef CHAR *LPSTR, *PSTR;
#ifdef IS_WIN64 #ifdef IS_WIN64
typedef uint64_t ULONG_PTR, *PULONG_PTR; typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
#else #else
#ifdef _Wp64 #ifdef _Wp64
#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 #if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300

View file

@ -917,8 +917,8 @@
#define RAD_S32 signed int #define RAD_S32 signed int
// But pointers are 64 bits. // But pointers are 64 bits.
#if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 ) #if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 )
#define RAD_SINTa __w64 signed long long #define RAD_SINTa __w64 signed __int64
#define RAD_UINTa __w64 unsigned long long #define RAD_UINTa __w64 unsigned __int64
#else // non-vc.net compiler or /Wp64 turned off #else // non-vc.net compiler or /Wp64 turned off
#define RAD_UINTa unsigned long long #define RAD_UINTa unsigned long long
#define RAD_SINTa signed long long #define RAD_SINTa signed long long
@ -976,8 +976,8 @@
#define RAD_U64 unsigned long long #define RAD_U64 unsigned long long
#define RAD_S64 signed long long #define RAD_S64 signed long long
#elif defined(__RADX64__) || defined(__RAD32__) #elif defined(__RADX64__) || defined(__RAD32__)
#define RAD_U64 unsigned long long #define RAD_U64 unsigned __int64
#define RAD_S64 signed long long #define RAD_S64 signed __int64
#else #else
// 16-bit // 16-bit
typedef RADSTRUCT RAD_U64 // do this so that we don't accidentally use U64s 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_BSWAP16 _byteswap_ushort
#define RR_BSWAP32 _byteswap_ulong #define RR_BSWAP32 _byteswap_ulong
unsigned long long __cdecl _byteswap_uint64 (unsigned long long val); unsigned __int64 __cdecl _byteswap_uint64 (unsigned __int64 val);
#pragma intrinsic(_byteswap_uint64) #pragma intrinsic(_byteswap_uint64)
#define RR_BSWAP64 _byteswap_uint64 #define RR_BSWAP64 _byteswap_uint64
@ -1909,7 +1909,7 @@ RADFORCEINLINE unsigned long RR_BSWAP32 (unsigned long _Long)
return _Long; return _Long;
} }
RADFORCEINLINE unsigned long long RR_BSWAP64 (unsigned long long _Long) RADFORCEINLINE unsigned __int64 RR_BSWAP64 (unsigned __int64 _Long)
{ {
__asm { __asm {
mov eax, DWORD PTR _Long 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) #if ( defined(_MSC_VER) && _MSC_VER >= 1300)
unsigned long long __cdecl _rotl64(unsigned long long _Val, int _Shift); unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
#pragma intrinsic(_rotl64) #pragma intrinsic(_rotl64)
#define RR_ROTL64(x,k) _rotl64((unsigned long long)(x),(int)(k)) #define RR_ROTL64(x,k) _rotl64((unsigned __int64)(x),(int)(k))
#elif defined(__RADCELL__) #elif defined(__RADCELL__)

View file

@ -1154,7 +1154,7 @@ void DQRNetworkManager::Tick_StateMachine()
break; break;
case DNM_INT_STATE_JOINING_SENDING_UNRELIABLE: case DNM_INT_STATE_JOINING_SENDING_UNRELIABLE:
{ {
int64_t timeNow = System::currentTimeMillis(); __int64 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 // 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 ) 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 // 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. // 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_t timeNow = System::currentTimeMillis(); __int64 timeNow = System::currentTimeMillis();
if( ( timeNow - m_startedWaitingForReservationsTime ) > JOIN_RESERVATION_WAIT_TIME ) if( ( timeNow - m_startedWaitingForReservationsTime ) > JOIN_RESERVATION_WAIT_TIME )
{ {
SetState(DNM_INT_STATE_JOINING_FAILED_TIDY_UP); SetState(DNM_INT_STATE_JOINING_FAILED_TIDY_UP);
@ -2742,7 +2742,7 @@ bool DQRNetworkManager::JoinPartyFromSearchResult(SessionSearchResult *searchRes
if( sessionRef != nullptr ) if( sessionRef != nullptr )
{ {
// Allow 2 seconds before we let the player cancel // Allow 2 seconds before we let the player cancel
int64_t allowCancelTime = System::currentTimeMillis() + (1000 * 2); __int64 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 // 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. // 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; break;
} }
int64_t currentTime = System::currentTimeMillis(); __int64 currentTime = System::currentTimeMillis();
if( currentTime > allowCancelTime) if( currentTime > allowCancelTime)
{ {
shownCancelScreen = true; shownCancelScreen = true;

View file

@ -339,9 +339,9 @@ private:
static const eDQRNetworkManagerState m_INTtoEXTStateMappings[DNM_INT_STATE_COUNT]; static const eDQRNetworkManagerState m_INTtoEXTStateMappings[DNM_INT_STATE_COUNT];
eDQRNetworkManagerInternalState m_state; eDQRNetworkManagerInternalState m_state;
eDQRNetworkManagerState m_stateExternal; eDQRNetworkManagerState m_stateExternal;
int64_t m_lastUnreliableSendTime; __int64 m_lastUnreliableSendTime;
int64_t m_firstUnreliableSendTime; __int64 m_firstUnreliableSendTime;
int64_t m_startedWaitingForReservationsTime; __int64 m_startedWaitingForReservationsTime;
unsigned char *m_customSessionData; unsigned char *m_customSessionData;
unsigned int m_customSessionDataSize; unsigned int m_customSessionDataSize;
int m_customDataDirtyUpdateTicks; int m_customDataDirtyUpdateTicks;
@ -491,7 +491,7 @@ public:
void SetDisplayName(PlayerUID xuid, wstring displayName); void SetDisplayName(PlayerUID xuid, wstring displayName);
private: private:
int64_t m_playersLeftPartyTime; __int64 m_playersLeftPartyTime;
int m_playersLeftParty; int m_playersLeftParty;
bool GetBestPartyUserIndex(); bool GetBestPartyUserIndex();

View file

@ -265,7 +265,7 @@ EventWriteBanLevel(__in_opt PCWSTR UserId, __in LPCGUID PlayerSessionId, __in co
// //
__inline __inline
ULONG ULONG
EventWriteBlockBroken(__in_opt PCWSTR UserId, __in LPCGUID PlayerSessionId, __in const signed int DifficultyLevelId, __in const signed int BlockId, __in const signed int BlockAux, __in const uint64_t BlockCount) EventWriteBlockBroken(__in_opt PCWSTR UserId, __in LPCGUID PlayerSessionId, __in const signed int DifficultyLevelId, __in const signed int BlockId, __in const signed int BlockAux, __in const unsigned __int64 BlockCount)
{ {
#define ARGUMENT_COUNT_XBLA_149E11AE_BlockBroken 7 #define ARGUMENT_COUNT_XBLA_149E11AE_BlockBroken 7
@ -289,7 +289,7 @@ EventWriteBlockBroken(__in_opt PCWSTR UserId, __in LPCGUID PlayerSessionId, __in
// //
__inline __inline
ULONG ULONG
EventWriteBlockPlaced(__in_opt PCWSTR UserId, __in LPCGUID PlayerSessionId, __in const signed int DifficultyLevelId, __in const signed int BlockId, __in const signed int BlockAux, __in const uint64_t BlockCount) EventWriteBlockPlaced(__in_opt PCWSTR UserId, __in LPCGUID PlayerSessionId, __in const signed int DifficultyLevelId, __in const signed int BlockId, __in const signed int BlockAux, __in const unsigned __int64 BlockCount)
{ {
#define ARGUMENT_COUNT_XBLA_149E11AE_BlockPlaced 7 #define ARGUMENT_COUNT_XBLA_149E11AE_BlockPlaced 7
@ -376,7 +376,7 @@ EventWriteGameProgress(__in_opt PCWSTR UserId, __in LPCGUID PlayerSessionId, __i
// //
__inline __inline
ULONG ULONG
EventWriteIncDistanceTravelled(__in_opt PCWSTR UserId, __in LPCGUID PlayerSessionId, __in const signed int DifficultyLevelId, __in const uint64_t Distance, __in const signed int TravelMethodId) EventWriteIncDistanceTravelled(__in_opt PCWSTR UserId, __in LPCGUID PlayerSessionId, __in const signed int DifficultyLevelId, __in const unsigned __int64 Distance, __in const signed int TravelMethodId)
{ {
#define ARGUMENT_COUNT_XBLA_149E11AE_IncDistanceTravelled 6 #define ARGUMENT_COUNT_XBLA_149E11AE_IncDistanceTravelled 6
@ -399,7 +399,7 @@ EventWriteIncDistanceTravelled(__in_opt PCWSTR UserId, __in LPCGUID PlayerSessio
// //
__inline __inline
ULONG ULONG
EventWriteIncTimePlayed(__in_opt PCWSTR UserId, __in LPCGUID PlayerSessionId, __in const signed int DifficultyLevelId, __in const uint64_t TimePlayed) EventWriteIncTimePlayed(__in_opt PCWSTR UserId, __in LPCGUID PlayerSessionId, __in const signed int DifficultyLevelId, __in const unsigned __int64 TimePlayed)
{ {
#define ARGUMENT_COUNT_XBLA_149E11AE_IncTimePlayed 5 #define ARGUMENT_COUNT_XBLA_149E11AE_IncTimePlayed 5
@ -570,7 +570,7 @@ EventWriteLevelStart(__in_opt PCWSTR UserId, __in LPCGUID PlayerSessionId, __in
// //
__inline __inline
ULONG ULONG
EventWriteMcItemAcquired(__in_opt PCWSTR UserId, __in const signed int SectionId, __in LPCGUID PlayerSessionId, __in_opt PCWSTR MultiplayerCorrelationId, __in const signed int GameplayModeId, __in const signed int DifficultyLevelId, __in const signed int ItemId, __in const signed int AcquisitionMethodId, __in const float LocationX, __in const float LocationY, __in const float LocationZ, __in const signed int ItemAux, __in const uint64_t ItemCount) EventWriteMcItemAcquired(__in_opt PCWSTR UserId, __in const signed int SectionId, __in LPCGUID PlayerSessionId, __in_opt PCWSTR MultiplayerCorrelationId, __in const signed int GameplayModeId, __in const signed int DifficultyLevelId, __in const signed int ItemId, __in const signed int AcquisitionMethodId, __in const float LocationX, __in const float LocationY, __in const float LocationZ, __in const signed int ItemAux, __in const unsigned __int64 ItemCount)
{ {
#define ARGUMENT_COUNT_XBLA_149E11AE_McItemAcquired 14 #define ARGUMENT_COUNT_XBLA_149E11AE_McItemAcquired 14
@ -601,7 +601,7 @@ EventWriteMcItemAcquired(__in_opt PCWSTR UserId, __in const signed int SectionId
// //
__inline __inline
ULONG ULONG
EventWriteMcItemUsed(__in_opt PCWSTR UserId, __in const signed int SectionId, __in LPCGUID PlayerSessionId, __in_opt PCWSTR MultiplayerCorrelationId, __in const signed int GameplayModeId, __in const signed int DifficultyLevelId, __in const signed int ItemId, __in const float LocationX, __in const float LocationY, __in const float LocationZ, __in const signed int ItemAux, __in const uint64_t ItemCount, __in const signed int Hunger) EventWriteMcItemUsed(__in_opt PCWSTR UserId, __in const signed int SectionId, __in LPCGUID PlayerSessionId, __in_opt PCWSTR MultiplayerCorrelationId, __in const signed int GameplayModeId, __in const signed int DifficultyLevelId, __in const signed int ItemId, __in const float LocationX, __in const float LocationY, __in const float LocationZ, __in const signed int ItemAux, __in const unsigned __int64 ItemCount, __in const signed int Hunger)
{ {
#define ARGUMENT_COUNT_XBLA_149E11AE_McItemUsed 14 #define ARGUMENT_COUNT_XBLA_149E11AE_McItemUsed 14

View file

@ -69,7 +69,7 @@ VOID XMLParser::FillBuffer()
} }
m_dwCharsConsumed += NChars; m_dwCharsConsumed += NChars;
int64_t iProgress = m_dwCharsTotal ? (( (int64_t)m_dwCharsConsumed * 1000 ) / (int64_t)m_dwCharsTotal) : 0; __int64 iProgress = m_dwCharsTotal ? (( (__int64)m_dwCharsConsumed * 1000 ) / (__int64)m_dwCharsTotal) : 0;
m_pISAXCallback->SetParseProgress( (DWORD)iProgress ); m_pISAXCallback->SetParseProgress( (DWORD)iProgress );
m_pReadBuf[ NChars ] = '\0'; m_pReadBuf[ NChars ] = '\0';

View file

@ -1252,7 +1252,7 @@ void GameRenderer::DisableUpdateThread()
#endif #endif
} }
void GameRenderer::renderLevel(float a, int64_t until) void GameRenderer::renderLevel(float a, __int64 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 // 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
@ -1335,7 +1335,7 @@ void GameRenderer::renderLevel(float a, int64_t until)
if (until == 0) break; if (until == 0) break;
int64_t diff = until - System::nanoTime(); __int64 diff = until - System::nanoTime();
if (diff < 0) break; if (diff < 0) break;
if (diff > 1000000000) break; if (diff > 1000000000) break;
} while (true); } while (true);

View file

@ -94,8 +94,8 @@ public:
void setupCamera(float a, int eye); void setupCamera(float a, int eye);
private: private:
void renderItemInHand(float a, int eye); void renderItemInHand(float a, int eye);
int64_t lastActiveTime; __int64 lastActiveTime;
int64_t lastNsTime; __int64 lastNsTime;
// 4J - changes brought forward from 1.8.2 // 4J - changes brought forward from 1.8.2
bool _updateLightTexture; bool _updateLightTexture;
public: public:
@ -112,7 +112,7 @@ private:
public: public:
void render(float a, bool bFirst); // 4J added bFirst void render(float a, bool bFirst); // 4J added bFirst
void renderLevel(float a); void renderLevel(float a);
void renderLevel(float a, int64_t until); void renderLevel(float a, __int64 until);
private: private:
Random *random; Random *random;
int rainSoundTime; int rainSoundTime;

View file

@ -784,7 +784,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse)
glPushMatrix(); glPushMatrix();
if (Minecraft::warezTime > 0) glTranslatef(0, 32, 0); if (Minecraft::warezTime > 0) glTranslatef(0, 32, 0);
font->drawShadow(ClientConstants::VERSION_STRING + L" (" + minecraft->fpsString + L")", iSafezoneXHalf+2, 20, 0xffffff); font->drawShadow(ClientConstants::VERSION_STRING + L" (" + minecraft->fpsString + L")", iSafezoneXHalf+2, 20, 0xffffff);
font->drawShadow(L"Seed: " + _toString<int64_t>(minecraft->level->getLevelData()->getSeed() ), iSafezoneXHalf+2, 32 + 00, 0xffffff); font->drawShadow(L"Seed: " + _toString<__int64>(minecraft->level->getLevelData()->getSeed() ), iSafezoneXHalf+2, 32 + 00, 0xffffff);
font->drawShadow(minecraft->gatherStats1(), iSafezoneXHalf+2, 32 + 10, 0xffffff); font->drawShadow(minecraft->gatherStats1(), iSafezoneXHalf+2, 32 + 10, 0xffffff);
font->drawShadow(minecraft->gatherStats2(), iSafezoneXHalf+2, 32 + 20, 0xffffff); font->drawShadow(minecraft->gatherStats2(), iSafezoneXHalf+2, 32 + 20, 0xffffff);
font->drawShadow(minecraft->gatherStats3(), iSafezoneXHalf+2, 32 + 30, 0xffffff); font->drawShadow(minecraft->gatherStats3(), iSafezoneXHalf+2, 32 + 30, 0xffffff);
@ -1391,7 +1391,7 @@ void Gui::displayClientMessage(int messageId, int iPad)
} }
// 4J Added // 4J Added
void Gui::renderGraph(int dataLength, int dataPos, int64_t *dataA, float dataAScale, int dataAWarning, int64_t *dataB, float dataBScale, int dataBWarning) void Gui::renderGraph(int dataLength, int dataPos, __int64 *dataA, float dataAScale, int dataAWarning, __int64 *dataB, float dataBScale, int dataBWarning)
{ {
int height = minecraft->height; int height = minecraft->height;
// This causes us to cover xScale*dataLength pixels in the horizontal // This causes us to cover xScale*dataLength pixels in the horizontal
@ -1430,7 +1430,7 @@ void Gui::renderGraph(int dataLength, int dataPos, int64_t *dataA, float dataASc
t->color(0xff000000 + cc * 256); t->color(0xff000000 + cc * 256);
} }
int64_t aVal = dataA[i] / dataAScale; __int64 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 - aVal + 0.5f), (float)( 0));
t->vertex((float)(xScale*i + 0.5f), (float)( height + 0.5f), (float)( 0)); t->vertex((float)(xScale*i + 0.5f), (float)( height + 0.5f), (float)( 0));
@ -1447,7 +1447,7 @@ void Gui::renderGraph(int dataLength, int dataPos, int64_t *dataA, float dataASc
t->color(0xff808080 + cc/2 * 256); t->color(0xff808080 + cc/2 * 256);
} }
int64_t bVal = dataB[i] / dataBScale; __int64 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 - bVal + 0.5f), (float)( 0));
t->vertex((float)(xScale*i + (xScale - 1) + 0.5f), (float)( height + 0.5f), (float)( 0)); t->vertex((float)(xScale*i + (xScale - 1) + 0.5f), (float)( height + 0.5f), (float)( 0));
@ -1458,7 +1458,7 @@ void Gui::renderGraph(int dataLength, int dataPos, int64_t *dataA, float dataASc
glEnable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_2D);
} }
void Gui::renderStackedGraph(int dataPos, int dataLength, int dataSources, int64_t (*func)(unsigned int dataPos, unsigned int dataSource) ) void Gui::renderStackedGraph(int dataPos, int dataLength, int dataSources, __int64 (*func)(unsigned int dataPos, unsigned int dataSource) )
{ {
int height = minecraft->height; int height = minecraft->height;
@ -1475,8 +1475,8 @@ void Gui::renderStackedGraph(int dataPos, int dataLength, int dataSources, int64
Tesselator *t = Tesselator::getInstance(); Tesselator *t = Tesselator::getInstance();
t->begin(GL_LINES); t->begin(GL_LINES);
int64_t thisVal = 0; __int64 thisVal = 0;
int64_t topVal = 0; __int64 topVal = 0;
for (int i = 0; i < dataLength; i++) for (int i = 0; i < dataLength; i++)
{ {
thisVal = 0; thisVal = 0;

View file

@ -63,6 +63,6 @@ public:
float getJukeboxOpacity(int iPad); float getJukeboxOpacity(int iPad);
// 4J Added // 4J Added
void renderGraph(int dataLength, int dataPos, int64_t *dataA, float dataAScale, int dataAWarning, int64_t *dataB, float dataBScale, int dataBWarning); 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_t (*func)(unsigned int dataPos, unsigned int dataSource) ); void renderStackedGraph(int dataPos, int dataLength, int dataSources, __int64 (*func)(unsigned int dataPos, unsigned int dataSource) );
}; };

View file

@ -2061,9 +2061,9 @@ bool LevelRenderer::updateDirtyChunks()
if( bAtomic || (index == 0) ) if( bAtomic || (index == 0) )
{ {
//PIXBeginNamedEvent(0,"Rebuilding near chunk %d %d %d",chunk->x, chunk->y, chunk->z); //PIXBeginNamedEvent(0,"Rebuilding near chunk %d %d %d",chunk->x, chunk->y, chunk->z);
// static int64_t totalTime = 0; // static __int64 totalTime = 0;
// static int64_t countTime = 0; // static __int64 countTime = 0;
// int64_t startTime = System::currentTimeMillis(); // __int64 startTime = System::currentTimeMillis();
//app.DebugPrintf("Rebuilding permaChunk %d\n", index); //app.DebugPrintf("Rebuilding permaChunk %d\n", index);
@ -2072,7 +2072,7 @@ bool LevelRenderer::updateDirtyChunks()
if(index !=0) 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 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_t endTime = System::currentTimeMillis(); // __int64 endTime = System::currentTimeMillis();
// totalTime += (endTime - startTime); // totalTime += (endTime - startTime);
// countTime++; // countTime++;
// printf("%d : %f\n", countTime, (float)totalTime / (float)countTime); // printf("%d : %f\n", countTime, (float)totalTime / (float)countTime);
@ -2111,11 +2111,11 @@ bool LevelRenderer::updateDirtyChunks()
static Chunk permaChunk; static Chunk permaChunk;
permaChunk.makeCopyForRebuild(chunk); permaChunk.makeCopyForRebuild(chunk);
LeaveCriticalSection(&m_csDirtyChunks); LeaveCriticalSection(&m_csDirtyChunks);
// static int64_t totalTime = 0; // static __int64 totalTime = 0;
// static int64_t countTime = 0; // static __int64 countTime = 0;
// int64_t startTime = System::currentTimeMillis(); // __int64 startTime = System::currentTimeMillis();
permaChunk.rebuild(); permaChunk.rebuild();
// int64_t endTime = System::currentTimeMillis(); // __int64 endTime = System::currentTimeMillis();
// totalTime += (endTime - startTime); // totalTime += (endTime - startTime);
// countTime++; // countTime++;
// printf("%d : %f\n", countTime, (float)totalTime / (float)countTime); // printf("%d : %f\n", countTime, (float)totalTime / (float)countTime);

View file

@ -258,7 +258,7 @@ public:
XLockFreeStack<int> dirtyChunksLockFreeStack; XLockFreeStack<int> dirtyChunksLockFreeStack;
bool dirtyChunkPresent; bool dirtyChunkPresent;
int64_t lastDirtyChunkFound; __int64 lastDirtyChunkFound;
static const int FORCE_DIRTY_CHUNK_CHECK_PERIOD_MS = 250; static const int FORCE_DIRTY_CHUNK_CHECK_PERIOD_MS = 250;
#ifdef _LARGE_WORLDS #ifdef _LARGE_WORLDS

View file

@ -50,12 +50,12 @@ public:
int m_iScreenSection; // assuming 4player splitscreen for now, or -1 for single player int m_iScreenSection; // assuming 4player splitscreen for now, or -1 for single player
uint64_t ullButtonsPressed; // Stores the button presses, since the inputmanager can be ticked faster than the minecraft __uint64 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 // player tick, and a button press and release combo can be missed in the minecraft::tick
uint64_t ullDpad_last; __uint64 ullDpad_last;
uint64_t ullDpad_this; __uint64 ullDpad_this;
uint64_t ullDpad_filtered; __uint64 ullDpad_filtered;
// 4J-PB - moved these in from the minecraft structure, since they are per player things for splitscreen // 4J-PB - moved these in from the minecraft structure, since they are per player things for splitscreen
//int ticks; //int ticks;

View file

@ -17,7 +17,7 @@ void MinecartRenderer::render(shared_ptr<Entity> _cart, double x, double y, doub
glPushMatrix(); glPushMatrix();
int64_t seed = cart->entityId * 493286711l; __int64 seed = cart->entityId * 493286711l;
seed = seed * seed * 4392167121l + seed * 98761; seed = seed * seed * 4392167121l + seed * 98761;
float xo = ((((seed >> 16) & 0x7) + 0.5f) / 8.0f - 0.5f) * 0.004f; float xo = ((((seed >> 16) & 0x7) + 0.5f) / 8.0f - 0.5f) * 0.004f;

View file

@ -82,10 +82,10 @@
#define DISABLE_LEVELTICK_THREAD #define DISABLE_LEVELTICK_THREAD
Minecraft *Minecraft::m_instance = NULL; Minecraft *Minecraft::m_instance = NULL;
int64_t Minecraft::frameTimes[512]; __int64 Minecraft::frameTimes[512];
int64_t Minecraft::tickTimes[512]; __int64 Minecraft::tickTimes[512];
int Minecraft::frameTimePos = 0; int Minecraft::frameTimePos = 0;
int64_t Minecraft::warezTime = 0; __int64 Minecraft::warezTime = 0;
File Minecraft::workDir = File(L""); File Minecraft::workDir = File(L"");
#ifdef __PSVITA__ #ifdef __PSVITA__
@ -680,7 +680,7 @@ void Minecraft::run()
return; return;
} }
int64_t lastTime = System::currentTimeMillis(); __int64 lastTime = System::currentTimeMillis();
int frames = 0; int frames = 0;
while (running) while (running)
@ -705,7 +705,7 @@ void Minecraft::run()
timer->advanceTime(); timer->advanceTime();
} }
int64_t beforeTickTime = System::nanoTime(); __int64 beforeTickTime = System::nanoTime();
for (int i = 0; i < timer->ticks; i++) for (int i = 0; i < timer->ticks; i++)
{ {
ticks++; ticks++;
@ -717,7 +717,7 @@ void Minecraft::run()
// setScreen(new LevelConflictScreen()); // setScreen(new LevelConflictScreen());
// } // }
} }
int64_t tickDuraction = System::nanoTime() - beforeTickTime; __int64 tickDuraction = System::nanoTime() - beforeTickTime;
checkGlError(L"Pre render"); checkGlError(L"Pre render");
TileRenderer::fancy = options->fancyGraphics; TileRenderer::fancy = options->fancyGraphics;
@ -1272,7 +1272,7 @@ void Minecraft::applyFrameMouseLook()
void Minecraft::run_middle() void Minecraft::run_middle()
{ {
static int64_t lastTime = 0; static __int64 lastTime = 0;
static bool bFirstTimeIntoGame = true; static bool bFirstTimeIntoGame = true;
static bool bAutosaveTimerSet=false; static bool bAutosaveTimerSet=false;
static unsigned int uiAutosaveTimer=0; static unsigned int uiAutosaveTimer=0;
@ -1796,7 +1796,7 @@ void Minecraft::run_middle()
timer->advanceTime(); timer->advanceTime();
} }
//int64_t beforeTickTime = System::nanoTime(); //__int64 beforeTickTime = System::nanoTime();
for (int i = 0; i < timer->ticks; i++) for (int i = 0; i < timer->ticks; i++)
{ {
bool bLastTimerTick = ( i == ( timer->ticks - 1 ) ); bool bLastTimerTick = ( i == ( timer->ticks - 1 ) );
@ -1882,7 +1882,7 @@ void Minecraft::run_middle()
// CompressedTileStorage::tick(); // 4J added // CompressedTileStorage::tick(); // 4J added
// SparseDataStorage::tick(); // 4J added // SparseDataStorage::tick(); // 4J added
} }
//int64_t tickDuraction = System::nanoTime() - beforeTickTime; //__int64 tickDuraction = System::nanoTime() - beforeTickTime;
MemSect(31); MemSect(31);
checkGlError(L"Pre render"); checkGlError(L"Pre render");
MemSect(0); MemSect(0);
@ -2084,14 +2084,14 @@ void Minecraft::emergencySave()
setLevel(NULL); setLevel(NULL);
} }
void Minecraft::renderFpsMeter(int64_t tickTime) void Minecraft::renderFpsMeter(__int64 tickTime)
{ {
int nsPer60Fps = 1000000000l / 60; int nsPer60Fps = 1000000000l / 60;
if (lastTimer == -1) if (lastTimer == -1)
{ {
lastTimer = System::nanoTime(); lastTimer = System::nanoTime();
} }
int64_t now = System::nanoTime(); __int64 now = System::nanoTime();
Minecraft::tickTimes[(Minecraft::frameTimePos) & (Minecraft::frameTimes_length - 1)] = tickTime; Minecraft::tickTimes[(Minecraft::frameTimePos) & (Minecraft::frameTimes_length - 1)] = tickTime;
Minecraft::frameTimes[(Minecraft::frameTimePos++) & (Minecraft::frameTimes_length - 1)] = now - lastTimer; Minecraft::frameTimes[(Minecraft::frameTimePos++) & (Minecraft::frameTimes_length - 1)] = now - lastTimer;
lastTimer = now; lastTimer = now;
@ -2123,7 +2123,7 @@ void Minecraft::renderFpsMeter(int64_t tickTime)
t->vertex((float)(Minecraft::frameTimes_length), (float)( height - hh1 * 2), (float)( 0)); t->vertex((float)(Minecraft::frameTimes_length), (float)( height - hh1 * 2), (float)( 0));
t->end(); t->end();
int64_t totalTime = 0; __int64 totalTime = 0;
for (int i = 0; i < Minecraft::frameTimes_length; i++) for (int i = 0; i < Minecraft::frameTimes_length; i++)
{ {
totalTime += Minecraft::frameTimes[i]; totalTime += Minecraft::frameTimes[i];
@ -2153,8 +2153,8 @@ void Minecraft::renderFpsMeter(int64_t tickTime)
t->color(0xff000000 + cc * 256); t->color(0xff000000 + cc * 256);
} }
int64_t time = Minecraft::frameTimes[i] / 200000; __int64 time = Minecraft::frameTimes[i] / 200000;
int64_t time2 = Minecraft::tickTimes[i] / 200000; __int64 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 - time + 0.5f), (float)( 0));
t->vertex((float)(i + 0.5f), (float)( height + 0.5f), (float)( 0)); t->vertex((float)(i + 0.5f), (float)( height + 0.5f), (float)( 0));
@ -3551,7 +3551,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
player->drop(); player->drop();
} }
uint64_t ullButtonsPressed=player->ullButtonsPressed; __uint64 ullButtonsPressed=player->ullButtonsPressed;
bool selected = false; bool selected = false;
#ifdef __PSVITA__ #ifdef __PSVITA__
@ -4542,7 +4542,7 @@ void Minecraft::main()
// 4J-PB - Can't call this for the first 5 seconds of a game - MS rule // 4J-PB - Can't call this for the first 5 seconds of a game - MS rule
//if (ProfileManager.IsFullVersion()) //if (ProfileManager.IsFullVersion())
{ {
name = L"Player" + _toString<int64_t>(System::currentTimeMillis() % 1000); name = L"Player" + _toString<__int64>(System::currentTimeMillis() % 1000);
sessionId = L"-"; sessionId = L"-";
/* 4J - TODO - get a session ID from somewhere? /* 4J - TODO - get a session ID from somewhere?
if (args.length > 0) name = args[0]; if (args.length > 0) name = args[0];
@ -4647,7 +4647,7 @@ void Minecraft::delayTextureReload()
reloadTextures = true; reloadTextures = true;
} }
int64_t Minecraft::currentTimeMillis() __int64 Minecraft::currentTimeMillis()
{ {
return System::currentTimeMillis();//(Sys.getTime() * 1000) / Sys.getTimerResolution(); return System::currentTimeMillis();//(Sys.getTime() * 1000) / Sys.getTimerResolution();
} }

View file

@ -165,11 +165,11 @@ private:
LevelStorageSource *levelSource; LevelStorageSource *levelSource;
public: public:
static const int frameTimes_length = 512; static const int frameTimes_length = 512;
static int64_t frameTimes[frameTimes_length]; static __int64 frameTimes[frameTimes_length];
static const int tickTimes_length = 512; static const int tickTimes_length = 512;
static int64_t tickTimes[tickTimes_length]; static __int64 tickTimes[tickTimes_length];
static int frameTimePos; static int frameTimePos;
static int64_t warezTime; static __int64 warezTime;
private: private:
int rightClickDelay; int rightClickDelay;
public: public:
@ -230,9 +230,9 @@ private:
// String grabHugeScreenshot(File workDir2, int width, int height, int ssWidth, int ssHeight); // 4J - removed // String grabHugeScreenshot(File workDir2, int width, int height, int ssWidth, int ssHeight); // 4J - removed
// 4J - per player thing? // 4J - per player thing?
int64_t lastTimer; __int64 lastTimer;
void renderFpsMeter(int64_t tickTime); void renderFpsMeter(__int64 tickTime);
public: public:
void stop(); void stop();
// 4J removed // 4J removed
@ -253,7 +253,7 @@ public:
//bool isRaining ; //bool isRaining ;
// 4J - Moved to per player // 4J - Moved to per player
//int64_t lastTickTime; //__int64 lastTickTime;
private: private:
// 4J- per player? // 4J- per player?
@ -301,7 +301,7 @@ public:
static int maxSupportedTextureSize(); static int maxSupportedTextureSize();
void delayTextureReload(); void delayTextureReload();
static int64_t currentTimeMillis(); static __int64 currentTimeMillis();
#ifdef _DURANGO #ifdef _DURANGO
static void inGameSignInCheckAllPrivilegesCallback(LPVOID lpParam, bool hasPrivileges, int iPad); static void inGameSignInCheckAllPrivilegesCallback(LPVOID lpParam, bool hasPrivileges, int iPad);

View file

@ -54,9 +54,9 @@
//4J Added //4J Added
MinecraftServer *MinecraftServer::server = NULL; MinecraftServer *MinecraftServer::server = NULL;
bool MinecraftServer::setTimeAtEndOfTick = false; bool MinecraftServer::setTimeAtEndOfTick = false;
int64_t MinecraftServer::setTime = 0; __int64 MinecraftServer::setTime = 0;
bool MinecraftServer::setTimeOfDayAtEndOfTick = false; bool MinecraftServer::setTimeOfDayAtEndOfTick = false;
int64_t MinecraftServer::setTimeOfDay = 0; __int64 MinecraftServer::setTimeOfDay = 0;
bool MinecraftServer::m_bPrimaryPlayerSignedOut=false; bool MinecraftServer::m_bPrimaryPlayerSignedOut=false;
bool MinecraftServer::s_bServerHalted=false; bool MinecraftServer::s_bServerHalted=false;
bool MinecraftServer::s_bSaveOnExitAnswered=false; bool MinecraftServer::s_bSaveOnExitAnswered=false;
@ -99,7 +99,7 @@ MinecraftServer::~MinecraftServer()
{ {
} }
bool MinecraftServer::initServer(int64_t seed, NetworkGameInitData *initData, DWORD initSettings, bool findSeed) bool MinecraftServer::initServer(__int64 seed, NetworkGameInitData *initData, DWORD initSettings, bool findSeed)
{ {
// 4J - removed // 4J - removed
#if 0 #if 0
@ -149,7 +149,7 @@ bool MinecraftServer::initServer(int64_t seed, NetworkGameInitData *initData, DW
//localIp = settings->getString(L"server-ip", L""); //localIp = settings->getString(L"server-ip", L"");
//onlineMode = settings->getBoolean(L"online-mode", true); //onlineMode = settings->getBoolean(L"online-mode", true);
//motd = settings->getString(L"motd", L"A Minecraft Server"); //motd = settings->getString(L"motd", L"A Minecraft Server");
//motd.replace('<EFBFBD>', '$'); //motd.replace('§', '$');
setAnimals(settings->getBoolean(L"spawn-animals", true)); setAnimals(settings->getBoolean(L"spawn-animals", true));
setNpcsEnabled(settings->getBoolean(L"spawn-npcs", true)); setNpcsEnabled(settings->getBoolean(L"spawn-npcs", true));
@ -201,7 +201,7 @@ bool MinecraftServer::initServer(int64_t seed, NetworkGameInitData *initData, DW
// TODO: Stop loading, add error message. // TODO: Stop loading, add error message.
} }
int64_t levelNanoTime = System::nanoTime(); __int64 levelNanoTime = System::nanoTime();
wstring levelName = settings->getString(L"level-name", L"world"); wstring levelName = settings->getString(L"level-name", L"world");
wstring levelTypeString; wstring levelTypeString;
@ -245,10 +245,10 @@ bool MinecraftServer::initServer(int64_t seed, NetworkGameInitData *initData, DW
#if 0 #if 0
wstring levelSeedString = settings->getString(L"level-seed", L""); wstring levelSeedString = settings->getString(L"level-seed", L"");
int64_t levelSeed = (new Random())->nextLong(); __int64 levelSeed = (new Random())->nextLong();
if (levelSeedString.length() > 0) if (levelSeedString.length() > 0)
{ {
long newSeed = _fromString<int64_t>(levelSeedString); long newSeed = _fromString<__int64>(levelSeedString);
if (newSeed != 0) { if (newSeed != 0) {
levelSeed = newSeed; levelSeed = newSeed;
} }
@ -375,7 +375,7 @@ void MinecraftServer::postProcessTerminate(ProgressRenderer *mcprogress)
DeleteCriticalSection(&m_postProcessCS); DeleteCriticalSection(&m_postProcessCS);
} }
bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring& name, int64_t levelSeed, LevelType *pLevelType, NetworkGameInitData *initData) bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring& name, __int64 levelSeed, LevelType *pLevelType, NetworkGameInitData *initData)
{ {
// 4J - TODO - do with new save stuff // 4J - TODO - do with new save stuff
// if (storageSource->requiresConversion(name)) // if (storageSource->requiresConversion(name))
@ -518,7 +518,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring
m_postUpdateThread->SetPriority(THREAD_PRIORITY_ABOVE_NORMAL); m_postUpdateThread->SetPriority(THREAD_PRIORITY_ABOVE_NORMAL);
m_postUpdateThread->Run(); m_postUpdateThread->Run();
int64_t startTime = System::currentTimeMillis(); __int64 startTime = System::currentTimeMillis();
// 4J Stu - Added this to temporarily make starting games on vita faster // 4J Stu - Added this to temporarily make starting games on vita faster
#ifdef __PSVITA__ #ifdef __PSVITA__
@ -548,7 +548,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring
csf->closeHandle(fe); csf->closeHandle(fe);
} }
int64_t lastTime = System::currentTimeMillis(); __int64 lastTime = System::currentTimeMillis();
// 4J Stu - This loop is changed in 1.0.1 to only process the first level (ie the overworld), but I think we still want to do them all // 4J Stu - This loop is changed in 1.0.1 to only process the first level (ie the overworld), but I think we still want to do them all
int i = 0; int i = 0;
@ -564,7 +564,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring
} }
#if 0 #if 0
int64_t lastStorageTickTime = System::currentTimeMillis(); __int64 lastStorageTickTime = System::currentTimeMillis();
// Test code to enable full creation of levels at start up // Test code to enable full creation of levels at start up
int halfsidelen = ( i == 0 ) ? 27 : 9; int halfsidelen = ( i == 0 ) ? 27 : 9;
@ -587,7 +587,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring
} }
} }
#else #else
int64_t lastStorageTickTime = System::currentTimeMillis(); __int64 lastStorageTickTime = System::currentTimeMillis();
Pos *spawnPos = level->getSharedSpawnPos(); Pos *spawnPos = level->getSharedSpawnPos();
int twoRPlusOne = r*2 + 1; int twoRPlusOne = r*2 + 1;
@ -604,7 +604,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring
return false; return false;
} }
// printf(">>>%d %d %d\n",i,x,z); // printf(">>>%d %d %d\n",i,x,z);
// int64_t now = System::currentTimeMillis(); // __int64 now = System::currentTimeMillis();
// if (now < lastTime) lastTime = now; // if (now < lastTime) lastTime = now;
// if (now > lastTime + 1000) // if (now > lastTime + 1000)
{ {
@ -1044,7 +1044,7 @@ CommandDispatcher *MinecraftServer::getCommandDispatcher()
} }
extern int c0a, c0b, c1a, c1b, c1c, c2a, c2b; extern int c0a, c0b, c1a, c1b, c1c, c2a, c2b;
void MinecraftServer::run(int64_t seed, void *lpParameter) void MinecraftServer::run(__int64 seed, void *lpParameter)
{ {
NetworkGameInitData *initData = NULL; NetworkGameInitData *initData = NULL;
DWORD initSettings = 0; DWORD initSettings = 0;
@ -1075,18 +1075,18 @@ void MinecraftServer::run(int64_t seed, void *lpParameter)
} }
} }
int64_t lastTime = System::currentTimeMillis(); __int64 lastTime = System::currentTimeMillis();
int64_t unprocessedTime = 0; __int64 unprocessedTime = 0;
while (running && !s_bServerHalted) while (running && !s_bServerHalted)
{ {
int64_t now = System::currentTimeMillis(); __int64 now = System::currentTimeMillis();
// 4J Stu - When we pause the server, we don't want to count that as time passed // 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 // 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 //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; //if(m_isServerPaused) lastTime = now;
int64_t passedTime = now - lastTime; __int64 passedTime = now - lastTime;
if (passedTime > MS_PER_TICK * 40) if (passedTime > MS_PER_TICK * 40)
{ {
// logger.warning("Can't keep up! Did the system time change, or is the server overloaded?"); // logger.warning("Can't keep up! Did the system time change, or is the server overloaded?");
@ -1112,13 +1112,13 @@ void MinecraftServer::run(int64_t seed, void *lpParameter)
else else
{ {
// int tickcount = 0; // int tickcount = 0;
// int64_t beforeall = System::currentTimeMillis(); // __int64 beforeall = System::currentTimeMillis();
while (unprocessedTime > MS_PER_TICK) while (unprocessedTime > MS_PER_TICK)
{ {
unprocessedTime -= MS_PER_TICK; unprocessedTime -= MS_PER_TICK;
// int64_t before = System::currentTimeMillis(); // __int64 before = System::currentTimeMillis();
tick(); tick();
// int64_t after = System::currentTimeMillis(); // __int64 after = System::currentTimeMillis();
// PIXReportCounter(L"Server time",(float)(after-before)); // PIXReportCounter(L"Server time",(float)(after-before));
// 4J Ensure that the slow queue owner keeps cycling if it's not been used in a while // 4J Ensure that the slow queue owner keeps cycling if it's not been used in a while
@ -1135,7 +1135,7 @@ void MinecraftServer::run(int64_t seed, void *lpParameter)
// app.DebugPrintf("Not considering cycling: %d - %d -> %d > %d\n",time, s_slowQueueLastTime, (time - s_slowQueueLastTime), (2*MINECRAFT_SERVER_SLOW_QUEUE_DELAY)); // app.DebugPrintf("Not considering cycling: %d - %d -> %d > %d\n",time, s_slowQueueLastTime, (time - s_slowQueueLastTime), (2*MINECRAFT_SERVER_SLOW_QUEUE_DELAY));
// } // }
} }
// int64_t afterall = System::currentTimeMillis(); // __int64 afterall = System::currentTimeMillis();
// PIXReportCounter(L"Server time all",(float)(afterall-beforeall)); // PIXReportCounter(L"Server time all",(float)(afterall-beforeall));
// PIXReportCounter(L"Server ticks",(float)tickcount); // PIXReportCounter(L"Server ticks",(float)tickcount);
} }
@ -1479,11 +1479,11 @@ void MinecraftServer::tick()
players->broadcastAll( shared_ptr<SetTimePacket>( new SetTimePacket(level->getTime() ) ), level->dimension->id); players->broadcastAll( shared_ptr<SetTimePacket>( new SetTimePacket(level->getTime() ) ), level->dimension->id);
} }
// #ifndef __PS3__ // #ifndef __PS3__
static int64_t stc = 0; static __int64 stc = 0;
int64_t st0 = System::currentTimeMillis(); __int64 st0 = System::currentTimeMillis();
PIXBeginNamedEvent(0,"Level tick %d",i); PIXBeginNamedEvent(0,"Level tick %d",i);
((Level *)level)->tick(); ((Level *)level)->tick();
int64_t st1 = System::currentTimeMillis(); __int64 st1 = System::currentTimeMillis();
PIXEndNamedEvent(); PIXEndNamedEvent();
PIXBeginNamedEvent(0,"Update lights %d",i); PIXBeginNamedEvent(0,"Update lights %d",i);
// 4J - used to be in a while loop, but we don't want the server locking up for a big chunk of time (could end up trying to process 1,000,000 lights...) // 4J - used to be in a while loop, but we don't want the server locking up for a big chunk of time (could end up trying to process 1,000,000 lights...)
@ -1491,7 +1491,7 @@ void MinecraftServer::tick()
// printf("lights: %d\n",level->getLightsToUpdate()); // printf("lights: %d\n",level->getLightsToUpdate());
while(level->updateLights() ) while(level->updateLights() )
; ;
int64_t st2 = System::currentTimeMillis(); __int64 st2 = System::currentTimeMillis();
PIXEndNamedEvent(); PIXEndNamedEvent();
PIXBeginNamedEvent(0,"Entity tick %d",i); PIXBeginNamedEvent(0,"Entity tick %d",i);
// 4J added to stop ticking entities in levels when players are not in those levels. // 4J added to stop ticking entities in levels when players are not in those levels.
@ -1519,7 +1519,7 @@ void MinecraftServer::tick()
level->getTracker()->tick(); level->getTracker()->tick();
PIXEndNamedEvent(); PIXEndNamedEvent();
int64_t st3 = System::currentTimeMillis(); __int64 st3 = System::currentTimeMillis();
// printf(">>>>>>>>>>>>>>>>>>>>>> Tick %d %d %d : %d\n", st1 - st0, st2 - st1, st3 - st2, st0 - stc ); // printf(">>>>>>>>>>>>>>>>>>>>>> Tick %d %d %d : %d\n", st1 - st0, st2 - st1, st3 - st2, st0 - stc );
stc = st0; stc = st0;
// #endif// __PS3__ // #endif// __PS3__
@ -1564,7 +1564,7 @@ void MinecraftServer::handleConsoleInputs()
} }
} }
void MinecraftServer::main(int64_t seed, void *lpParameter) void MinecraftServer::main(__int64 seed, void *lpParameter)
{ {
#if __PS3__ #if __PS3__
ShutdownManager::HasStarted(ShutdownManager::eServerThread ); ShutdownManager::HasStarted(ShutdownManager::eServerThread );

View file

@ -23,14 +23,14 @@ class CommandDispatcher;
typedef struct _LoadSaveDataThreadParam typedef struct _LoadSaveDataThreadParam
{ {
LPVOID data; LPVOID data;
int64_t fileSize; __int64 fileSize;
const wstring saveName; const wstring saveName;
_LoadSaveDataThreadParam(LPVOID data, int64_t filesize, const wstring &saveName) : data( data ), fileSize( filesize ), saveName( saveName ) {} _LoadSaveDataThreadParam(LPVOID data, __int64 filesize, const wstring &saveName) : data( data ), fileSize( filesize ), saveName( saveName ) {}
} LoadSaveDataThreadParam; } LoadSaveDataThreadParam;
typedef struct _NetworkGameInitData typedef struct _NetworkGameInitData
{ {
int64_t seed; __int64 seed;
LoadSaveDataThreadParam *saveData; LoadSaveDataThreadParam *saveData;
DWORD settings; DWORD settings;
LevelGenerationOptions *levelGen; LevelGenerationOptions *levelGen;
@ -125,9 +125,9 @@ public:
~MinecraftServer(); ~MinecraftServer();
private: private:
// 4J Added - LoadSaveDataThreadParam // 4J Added - LoadSaveDataThreadParam
bool initServer(int64_t seed, NetworkGameInitData *initData, DWORD initSettings, bool findSeed); bool initServer(__int64 seed, NetworkGameInitData *initData, DWORD initSettings, bool findSeed);
void postProcessTerminate(ProgressRenderer *mcprogress); void postProcessTerminate(ProgressRenderer *mcprogress);
bool loadLevel(LevelStorageSource *storageSource, const wstring& name, int64_t levelSeed, LevelType *pLevelType, NetworkGameInitData *initData); bool loadLevel(LevelStorageSource *storageSource, const wstring& name, __int64 levelSeed, LevelType *pLevelType, NetworkGameInitData *initData);
void setProgress(const wstring& status, int progress); void setProgress(const wstring& status, int progress);
void endProgress(); void endProgress();
void saveAllChunks(); void saveAllChunks();
@ -154,7 +154,7 @@ public:
public: public:
void halt(); void halt();
void run(int64_t seed, void *lpParameter); void run(__int64 seed, void *lpParameter);
void broadcastStartSavingPacket(); void broadcastStartSavingPacket();
void broadcastStopSavingPacket(); void broadcastStopSavingPacket();
@ -165,7 +165,7 @@ public:
void handleConsoleInput(const wstring& msg, ConsoleInputSource *source); void handleConsoleInput(const wstring& msg, ConsoleInputSource *source);
void handleConsoleInputs(); void handleConsoleInputs();
// void addTickable(Tickable tickable); // 4J removed // void addTickable(Tickable tickable); // 4J removed
static void main(int64_t seed, void *lpParameter); static void main(__int64 seed, void *lpParameter);
static void HaltServer(bool bPrimaryPlayerSignedOut=false); static void HaltServer(bool bPrimaryPlayerSignedOut=false);
File *getFile(const wstring& name); File *getFile(const wstring& name);
@ -185,9 +185,9 @@ private:
static MinecraftServer *server; static MinecraftServer *server;
static bool setTimeOfDayAtEndOfTick; static bool setTimeOfDayAtEndOfTick;
static int64_t setTimeOfDay; static __int64 setTimeOfDay;
static bool setTimeAtEndOfTick; static bool setTimeAtEndOfTick;
static int64_t setTime; static __int64 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 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 static bool s_bServerHalted; // 4J Stu Added so that we can halt the server even before it's been created properly
@ -211,8 +211,8 @@ public:
public: public:
static PlayerList *getPlayerList() { if( server != NULL ) return server->players; else return NULL; } static PlayerList *getPlayerList() { if( server != NULL ) return server->players; else return NULL; }
static void SetTimeOfDay(int64_t time) { setTimeOfDayAtEndOfTick = true; setTimeOfDay = time; } static void SetTimeOfDay(__int64 time) { setTimeOfDayAtEndOfTick = true; setTimeOfDay = time; }
static void SetTime(int64_t time) { setTimeAtEndOfTick = true; setTime = time; } static void SetTime(__int64 time) { setTimeAtEndOfTick = true; setTime = time; }
C4JThread::Event* m_serverPausedEvent; C4JThread::Event* m_serverPausedEvent;
private: private:

View file

@ -917,8 +917,8 @@
#define RAD_S32 signed int #define RAD_S32 signed int
// But pointers are 64 bits. // But pointers are 64 bits.
#if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 ) #if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 )
#define RAD_SINTa __w64 signed int64_t #define RAD_SINTa __w64 signed __int64
#define RAD_UINTa __w64 uint64_t #define RAD_UINTa __w64 unsigned __int64
#else // non-vc.net compiler or /Wp64 turned off #else // non-vc.net compiler or /Wp64 turned off
#define RAD_UINTa unsigned long long #define RAD_UINTa unsigned long long
#define RAD_SINTa signed long long #define RAD_SINTa signed long long
@ -976,8 +976,8 @@
#define RAD_U64 unsigned long long #define RAD_U64 unsigned long long
#define RAD_S64 signed long long #define RAD_S64 signed long long
#elif defined(__RADX64__) || defined(__RAD32__) #elif defined(__RADX64__) || defined(__RAD32__)
#define RAD_U64 unsigned long long #define RAD_U64 unsigned __int64
#define RAD_S64 signed long long #define RAD_S64 signed __int64
#else #else
// 16-bit // 16-bit
typedef RADSTRUCT RAD_U64 // do this so that we don't accidentally use U64s 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_BSWAP16 _byteswap_ushort
#define RR_BSWAP32 _byteswap_ulong #define RR_BSWAP32 _byteswap_ulong
unsigned long long __cdecl _byteswap_uint64 (unsigned long long val); unsigned __int64 __cdecl _byteswap_uint64 (unsigned __int64 val);
#pragma intrinsic(_byteswap_uint64) #pragma intrinsic(_byteswap_uint64)
#define RR_BSWAP64 _byteswap_uint64 #define RR_BSWAP64 _byteswap_uint64
@ -1909,7 +1909,7 @@ RADFORCEINLINE unsigned long RR_BSWAP32 (unsigned long _Long)
return _Long; return _Long;
} }
RADFORCEINLINE unsigned long long RR_BSWAP64 (unsigned long long _Long) RADFORCEINLINE unsigned __int64 RR_BSWAP64 (unsigned __int64 _Long)
{ {
__asm { __asm {
mov eax, DWORD PTR _Long 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) #if ( defined(_MSC_VER) && _MSC_VER >= 1300)
unsigned long long __cdecl _rotl64(unsigned long long _Val, int _Shift); unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
#pragma intrinsic(_rotl64) #pragma intrinsic(_rotl64)
#define RR_ROTL64(x,k) _rotl64((unsigned long long)(x),(int)(k)) #define RR_ROTL64(x,k) _rotl64((unsigned __int64)(x),(int)(k))
#elif defined(__RADCELL__) #elif defined(__RADCELL__)

View file

@ -326,7 +326,7 @@ RADDEFSTART
typedef CHAR *LPSTR, *PSTR; typedef CHAR *LPSTR, *PSTR;
#ifdef IS_WIN64 #ifdef IS_WIN64
typedef uint64_t ULONG_PTR, *PULONG_PTR; typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
#else #else
#ifdef _Wp64 #ifdef _Wp64
#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 #if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300

View file

@ -917,8 +917,8 @@
#define RAD_S32 signed int #define RAD_S32 signed int
// But pointers are 64 bits. // But pointers are 64 bits.
#if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 ) #if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 )
#define RAD_SINTa __w64 signed long long #define RAD_SINTa __w64 signed __int64
#define RAD_UINTa __w64 unsigned long long #define RAD_UINTa __w64 unsigned __int64
#else // non-vc.net compiler or /Wp64 turned off #else // non-vc.net compiler or /Wp64 turned off
#define RAD_UINTa unsigned long long #define RAD_UINTa unsigned long long
#define RAD_SINTa signed long long #define RAD_SINTa signed long long
@ -976,8 +976,8 @@
#define RAD_U64 unsigned long long #define RAD_U64 unsigned long long
#define RAD_S64 signed long long #define RAD_S64 signed long long
#elif defined(__RADX64__) || defined(__RAD32__) #elif defined(__RADX64__) || defined(__RAD32__)
#define RAD_U64 unsigned long long #define RAD_U64 unsigned __int64
#define RAD_S64 signed long long #define RAD_S64 signed __int64
#else #else
// 16-bit // 16-bit
typedef RADSTRUCT RAD_U64 // do this so that we don't accidentally use U64s 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_BSWAP16 _byteswap_ushort
#define RR_BSWAP32 _byteswap_ulong #define RR_BSWAP32 _byteswap_ulong
unsigned long long __cdecl _byteswap_uint64 (unsigned long long val); unsigned __int64 __cdecl _byteswap_uint64 (unsigned __int64 val);
#pragma intrinsic(_byteswap_uint64) #pragma intrinsic(_byteswap_uint64)
#define RR_BSWAP64 _byteswap_uint64 #define RR_BSWAP64 _byteswap_uint64
@ -1909,7 +1909,7 @@ RADFORCEINLINE unsigned long RR_BSWAP32 (unsigned long _Long)
return _Long; return _Long;
} }
RADFORCEINLINE unsigned long long RR_BSWAP64 (unsigned long long) RADFORCEINLINE unsigned __int64 RR_BSWAP64 (unsigned __int64 _Long)
{ {
__asm { __asm {
mov eax, DWORD PTR _Long 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) #if ( defined(_MSC_VER) && _MSC_VER >= 1300)
unsigned long long __cdecl _rotl64(unsigned long long _Val, int _Shift); unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
#pragma intrinsic(_rotl64) #pragma intrinsic(_rotl64)
#define RR_ROTL64(x,k) _rotl64((unsigned long long)(x),(int)(k)) #define RR_ROTL64(x,k) _rotl64((unsigned __int64)(x),(int)(k))
#elif defined(__RADCELL__) #elif defined(__RADCELL__)

View file

@ -21,8 +21,8 @@ int (* SQRNetworkManager_Orbis::s_SignInCompleteCallbackFn)(void *pParam, bool b
void * SQRNetworkManager_Orbis::s_SignInCompleteParam = NULL; void * SQRNetworkManager_Orbis::s_SignInCompleteParam = NULL;
sce::Toolkit::NP::PresenceDetails SQRNetworkManager_Orbis::s_lastPresenceInfo; sce::Toolkit::NP::PresenceDetails SQRNetworkManager_Orbis::s_lastPresenceInfo;
int64_t SQRNetworkManager_Orbis::s_lastPresenceTime = 0; __int64 SQRNetworkManager_Orbis::s_lastPresenceTime = 0;
int64_t SQRNetworkManager_Orbis::s_resendPresenceTime = 0; __int64 SQRNetworkManager_Orbis::s_resendPresenceTime = 0;
bool SQRNetworkManager_Orbis::s_presenceStatusDirty = false; bool SQRNetworkManager_Orbis::s_presenceStatusDirty = false;
bool SQRNetworkManager_Orbis::s_presenceDataDirty = false; bool SQRNetworkManager_Orbis::s_presenceDataDirty = false;

View file

@ -325,8 +325,8 @@ private:
static sce::Toolkit::NP::PresenceDetails s_lastPresenceInfo; 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 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_t s_lastPresenceTime; static __int64 s_lastPresenceTime;
static int64_t s_resendPresenceTime; static __int64 s_resendPresenceTime;
static bool s_presenceStatusDirty; static bool s_presenceStatusDirty;
static bool s_presenceDataDirty; static bool s_presenceDataDirty;

View file

@ -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;} 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 _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_t _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 _Val, char * _DstBuf, size_t _Size, int _Radix) { if(_Radix==10) sprintf(_DstBuf,"%lld",_Val); else return -1; return 0; }
DWORD XGetLanguage() DWORD XGetLanguage()
{ {

View file

@ -356,7 +356,7 @@ VOID OutputDebugString(LPCSTR lpOutputString);
VOID OutputDebugStringA(LPCSTR lpOutputString); VOID OutputDebugStringA(LPCSTR lpOutputString);
errno_t _itoa_s(int _Value, char * _DstBuf, size_t _Size, int _Radix); errno_t _itoa_s(int _Value, char * _DstBuf, size_t _Size, int _Radix);
errno_t _i64toa_s(int64_t _Val, char * _DstBuf, size_t _Size, int _Radix); errno_t _i64toa_s(__int64 _Val, char * _DstBuf, size_t _Size, int _Radix);
#define __declspec(a) #define __declspec(a)
extern "C" int _wcsicmp (const wchar_t * dst, const wchar_t * src); extern "C" int _wcsicmp (const wchar_t * dst, const wchar_t * src);

View file

@ -34,6 +34,8 @@ typedef unsigned int *PUINT;
typedef unsigned char byte; typedef unsigned char byte;
typedef long __int64;
typedef unsigned long __uint64;
typedef unsigned int DWORD; typedef unsigned int DWORD;
typedef int INT; typedef int INT;
typedef unsigned long ULONG_PTR, *PULONG_PTR; typedef unsigned long ULONG_PTR, *PULONG_PTR;

View file

@ -400,7 +400,7 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart()
StorageManager.SetSaveTitle(wWorldName.c_str()); StorageManager.SetSaveTitle(wWorldName.c_str());
bool isFlat = false; bool isFlat = false;
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 __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
NetworkGameInitData *param = new NetworkGameInitData(); NetworkGameInitData *param = new NetworkGameInitData();
param->seed = seedValue; param->seed = seedValue;

View file

@ -106,10 +106,10 @@ void *user_malloc(size_t size)
{ {
#if 0 #if 0
static int throttle = 0; static int throttle = 0;
static int64_t lasttime = 0; static __int64 lasttime = 0;
if( ( throttle % 100 ) == 0 ) if( ( throttle % 100 ) == 0 )
{ {
int64_t nowtime = System::currentTimeMillis(); __int64 nowtime = System::currentTimeMillis();
if( ( nowtime - lasttime ) > 20000 ) if( ( nowtime - lasttime ) > 20000 )
{ {
lasttime = nowtime; lasttime = nowtime;

View file

@ -917,8 +917,8 @@
#define RAD_S32 signed int #define RAD_S32 signed int
// But pointers are 64 bits. // But pointers are 64 bits.
#if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 ) #if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 )
#define RAD_SINTa __w64 signed long long #define RAD_SINTa __w64 signed __int64
#define RAD_UINTa __w64 unsigned long long #define RAD_UINTa __w64 unsigned __int64
#else // non-vc.net compiler or /Wp64 turned off #else // non-vc.net compiler or /Wp64 turned off
#define RAD_UINTa unsigned long long #define RAD_UINTa unsigned long long
#define RAD_SINTa signed long long #define RAD_SINTa signed long long
@ -976,8 +976,8 @@
#define RAD_U64 unsigned long long #define RAD_U64 unsigned long long
#define RAD_S64 signed long long #define RAD_S64 signed long long
#elif defined(__RADX64__) || defined(__RAD32__) #elif defined(__RADX64__) || defined(__RAD32__)
#define RAD_U64 unsigned long long #define RAD_U64 unsigned __int64
#define RAD_S64 signed long long #define RAD_S64 signed __int64
#else #else
// 16-bit // 16-bit
typedef RADSTRUCT RAD_U64 // do this so that we don't accidentally use U64s 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_BSWAP16 _byteswap_ushort
#define RR_BSWAP32 _byteswap_ulong #define RR_BSWAP32 _byteswap_ulong
unsigned long long __cdecl _byteswap_uint64 (unsigned long long val); unsigned __int64 __cdecl _byteswap_uint64 (unsigned __int64 val);
#pragma intrinsic(_byteswap_uint64) #pragma intrinsic(_byteswap_uint64)
#define RR_BSWAP64 _byteswap_uint64 #define RR_BSWAP64 _byteswap_uint64
@ -1909,7 +1909,7 @@ RADFORCEINLINE unsigned long RR_BSWAP32 (unsigned long _Long)
return _Long; return _Long;
} }
RADFORCEINLINE unsigned long long RR_BSWAP64 (unsigned long long _Long) RADFORCEINLINE unsigned __int64 RR_BSWAP64 (unsigned __int64 _Long)
{ {
__asm { __asm {
mov eax, DWORD PTR _Long 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) #if ( defined(_MSC_VER) && _MSC_VER >= 1300)
unsigned long long __cdecl _rotl64(unsigned long long _Val, int _Shift); unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
#pragma intrinsic(_rotl64) #pragma intrinsic(_rotl64)
#define RR_ROTL64(x,k) _rotl64((uint64_t)(x),(int)(k)) #define RR_ROTL64(x,k) _rotl64((unsigned __int64)(x),(int)(k))
#elif defined(__RADCELL__) #elif defined(__RADCELL__)

View file

@ -326,7 +326,7 @@ RADDEFSTART
typedef CHAR *LPSTR, *PSTR; typedef CHAR *LPSTR, *PSTR;
#ifdef IS_WIN64 #ifdef IS_WIN64
typedef uint64_t ULONG_PTR, *PULONG_PTR; typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
#else #else
#ifdef _Wp64 #ifdef _Wp64
#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 #if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300

View file

@ -917,8 +917,8 @@
#define RAD_S32 signed int #define RAD_S32 signed int
// But pointers are 64 bits. // But pointers are 64 bits.
#if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 ) #if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 )
#define RAD_SINTa __w64 signed long long #define RAD_SINTa __w64 signed __int64
#define RAD_UINTa __w64 unsigned long long #define RAD_UINTa __w64 unsigned __int64
#else // non-vc.net compiler or /Wp64 turned off #else // non-vc.net compiler or /Wp64 turned off
#define RAD_UINTa unsigned long long #define RAD_UINTa unsigned long long
#define RAD_SINTa signed long long #define RAD_SINTa signed long long
@ -976,8 +976,8 @@
#define RAD_U64 unsigned long long #define RAD_U64 unsigned long long
#define RAD_S64 signed long long #define RAD_S64 signed long long
#elif defined(__RADX64__) || defined(__RAD32__) #elif defined(__RADX64__) || defined(__RAD32__)
#define RAD_U64 unsigned long long #define RAD_U64 unsigned __int64
#define RAD_S64 signed long long #define RAD_S64 signed __int64
#else #else
// 16-bit // 16-bit
typedef RADSTRUCT RAD_U64 // do this so that we don't accidentally use U64s 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_BSWAP16 _byteswap_ushort
#define RR_BSWAP32 _byteswap_ulong #define RR_BSWAP32 _byteswap_ulong
unsigned long long __cdecl _byteswap_uint64 (unsigned long long val); unsigned __int64 __cdecl _byteswap_uint64 (unsigned __int64 val);
#pragma intrinsic(_byteswap_uint64) #pragma intrinsic(_byteswap_uint64)
#define RR_BSWAP64 _byteswap_uint64 #define RR_BSWAP64 _byteswap_uint64
@ -1909,7 +1909,7 @@ RADFORCEINLINE unsigned long RR_BSWAP32 (unsigned long _Long)
return _Long; return _Long;
} }
RADFORCEINLINE unsigned long long RR_BSWAP64 (unsigned long long _Long) RADFORCEINLINE unsigned __int64 RR_BSWAP64 (unsigned __int64 _Long)
{ {
__asm { __asm {
mov eax, DWORD PTR _Long 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) #if ( defined(_MSC_VER) && _MSC_VER >= 1300)
unsigned long long __cdecl _rotl64(unsigned long long _Val, int _Shift); unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
#pragma intrinsic(_rotl64) #pragma intrinsic(_rotl64)
#define RR_ROTL64(x,k) _rotl64((unsigned long long)(x),(int)(k)) #define RR_ROTL64(x,k) _rotl64((unsigned __int64)(x),(int)(k))
#elif defined(__RADCELL__) #elif defined(__RADCELL__)

View file

@ -345,7 +345,7 @@ bool SonyRemoteStorage_PS3::setDataInternal()
char seed[22]; char seed[22];
app.GetImageTextData(m_thumbnailData, m_thumbnailDataSize,(unsigned char *)seed, uiHostOptions, bHostOptionsRead, uiTexturePack); app.GetImageTextData(m_thumbnailData, m_thumbnailDataSize,(unsigned char *)seed, uiHostOptions, bHostOptionsRead, uiTexturePack);
int64_t iSeed = strtoll(seed,NULL,10); __int64 iSeed = strtoll(seed,NULL,10);
char seedHex[17]; char seedHex[17];
sprintf(seedHex,"%016llx",iSeed); sprintf(seedHex,"%016llx",iSeed);
memcpy(descData.m_seed,seedHex,16); // Don't copy null memcpy(descData.m_seed,seedHex,16); // Don't copy null

View file

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

View file

@ -671,7 +671,7 @@ HANDLE FindFirstFileA(LPCSTR lpFileName, LPWIN32_FIND_DATA lpFindFileData) { PS3
BOOL FindNextFileA(HANDLE hFindFile, LPWIN32_FIND_DATAA lpFindFileData) { PS3_STUBBED; return false;} 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 _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_t _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 _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) int _wtoi(const wchar_t *_Str)
{ {

View file

@ -364,7 +364,7 @@ VOID OutputDebugString(LPCSTR lpOutputString);
VOID OutputDebugStringA(LPCSTR lpOutputString); VOID OutputDebugStringA(LPCSTR lpOutputString);
errno_t _itoa_s(int _Value, char * _DstBuf, size_t _Size, int _Radix); errno_t _itoa_s(int _Value, char * _DstBuf, size_t _Size, int _Radix);
errno_t _i64toa_s(int64_t _Val, char * _DstBuf, size_t _Size, int _Radix); errno_t _i64toa_s(__int64 _Val, char * _DstBuf, size_t _Size, int _Radix);
int _wtoi(const wchar_t *_Str); int _wtoi(const wchar_t *_Str);

View file

@ -111,19 +111,21 @@ typedef unsigned int *PUINT;
typedef unsigned char byte; typedef unsigned char byte;
typedef long long __int64;
typedef unsigned long long __uint64;
typedef unsigned long DWORD; typedef unsigned long DWORD;
typedef int INT; typedef int INT;
typedef unsigned long ULONG_PTR, *PULONG_PTR; typedef unsigned long ULONG_PTR, *PULONG_PTR;
typedef ULONG_PTR SIZE_T, *PSIZE_T; typedef ULONG_PTR SIZE_T, *PSIZE_T;
typedef int64_t LONG64, *PLONG64; typedef __int64 LONG64, *PLONG64;
#define VOID void #define VOID void
typedef char CHAR; typedef char CHAR;
typedef short SHORT; typedef short SHORT;
typedef long LONG; typedef long LONG;
typedef long long LONGLONG; typedef __int64 LONGLONG;
typedef unsigned long long ULONGLONG; typedef __uint64 ULONGLONG;
#define CONST const #define CONST const

View file

@ -138,10 +138,10 @@ private:
ArchiveImplementation::load(t); ArchiveImplementation::load(t);
} }
#elif defined(BOOST_HAS_MS_INT64) #elif defined(BOOST_HAS_MS_INT64)
virtual void load(int64_t & t){ virtual void load(__int64 & t){
ArchiveImplementation::load(t); ArchiveImplementation::load(t);
} }
virtual void load(uint64_t & t){ virtual void load(unsigned __int64 & t){
ArchiveImplementation::load(t); ArchiveImplementation::load(t);
} }
#endif #endif

View file

@ -83,8 +83,8 @@ public:
virtual void load(boost::long_long_type & t) = 0; virtual void load(boost::long_long_type & t) = 0;
virtual void load(boost::ulong_long_type & t) = 0; virtual void load(boost::ulong_long_type & t) = 0;
#elif defined(BOOST_HAS_MS_INT64) #elif defined(BOOST_HAS_MS_INT64)
virtual void load(int64_t & t) = 0; virtual void load(__int64 & t) = 0;
virtual void load(uint64_t & t) = 0; virtual void load(unsigned __int64 & t) = 0;
#endif #endif
virtual void load(float & t) = 0; virtual void load(float & t) = 0;

View file

@ -82,8 +82,8 @@ public:
virtual void save(const boost::long_long_type t) = 0; virtual void save(const boost::long_long_type t) = 0;
virtual void save(const boost::ulong_long_type t) = 0; virtual void save(const boost::ulong_long_type t) = 0;
#elif defined(BOOST_HAS_MS_INT64) #elif defined(BOOST_HAS_MS_INT64)
virtual void save(const int64_t t) = 0; virtual void save(const __int64 t) = 0;
virtual void save(const uint64_t t) = 0; virtual void save(const unsigned __int64 t) = 0;
#endif #endif
virtual void save(const float t) = 0; virtual void save(const float t) = 0;

View file

@ -41,7 +41,7 @@ namespace detail {
enum enum
{ {
sockaddr_storage_maxsize = 128, // Maximum size. sockaddr_storage_maxsize = 128, // Maximum size.
sockaddr_storage_alignsize = (sizeof(int64_t)), // Desired alignment. sockaddr_storage_alignsize = (sizeof(__int64)), // Desired alignment.
sockaddr_storage_pad1size = (sockaddr_storage_alignsize - sizeof(short)), sockaddr_storage_pad1size = (sockaddr_storage_alignsize - sizeof(short)),
sockaddr_storage_pad2size = (sockaddr_storage_maxsize - sockaddr_storage_pad2size = (sockaddr_storage_maxsize -
(sizeof(short) + sockaddr_storage_pad1size + sockaddr_storage_alignsize)) (sizeof(short) + sockaddr_storage_pad1size + sockaddr_storage_alignsize))
@ -51,7 +51,7 @@ struct sockaddr_storage_emulation
{ {
short ss_family; short ss_family;
char __ss_pad1[sockaddr_storage_pad1size]; char __ss_pad1[sockaddr_storage_pad1size];
int64_t __ss_align; __int64 __ss_align;
char __ss_pad2[sockaddr_storage_pad2size]; char __ss_pad2[sockaddr_storage_pad2size];
}; };

View file

@ -94,12 +94,12 @@
#pragma intrinsic(_InterlockedOr64) #pragma intrinsic(_InterlockedOr64)
#pragma intrinsic(_InterlockedXor64) #pragma intrinsic(_InterlockedXor64)
#define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64(dest, exchange, compare) _InterlockedCompareExchange64((int64_t*)(dest), (int64_t)(exchange), (int64_t)(compare)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64(dest, exchange, compare) _InterlockedCompareExchange64((__int64*)(dest), (__int64)(exchange), (__int64)(compare))
#define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64(dest, addend) _InterlockedExchangeAdd64((int64_t*)(dest), (int64_t)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64(dest, addend) _InterlockedExchangeAdd64((__int64*)(dest), (__int64)(addend))
#define BOOST_ATOMIC_INTERLOCKED_EXCHANGE64(dest, newval) _InterlockedExchange64((int64_t*)(dest), (int64_t)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE64(dest, newval) _InterlockedExchange64((__int64*)(dest), (__int64)(newval))
#define BOOST_ATOMIC_INTERLOCKED_AND64(dest, arg) _InterlockedAnd64((int64_t*)(dest), (int64_t)(arg)) #define BOOST_ATOMIC_INTERLOCKED_AND64(dest, arg) _InterlockedAnd64((__int64*)(dest), (__int64)(arg))
#define BOOST_ATOMIC_INTERLOCKED_OR64(dest, arg) _InterlockedOr64((int64_t*)(dest), (int64_t)(arg)) #define BOOST_ATOMIC_INTERLOCKED_OR64(dest, arg) _InterlockedOr64((__int64*)(dest), (__int64)(arg))
#define BOOST_ATOMIC_INTERLOCKED_XOR64(dest, arg) _InterlockedXor64((int64_t*)(dest), (int64_t)(arg)) #define BOOST_ATOMIC_INTERLOCKED_XOR64(dest, arg) _InterlockedXor64((__int64*)(dest), (__int64)(arg))
#pragma intrinsic(_InterlockedCompareExchangePointer) #pragma intrinsic(_InterlockedCompareExchangePointer)
#pragma intrinsic(_InterlockedExchangePointer) #pragma intrinsic(_InterlockedExchangePointer)
@ -128,9 +128,9 @@
#if defined(_WIN64) #if defined(_WIN64)
#define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64(dest, exchange, compare) InterlockedCompareExchange64((int64_t*)(dest), (int64_t)(exchange), (int64_t)(compare)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64(dest, exchange, compare) InterlockedCompareExchange64((__int64*)(dest), (__int64)(exchange), (__int64)(compare))
#define BOOST_ATOMIC_INTERLOCKED_EXCHANGE64(dest, newval) InterlockedExchange64((int64_t*)(dest), (int64_t)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE64(dest, newval) InterlockedExchange64((__int64*)(dest), (__int64)(newval))
#define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64(dest, addend) InterlockedExchangeAdd64((int64_t*)(dest), (int64_t)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64(dest, addend) InterlockedExchangeAdd64((__int64*)(dest), (__int64)(addend))
#define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare))
#define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER(dest, newval) InterlockedExchangePointer((void**)(dest), (void*)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER(dest, newval) InterlockedExchangePointer((void**)(dest), (void*)(newval))
@ -168,16 +168,16 @@ BOOST_ATOMIC_INTERLOCKED_IMPORT long __stdcall InterlockedExchangeAdd(long volat
#if defined(_WIN64) #if defined(_WIN64)
BOOST_ATOMIC_INTERLOCKED_IMPORT int64_t __stdcall InterlockedCompareExchange64(int64_t volatile*, int64_t, int64_t); BOOST_ATOMIC_INTERLOCKED_IMPORT __int64 __stdcall InterlockedCompareExchange64(__int64 volatile*, __int64, __int64);
BOOST_ATOMIC_INTERLOCKED_IMPORT int64_t __stdcall InterlockedExchange64(int64_t volatile*, int64_t); BOOST_ATOMIC_INTERLOCKED_IMPORT __int64 __stdcall InterlockedExchange64(__int64 volatile*, __int64);
BOOST_ATOMIC_INTERLOCKED_IMPORT int64_t __stdcall InterlockedExchangeAdd64(int64_t volatile*, int64_t); BOOST_ATOMIC_INTERLOCKED_IMPORT __int64 __stdcall InterlockedExchangeAdd64(__int64 volatile*, __int64);
BOOST_ATOMIC_INTERLOCKED_IMPORT void* __stdcall InterlockedCompareExchangePointer(void* volatile *, void*, void*); BOOST_ATOMIC_INTERLOCKED_IMPORT void* __stdcall InterlockedCompareExchangePointer(void* volatile *, void*, void*);
BOOST_ATOMIC_INTERLOCKED_IMPORT void* __stdcall InterlockedExchangePointer(void* volatile *, void*); BOOST_ATOMIC_INTERLOCKED_IMPORT void* __stdcall InterlockedExchangePointer(void* volatile *, void*);
#define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64(dest, exchange, compare) boost::atomics::detail::InterlockedCompareExchange64((int64_t*)(dest), (int64_t)(exchange), (int64_t)(compare)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64(dest, exchange, compare) boost::atomics::detail::InterlockedCompareExchange64((__int64*)(dest), (__int64)(exchange), (__int64)(compare))
#define BOOST_ATOMIC_INTERLOCKED_EXCHANGE64(dest, newval) boost::atomics::detail::InterlockedExchange64((int64_t*)(dest), (int64_t)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE64(dest, newval) boost::atomics::detail::InterlockedExchange64((__int64*)(dest), (__int64)(newval))
#define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64(dest, addend) boost::atomics::detail::InterlockedExchangeAdd64((int64_t*)(dest), (int64_t)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64(dest, addend) boost::atomics::detail::InterlockedExchangeAdd64((__int64*)(dest), (__int64)(addend))
#define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) boost::atomics::detail::InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) boost::atomics::detail::InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare))
#define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER(dest, newval) boost::atomics::detail::InterlockedExchangePointer((void**)(dest), (void*)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER(dest, newval) boost::atomics::detail::InterlockedExchangePointer((void**)(dest), (void*)(newval))

View file

@ -100,7 +100,7 @@ namespace chrono_detail
#endif #endif
return system_clock::time_point( return system_clock::time_point(
system_clock::duration( system_clock::duration(
((static_cast<int64_t>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime) ((static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime)
-116444736000000000LL -116444736000000000LL
) )
); );
@ -124,14 +124,14 @@ namespace chrono_detail
ec.clear(); ec.clear();
} }
return time_point(duration( return time_point(duration(
(static_cast<int64_t>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime)); (static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime));
} }
#endif #endif
BOOST_CHRONO_INLINE BOOST_CHRONO_INLINE
std::time_t system_clock::to_time_t(const system_clock::time_point& t) BOOST_NOEXCEPT std::time_t system_clock::to_time_t(const system_clock::time_point& t) BOOST_NOEXCEPT
{ {
int64_t temp = t.time_since_epoch().count(); __int64 temp = t.time_since_epoch().count();
temp /= 10000000; temp /= 10000000;
return static_cast<std::time_t>( temp ); return static_cast<std::time_t>( temp );
@ -140,7 +140,7 @@ namespace chrono_detail
BOOST_CHRONO_INLINE BOOST_CHRONO_INLINE
system_clock::time_point system_clock::from_time_t(std::time_t t) BOOST_NOEXCEPT system_clock::time_point system_clock::from_time_t(std::time_t t) BOOST_NOEXCEPT
{ {
int64_t temp = t; __int64 temp = t;
temp *= 10000000; temp *= 10000000;
return time_point(duration(temp)); return time_point(duration(temp));

View file

@ -85,8 +85,8 @@ namespace boost
template <> struct Integer< ::boost::long_long_type> {}; template <> struct Integer< ::boost::long_long_type> {};
template <> struct Integer< ::boost::ulong_long_type> {}; template <> struct Integer< ::boost::ulong_long_type> {};
# elif defined(BOOST_HAS_MS_INT64) # elif defined(BOOST_HAS_MS_INT64)
template <> struct Integer<int64_t> {}; template <> struct Integer<__int64> {};
template <> struct Integer<uint64_t> {}; template <> struct Integer<unsigned __int64> {};
# endif # endif
BOOST_concept(SignedInteger,(T)) { BOOST_concept(SignedInteger,(T)) {
@ -103,7 +103,7 @@ namespace boost
# if defined(BOOST_HAS_LONG_LONG) # if defined(BOOST_HAS_LONG_LONG)
template <> struct SignedInteger< ::boost::long_long_type> {}; template <> struct SignedInteger< ::boost::long_long_type> {};
# elif defined(BOOST_HAS_MS_INT64) # elif defined(BOOST_HAS_MS_INT64)
template <> struct SignedInteger<int64_t> {}; template <> struct SignedInteger<__int64> {};
# endif # endif
BOOST_concept(UnsignedInteger,(T)) { BOOST_concept(UnsignedInteger,(T)) {
@ -121,7 +121,7 @@ namespace boost
# if defined(BOOST_HAS_LONG_LONG) # if defined(BOOST_HAS_LONG_LONG)
template <> struct UnsignedInteger< ::boost::ulong_long_type> {}; template <> struct UnsignedInteger< ::boost::ulong_long_type> {};
# elif defined(BOOST_HAS_MS_INT64) # elif defined(BOOST_HAS_MS_INT64)
template <> struct UnsignedInteger<uint64_t> {}; template <> struct UnsignedInteger<unsigned __int64> {};
# endif # endif
//=========================================================================== //===========================================================================

View file

@ -221,7 +221,7 @@
#include <float.h> #include <float.h>
#endif #endif
// //
// int64_t: // __int64:
// //
#if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__) #if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)
# define BOOST_HAS_MS_INT64 # define BOOST_HAS_MS_INT64

View file

@ -20,7 +20,7 @@
# define BOOST_NO_TYPEID # define BOOST_NO_TYPEID
#endif #endif
#if defined(int64_t) #if defined(__int64)
# define BOOST_HAS_MS_INT64 # define BOOST_HAS_MS_INT64
#endif #endif

View file

@ -129,7 +129,7 @@
#endif #endif
// //
// int64_t: // __int64:
// //
#if !defined(__STRICT_ANSI__) #if !defined(__STRICT_ANSI__)
# define BOOST_HAS_MS_INT64 # define BOOST_HAS_MS_INT64

View file

@ -32,7 +32,7 @@
#endif // version 4245 #endif // version 4245
// //
// enable int64_t support in VC emulation mode // enable __int64 support in VC emulation mode
// //
# if defined(_MSC_VER) && (_MSC_VER >= 1200) # if defined(_MSC_VER) && (_MSC_VER >= 1200)
# define BOOST_HAS_MS_INT64 # define BOOST_HAS_MS_INT64

View file

@ -159,7 +159,7 @@
#endif #endif
// //
// int64_t support: // __int64 support:
// //
#if (_MSC_VER >= 1200) #if (_MSC_VER >= 1200)
# define BOOST_HAS_MS_INT64 # define BOOST_HAS_MS_INT64

View file

@ -57,7 +57,7 @@
# endif # endif
// //
// Borland version of numeric_limits lacks int64_t specialisation: // Borland version of numeric_limits lacks __int64 specialisation:
// //
#ifdef __BORLANDC__ #ifdef __BORLANDC__
# define BOOST_NO_MS_INT64_NUMERIC_LIMITS # define BOOST_NO_MS_INT64_NUMERIC_LIMITS

View file

@ -105,8 +105,8 @@
#endif #endif
// //
// if there is no int64_t then there is no specialisation // if there is no __int64 then there is no specialisation
// for numeric_limits<int64_t> either: // for numeric_limits<__int64> either:
// //
#if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS) #if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS)
# define BOOST_NO_MS_INT64_NUMERIC_LIMITS # define BOOST_NO_MS_INT64_NUMERIC_LIMITS

View file

@ -337,16 +337,16 @@ namespace boost
__extension__ typedef unsigned long long uint_fast64_t; __extension__ typedef unsigned long long uint_fast64_t;
# elif defined(BOOST_HAS_MS_INT64) # elif defined(BOOST_HAS_MS_INT64)
// //
// we have Borland/Intel/Microsoft int64_t: // we have Borland/Intel/Microsoft __int64:
// //
typedef int64_t intmax_t; typedef __int64 intmax_t;
typedef uint64_t uintmax_t; typedef unsigned __int64 uintmax_t;
typedef int64_t int64_t; typedef __int64 int64_t;
typedef int64_t int_least64_t; typedef __int64 int_least64_t;
typedef int64_t int_fast64_t; typedef __int64 int_fast64_t;
typedef uint64_t uint64_t; typedef unsigned __int64 uint64_t;
typedef uint64_t uint_least64_t; typedef unsigned __int64 uint_least64_t;
typedef uint64_t uint_fast64_t; typedef unsigned __int64 uint_fast64_t;
# else // assume no 64-bit integers # else // assume no 64-bit integers
# define BOOST_NO_INT64_T # define BOOST_NO_INT64_T
typedef int32_t intmax_t; typedef int32_t intmax_t;

View file

@ -68,7 +68,7 @@ extern "C" {
//~ #if defined(BOOST_NO_INT64_T) //~ #if defined(BOOST_NO_INT64_T)
//~ typedef double LONGLONG_; //~ typedef double LONGLONG_;
//~ #else //~ #else
//~ typedef int64_t LONGLONG_; //~ typedef __int64 LONGLONG_;
//~ #endif //~ #endif
//~ #else //~ #else
//~ typedef double LONGLONG_; //~ typedef double LONGLONG_;
@ -80,7 +80,7 @@ extern "C" {
#if defined(__CYGWIN__) #if defined(__CYGWIN__)
typedef unsigned long ULONG_PTR_; typedef unsigned long ULONG_PTR_;
#else #else
typedef uint64_t ULONG_PTR_; typedef unsigned __int64 ULONG_PTR_;
#endif #endif
# else # else
typedef unsigned long ULONG_PTR_; typedef unsigned long ULONG_PTR_;

View file

@ -56,7 +56,7 @@ extern "C" {
void * OwningThread; void * OwningThread;
void * LockSemaphore; void * LockSemaphore;
#if defined(_WIN64) #if defined(_WIN64)
uint64_t SpinCount; unsigned __int64 SpinCount;
#else #else
unsigned long SpinCount; unsigned long SpinCount;
#endif #endif

View file

@ -60,7 +60,7 @@ namespace boost
#ifdef BOOST_HAS_LONG_LONG #ifdef BOOST_HAS_LONG_LONG
template<> struct int_least_helper<1> { typedef boost::long_long_type least; }; template<> struct int_least_helper<1> { typedef boost::long_long_type least; };
#elif defined(BOOST_HAS_MS_INT64) #elif defined(BOOST_HAS_MS_INT64)
template<> struct int_least_helper<1> { typedef int64_t least; }; template<> struct int_least_helper<1> { typedef __int64 least; };
#endif #endif
template<> struct int_least_helper<2> { typedef long least; }; template<> struct int_least_helper<2> { typedef long least; };
template<> struct int_least_helper<3> { typedef int least; }; template<> struct int_least_helper<3> { typedef int least; };
@ -69,7 +69,7 @@ namespace boost
#ifdef BOOST_HAS_LONG_LONG #ifdef BOOST_HAS_LONG_LONG
template<> struct uint_least_helper<1> { typedef boost::ulong_long_type least; }; template<> struct uint_least_helper<1> { typedef boost::ulong_long_type least; };
#elif defined(BOOST_HAS_MS_INT64) #elif defined(BOOST_HAS_MS_INT64)
template<> struct uint_least_helper<1> { typedef uint64_t least; }; template<> struct uint_least_helper<1> { typedef unsigned __int64 least; };
#endif #endif
template<> struct uint_least_helper<2> { typedef unsigned long least; }; template<> struct uint_least_helper<2> { typedef unsigned long least; };
template<> struct uint_least_helper<3> { typedef unsigned int least; }; template<> struct uint_least_helper<3> { typedef unsigned int least; };

View file

@ -109,7 +109,7 @@ BOOST_LOW_BITS_MASK_SPECIALIZE( unsigned long );
#endif #endif
#elif defined(BOOST_HAS_MS_INT64) #elif defined(BOOST_HAS_MS_INT64)
#if 18446744073709551615ui64 > ULONG_MAX #if 18446744073709551615ui64 > ULONG_MAX
BOOST_LOW_BITS_MASK_SPECIALIZE( uint64_t ); BOOST_LOW_BITS_MASK_SPECIALIZE( unsigned __int64 );
#endif #endif
#endif #endif

View file

@ -85,10 +85,10 @@ template < >
class integer_traits< ::boost::ulong_long_type >; class integer_traits< ::boost::ulong_long_type >;
#elif !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_MS_INT64) #elif !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_MS_INT64)
template < > template < >
class integer_traits<int64_t>; class integer_traits<__int64>;
template < > template < >
class integer_traits<uint64_t>; class integer_traits<unsigned __int64>;
#endif #endif

View file

@ -239,15 +239,15 @@ class integer_traits< ::boost::ulong_long_type>
#elif defined(BOOST_HAS_MS_INT64) #elif defined(BOOST_HAS_MS_INT64)
template<> template<>
class integer_traits< int64_t> class integer_traits< __int64>
: public std::numeric_limits< int64_t>, : public std::numeric_limits< __int64>,
public detail::integer_traits_base< int64_t, _I64_MIN, _I64_MAX> public detail::integer_traits_base< __int64, _I64_MIN, _I64_MAX>
{ }; { };
template<> template<>
class integer_traits< uint64_t> class integer_traits< unsigned __int64>
: public std::numeric_limits< uint64_t>, : public std::numeric_limits< unsigned __int64>,
public detail::integer_traits_base< uint64_t, 0, _UI64_MAX> public detail::integer_traits_base< unsigned __int64, 0, _UI64_MAX>
{ }; { };
#endif #endif

View file

@ -610,7 +610,7 @@ struct interprocess_section_basic_information
{ {
void * base_address; void * base_address;
unsigned long section_attributes; unsigned long section_attributes;
int64_t section_size; __int64 section_size;
}; };
struct interprocess_filetime struct interprocess_filetime
@ -778,9 +778,9 @@ union system_timeofday_information
{ {
struct data_t struct data_t
{ {
int64_t liKeBootTime; __int64 liKeBootTime;
int64_t liKeSystemTime; __int64 liKeSystemTime;
int64_t liExpTimeZoneBias; __int64 liExpTimeZoneBias;
unsigned long uCurrentTimeZoneId; unsigned long uCurrentTimeZoneId;
unsigned long dwReserved; unsigned long dwReserved;
} data; } data;
@ -877,7 +877,7 @@ extern "C" __declspec(dllimport) int __stdcall FlushViewOfFile (void *, std::siz
extern "C" __declspec(dllimport) int __stdcall VirtualUnlock (void *, std::size_t); extern "C" __declspec(dllimport) int __stdcall VirtualUnlock (void *, std::size_t);
extern "C" __declspec(dllimport) int __stdcall VirtualProtect (void *, std::size_t, unsigned long, unsigned long *); extern "C" __declspec(dllimport) int __stdcall VirtualProtect (void *, std::size_t, unsigned long, unsigned long *);
extern "C" __declspec(dllimport) int __stdcall FlushFileBuffers (void *); extern "C" __declspec(dllimport) int __stdcall FlushFileBuffers (void *);
extern "C" __declspec(dllimport) int __stdcall GetFileSizeEx (void *, int64_t *size); extern "C" __declspec(dllimport) int __stdcall GetFileSizeEx (void *, __int64 *size);
extern "C" __declspec(dllimport) unsigned long __stdcall FormatMessageA extern "C" __declspec(dllimport) unsigned long __stdcall FormatMessageA
(unsigned long dwFlags, const void *lpSource, unsigned long dwMessageId, (unsigned long dwFlags, const void *lpSource, unsigned long dwMessageId,
unsigned long dwLanguageId, char *lpBuffer, unsigned long nSize, unsigned long dwLanguageId, char *lpBuffer, unsigned long nSize,
@ -888,9 +888,9 @@ extern "C" __declspec(dllimport) int __stdcall CreateDirectoryA(const char *, in
extern "C" __declspec(dllimport) int __stdcall RemoveDirectoryA(const char *lpPathName); extern "C" __declspec(dllimport) int __stdcall RemoveDirectoryA(const char *lpPathName);
extern "C" __declspec(dllimport) int __stdcall GetTempPathA(unsigned long length, char *buffer); extern "C" __declspec(dllimport) int __stdcall GetTempPathA(unsigned long length, char *buffer);
extern "C" __declspec(dllimport) int __stdcall CreateDirectory(const char *, interprocess_security_attributes*); extern "C" __declspec(dllimport) int __stdcall CreateDirectory(const char *, interprocess_security_attributes*);
extern "C" __declspec(dllimport) int __stdcall SetFileValidData(void *, int64_t size); extern "C" __declspec(dllimport) int __stdcall SetFileValidData(void *, __int64 size);
extern "C" __declspec(dllimport) int __stdcall SetEndOfFile(void *); extern "C" __declspec(dllimport) int __stdcall SetEndOfFile(void *);
extern "C" __declspec(dllimport) int __stdcall SetFilePointerEx(void *, int64_t distance, int64_t *new_file_pointer, unsigned long move_method); extern "C" __declspec(dllimport) int __stdcall SetFilePointerEx(void *, __int64 distance, __int64 *new_file_pointer, unsigned long move_method);
extern "C" __declspec(dllimport) int __stdcall LockFile (void *hnd, unsigned long offset_low, unsigned long offset_high, unsigned long size_low, unsigned long size_high); extern "C" __declspec(dllimport) int __stdcall LockFile (void *hnd, unsigned long offset_low, unsigned long offset_high, unsigned long size_low, unsigned long size_high);
extern "C" __declspec(dllimport) int __stdcall UnlockFile(void *hnd, unsigned long offset_low, unsigned long offset_high, unsigned long size_low, unsigned long size_high); extern "C" __declspec(dllimport) int __stdcall UnlockFile(void *hnd, unsigned long offset_low, unsigned long offset_high, unsigned long size_low, unsigned long size_high);
extern "C" __declspec(dllimport) int __stdcall LockFileEx(void *hnd, unsigned long flags, unsigned long reserved, unsigned long size_low, unsigned long size_high, interprocess_overlapped* overlapped); extern "C" __declspec(dllimport) int __stdcall LockFileEx(void *hnd, unsigned long flags, unsigned long reserved, unsigned long size_low, unsigned long size_high, interprocess_overlapped* overlapped);
@ -908,7 +908,7 @@ extern "C" __declspec(dllimport) unsigned long __stdcall GetMappedFileNameW(void
extern "C" __declspec(dllimport) long __stdcall RegOpenKeyExA(void *, const char *, unsigned long, unsigned long, void **); extern "C" __declspec(dllimport) long __stdcall RegOpenKeyExA(void *, const char *, unsigned long, unsigned long, void **);
extern "C" __declspec(dllimport) long __stdcall RegQueryValueExA(void *, const char *, unsigned long*, unsigned long*, unsigned char *, unsigned long*); extern "C" __declspec(dllimport) long __stdcall RegQueryValueExA(void *, const char *, unsigned long*, unsigned long*, unsigned char *, unsigned long*);
extern "C" __declspec(dllimport) long __stdcall RegCloseKey(void *); extern "C" __declspec(dllimport) long __stdcall RegCloseKey(void *);
extern "C" __declspec(dllimport) int __stdcall QueryPerformanceCounter(int64_t *lpPerformanceCount); extern "C" __declspec(dllimport) int __stdcall QueryPerformanceCounter(__int64 *lpPerformanceCount);
//COM API //COM API
extern "C" __declspec(dllimport) long __stdcall CoInitializeEx(void *pvReserved, unsigned long dwCoInit); extern "C" __declspec(dllimport) long __stdcall CoInitializeEx(void *pvReserved, unsigned long dwCoInit);
@ -1091,7 +1091,7 @@ class interprocess_all_access_security
{ return &sa; } { return &sa; }
}; };
inline void * create_file_mapping (void * handle, unsigned long access, uint64_t file_offset, const char * name, interprocess_security_attributes *psec) inline void * create_file_mapping (void * handle, unsigned long access, unsigned __int64 file_offset, const char * name, interprocess_security_attributes *psec)
{ {
const unsigned long high_size(file_offset >> 32), low_size((boost::uint32_t)file_offset); const unsigned long high_size(file_offset >> 32), low_size((boost::uint32_t)file_offset);
return CreateFileMappingA (handle, psec, access, high_size, low_size, name); return CreateFileMappingA (handle, psec, access, high_size, low_size, name);
@ -1100,9 +1100,9 @@ inline void * create_file_mapping (void * handle, unsigned long access, uint64_t
inline void * open_file_mapping (unsigned long access, const char *name) inline void * open_file_mapping (unsigned long access, const char *name)
{ return OpenFileMappingA (access, 0, name); } { return OpenFileMappingA (access, 0, name); }
inline void *map_view_of_file_ex(void *handle, unsigned long file_access, uint64_t offset, std::size_t numbytes, void *base_addr) inline void *map_view_of_file_ex(void *handle, unsigned long file_access, unsigned __int64 offset, std::size_t numbytes, void *base_addr)
{ {
const unsigned long offset_low = (unsigned long)(offset & ((uint64_t)0xFFFFFFFF)); const unsigned long offset_low = (unsigned long)(offset & ((unsigned __int64)0xFFFFFFFF));
const unsigned long offset_high = offset >> 32; const unsigned long offset_high = offset >> 32;
return MapViewOfFileEx(handle, file_access, offset_high, offset_low, numbytes, base_addr); return MapViewOfFileEx(handle, file_access, offset_high, offset_low, numbytes, base_addr);
} }
@ -1146,7 +1146,7 @@ inline bool virtual_protect(void *base_addr, std::size_t numbytes, unsigned long
inline bool flush_file_buffers(void *handle) inline bool flush_file_buffers(void *handle)
{ return 0 != FlushFileBuffers(handle); } { return 0 != FlushFileBuffers(handle); }
inline bool get_file_size(void *handle, int64_t &size) inline bool get_file_size(void *handle, __int64 &size)
{ return 0 != GetFileSizeEx(handle, &size); } { return 0 != GetFileSizeEx(handle, &size); }
inline bool create_directory(const char *name) inline bool create_directory(const char *name)
@ -1164,7 +1164,7 @@ inline unsigned long get_temp_path(unsigned long length, char *buffer)
inline int set_end_of_file(void *handle) inline int set_end_of_file(void *handle)
{ return 0 != SetEndOfFile(handle); } { return 0 != SetEndOfFile(handle); }
inline bool set_file_pointer_ex(void *handle, int64_t distance, int64_t *new_file_pointer, unsigned long move_method) inline bool set_file_pointer_ex(void *handle, __int64 distance, __int64 *new_file_pointer, unsigned long move_method)
{ return 0 != SetFilePointerEx(handle, distance, new_file_pointer, move_method); } { return 0 != SetFilePointerEx(handle, distance, new_file_pointer, move_method); }
inline bool lock_file_ex(void *hnd, unsigned long flags, unsigned long reserved, unsigned long size_low, unsigned long size_high, interprocess_overlapped *overlapped) inline bool lock_file_ex(void *hnd, unsigned long flags, unsigned long reserved, unsigned long size_low, unsigned long size_high, interprocess_overlapped *overlapped)
@ -1225,7 +1225,7 @@ inline long reg_query_value_ex(void *hKey, const char *lpValueName, unsigned lon
inline long reg_close_key(void *hKey) inline long reg_close_key(void *hKey)
{ return RegCloseKey(hKey); } { return RegCloseKey(hKey); }
inline bool query_performance_counter(int64_t *lpPerformanceCount) inline bool query_performance_counter(__int64 *lpPerformanceCount)
{ {
return 0 != QueryPerformanceCounter(lpPerformanceCount); return 0 != QueryPerformanceCounter(lpPerformanceCount);
} }
@ -1812,7 +1812,7 @@ inline bool is_directory(const char *path)
(attrib & file_attribute_directory)); (attrib & file_attribute_directory));
} }
inline bool get_file_mapping_size(void *file_mapping_hnd, int64_t &size) inline bool get_file_mapping_size(void *file_mapping_hnd, __int64 &size)
{ {
NtQuerySection_t pNtQuerySection = NtQuerySection_t pNtQuerySection =
(NtQuerySection_t)dll_func::get(dll_func::NtQuerySection); (NtQuerySection_t)dll_func::get(dll_func::NtQuerySection);

View file

@ -138,7 +138,7 @@ class windows_named_condition_any
class named_cond_callbacks : public windows_named_sync_interface class named_cond_callbacks : public windows_named_sync_interface
{ {
typedef int64_t sem_count_t; typedef __int64 sem_count_t;
mutable sem_count_t sem_counts [2]; mutable sem_count_t sem_counts [2];
public: public:

View file

@ -66,7 +66,7 @@ class windows_named_semaphore
class named_sem_callbacks : public windows_named_sync_interface class named_sem_callbacks : public windows_named_sync_interface
{ {
public: public:
typedef int64_t sem_count_t; typedef __int64 sem_count_t;
named_sem_callbacks(winapi_semaphore_wrapper &sem_wrapper, sem_count_t sem_cnt) named_sem_callbacks(winapi_semaphore_wrapper &sem_wrapper, sem_count_t sem_cnt)
: m_sem_wrapper(sem_wrapper), m_sem_count(sem_cnt) : m_sem_wrapper(sem_wrapper), m_sem_count(sem_cnt)
{} {}

View file

@ -122,12 +122,12 @@ inline void windows_named_sync::open_or_create
if(m_file_hnd != winapi::invalid_handle_value){ if(m_file_hnd != winapi::invalid_handle_value){
//Now lock the file //Now lock the file
const std::size_t buflen = sync_interface.get_data_size(); const std::size_t buflen = sync_interface.get_data_size();
typedef int64_t unique_id_type; typedef __int64 unique_id_type;
const std::size_t sizeof_file_info = sizeof(unique_id_type) + buflen; const std::size_t sizeof_file_info = sizeof(unique_id_type) + buflen;
winapi::interprocess_overlapped overlapped; winapi::interprocess_overlapped overlapped;
if(winapi::lock_file_ex if(winapi::lock_file_ex
(m_file_hnd, winapi::lockfile_exclusive_lock, 0, sizeof_file_info, 0, &overlapped)){ (m_file_hnd, winapi::lockfile_exclusive_lock, 0, sizeof_file_info, 0, &overlapped)){
int64_t filesize = 0; __int64 filesize = 0;
//Obtain the unique id to open the native semaphore. //Obtain the unique id to open the native semaphore.
//If file size was created //If file size was created
if(winapi::get_file_size(m_file_hnd, filesize)){ if(winapi::get_file_size(m_file_hnd, filesize)){

View file

@ -62,7 +62,7 @@ inline bool bytes_to_str(const void *mem, const std::size_t mem_length, char *ou
class sync_id class sync_id
{ {
public: public:
typedef int64_t internal_type; typedef __int64 internal_type;
sync_id(const void *map_addr) sync_id(const void *map_addr)
: map_addr_(map_addr) : map_addr_(map_addr)
{ winapi::query_performance_counter(&rand_); } { winapi::query_performance_counter(&rand_); }

Some files were not shown because too many files have changed in this diff Show more