diff --git a/Minecraft.Client/ClientConnection.cpp b/Minecraft.Client/ClientConnection.cpp index 9b9bb86a7..28f681c5f 100644 --- a/Minecraft.Client/ClientConnection.cpp +++ b/Minecraft.Client/ClientConnection.cpp @@ -55,7 +55,7 @@ #endif #include "DLCTexturePack.h" -#ifdef _WINDOWS64 +#if defined(_WIN32) #include "Xbox\Network\NetworkPlayerXbox.h" #include "Common\Network\PlatformNetworkManagerStub.h" #endif @@ -759,7 +759,7 @@ void ClientConnection::handleAddPlayer(shared_ptr packet) return; } } -#ifdef _WINDOWS64 +#if defined(_WIN32) // Win64 keeps local-player identity separate from network smallId; also guard against creating // a duplicate remote player for a local slot by checking the username directly. for (unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx) @@ -771,7 +771,7 @@ void ClientConnection::handleAddPlayer(shared_ptr packet) } } #endif -/*#ifdef _WINDOWS64 +/*#if defined(_WIN32) // On Windows64 all XUIDs are INVALID_XUID so the XUID check above never fires. // packet->m_playerIndex is the server-assigned sequential index (set via LoginPacket), // NOT the controller slot — so we must scan all local player slots and match by @@ -810,7 +810,7 @@ void ClientConnection::handleAddPlayer(shared_ptr packet) player->m_displayName = player->getName(); #endif -#ifdef _WINDOWS64 +#if defined(_WIN32) { IQNetPlayer* matchedQNetPlayer = NULL; PlayerUID pktXuid = player->getXuid(); @@ -1001,7 +1001,7 @@ void ClientConnection::handleMoveEntitySmall(shared_ptr p void ClientConnection::handleRemoveEntity(shared_ptr packet) { -#ifdef _WINDOWS64 +#if defined(_WIN32) if (!g_NetworkManager.IsHost()) { for (int i = 0; i < packet->ids.length; i++) diff --git a/Minecraft.Client/Common/Audio/Consoles_SoundEngine.h b/Minecraft.Client/Common/Audio/Consoles_SoundEngine.h index 9a1ae3723..69db50dcd 100644 --- a/Minecraft.Client/Common/Audio/Consoles_SoundEngine.h +++ b/Minecraft.Client/Common/Audio/Consoles_SoundEngine.h @@ -14,7 +14,7 @@ // 4J Stu - Temp define to get Miles to link, can likely be removed when we get a new version of Miles #define _SEKRIT #include "..\..\Durango\Miles\include\mss.h" -#elif defined _WINDOWS64 +#elif defined(_WIN32) #else // PS4 // 4J Stu - Temp define to get Miles to link, can likely be removed when we get a new version of Miles #define _SEKRIT2 diff --git a/Minecraft.Client/Common/Audio/SoundEngine.cpp b/Minecraft.Client/Common/Audio/SoundEngine.cpp index b2ca2be33..22afbd022 100644 --- a/Minecraft.Client/Common/Audio/SoundEngine.cpp +++ b/Minecraft.Client/Common/Audio/SoundEngine.cpp @@ -63,7 +63,7 @@ void SoundEngine::playMusicTick() {}; #else -#ifdef _WINDOWS64 +#if defined(_WIN32) char SoundEngine::m_szSoundPath[]={"Windows64Media\\Sound\\"}; char SoundEngine::m_szMusicPath[]={"music\\"}; char SoundEngine::m_szRedistName[]={"redist64"}; diff --git a/Minecraft.Client/Common/Audio/SoundEngine.h b/Minecraft.Client/Common/Audio/SoundEngine.h index 5bd2fe4b9..66e39c986 100644 --- a/Minecraft.Client/Common/Audio/SoundEngine.h +++ b/Minecraft.Client/Common/Audio/SoundEngine.h @@ -78,7 +78,7 @@ enum MUSIC_STREAMSTATE typedef struct { - #ifndef _WINDOWS64 + #if !defined(_WIN32) F32 x,y,z,volume,pitch; #else float x,y,z,volume,pitch; @@ -92,7 +92,7 @@ typedef struct } AUDIO_INFO; -#ifdef _WINDOWS64 +#if defined(_WIN32) struct MiniAudioSound { ma_sound sound; diff --git a/Minecraft.Client/Common/Consoles_App.cpp b/Minecraft.Client/Common/Consoles_App.cpp index 3aae68d2c..113df0caf 100644 --- a/Minecraft.Client/Common/Consoles_App.cpp +++ b/Minecraft.Client/Common/Consoles_App.cpp @@ -760,7 +760,7 @@ bool CMinecraftApp::LoadBeaconMenu(int iPad ,shared_ptr inventory, sh // GAME SETTINGS ////////////////////////////////////////////// -#ifdef _WINDOWS64 +#if defined(_WIN32) static void Win64_GetSettingsPath(char *outPath, DWORD size) { GetModuleFileNameA(NULL, outPath, size); @@ -811,7 +811,7 @@ void CMinecraftApp::InitGameSettings() //SetDefaultGameSettings(i); - done on a callback from the profile manager // 4J-PB - adding in for Windows & PS3 to set the defaults for the joypad -#if defined _WINDOWS64// || defined __PSVITA__ +#if defined(_WIN32)// || defined __PSVITA__ C_4JProfile::PROFILESETTINGS *pProfileSettings=ProfileManager.GetDashboardProfileSettings(i); // clear this for now - it will come from reading the system values memset(pProfileSettings,0,sizeof(C_4JProfile::PROFILESETTINGS)); @@ -2409,7 +2409,7 @@ void CMinecraftApp::CheckGameSettingsChanged(bool bOverride5MinuteTimer, int iPa StorageManager.WriteToProfile(i,true, bOverride5MinuteTimer); #else ProfileManager.WriteToProfile(i,true, bOverride5MinuteTimer); -#ifdef _WINDOWS64 +#if defined(_WIN32) Win64_SaveSettings(GameSettingsA[i]); #endif #endif @@ -2425,7 +2425,7 @@ void CMinecraftApp::CheckGameSettingsChanged(bool bOverride5MinuteTimer, int iPa StorageManager.WriteToProfile(iPad,true, bOverride5MinuteTimer); #else ProfileManager.WriteToProfile(iPad,true, bOverride5MinuteTimer); -#ifdef _WINDOWS64 +#if defined(_WIN32) Win64_SaveSettings(GameSettingsA[iPad]); #endif #endif @@ -5831,7 +5831,7 @@ int CMinecraftApp::GetTPConfigVal(WCHAR *pwchDataFile) return -1; } -#elif defined _WINDOWS64 +#elif defined(_WIN32) int CMinecraftApp::GetTPConfigVal(WCHAR *pwchDataFile) { return -1; @@ -9509,7 +9509,7 @@ bool CMinecraftApp::IsLocalMultiplayerAvailable() if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers; } -#ifdef _WINDOWS64 +#if defined(_WIN32) bool available = connectedControllers > 1; #else bool available = RenderManager.IsHiDef() && connectedControllers > 1; @@ -10049,7 +10049,7 @@ enum ETitleUpdateTexturePacks //eTUTP_Steampunk = 0x01000808, // 4J Stu - The released Steampunk pack had a sub-pack ID }; -#ifdef _WINDOWS64 +#if defined(_WIN32) wstring titleUpdateTexturePackRoot = L"Windows64\\DLC\\"; #elif defined(__ORBIS__) wstring titleUpdateTexturePackRoot = L"/app0/orbis/CU/DLC/"; diff --git a/Minecraft.Client/Common/Consoles_App.h b/Minecraft.Client/Common/Consoles_App.h index ec36b7652..de786ac55 100644 --- a/Minecraft.Client/Common/Consoles_App.h +++ b/Minecraft.Client/Common/Consoles_App.h @@ -920,7 +920,7 @@ public: #elif defined _DURANGO -#elif defined _WINDOWS64 +#elif defined(_WIN32) //CMinecraftAudio audio; #else // PS4 diff --git a/Minecraft.Client/Common/DLC/DLCManager.cpp b/Minecraft.Client/Common/DLC/DLCManager.cpp index 36f4d7f7e..fdb1df339 100644 --- a/Minecraft.Client/Common/DLC/DLCManager.cpp +++ b/Minecraft.Client/Common/DLC/DLCManager.cpp @@ -327,7 +327,7 @@ bool DLCManager::readDLCDataFile(DWORD &dwFilesProcessed, const string &path, DL } else if (fromArchive) return false; -#ifdef _WINDOWS64 +#if defined(_WIN32) string finalPath = StorageManager.GetMountedPath(path.c_str()); if(finalPath.size() == 0) finalPath = path; HANDLE file = CreateFile(finalPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); @@ -534,7 +534,7 @@ DWORD DLCManager::retrievePackIDFromDLCDataFile(const string &path, DLCPack *pac DWORD packId = 0; wstring wPath = convStringToWstring(path); -#ifdef _WINDOWS64 +#if defined(_WIN32) string finalPath = StorageManager.GetMountedPath(path.c_str()); if(finalPath.size() == 0) finalPath = path; HANDLE file = CreateFile(finalPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); diff --git a/Minecraft.Client/Common/Filesystem/Filesystem.cpp b/Minecraft.Client/Common/Filesystem/Filesystem.cpp index 0d225cb5b..331ed035f 100644 --- a/Minecraft.Client/Common/Filesystem/Filesystem.cpp +++ b/Minecraft.Client/Common/Filesystem/Filesystem.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" #include "Filesystem.h" -#ifdef _WINDOWS64 +#if defined(_WIN32) #include #endif // TODO: More os' filesystem handling for when the project moves away from only Windows @@ -9,7 +9,7 @@ bool FileOrDirectoryExists(const char* path) { -#ifdef _WINDOWS64 +#if defined(_WIN32) DWORD attribs = GetFileAttributesA(path); return (attribs != INVALID_FILE_ATTRIBUTES); #else @@ -20,7 +20,7 @@ bool FileOrDirectoryExists(const char* path) bool FileExists(const char* path) { -#ifdef _WINDOWS64 +#if defined(_WIN32) DWORD attribs = GetFileAttributesA(path); return (attribs != INVALID_FILE_ATTRIBUTES && !(attribs & FILE_ATTRIBUTE_DIRECTORY)); #else @@ -31,7 +31,7 @@ bool FileExists(const char* path) bool DirectoryExists(const char* path) { -#ifdef _WINDOWS64 +#if defined(_WIN32) DWORD attribs = GetFileAttributesA(path); return (attribs != INVALID_FILE_ATTRIBUTES && (attribs & FILE_ATTRIBUTE_DIRECTORY)); #else @@ -42,7 +42,7 @@ bool DirectoryExists(const char* path) bool GetFirstFileInDirectory(const char* directory, char* outFilePath, size_t outFilePathSize) { -#ifdef _WINDOWS64 +#if defined(_WIN32) char searchPath[MAX_PATH]; snprintf(searchPath, MAX_PATH, "%s\\*", directory); diff --git a/Minecraft.Client/Common/GameRules/GameRuleManager.cpp b/Minecraft.Client/Common/GameRules/GameRuleManager.cpp index f18aa7ae2..769a222ac 100644 --- a/Minecraft.Client/Common/GameRules/GameRuleManager.cpp +++ b/Minecraft.Client/Common/GameRules/GameRuleManager.cpp @@ -641,7 +641,7 @@ void GameRuleManager::loadDefaultGameRules() #else // _XBOX -#ifdef _WINDOWS64 +#if defined(_WIN32) File packedTutorialFile(L"Windows64Media\\Tutorial\\Tutorial.pck"); if(!packedTutorialFile.exists()) packedTutorialFile = File(L"Windows64\\Tutorial\\Tutorial.pck"); #elif defined(__ORBIS__) diff --git a/Minecraft.Client/Common/Network/GameNetworkManager.cpp b/Minecraft.Client/Common/Network/GameNetworkManager.cpp index dbae30103..7dc307027 100644 --- a/Minecraft.Client/Common/Network/GameNetworkManager.cpp +++ b/Minecraft.Client/Common/Network/GameNetworkManager.cpp @@ -224,7 +224,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame wstring fileRoot = L"GAME:\\res\\TitleUpdate\\GameRules\\" + param->levelGen->getBaseSavePath(); #endif #else -#ifdef _WINDOWS64 +#if defined(_WIN32) wstring fileRoot = L"Windows64Media\\Tutorial\\" + param->levelGen->getBaseSavePath(); File root(fileRoot); if(!root.exists()) fileRoot = L"Windows64\\Tutorial\\" + param->levelGen->getBaseSavePath(); diff --git a/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp b/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp index 80fbd98cf..ec6f8ce18 100644 --- a/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp +++ b/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp @@ -3,7 +3,7 @@ #include "..\..\..\Minecraft.World\StringHelpers.h" #include "PlatformNetworkManagerStub.h" #include "..\..\Xbox\Network\NetworkPlayerXbox.h" -#ifdef _WINDOWS64 +#if defined(_WIN32) #include "..\..\Windows64\Network\WinsockNetLayer.h" #include "..\..\Windows64\Windows64_Xuid.h" #include "..\..\Minecraft.h" @@ -213,7 +213,7 @@ bool CPlatformNetworkManagerStub::isSystemPrimaryPlayer(IQNetPlayer *pQNetPlayer // We call this twice a frame, either side of the render call so is a good place to "tick" things void CPlatformNetworkManagerStub::DoWork() { -#ifdef _WINDOWS64 +#if defined(_WIN32) extern QNET_STATE _iQNetStubState; if (_iQNetStubState == QNET_STATE_SESSION_STARTING && app.GetGameStarted()) { @@ -303,7 +303,7 @@ bool CPlatformNetworkManagerStub::LeaveGame(bool bMigrateHost) m_bLeavingGame = true; -#ifdef _WINDOWS64 +#if defined(_WIN32) WinsockNetLayer::StopAdvertising(); #endif @@ -325,7 +325,7 @@ bool CPlatformNetworkManagerStub::LeaveGame(bool bMigrateHost) m_machineQNetPrimaryPlayers.clear(); SystemFlagReset(); -#ifdef _WINDOWS64 +#if defined(_WIN32) WinsockNetLayer::Shutdown(); WinsockNetLayer::Initialize(); #endif @@ -353,7 +353,7 @@ void CPlatformNetworkManagerStub::HostGame(int localUsersMask, bool bOnlineGame, m_pIQNet->HostGame(); -#ifdef _WINDOWS64 +#if defined(_WIN32) IQNet::m_player[0].m_smallId = 0; IQNet::m_player[0].m_isRemote = false; // world host is pinned to legacy host XUID to keep old player data compatibility. @@ -364,7 +364,7 @@ void CPlatformNetworkManagerStub::HostGame(int localUsersMask, bool bOnlineGame, _HostGame( localUsersMask, publicSlots, privateSlots ); -#ifdef _WINDOWS64 +#if defined(_WIN32) int port = WIN64_NET_DEFAULT_PORT; const char* bindIp = NULL; if (g_Win64DedicatedServer) @@ -398,7 +398,7 @@ bool CPlatformNetworkManagerStub::_StartGame() int CPlatformNetworkManagerStub::JoinGame(FriendSessionInfo* searchResult, int localUsersMask, int primaryUserIndex) { -#ifdef _WINDOWS64 +#if defined(_WIN32) if (searchResult == NULL) return CGameNetworkManager::JOINGAME_FAIL_GENERAL; @@ -485,7 +485,7 @@ void CPlatformNetworkManagerStub::HandleSignInChange() bool CPlatformNetworkManagerStub::_RunNetworkGame() { -#ifdef _WINDOWS64 +#if defined(_WIN32) extern QNET_STATE _iQNetStubState; _iQNetStubState = QNET_STATE_GAME_PLAY; @@ -689,7 +689,7 @@ wstring CPlatformNetworkManagerStub::GatherRTTStats() void CPlatformNetworkManagerStub::TickSearch() { -#ifdef _WINDOWS64 +#if defined(_WIN32) if (m_SessionsUpdatedCallback == NULL) return; @@ -705,7 +705,7 @@ void CPlatformNetworkManagerStub::TickSearch() void CPlatformNetworkManagerStub::SearchForGames() { -#ifdef _WINDOWS64 +#if defined(_WIN32) std::vector lanSessions = WinsockNetLayer::GetDiscoveredSessions(); //THEY GET DELETED HERE DAMMIT diff --git a/Minecraft.Client/Common/Tutorial/ChoiceTask.cpp b/Minecraft.Client/Common/Tutorial/ChoiceTask.cpp index 1ea34ace6..ced1b1b36 100644 --- a/Minecraft.Client/Common/Tutorial/ChoiceTask.cpp +++ b/Minecraft.Client/Common/Tutorial/ChoiceTask.cpp @@ -55,7 +55,7 @@ bool ChoiceTask::isCompleted() { // If the player is under water then allow all keypresses so they can jump out if (pMinecraft->localplayers[tutorial->getPad()]->isUnderLiquid(Material::water)) return false; -#ifdef _WINDOWS64 +#if defined(_WIN32) if (!m_bConfirmMappingComplete && (InputManager.GetValue(xboxPad, m_iConfirmMapping) > 0 || g_KBMInput.IsKeyDown(VK_RETURN))) @@ -67,7 +67,7 @@ bool ChoiceTask::isCompleted() m_bConfirmMappingComplete = true; } -#ifdef _WINDOWS64 +#if defined(_WIN32) if (!m_bCancelMappingComplete && (InputManager.GetValue(xboxPad, m_iCancelMapping) > 0 || g_KBMInput.IsKeyDown('B'))) diff --git a/Minecraft.Client/Common/Tutorial/ControllerTask.cpp b/Minecraft.Client/Common/Tutorial/ControllerTask.cpp index 379e117c4..2beb6854d 100644 --- a/Minecraft.Client/Common/Tutorial/ControllerTask.cpp +++ b/Minecraft.Client/Common/Tutorial/ControllerTask.cpp @@ -66,7 +66,7 @@ bool ControllerTask::isCompleted() } else { -#ifdef _WINDOWS64 +#if defined(_WIN32) bAllComplete = true; #else bAllComplete = false; @@ -91,7 +91,7 @@ bool ControllerTask::isCompleted() } else { -#ifdef _WINDOWS64 +#if defined(_WIN32) bAllComplete = true; #else bAllComplete = false; diff --git a/Minecraft.Client/Common/Tutorial/InfoTask.cpp b/Minecraft.Client/Common/Tutorial/InfoTask.cpp index 6a78ed92a..c87ca268d 100644 --- a/Minecraft.Client/Common/Tutorial/InfoTask.cpp +++ b/Minecraft.Client/Common/Tutorial/InfoTask.cpp @@ -66,7 +66,7 @@ bool InfoTask::isCompleted() bool current = it.second; if(!current) { -#ifdef _WINDOWS64 +#if defined(_WIN32) if (InputManager.GetValue(pMinecraft->player->GetXboxPad(), it.first) > 0 || g_KBMInput.IsKeyDown(VK_SPACE)) #else if( InputManager.GetValue(pMinecraft->player->GetXboxPad(), it.first) > 0) diff --git a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp index 882584211..8b482e6e9 100644 --- a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp @@ -13,7 +13,7 @@ #include #endif -#ifdef _WINDOWS64 +#if defined(_WIN32) #include "..\..\Windows64\KeyboardMouseInput.h" SavedInventoryCursorPos g_savedInventoryCursorPos = { 0.0f, 0.0f, false }; @@ -480,7 +480,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() } #endif -#ifdef _WINDOWS64 +#if defined(_WIN32) if (!g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive()) { int deltaX = g_KBMInput.GetMouseDeltaX(); @@ -728,7 +728,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() // If there is no stick input, and we are over a slot, then snap pointer to slot centre. // 4J - TomK - only if this particular component allows so! -#ifdef _WINDOWS64 +#if defined(_WIN32) if((g_KBMInput.IsMouseGrabbed() || !g_KBMInput.IsKBMActive()) && CanHaveFocus(eSectionUnderPointer)) #else if(CanHaveFocus(eSectionUnderPointer)) diff --git a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.h b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.h index 4877cfce8..98b704388 100644 --- a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.h +++ b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.h @@ -1,6 +1,6 @@ #pragma once -#ifdef _WINDOWS64 +#if defined(_WIN32) struct SavedInventoryCursorPos { float x; diff --git a/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp index 0d3f7dace..f35787e20 100644 --- a/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp @@ -1100,7 +1100,7 @@ void IUIScene_CreativeMenu::handleAdditionalKeyPress(int iAction) case ACTION_MENU_OTHER_STICK_DOWN: { int pageStep = TabSpec::rows; -#ifdef _WINDOWS64 +#if defined(_WIN32) if (g_KBMInput.WasMouseWheelConsumed()) { pageStep = 1; @@ -1120,7 +1120,7 @@ void IUIScene_CreativeMenu::handleAdditionalKeyPress(int iAction) case ACTION_MENU_OTHER_STICK_UP: { int pageStep = TabSpec::rows; -#ifdef _WINDOWS64 +#if defined(_WIN32) if (g_KBMInput.WasMouseWheelConsumed()) { pageStep = 1; diff --git a/Minecraft.Client/Common/UI/UIComponent_DebugUIMarketingGuide.cpp b/Minecraft.Client/Common/UI/UIComponent_DebugUIMarketingGuide.cpp index 240429bc5..bd4d5bd65 100644 --- a/Minecraft.Client/Common/UI/UIComponent_DebugUIMarketingGuide.cpp +++ b/Minecraft.Client/Common/UI/UIComponent_DebugUIMarketingGuide.cpp @@ -21,7 +21,7 @@ UIComponent_DebugUIMarketingGuide::UIComponent_DebugUIMarketingGuide(int iPad, v value[0].number = (F64)4; #elif defined __PSVITA__ value[0].number = (F64)5; -#elif defined _WINDOWS64 +#elif defined(_WIN32) value[0].number = (F64)0; #endif IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcSetPlatform , 1 , value ); diff --git a/Minecraft.Client/Common/UI/UIController.cpp b/Minecraft.Client/Common/UI/UIController.cpp index 95423642a..91cce6412 100644 --- a/Minecraft.Client/Common/UI/UIController.cpp +++ b/Minecraft.Client/Common/UI/UIController.cpp @@ -12,7 +12,7 @@ #include "..\..\EnderDragonRenderer.h" #include "..\..\MultiPlayerLocalPlayer.h" #include "UIFontData.h" -#ifdef _WINDOWS64 +#if defined(_WIN32) #include "..\..\Windows64\KeyboardMouseInput.h" #endif #ifdef __PSVITA__ @@ -56,7 +56,7 @@ bool UIController::ms_bReloadSkinCSInitialised = false; DWORD UIController::m_dwTrialTimerLimitSecs=DYNAMIC_CONFIG_DEFAULT_TRIAL_TIME; -#ifdef _WINDOWS64 +#if defined(_WIN32) static UIControl_Slider *FindSliderById(UIScene *pScene, int sliderId) { vector *controls = pScene->GetControls(); @@ -198,7 +198,7 @@ UIController::UIController() #endif // 4J Stu - This is a bit of a hack until we change the Minecraft initialisation to store the proper screen size for other platforms -#if defined _WINDOWS64 || defined _DURANGO || defined __ORBIS__ +#if defined(_WIN32) || defined _DURANGO || defined __ORBIS__ m_fScreenWidth = 1920.0f; m_fScreenHeight = 1080.0f; m_bScreenWidthSetup = false; @@ -522,7 +522,7 @@ void UIController::loadSkins() platformSkinPath = L"skinPS3.swf"; #elif defined __PSVITA__ platformSkinPath = L"skinVita.swf"; -#elif defined _WINDOWS64 +#elif defined(_WIN32) if(m_fScreenHeight>720.0f) { platformSkinPath = L"skinHDWin.swf"; @@ -576,7 +576,7 @@ void UIController::loadSkins() #if ( defined(_WINDOWS64) || defined(_DURANGO) || defined(__ORBIS__) ) -#if defined(_WINDOWS64) +#if defined(_WIN32) // 4J Stu - Load the 720/480 skins so that we have something to fallback on during development #ifndef _FINAL_BUILD m_iggyLibraries[eLibraryFallback_GraphicsDefault] = loadSkin(L"skinGraphics.swf", L"skinGraphics.swf"); @@ -655,7 +655,7 @@ void UIController::ReloadSkin() m_iggyLibraries[i] = IGGY_INVALID_LIBRARY; } -#ifdef _WINDOWS64 +#if defined(_WIN32) // 4J Stu - Don't load on a thread on windows. I haven't investigated this in detail, so a quick fix reloadSkinThreadProc(this); #else @@ -783,7 +783,7 @@ void UIController::tickInput() else #endif { -#ifdef _WINDOWS64 +#if defined(_WIN32) if (!g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive()) { UIScene *pScene = NULL; @@ -1178,7 +1178,7 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key) pressed = InputManager.ButtonPressed(iPad,key); // Toggle released = InputManager.ButtonReleased(iPad,key); // Toggle -#ifdef _WINDOWS64 +#if defined(_WIN32) if (iPad == 0) { int vk = 0; @@ -1507,7 +1507,7 @@ void UIController::setupCustomDrawGameState() m_customRenderingClearRect.top = LONG_MAX; m_customRenderingClearRect.bottom = LONG_MIN; -#if defined _WINDOWS64 || _DURANGO +#if defined(_WIN32) || _DURANGO PIXBeginNamedEvent(0,"StartFrame"); RenderManager.StartFrame(); PIXEndNamedEvent(); diff --git a/Minecraft.Client/Common/UI/UIScene.cpp b/Minecraft.Client/Common/UI/UIScene.cpp index 6ef6d0e82..e84af48bb 100644 --- a/Minecraft.Client/Common/UI/UIScene.cpp +++ b/Minecraft.Client/Common/UI/UIScene.cpp @@ -284,7 +284,7 @@ void UIScene::loadMovie() #elif defined __PSVITA__ moviePath.append(L"Vita.swf"); m_loadedResolution = eSceneResolution_Vita; -#elif defined _WINDOWS64 +#elif defined(_WIN32) if(ui.getScreenHeight() == 720) { moviePath.append(L"720.swf"); diff --git a/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.cpp b/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.cpp index 6b196c1b8..418f64789 100644 --- a/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.cpp @@ -5,7 +5,7 @@ #include "..\..\..\Minecraft.World\net.minecraft.world.inventory.h" #include "..\..\..\Minecraft.World\net.minecraft.world.item.h" #include "..\..\MultiplayerLocalPlayer.h" -#ifdef _WINDOWS64 +#if defined(_WIN32) #include "..\..\Windows64\KeyboardMouseInput.h" #endif @@ -39,7 +39,7 @@ void UIScene_AbstractContainerMenu::handleDestroy() { app.DebugPrintf("UIScene_AbstractContainerMenu::handleDestroy\n"); -#ifdef _WINDOWS64 +#if defined(_WIN32) g_savedInventoryCursorPos.x = m_pointerPos.x; g_savedInventoryCursorPos.y = m_pointerPos.y; g_savedInventoryCursorPos.hasSavedPos = true; @@ -83,7 +83,7 @@ void UIScene_AbstractContainerMenu::InitDataAssociations(int iPad, AbstractConta void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex) { -#ifdef _WINDOWS64 +#if defined(_WIN32) g_KBMInput.SetScreenCursorHidden(true); g_KBMInput.SetCursorHiddenForUI(true); #endif @@ -171,7 +171,7 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex) //m_pointerControl->SetPosition( &vPointerPos ); m_pointerPos = vPointerPos; -#ifdef _WINDOWS64 +#if defined(_WIN32) if (g_savedInventoryCursorPos.hasSavedPos) { m_pointerPos.x = g_savedInventoryCursorPos.x; diff --git a/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp b/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp index 2bd06bc63..b6449150c 100644 --- a/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp @@ -17,7 +17,7 @@ #include "PSVita\Network\SQRNetworkManager_AdHoc_Vita.h" #endif -#ifdef _WINDOWS64 +#if defined(_WIN32) #include #include "Xbox\Resource.h" @@ -84,7 +84,7 @@ UIScene_CreateWorldMenu::UIScene_CreateWorldMenu(int iPad, void *initData, UILay m_iGameModeId = GameType::SURVIVAL->getId(); m_pDLCPack = NULL; m_bRebuildTouchBoxes = false; -#ifdef _WINDOWS64 +#if defined(_WIN32) m_bDirectEditing = false; m_iDirectEditCooldown = 0; #endif @@ -293,7 +293,7 @@ void UIScene_CreateWorldMenu::tick() { UIScene::tick(); -#ifdef _WINDOWS64 +#if defined(_WIN32) if (m_iDirectEditCooldown > 0) m_iDirectEditCooldown--; @@ -406,7 +406,7 @@ int UIScene_CreateWorldMenu::ContinueOffline(void *pParam,int iPad,C4JStorage::E void UIScene_CreateWorldMenu::handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled) { if(m_bIgnoreInput) return; -#ifdef _WINDOWS64 +#if defined(_WIN32) if (m_bDirectEditing || m_iDirectEditCooldown > 0) { handled = true; return; } #endif @@ -463,7 +463,7 @@ void UIScene_CreateWorldMenu::handleInput(int iPad, int key, bool repeat, bool p void UIScene_CreateWorldMenu::handlePress(F64 controlId, F64 childId) { if(m_bIgnoreInput) return; -#ifdef _WINDOWS64 +#if defined(_WIN32) if (m_bDirectEditing || m_iDirectEditCooldown > 0) return; #endif @@ -475,7 +475,7 @@ void UIScene_CreateWorldMenu::handlePress(F64 controlId, F64 childId) case eControl_EditWorldName: { m_bIgnoreInput=true; -#ifdef _WINDOWS64 +#if defined(_WIN32) if (Win64_IsControllerConnected()) { UIKeyboardInitData kbData; @@ -808,7 +808,7 @@ int UIScene_CreateWorldMenu::KeyboardCompleteWorldNameCallback(LPVOID lpParam,bo { uint16_t pchText[128]; ZeroMemory(pchText, 128 * sizeof(uint16_t) ); -#ifdef _WINDOWS64 +#if defined(_WIN32) Win64_GetKeyboardText(pchText, 128); #else InputManager.GetText(pchText); @@ -1041,7 +1041,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame() #endif else { -#ifdef _WINDOWS64 +#if defined(_WIN32) // On Windows64, Xbox Live is unavailable. Skip QuadrantSignin and start directly. CreateGame(this, 0); #else @@ -1431,7 +1431,7 @@ int UIScene_CreateWorldMenu::ConfirmCreateReturned(void *pParam,int iPad,C4JStor if(isClientSide && app.IsLocalMultiplayerAvailable()) { -#ifdef _WINDOWS64 +#if defined(_WIN32) // On Windows64, Xbox Live is unavailable. Skip QuadrantSignin and start directly. CreateGame(pClass, 0); return 0; diff --git a/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.h b/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.h index 13f38a3b7..799f7148d 100644 --- a/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.h +++ b/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.h @@ -51,7 +51,7 @@ private: DLCPack * m_pDLCPack; bool m_bRebuildTouchBoxes; -#ifdef _WINDOWS64 +#if defined(_WIN32) bool m_bDirectEditing; wstring m_worldNameBeforeEdit; int m_iDirectEditCooldown; diff --git a/Minecraft.Client/Common/UI/UIScene_DLCMainMenu.cpp b/Minecraft.Client/Common/UI/UIScene_DLCMainMenu.cpp index 77ffdffd9..6229bd95d 100644 --- a/Minecraft.Client/Common/UI/UIScene_DLCMainMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_DLCMainMenu.cpp @@ -149,7 +149,7 @@ void UIScene_DLCMainMenu::handleTimerComplete(int id) switch(id) { case PLAYER_ONLINE_TIMER_ID: -#ifndef _WINDOWS64 +#if !defined(_WIN32) if(ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad())==false) { // check the player hasn't gone offline diff --git a/Minecraft.Client/Common/UI/UIScene_DLCOffersMenu.cpp b/Minecraft.Client/Common/UI/UIScene_DLCOffersMenu.cpp index c109ed62b..a784045f6 100644 --- a/Minecraft.Client/Common/UI/UIScene_DLCOffersMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_DLCOffersMenu.cpp @@ -86,7 +86,7 @@ void UIScene_DLCOffersMenu::handleTimerComplete(int id) switch(id) { case PLAYER_ONLINE_TIMER_ID: -#ifndef _WINDOWS64 +#if !defined(_WIN32) if(ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad())==false) { // check the player hasn't gone offline diff --git a/Minecraft.Client/Common/UI/UIScene_InGameSaveManagementMenu.cpp b/Minecraft.Client/Common/UI/UIScene_InGameSaveManagementMenu.cpp index fa2c7e613..8ccf78895 100644 --- a/Minecraft.Client/Common/UI/UIScene_InGameSaveManagementMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_InGameSaveManagementMenu.cpp @@ -276,7 +276,7 @@ void UIScene_InGameSaveManagementMenu::tick() #ifdef _DURANGO // Already utf16 on durango memcpy(u16Message, m_saveDetails[m_iRequestingThumbnailId].UTF16SaveFilename, MAX_SAVEFILENAME_LENGTH); -#elif defined(_WINDOWS64) +#elif defined(_WIN32) int result = ::MultiByteToWideChar( CP_UTF8, // convert from UTF-8 MB_ERR_INVALID_CHARS, // error on invalid chars diff --git a/Minecraft.Client/Common/UI/UIScene_Intro.cpp b/Minecraft.Client/Common/UI/UIScene_Intro.cpp index 7fc435b22..2ca08fa72 100644 --- a/Minecraft.Client/Common/UI/UIScene_Intro.cpp +++ b/Minecraft.Client/Common/UI/UIScene_Intro.cpp @@ -22,7 +22,7 @@ UIScene_Intro::UIScene_Intro(int iPad, void *initData, UILayer *parentLayer) : U bChina = ProfileManager.LocaleIsChina(); #endif // 4J Stu - These map to values in the Actionscript -#ifdef _WINDOWS64 +#if defined(_WIN32) int platformIdx = 0; #elif defined(_XBOX) int platformIdx = 1; diff --git a/Minecraft.Client/Common/UI/UIScene_Keyboard.cpp b/Minecraft.Client/Common/UI/UIScene_Keyboard.cpp index 9e46a42e9..c0817ade0 100644 --- a/Minecraft.Client/Common/UI/UIScene_Keyboard.cpp +++ b/Minecraft.Client/Common/UI/UIScene_Keyboard.cpp @@ -2,7 +2,7 @@ #include "UI.h" #include "UIScene_Keyboard.h" -#ifdef _WINDOWS64 +#if defined(_WIN32) // Global buffer that stores the text entered in the native keyboard scene. // Callbacks retrieve it via Win64_GetKeyboardText() declared in UIStructs.h. wchar_t g_Win64KeyboardResult[256] = {}; @@ -16,7 +16,7 @@ UIScene_Keyboard::UIScene_Keyboard(int iPad, void *initData, UILayer *parentLaye // Setup all the Iggy references we need for this scene initialiseMovie(); -#ifdef _WINDOWS64 +#if defined(_WIN32) m_win64Callback = NULL; m_win64CallbackParam = NULL; m_win64TextBuffer = L""; @@ -62,7 +62,7 @@ UIScene_Keyboard::UIScene_Keyboard(int iPad, void *initData, UILayer *parentLaye m_ButtonBackspace.init(L"Backspace", -1); // Initialise function keyboard Buttons and set alternative symbol button string -#ifdef _WINDOWS64 +#if defined(_WIN32) if (!m_bPCMode) #endif { @@ -79,7 +79,7 @@ UIScene_Keyboard::UIScene_Keyboard(int iPad, void *initData, UILayer *parentLaye IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcInitFunctionButtons , 1 , value ); } -#ifdef _WINDOWS64 +#if defined(_WIN32) if (m_bPCMode) { // PC text-input mode: hide all on-screen buttons, user types with physical keyboard @@ -158,7 +158,7 @@ bool UIScene_Keyboard::allowRepeat(int key) return true; } -#ifdef _WINDOWS64 +#if defined(_WIN32) void UIScene_Keyboard::tick() { UIScene::tick(); @@ -208,7 +208,7 @@ void UIScene_Keyboard::handleInput(int iPad, int key, bool repeat, bool pressed, switch(key) { case ACTION_MENU_CANCEL: -#ifdef _WINDOWS64 +#if defined(_WIN32) { // Cache before navigateBack() destroys this scene int(*cb)(LPVOID, const bool) = m_win64Callback; @@ -302,7 +302,7 @@ void UIScene_Keyboard::handleTimerComplete(int id) void UIScene_Keyboard::KeyboardDonePressed() { -#ifdef _WINDOWS64 +#if defined(_WIN32) // Use getLabel() here — this is a timer callback (not an Iggy callback) so it's safe. // getLabel() reflects both physical keyboard input (pushed via setLabel) and // on-screen button input (set directly by Flash ActionScript). diff --git a/Minecraft.Client/Common/UI/UIScene_Keyboard.h b/Minecraft.Client/Common/UI/UIScene_Keyboard.h index 054322f20..968939d69 100644 --- a/Minecraft.Client/Common/UI/UIScene_Keyboard.h +++ b/Minecraft.Client/Common/UI/UIScene_Keyboard.h @@ -7,7 +7,7 @@ class UIScene_Keyboard : public UIScene private: bool m_bKeyboardDonePressed; -#ifdef _WINDOWS64 +#if defined(_WIN32) int(*m_win64Callback)(LPVOID, const bool); LPVOID m_win64CallbackParam; wstring m_win64TextBuffer; @@ -57,7 +57,7 @@ public: // INPUT virtual void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled); -#ifdef _WINDOWS64 +#if defined(_WIN32) virtual void tick(); #endif @@ -87,7 +87,7 @@ public: #endif // Returns true if lower scenes in this scenes layer, or in any layer below this scenes layers should be hidden -#ifdef _WINDOWS64 +#if defined(_WIN32) virtual bool hidesLowerScenes() { return true; } #else virtual bool hidesLowerScenes() { return false; } diff --git a/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp index 12b219053..91b4eb00d 100644 --- a/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp @@ -1016,7 +1016,7 @@ void UIScene_LeaderboardsMenu::handleTimerComplete(int id) switch(id) { case PLAYER_ONLINE_TIMER_ID: -#ifndef _WINDOWS64 +#if !defined(_WIN32) if(ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad())==false) { // check the player hasn't gone offline diff --git a/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp index ed3c8137e..c8b24ca3e 100644 --- a/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp @@ -248,7 +248,7 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLaye m_labelGameName.init(wSaveName); #endif #endif -#ifdef _WINDOWS64 +#if defined(_WIN32) if (params->saveDetails != NULL && params->saveDetails->UTF8SaveName[0] != '\0') { wchar_t wSaveName[128]; @@ -862,7 +862,7 @@ void UIScene_LoadMenu::StartSharedLaunchFlow() TelemetryManager->RecordUpsellPresented(m_iPad, eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF); #endif -#if defined(_WINDOWS64) || defined(_DURANGO) +#if defined(_WIN32) || defined(_DURANGO) // trial pack warning UINT uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; @@ -1455,7 +1455,7 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam) #endif else { -#ifdef _WINDOWS64 +#if defined(_WIN32) // On Windows64, IsSignedInLive() returns true as a stub but Xbox Live is // not available. Skip QuadrantSignin and proceed directly with local play. DWORD dwLocalUsersMask = CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad()); @@ -1630,7 +1630,7 @@ void UIScene_LoadMenu::StartGameFromSave(UIScene_LoadMenu* pClass, DWORD dwLocal param->settings = app.GetGameHostOption( eGameHostOption_All ); -#ifdef _WINDOWS64 +#if defined(_WIN32) { extern wchar_t g_Win64UsernameW[17]; Minecraft::GetInstance()->user->name = g_Win64UsernameW; diff --git a/Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp index 8664aca12..3ab03464c 100644 --- a/Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp @@ -25,7 +25,7 @@ #include "message_dialog.h" #endif -#ifdef _WINDOWS64 +#if defined(_WIN32) #include "..\..\..\Minecraft.World\NbtIo.h" #include "..\..\..\Minecraft.World\compression.h" @@ -730,7 +730,7 @@ void UIScene_LoadOrJoinMenu::tick() m_saveDetails = new SaveListDetails[m_pSaveDetails->iSaveC]; m_iSaveDetailsCount = m_pSaveDetails->iSaveC; -#ifdef _WINDOWS64 +#if defined(_WIN32) // Build sorted index array (newest-first by filename timestamp YYYYMMDDHHMMSS) int *sortedIdx = new int[m_pSaveDetails->iSaveC]; for (int si = 0; si < (int)m_pSaveDetails->iSaveC; ++si) sortedIdx[si] = si; @@ -760,7 +760,7 @@ void UIScene_LoadOrJoinMenu::tick() memcpy(m_saveDetails[i].UTF16SaveName, m_pSaveDetails->SaveInfoA[i].UTF16SaveTitle, 128); memcpy(m_saveDetails[i].UTF16SaveFilename, m_pSaveDetails->SaveInfoA[i].UTF16SaveFilename, MAX_SAVEFILENAME_LENGTH); #else -#ifdef _WINDOWS64 +#if defined(_WIN32) { int origIdx = sortedIdx[i]; wchar_t wFilename[MAX_SAVEFILENAME_LENGTH]; @@ -790,7 +790,7 @@ void UIScene_LoadOrJoinMenu::tick() #endif #endif } -#ifdef _WINDOWS64 +#if defined(_WIN32) delete[] sortedIdx; #endif m_controlSavesTimer.setVisible( false ); @@ -808,7 +808,7 @@ void UIScene_LoadOrJoinMenu::tick() app.DebugPrintf("Requesting the first thumbnail\n"); // set the save to load PSAVE_DETAILS pSaveDetails=StorageManager.ReturnSavesInfo(); -#ifdef _WINDOWS64 +#if defined(_WIN32) C4JStorage::ESaveGameState eLoadStatus=StorageManager.LoadSaveDataThumbnail(&pSaveDetails->SaveInfoA[m_saveDetails[m_iRequestingThumbnailId].saveId],&LoadSaveDataThumbnailReturned,this); #else C4JStorage::ESaveGameState eLoadStatus=StorageManager.LoadSaveDataThumbnail(&pSaveDetails->SaveInfoA[(int)m_iRequestingThumbnailId],&LoadSaveDataThumbnailReturned,this); @@ -834,7 +834,7 @@ void UIScene_LoadOrJoinMenu::tick() #ifdef _DURANGO // Already utf16 on durango memcpy(u16Message, m_saveDetails[m_iRequestingThumbnailId].UTF16SaveFilename, MAX_SAVEFILENAME_LENGTH); -#elif defined(_WINDOWS64) +#elif defined(_WIN32) int result = ::MultiByteToWideChar( CP_UTF8, // convert from UTF-8 MB_ERR_INVALID_CHARS, // error on invalid chars @@ -875,7 +875,7 @@ void UIScene_LoadOrJoinMenu::tick() app.DebugPrintf("Requesting another thumbnail\n"); // set the save to load PSAVE_DETAILS pSaveDetails=StorageManager.ReturnSavesInfo(); -#ifdef _WINDOWS64 +#if defined(_WIN32) C4JStorage::ESaveGameState eLoadStatus=StorageManager.LoadSaveDataThumbnail(&pSaveDetails->SaveInfoA[m_saveDetails[m_iRequestingThumbnailId].saveId],&LoadSaveDataThumbnailReturned,this); #else C4JStorage::ESaveGameState eLoadStatus=StorageManager.LoadSaveDataThumbnail(&pSaveDetails->SaveInfoA[(int)m_iRequestingThumbnailId],&LoadSaveDataThumbnailReturned,this); @@ -1359,7 +1359,7 @@ int UIScene_LoadOrJoinMenu::KeyboardCompleteWorldNameCallback(LPVOID lpParam,boo { uint16_t ui16Text[128]; ZeroMemory(ui16Text, 128 * sizeof(uint16_t) ); -#ifdef _WINDOWS64 +#if defined(_WIN32) Win64_GetKeyboardText(ui16Text, 128); #else InputManager.GetText(ui16Text); @@ -1371,7 +1371,7 @@ int UIScene_LoadOrJoinMenu::KeyboardCompleteWorldNameCallback(LPVOID lpParam,boo #if (defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined(__PSVITA__)) // open the save and overwrite the metadata StorageManager.RenameSaveData(pClass->m_iSaveListIndex - pClass->m_iDefaultButtonsC, ui16Text,&UIScene_LoadOrJoinMenu::RenameSaveDataReturned,pClass); -#elif defined(_WINDOWS64) +#elif defined(_WIN32) { int listPos = pClass->m_iSaveListIndex - pClass->m_iDefaultButtonsC; @@ -2249,7 +2249,7 @@ void UIScene_LoadOrJoinMenu::LoadSaveFromCloud() #endif //SONY_REMOTE_STORAGE_DOWNLOAD -#ifdef _WINDOWS64 +#if defined(_WIN32) static bool Win64_DeleteSaveDirectory(const wchar_t* wPath) { wchar_t wSearch[MAX_PATH]; @@ -2290,7 +2290,7 @@ int UIScene_LoadOrJoinMenu::DeleteSaveDialogReturned(void *pParam,int iPad,C4JSt } else { -#ifdef _WINDOWS64 +#if defined(_WIN32) { // Use m_saveDetails (sorted display order) so the correct folder is targeted int displayIdx = pClass->m_iSaveListIndex - pClass->m_iDefaultButtonsC; @@ -2383,7 +2383,7 @@ int UIScene_LoadOrJoinMenu::SaveOptionsDialogReturned(void *pParam,int iPad,C4JS case C4JStorage::EMessage_ResultDecline: // rename { pClass->m_bIgnoreInput=true; -#ifdef _WINDOWS64 +#if defined(_WIN32) { wchar_t wSaveName[128]; ZeroMemory(wSaveName, 128 * sizeof(wchar_t)); diff --git a/Minecraft.Client/Common/UI/UIStructs.h b/Minecraft.Client/Common/UI/UIStructs.h index ac83458fc..46b48bb16 100644 --- a/Minecraft.Client/Common/UI/UIStructs.h +++ b/Minecraft.Client/Common/UI/UIStructs.h @@ -283,7 +283,7 @@ typedef struct _JoinMenuInitData } JoinMenuInitData; // Native keyboard (Windows64 replacement for InputManager.RequestKeyboard WinAPI dialog) -#ifdef _WINDOWS64 +#if defined(_WIN32) typedef struct _UIKeyboardInitData { const wchar_t* title; diff --git a/Minecraft.Client/Extrax64Stubs.cpp b/Minecraft.Client/Extrax64Stubs.cpp index 9e693d1a0..837a668d5 100644 --- a/Minecraft.Client/Extrax64Stubs.cpp +++ b/Minecraft.Client/Extrax64Stubs.cpp @@ -15,7 +15,7 @@ #include "Durango\Social\SocialManager.h" #include "Durango\Sentient\DynamicConfigurations.h" #include "Durango\DurangoExtras\xcompress.h" -#elif defined _WINDOWS64 +#elif defined(_WIN32) #include "Windows64\Sentient\SentientManager.h" #include "StatsCounter.h" #include "Windows64\Social\SocialManager.h" @@ -37,7 +37,7 @@ #endif #if !defined(__PS3__) && !defined(__ORBIS__) && !defined(__PSVITA__) -#ifdef _WINDOWS64 +#if defined(_WIN32) //C4JStorage StorageManager; C_4JProfile ProfileManager; #endif @@ -510,7 +510,7 @@ DWORD XEnableGuestSignin(BOOL fEnable) { return 0; } /////////////////////////////////////////////// Profile library -#ifdef _WINDOWS64 +#if defined(_WIN32) static void* profileData[4]; static bool s_bProfileIsFullVersion; void C_4JProfile::Initialise(DWORD dwTitleID, @@ -592,7 +592,7 @@ void C_4JProfile::SetPrimaryPlayerChanged(bool bVal) {} bool C_4JProfile::QuerySigninStatus(void) { return true; } void C_4JProfile::GetXUID(int iPad, PlayerUID * pXuid, bool bOnlineXuid) { -#ifdef _WINDOWS64 +#if defined(_WIN32) if (iPad != 0) { *pXuid = INVALID_XUID; @@ -689,7 +689,7 @@ void C_4JProfile::SetDebugFullOverride(bool bVal) { s_bProfileIsFullVersion = void C_4JProfile::ShowProfileCard(int iPad, PlayerUID targetUid) {} /////////////////////////////////////////////// Storage library -//#ifdef _WINDOWS64 +//#if defined(_WIN32) #if 0 C4JStorage::C4JStorage() {} void C4JStorage::Tick() {} diff --git a/Minecraft.Client/Input.cpp b/Minecraft.Client/Input.cpp index 1fd676836..ed883ffd7 100644 --- a/Minecraft.Client/Input.cpp +++ b/Minecraft.Client/Input.cpp @@ -7,7 +7,7 @@ #include "Input.h" #include "..\Minecraft.Client\LocalPlayer.h" #include "Options.h" -#ifdef _WINDOWS64 +#if defined(_WIN32) #include "Windows64\KeyboardMouseInput.h" #endif @@ -45,7 +45,7 @@ void Input::tick(LocalPlayer *player) float kbXA = 0.0f; float kbYA = 0.0f; -#ifdef _WINDOWS64 +#if defined(_WIN32) if (iPad == 0 && g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive()) { if( pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_LEFT) || pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_RIGHT) ) @@ -92,7 +92,7 @@ void Input::tick(LocalPlayer *player) } } -#ifdef _WINDOWS64 +#if defined(_WIN32) if (iPad == 0 && g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive()) { // Left Shift = sneak (hold to crouch) @@ -163,7 +163,7 @@ void Input::tick(LocalPlayer *player) float turnX = tx * abs(tx) * turnSpeed; float turnY = ty * abs(ty) * turnSpeed; -#ifdef _WINDOWS64 +#if defined(_WIN32) if (iPad == 0 && g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive()) { float mouseSensitivity = ((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity_InGame)) / 100.0f; @@ -187,7 +187,7 @@ void Input::tick(LocalPlayer *player) unsigned int jump = InputManager.GetValue(iPad, MINECRAFT_ACTION_JUMP); bool kbJump = false; -#ifdef _WINDOWS64 +#if defined(_WIN32) kbJump = (iPad == 0) && g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive() && g_KBMInput.IsKeyDown(KeyboardMouseInput::KEY_JUMP); #endif if( (jump > 0 || kbJump) && pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_JUMP) ) @@ -199,7 +199,7 @@ void Input::tick(LocalPlayer *player) if (app.GetFreezePlayers()) jumping = false; #endif -#ifdef _WINDOWS64 +#if defined(_WIN32) if (iPad == 0 && g_KBMInput.IsKeyPressed(VK_ESCAPE) && g_KBMInput.IsMouseGrabbed()) { g_KBMInput.SetMouseGrabbed(false); diff --git a/Minecraft.Client/LevelRenderer.h b/Minecraft.Client/LevelRenderer.h index bb2c0d13c..5fd1ae773 100644 --- a/Minecraft.Client/LevelRenderer.h +++ b/Minecraft.Client/LevelRenderer.h @@ -52,7 +52,7 @@ public: static const int CHUNK_SIZE = 16; #endif static const int CHUNK_Y_COUNT = Level::maxBuildHeight / CHUNK_SIZE; -#if defined _WINDOWS64 +#if defined(_WIN32) static const int MAX_COMMANDBUFFER_ALLOCATIONS = 2047 * 1024 * 1024; // Changed to 2047. 4J had set to 512. #elif defined _XBOX_ONE static const int MAX_COMMANDBUFFER_ALLOCATIONS = 512 * 1024 * 1024; // 4J - added diff --git a/Minecraft.Client/LocalPlayer.cpp b/Minecraft.Client/LocalPlayer.cpp index cfcf85acc..882120bd2 100644 --- a/Minecraft.Client/LocalPlayer.cpp +++ b/Minecraft.Client/LocalPlayer.cpp @@ -277,7 +277,7 @@ void LocalPlayer::aiStep() } } if (isSneaking()) sprintTriggerTime = 0; -#ifdef _WINDOWS64 +#if defined(_WIN32) if (input->sprinting && onGround && enoughFoodToSprint && !isUsingItem() && !hasEffect(MobEffect::blindness) && !isSneaking()) { setSprinting(true); diff --git a/Minecraft.Client/Minecraft.cpp b/Minecraft.Client/Minecraft.cpp index 7ae206cf9..62f8bb347 100644 --- a/Minecraft.Client/Minecraft.cpp +++ b/Minecraft.Client/Minecraft.cpp @@ -503,7 +503,7 @@ void Minecraft::setScreen(Screen *screen) this->screen->removed(); } -#ifdef _WINDOWS64 +#if defined(_WIN32) if (screen != NULL && g_KBMInput.IsMouseGrabbed()) { g_KBMInput.SetMouseGrabbed(false); @@ -1039,7 +1039,7 @@ shared_ptr Minecraft::createExtraLocalPlayer(int idx, co PlayerUID playerXUIDOnline = INVALID_XUID; ProfileManager.GetXUID(idx,&playerXUIDOffline,false); ProfileManager.GetXUID(idx,&playerXUIDOnline,true); -#ifdef _WINDOWS64 +#if defined(_WIN32) // Compatibility rule for Win64 id migration // host keeps legacy host XUID, non-host uses persistent uid.dat XUID. INetworkPlayer *localNetworkPlayer = g_NetworkManager.GetLocalPlayerByUserIndex(idx); @@ -1191,7 +1191,7 @@ void Minecraft::createPrimaryLocalPlayer(int iPad) } } -#ifdef _WINDOWS64 +#if defined(_WIN32) void Minecraft::applyFrameMouseLook() { // Per-frame mouse look: consume mouse deltas every frame instead of waiting @@ -1467,7 +1467,7 @@ void Minecraft::run_middle() if(InputManager.ButtonPressed(i, MINECRAFT_ACTION_RENDER_THIRD_PERSON)) localplayers[i]->ullButtonsPressed|=1LL<ullButtonsPressed|=1LL<lastClickTick[0] = ticks; } -#ifdef _WINDOWS64 +#if defined(_WIN32) bool actionPressed = InputManager.ButtonPressed(iPad, MINECRAFT_ACTION_ACTION) || (iPad == 0 && g_KBMInput.IsKBMActive() && g_KBMInput.IsMouseButtonPressed(KeyboardMouseInput::MOUSE_LEFT)); bool actionHeld = InputManager.ButtonDown(iPad, MINECRAFT_ACTION_ACTION) || (iPad == 0 && g_KBMInput.IsKBMActive() && g_KBMInput.IsMouseButtonDown(KeyboardMouseInput::MOUSE_LEFT)); #else @@ -3577,7 +3577,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) lastClickTick = ticks; } */ -#ifdef _WINDOWS64 +#if defined(_WIN32) bool useHeld = InputManager.ButtonDown(iPad, MINECRAFT_ACTION_USE) || (iPad == 0 && g_KBMInput.IsKBMActive() && g_KBMInput.IsMouseButtonDown(KeyboardMouseInput::MOUSE_RIGHT)); #else bool useHeld = InputManager.ButtonDown(iPad, MINECRAFT_ACTION_USE); @@ -4313,7 +4313,7 @@ void Minecraft::setLevel(MultiPlayerLevel *level, int message /*=-1*/, shared_pt playerXUIDOnline.setForAdhoc(); } #endif -#ifdef _WINDOWS64 +#if defined(_WIN32) // On Windows, the implementation has been changed to use a per-client pseudo XUID based on `uid.dat`. // To maintain player data compatibility with existing worlds, the world host (the first player) will use the previous embedded pseudo XUID. INetworkPlayer *localNetworkPlayer = g_NetworkManager.GetLocalPlayerByUserIndex(iPrimaryPlayer); @@ -4508,7 +4508,7 @@ void Minecraft::respawnPlayer(int iPad, int dimension, int newEntityId) PlayerUID playerXUIDOnline = INVALID_XUID; ProfileManager.GetXUID(iTempPad,&playerXUIDOffline,false); ProfileManager.GetXUID(iTempPad,&playerXUIDOnline,true); -#ifdef _WINDOWS64 +#if defined(_WIN32) // Same compatibility rule as create/init paths. INetworkPlayer *localNetworkPlayer = g_NetworkManager.GetLocalPlayerByUserIndex(iTempPad); if(localNetworkPlayer != NULL && localNetworkPlayer->IsHost()) diff --git a/Minecraft.Client/Minecraft.h b/Minecraft.Client/Minecraft.h index cc1e5d18a..3a986bf8c 100644 --- a/Minecraft.Client/Minecraft.h +++ b/Minecraft.Client/Minecraft.h @@ -217,7 +217,7 @@ public: static Minecraft *GetInstance(); void run_middle(); void run_end(); -#ifdef _WINDOWS64 +#if defined(_WIN32) void applyFrameMouseLook(); // Per-frame mouse look to reduce input latency #endif diff --git a/Minecraft.Client/MinecraftServer.cpp b/Minecraft.Client/MinecraftServer.cpp index 012ae19bd..9855c5b6f 100644 --- a/Minecraft.Client/MinecraftServer.cpp +++ b/Minecraft.Client/MinecraftServer.cpp @@ -31,7 +31,7 @@ #include "..\Minecraft.World\net.minecraft.world.item.h" #include "..\Minecraft.World\net.minecraft.world.item.enchantment.h" #include "..\Minecraft.World\net.minecraft.world.damagesource.h" -#ifdef _WINDOWS64 +#if defined(_WIN32) #include "Windows64\Network\WinsockNetLayer.h" #endif #include @@ -88,7 +88,7 @@ unordered_map MinecraftServer::ironTimers; static bool ShouldUseDedicatedServerProperties() { -#ifdef _WINDOWS64 +#if defined(_WIN32) return g_Win64DedicatedServer; #else return false; @@ -1230,7 +1230,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring if( levels[0]->isNew || levels[1]->isNew || levels[2]->isNew ) { -#ifndef _WINDOWS64 +#if !defined(_WIN32) // On Windows64 we skip the automatic initial save so that choosing // "Exit without saving" on a new world does not leave an orphaned save folder. levels[0]->saveToDisc(mcprogress, false); diff --git a/Minecraft.Client/PendingConnection.cpp b/Minecraft.Client/PendingConnection.cpp index 72b8f3825..09d3bf727 100644 --- a/Minecraft.Client/PendingConnection.cpp +++ b/Minecraft.Client/PendingConnection.cpp @@ -20,7 +20,7 @@ Random *PendingConnection::random = new Random(); -#ifdef _WINDOWS64 +#if defined(_WIN32) bool g_bRejectDuplicateNames = true; #endif @@ -192,7 +192,7 @@ void PendingConnection::handleLogin(shared_ptr packet) app.DebugPrintf("Rejecting duplicate xuid for name: %ls\n", name.c_str()); disconnect(DisconnectPacket::eDisconnect_Banned); } -#ifdef _WINDOWS64 +#if defined(_WIN32) else if (g_bRejectDuplicateNames) { bool nameTaken = false; diff --git a/Minecraft.Client/PlayerList.cpp b/Minecraft.Client/PlayerList.cpp index 42724a4f4..15305996f 100644 --- a/Minecraft.Client/PlayerList.cpp +++ b/Minecraft.Client/PlayerList.cpp @@ -56,7 +56,7 @@ PlayerList::PlayerList(MinecraftServer *server) //int viewDistance = server->settings->getInt(L"view-distance", 10); -#ifdef _WINDOWS64 +#if defined(_WIN32) maxPlayers = MINECRAFT_NET_MAX_PLAYERS; #else maxPlayers = server->settings->getInt(L"max-players", 20); @@ -106,7 +106,7 @@ void PlayerList::placeNewPlayer(Connection *connection, shared_ptr } } #endif -#ifdef _WINDOWS64 +#if defined(_WIN32) if (networkPlayer != NULL) { NetworkPlayerXbox* nxp = (NetworkPlayerXbox*)networkPlayer; @@ -513,7 +513,7 @@ if (player->riding != NULL) shared_ptr PlayerList::getPlayerForLogin(PendingConnection *pendingConnection, const wstring& userName, PlayerUID xuid, PlayerUID onlineXuid) { -#ifdef _WINDOWS64 +#if defined(_WIN32) if (players.size() >= (unsigned int)MINECRAFT_NET_MAX_PLAYERS) #else if (players.size() >= (unsigned int)maxPlayers) @@ -526,7 +526,7 @@ shared_ptr PlayerList::getPlayerForLogin(PendingConnection *pendin player->gameMode->player = player; // 4J added as had to remove this assignment from ServerPlayer ctor player->setXuid( xuid ); // 4J Added player->setOnlineXuid( onlineXuid ); // 4J Added -#ifdef _WINDOWS64 +#if defined(_WIN32) { // Use packet-supplied identity from LoginPacket. // Do not recompute from name here: mixed-version clients must stay compatible. diff --git a/Minecraft.Client/Screen.cpp b/Minecraft.Client/Screen.cpp index 131cf0134..35e6bb41c 100644 --- a/Minecraft.Client/Screen.cpp +++ b/Minecraft.Client/Screen.cpp @@ -5,7 +5,7 @@ #include "Tesselator.h" #include "Textures.h" #include "..\Minecraft.World\SoundTypes.h" -#ifdef _WINDOWS64 +#if defined(_WIN32) #include "Windows64\KeyboardMouseInput.h" #endif @@ -103,7 +103,7 @@ void Screen::init() void Screen::updateEvents() { -#ifdef _WINDOWS64 +#if defined(_WIN32) // Poll mouse button state and dispatch click/release events for (int btn = 0; btn < 3; btn++) { @@ -165,7 +165,7 @@ void Screen::updateEvents() void Screen::mouseEvent() { -#ifdef _WINDOWS64 +#if defined(_WIN32) // Mouse event dispatching is handled directly in updateEvents() for Windows #else /* 4J - TODO diff --git a/Minecraft.Client/Windows64/KeyboardMouseInput.cpp b/Minecraft.Client/Windows64/KeyboardMouseInput.cpp index fe3c39194..4ec4414e3 100644 --- a/Minecraft.Client/Windows64/KeyboardMouseInput.cpp +++ b/Minecraft.Client/Windows64/KeyboardMouseInput.cpp @@ -1,6 +1,6 @@ #include "stdafx.h" -#ifdef _WINDOWS64 +#if defined(_WIN32) #include "KeyboardMouseInput.h" #include diff --git a/Minecraft.Client/Windows64/KeyboardMouseInput.h b/Minecraft.Client/Windows64/KeyboardMouseInput.h index fff924bfd..1d8440ba8 100644 --- a/Minecraft.Client/Windows64/KeyboardMouseInput.h +++ b/Minecraft.Client/Windows64/KeyboardMouseInput.h @@ -1,6 +1,6 @@ #pragma once -#ifdef _WINDOWS64 +#if defined(_WIN32) #include diff --git a/Minecraft.Client/Windows64/Network/WinsockNetLayer.cpp b/Minecraft.Client/Windows64/Network/WinsockNetLayer.cpp index ca1d62af7..75c23591d 100644 --- a/Minecraft.Client/Windows64/Network/WinsockNetLayer.cpp +++ b/Minecraft.Client/Windows64/Network/WinsockNetLayer.cpp @@ -3,7 +3,7 @@ #include "stdafx.h" -#ifdef _WINDOWS64 +#if defined(_WIN32) #include "WinsockNetLayer.h" #include "..\..\Common\Network\PlatformNetworkManagerStub.h" diff --git a/Minecraft.Client/Windows64/Network/WinsockNetLayer.h b/Minecraft.Client/Windows64/Network/WinsockNetLayer.h index fd1280f7d..3213c8c86 100644 --- a/Minecraft.Client/Windows64/Network/WinsockNetLayer.h +++ b/Minecraft.Client/Windows64/Network/WinsockNetLayer.h @@ -2,7 +2,7 @@ // https://github.com/LCEMP/LCEMP #pragma once -#ifdef _WINDOWS64 +#if defined(_WIN32) #include #include diff --git a/Minecraft.Client/Windows64/Windows64_Xuid.h b/Minecraft.Client/Windows64/Windows64_Xuid.h index 93577751a..3f4733d92 100644 --- a/Minecraft.Client/Windows64/Windows64_Xuid.h +++ b/Minecraft.Client/Windows64/Windows64_Xuid.h @@ -1,6 +1,6 @@ #pragma once -#ifdef _WINDOWS64 +#if defined(_WIN32) #include #include diff --git a/Minecraft.Client/stdafx.h b/Minecraft.Client/stdafx.h index 7614d0589..d36a096f4 100644 --- a/Minecraft.Client/stdafx.h +++ b/Minecraft.Client/stdafx.h @@ -60,7 +60,7 @@ typedef unsigned __int64 __uint64; #endif -#ifdef _WINDOWS64 +#if defined(_WIN32) #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers // Windows Header Files: #include @@ -172,7 +172,7 @@ typedef XUID GameSessionUID; #include "Durango\4JLibs\inc\4J_Profile.h" #include "Durango\4JLibs\inc\4J_Render.h" #include "Durango\4JLibs\inc\4J_Storage.h" -#elif defined _WINDOWS64 +#elif defined(_WIN32) #include #include "Windows64\4JLibs\inc\4J_Input.h" #include "Windows64\4JLibs\inc\4J_Profile.h" @@ -267,7 +267,7 @@ typedef XUID GameSessionUID; #include "Durango\Iggy\include\iggy.h" #include "Durango\Iggy\gdraw\gdraw_d3d11.h" #include "Durango\Durango_UIController.h" -#elif defined _WINDOWS64 +#elif defined(_WIN32) #include "Windows64\Sentient\MinecraftTelemetry.h" #include "Windows64Media\strings.h" #include "Windows64\Windows64_App.h" diff --git a/Minecraft.Client/stubs.cpp b/Minecraft.Client/stubs.cpp index af65eb75e..1f4838738 100644 --- a/Minecraft.Client/stubs.cpp +++ b/Minecraft.Client/stubs.cpp @@ -1,6 +1,6 @@ #include "stdafx.h" -#ifdef _WINDOWS64 +#if defined(_WIN32) #include "Windows64\KeyboardMouseInput.h" static const int s_keyToVK[] = { diff --git a/Minecraft.Client/stubs.h b/Minecraft.Client/stubs.h index f4ae056f2..bad768093 100644 --- a/Minecraft.Client/stubs.h +++ b/Minecraft.Client/stubs.h @@ -186,7 +186,7 @@ class Keyboard public: static void create() {} static void destroy() {} -#ifdef _WINDOWS64 +#if defined(_WIN32) static bool isKeyDown(int keyCode); #else static bool isKeyDown(int) { return false; } @@ -251,7 +251,7 @@ public: static const int KEY_LEFT = 54; static const int KEY_RIGHT = 55; -#ifdef _WINDOWS64 +#if defined(_WIN32) // Map LWJGL-style key constant to Windows VK code static int toVK(int keyConst); #endif @@ -262,7 +262,7 @@ class Mouse public: static void create() {} static void destroy() {} -#ifdef _WINDOWS64 +#if defined(_WIN32) static int getX(); static int getY(); static bool isButtonDown(int button); diff --git a/Minecraft.World/BiomeOverrideLayer.cpp b/Minecraft.World/BiomeOverrideLayer.cpp index a44295dc2..09ffb8a4d 100644 --- a/Minecraft.World/BiomeOverrideLayer.cpp +++ b/Minecraft.World/BiomeOverrideLayer.cpp @@ -13,7 +13,7 @@ BiomeOverrideLayer::BiomeOverrideLayer(int seedMixup) : Layer(seedMixup) wstring path = L"GAME:\\GameRules\\biomemap.bin"; HANDLE file = CreateFile(path.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); #else -#ifdef _WINDOWS64 +#if defined(_WIN32) string path = "GameRules\\biomemap.bin"; #else string path = "GAME:\\GameRules\\biomemap.bin"; diff --git a/Minecraft.World/ConsoleSaveFileConverter.cpp b/Minecraft.World/ConsoleSaveFileConverter.cpp index 21de3cbea..f97e8e1fc 100644 --- a/Minecraft.World/ConsoleSaveFileConverter.cpp +++ b/Minecraft.World/ConsoleSaveFileConverter.cpp @@ -133,7 +133,7 @@ void ConsoleSaveFileConverter::ConvertSave(ConsoleSaveFile *sourceSave, ConsoleS if(progress) { -#ifndef _WINDOWS64 +#if !defined(_WIN32) progress->progressStage(IDS_SAVETRANSFER_STAGE_CONVERTING); #endif } diff --git a/Minecraft.World/CustomLevelSource.cpp b/Minecraft.World/CustomLevelSource.cpp index 613162992..5780e1f77 100644 --- a/Minecraft.World/CustomLevelSource.cpp +++ b/Minecraft.World/CustomLevelSource.cpp @@ -24,7 +24,7 @@ CustomLevelSource::CustomLevelSource(Level *level, __int64 seed, bool generateSt wstring path = L"GAME:\\GameRules\\heightmap.bin"; #else -#ifdef _WINDOWS64 +#if defined(_WIN32) string path = "GameRules\\heightmap.bin"; #else string path = "GAME:\\GameRules\\heightmap.bin"; @@ -66,7 +66,7 @@ CustomLevelSource::CustomLevelSource(Level *level, __int64 seed, bool generateSt wstring waterHeightPath = L"GAME:\\GameRules\\waterheight.bin"; #else -#ifdef _WINDOWS64 +#if defined(_WIN32) string waterHeightPath = "GameRules\\waterheight.bin"; #else string waterHeightPath = "GAME:\\GameRules\\waterheight.bin"; diff --git a/Minecraft.World/DirectoryLevelStorage.cpp b/Minecraft.World/DirectoryLevelStorage.cpp index facd949af..c10e8eb9f 100644 --- a/Minecraft.World/DirectoryLevelStorage.cpp +++ b/Minecraft.World/DirectoryLevelStorage.cpp @@ -284,7 +284,7 @@ LevelData *DirectoryLevelStorage::prepareLevel() for(unsigned int i = 0; i < count; ++i) { PlayerUID playerUid = dis.readPlayerUID(); -#ifdef _WINDOWS64 +#if defined(_WIN32) app.DebugPrintf(" -- %d\n", playerUid); #else app.DebugPrintf(" -- %ls\n", playerUid.toString().c_str()); @@ -684,7 +684,7 @@ void DirectoryLevelStorage::saveMapIdLookup() app.DebugPrintf("Saving %d mappings\n", m_playerMappings.size()); for ( auto& it : m_playerMappings ) { -#ifdef _WINDOWS64 +#if defined(_WIN32) app.DebugPrintf(" -- %d\n", it.first); #else app.DebugPrintf(" -- %ls\n", it.first.toString().c_str()); diff --git a/Minecraft.World/File.cpp b/Minecraft.World/File.cpp index 82e593dc2..d3d558462 100644 --- a/Minecraft.World/File.cpp +++ b/Minecraft.World/File.cpp @@ -36,7 +36,7 @@ File::File( const wstring& pathname ) //: parent( NULL ) else m_abstractPathName = pathname; -#ifdef _WINDOWS64 +#if defined(_WIN32) string path = wstringtochararray(m_abstractPathName); string finalPath = StorageManager.GetMountedPath(path.c_str()); if(finalPath.size() == 0) finalPath = path; diff --git a/Minecraft.World/FileHeader.h b/Minecraft.World/FileHeader.h index 4444409f5..68d9cbcc3 100644 --- a/Minecraft.World/FileHeader.h +++ b/Minecraft.World/FileHeader.h @@ -68,7 +68,7 @@ enum ESavePlatform SAVE_FILE_PLATFORM_LOCAL = SAVE_FILE_PLATFORM_PS4 #elif defined __PSVITA__ SAVE_FILE_PLATFORM_LOCAL = SAVE_FILE_PLATFORM_PSVITA -#elif defined _WINDOWS64 +#elif defined(_WIN32) SAVE_FILE_PLATFORM_LOCAL = SAVE_FILE_PLATFORM_WIN64 #endif }; diff --git a/Minecraft.World/Player.cpp b/Minecraft.World/Player.cpp index bd6b68a8e..24ea8ba66 100644 --- a/Minecraft.World/Player.cpp +++ b/Minecraft.World/Player.cpp @@ -369,7 +369,7 @@ void Player::tick() if( count++ == 100 ) { #if 0 -#ifdef _WINDOWS64 +#if defined(_WIN32) // Drop some items so we have them in inventory to play with this->drop( shared_ptr( new ItemInstance(Tile::recordPlayer) ) ); this->drop( shared_ptr( new ItemInstance(Item::map) ) ); diff --git a/Minecraft.World/stdafx.h b/Minecraft.World/stdafx.h index 37c3960ce..78d51c516 100644 --- a/Minecraft.World/stdafx.h +++ b/Minecraft.World/stdafx.h @@ -12,7 +12,7 @@ typedef unsigned __int64 __uint64; #endif -#ifdef _WINDOWS64 +#if defined(_WIN32) #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers // Windows Header Files: #include @@ -162,7 +162,7 @@ void MemSect(int sect); #include "..\Minecraft.Client\Durango\4JLibs\inc\4J_Render.h" #include "..\Minecraft.Client\Durango\4JLibs\inc\4J_Storage.h" #include "..\Minecraft.Client\Durango\4JLibs\inc\4J_Input.h" -#elif defined _WINDOWS64 +#elif defined(_WIN32) #include "..\Minecraft.Client\Windows64\4JLibs\inc\4J_Profile.h" #include "..\Minecraft.Client\Windows64\4JLibs\inc\4J_Render.h" #include "..\Minecraft.Client\Windows64\4JLibs\inc\4J_Storage.h" @@ -219,7 +219,7 @@ void MemSect(int sect); #include "..\Minecraft.Client\Durango\Sentient\MinecraftTelemetry.h" #include "..\Minecraft.Client\Durango\Sentient\TelemetryEnum.h" -#elif defined _WINDOWS64 +#elif defined(_WIN32) #include "..\Minecraft.Client\Windows64\Windows64_App.h" #include "..\Minecraft.Client\Windows64Media\strings.h" #include "..\Minecraft.Client\Windows64\Sentient\SentientTelemetryCommon.h" diff --git a/Minecraft.World/system.cpp b/Minecraft.World/system.cpp index b6dd56d96..4a33d4873 100644 --- a/Minecraft.World/system.cpp +++ b/Minecraft.World/system.cpp @@ -52,7 +52,7 @@ void System::arraycopy(arrayWithLength src, unsigned int srcPos, arrayWithL //The current value of the system timer, in nanoseconds. __int64 System::nanoTime() { -#if defined _WINDOWS64 || defined _XBOX || defined _WIN32 +#if defined(_WIN32) || defined _XBOX || defined _WIN32 static LARGE_INTEGER s_frequency = { 0 }; if (s_frequency.QuadPart == 0) {