Refactor Windows64 Preprocessor Directives to Unified _WIN32 Checks

- Updated all instances of _WINDOWS64 preprocessor directives to use _WIN32 for better compatibility and consistency across the codebase.
- Modified various files including UIScene_Keyboard, UIScene_LoadMenu, and others to ensure proper handling of Windows-specific functionality.
- Ensured that all relevant code paths are correctly defined under the new preprocessor directive, maintaining functionality for Windows platforms.
This commit is contained in:
SmashedFrenzy16 2026-03-06 13:56:22 +00:00
parent de46641cda
commit 8f87f3a2e9
60 changed files with 169 additions and 169 deletions

View file

@ -55,7 +55,7 @@
#endif #endif
#include "DLCTexturePack.h" #include "DLCTexturePack.h"
#ifdef _WINDOWS64 #if defined(_WIN32)
#include "Xbox\Network\NetworkPlayerXbox.h" #include "Xbox\Network\NetworkPlayerXbox.h"
#include "Common\Network\PlatformNetworkManagerStub.h" #include "Common\Network\PlatformNetworkManagerStub.h"
#endif #endif
@ -759,7 +759,7 @@ void ClientConnection::handleAddPlayer(shared_ptr<AddPlayerPacket> packet)
return; return;
} }
} }
#ifdef _WINDOWS64 #if defined(_WIN32)
// Win64 keeps local-player identity separate from network smallId; also guard against creating // 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. // a duplicate remote player for a local slot by checking the username directly.
for (unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx) for (unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx)
@ -771,7 +771,7 @@ void ClientConnection::handleAddPlayer(shared_ptr<AddPlayerPacket> packet)
} }
} }
#endif #endif
/*#ifdef _WINDOWS64 /*#if defined(_WIN32)
// On Windows64 all XUIDs are INVALID_XUID so the XUID check above never fires. // 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), // 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 // NOT the controller slot — so we must scan all local player slots and match by
@ -810,7 +810,7 @@ void ClientConnection::handleAddPlayer(shared_ptr<AddPlayerPacket> packet)
player->m_displayName = player->getName(); player->m_displayName = player->getName();
#endif #endif
#ifdef _WINDOWS64 #if defined(_WIN32)
{ {
IQNetPlayer* matchedQNetPlayer = NULL; IQNetPlayer* matchedQNetPlayer = NULL;
PlayerUID pktXuid = player->getXuid(); PlayerUID pktXuid = player->getXuid();
@ -1001,7 +1001,7 @@ void ClientConnection::handleMoveEntitySmall(shared_ptr<MoveEntityPacketSmall> p
void ClientConnection::handleRemoveEntity(shared_ptr<RemoveEntitiesPacket> packet) void ClientConnection::handleRemoveEntity(shared_ptr<RemoveEntitiesPacket> packet)
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
if (!g_NetworkManager.IsHost()) if (!g_NetworkManager.IsHost())
{ {
for (int i = 0; i < packet->ids.length; i++) for (int i = 0; i < packet->ids.length; i++)

View file

@ -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 // 4J Stu - Temp define to get Miles to link, can likely be removed when we get a new version of Miles
#define _SEKRIT #define _SEKRIT
#include "..\..\Durango\Miles\include\mss.h" #include "..\..\Durango\Miles\include\mss.h"
#elif defined _WINDOWS64 #elif defined(_WIN32)
#else // PS4 #else // PS4
// 4J Stu - Temp define to get Miles to link, can likely be removed when we get a new version of Miles // 4J Stu - Temp define to get Miles to link, can likely be removed when we get a new version of Miles
#define _SEKRIT2 #define _SEKRIT2

View file

@ -63,7 +63,7 @@ void SoundEngine::playMusicTick() {};
#else #else
#ifdef _WINDOWS64 #if defined(_WIN32)
char SoundEngine::m_szSoundPath[]={"Windows64Media\\Sound\\"}; char SoundEngine::m_szSoundPath[]={"Windows64Media\\Sound\\"};
char SoundEngine::m_szMusicPath[]={"music\\"}; char SoundEngine::m_szMusicPath[]={"music\\"};
char SoundEngine::m_szRedistName[]={"redist64"}; char SoundEngine::m_szRedistName[]={"redist64"};

View file

@ -78,7 +78,7 @@ enum MUSIC_STREAMSTATE
typedef struct typedef struct
{ {
#ifndef _WINDOWS64 #if !defined(_WIN32)
F32 x,y,z,volume,pitch; F32 x,y,z,volume,pitch;
#else #else
float x,y,z,volume,pitch; float x,y,z,volume,pitch;
@ -92,7 +92,7 @@ typedef struct
} }
AUDIO_INFO; AUDIO_INFO;
#ifdef _WINDOWS64 #if defined(_WIN32)
struct MiniAudioSound struct MiniAudioSound
{ {
ma_sound sound; ma_sound sound;

View file

@ -760,7 +760,7 @@ bool CMinecraftApp::LoadBeaconMenu(int iPad ,shared_ptr<Inventory> inventory, sh
// GAME SETTINGS // GAME SETTINGS
////////////////////////////////////////////// //////////////////////////////////////////////
#ifdef _WINDOWS64 #if defined(_WIN32)
static void Win64_GetSettingsPath(char *outPath, DWORD size) static void Win64_GetSettingsPath(char *outPath, DWORD size)
{ {
GetModuleFileNameA(NULL, outPath, size); GetModuleFileNameA(NULL, outPath, size);
@ -811,7 +811,7 @@ void CMinecraftApp::InitGameSettings()
//SetDefaultGameSettings(i); - done on a callback from the profile manager //SetDefaultGameSettings(i); - done on a callback from the profile manager
// 4J-PB - adding in for Windows & PS3 to set the defaults for the joypad // 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); C_4JProfile::PROFILESETTINGS *pProfileSettings=ProfileManager.GetDashboardProfileSettings(i);
// clear this for now - it will come from reading the system values // clear this for now - it will come from reading the system values
memset(pProfileSettings,0,sizeof(C_4JProfile::PROFILESETTINGS)); memset(pProfileSettings,0,sizeof(C_4JProfile::PROFILESETTINGS));
@ -2409,7 +2409,7 @@ void CMinecraftApp::CheckGameSettingsChanged(bool bOverride5MinuteTimer, int iPa
StorageManager.WriteToProfile(i,true, bOverride5MinuteTimer); StorageManager.WriteToProfile(i,true, bOverride5MinuteTimer);
#else #else
ProfileManager.WriteToProfile(i,true, bOverride5MinuteTimer); ProfileManager.WriteToProfile(i,true, bOverride5MinuteTimer);
#ifdef _WINDOWS64 #if defined(_WIN32)
Win64_SaveSettings(GameSettingsA[i]); Win64_SaveSettings(GameSettingsA[i]);
#endif #endif
#endif #endif
@ -2425,7 +2425,7 @@ void CMinecraftApp::CheckGameSettingsChanged(bool bOverride5MinuteTimer, int iPa
StorageManager.WriteToProfile(iPad,true, bOverride5MinuteTimer); StorageManager.WriteToProfile(iPad,true, bOverride5MinuteTimer);
#else #else
ProfileManager.WriteToProfile(iPad,true, bOverride5MinuteTimer); ProfileManager.WriteToProfile(iPad,true, bOverride5MinuteTimer);
#ifdef _WINDOWS64 #if defined(_WIN32)
Win64_SaveSettings(GameSettingsA[iPad]); Win64_SaveSettings(GameSettingsA[iPad]);
#endif #endif
#endif #endif
@ -5831,7 +5831,7 @@ int CMinecraftApp::GetTPConfigVal(WCHAR *pwchDataFile)
return -1; return -1;
} }
#elif defined _WINDOWS64 #elif defined(_WIN32)
int CMinecraftApp::GetTPConfigVal(WCHAR *pwchDataFile) int CMinecraftApp::GetTPConfigVal(WCHAR *pwchDataFile)
{ {
return -1; return -1;
@ -9509,7 +9509,7 @@ bool CMinecraftApp::IsLocalMultiplayerAvailable()
if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers; if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers;
} }
#ifdef _WINDOWS64 #if defined(_WIN32)
bool available = connectedControllers > 1; bool available = connectedControllers > 1;
#else #else
bool available = RenderManager.IsHiDef() && connectedControllers > 1; 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 //eTUTP_Steampunk = 0x01000808, // 4J Stu - The released Steampunk pack had a sub-pack ID
}; };
#ifdef _WINDOWS64 #if defined(_WIN32)
wstring titleUpdateTexturePackRoot = L"Windows64\\DLC\\"; wstring titleUpdateTexturePackRoot = L"Windows64\\DLC\\";
#elif defined(__ORBIS__) #elif defined(__ORBIS__)
wstring titleUpdateTexturePackRoot = L"/app0/orbis/CU/DLC/"; wstring titleUpdateTexturePackRoot = L"/app0/orbis/CU/DLC/";

View file

@ -920,7 +920,7 @@ public:
#elif defined _DURANGO #elif defined _DURANGO
#elif defined _WINDOWS64 #elif defined(_WIN32)
//CMinecraftAudio audio; //CMinecraftAudio audio;
#else // PS4 #else // PS4

View file

@ -327,7 +327,7 @@ bool DLCManager::readDLCDataFile(DWORD &dwFilesProcessed, const string &path, DL
} }
else if (fromArchive) return false; else if (fromArchive) return false;
#ifdef _WINDOWS64 #if defined(_WIN32)
string finalPath = StorageManager.GetMountedPath(path.c_str()); string finalPath = StorageManager.GetMountedPath(path.c_str());
if(finalPath.size() == 0) finalPath = path; if(finalPath.size() == 0) finalPath = path;
HANDLE file = CreateFile(finalPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); 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; DWORD packId = 0;
wstring wPath = convStringToWstring(path); wstring wPath = convStringToWstring(path);
#ifdef _WINDOWS64 #if defined(_WIN32)
string finalPath = StorageManager.GetMountedPath(path.c_str()); string finalPath = StorageManager.GetMountedPath(path.c_str());
if(finalPath.size() == 0) finalPath = path; if(finalPath.size() == 0) finalPath = path;
HANDLE file = CreateFile(finalPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); HANDLE file = CreateFile(finalPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);

View file

@ -1,7 +1,7 @@
#include "stdafx.h" #include "stdafx.h"
#include "Filesystem.h" #include "Filesystem.h"
#ifdef _WINDOWS64 #if defined(_WIN32)
#include <windows.h> #include <windows.h>
#endif // TODO: More os' filesystem handling for when the project moves away from only Windows #endif // TODO: More os' filesystem handling for when the project moves away from only Windows
@ -9,7 +9,7 @@
bool FileOrDirectoryExists(const char* path) bool FileOrDirectoryExists(const char* path)
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
DWORD attribs = GetFileAttributesA(path); DWORD attribs = GetFileAttributesA(path);
return (attribs != INVALID_FILE_ATTRIBUTES); return (attribs != INVALID_FILE_ATTRIBUTES);
#else #else
@ -20,7 +20,7 @@ bool FileOrDirectoryExists(const char* path)
bool FileExists(const char* path) bool FileExists(const char* path)
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
DWORD attribs = GetFileAttributesA(path); DWORD attribs = GetFileAttributesA(path);
return (attribs != INVALID_FILE_ATTRIBUTES && !(attribs & FILE_ATTRIBUTE_DIRECTORY)); return (attribs != INVALID_FILE_ATTRIBUTES && !(attribs & FILE_ATTRIBUTE_DIRECTORY));
#else #else
@ -31,7 +31,7 @@ bool FileExists(const char* path)
bool DirectoryExists(const char* path) bool DirectoryExists(const char* path)
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
DWORD attribs = GetFileAttributesA(path); DWORD attribs = GetFileAttributesA(path);
return (attribs != INVALID_FILE_ATTRIBUTES && (attribs & FILE_ATTRIBUTE_DIRECTORY)); return (attribs != INVALID_FILE_ATTRIBUTES && (attribs & FILE_ATTRIBUTE_DIRECTORY));
#else #else
@ -42,7 +42,7 @@ bool DirectoryExists(const char* path)
bool GetFirstFileInDirectory(const char* directory, char* outFilePath, size_t outFilePathSize) bool GetFirstFileInDirectory(const char* directory, char* outFilePath, size_t outFilePathSize)
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
char searchPath[MAX_PATH]; char searchPath[MAX_PATH];
snprintf(searchPath, MAX_PATH, "%s\\*", directory); snprintf(searchPath, MAX_PATH, "%s\\*", directory);

View file

@ -641,7 +641,7 @@ void GameRuleManager::loadDefaultGameRules()
#else // _XBOX #else // _XBOX
#ifdef _WINDOWS64 #if defined(_WIN32)
File packedTutorialFile(L"Windows64Media\\Tutorial\\Tutorial.pck"); File packedTutorialFile(L"Windows64Media\\Tutorial\\Tutorial.pck");
if(!packedTutorialFile.exists()) packedTutorialFile = File(L"Windows64\\Tutorial\\Tutorial.pck"); if(!packedTutorialFile.exists()) packedTutorialFile = File(L"Windows64\\Tutorial\\Tutorial.pck");
#elif defined(__ORBIS__) #elif defined(__ORBIS__)

View file

@ -224,7 +224,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame
wstring fileRoot = L"GAME:\\res\\TitleUpdate\\GameRules\\" + param->levelGen->getBaseSavePath(); wstring fileRoot = L"GAME:\\res\\TitleUpdate\\GameRules\\" + param->levelGen->getBaseSavePath();
#endif #endif
#else #else
#ifdef _WINDOWS64 #if defined(_WIN32)
wstring fileRoot = L"Windows64Media\\Tutorial\\" + param->levelGen->getBaseSavePath(); wstring fileRoot = L"Windows64Media\\Tutorial\\" + param->levelGen->getBaseSavePath();
File root(fileRoot); File root(fileRoot);
if(!root.exists()) fileRoot = L"Windows64\\Tutorial\\" + param->levelGen->getBaseSavePath(); if(!root.exists()) fileRoot = L"Windows64\\Tutorial\\" + param->levelGen->getBaseSavePath();

View file

@ -3,7 +3,7 @@
#include "..\..\..\Minecraft.World\StringHelpers.h" #include "..\..\..\Minecraft.World\StringHelpers.h"
#include "PlatformNetworkManagerStub.h" #include "PlatformNetworkManagerStub.h"
#include "..\..\Xbox\Network\NetworkPlayerXbox.h" #include "..\..\Xbox\Network\NetworkPlayerXbox.h"
#ifdef _WINDOWS64 #if defined(_WIN32)
#include "..\..\Windows64\Network\WinsockNetLayer.h" #include "..\..\Windows64\Network\WinsockNetLayer.h"
#include "..\..\Windows64\Windows64_Xuid.h" #include "..\..\Windows64\Windows64_Xuid.h"
#include "..\..\Minecraft.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 // We call this twice a frame, either side of the render call so is a good place to "tick" things
void CPlatformNetworkManagerStub::DoWork() void CPlatformNetworkManagerStub::DoWork()
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
extern QNET_STATE _iQNetStubState; extern QNET_STATE _iQNetStubState;
if (_iQNetStubState == QNET_STATE_SESSION_STARTING && app.GetGameStarted()) if (_iQNetStubState == QNET_STATE_SESSION_STARTING && app.GetGameStarted())
{ {
@ -303,7 +303,7 @@ bool CPlatformNetworkManagerStub::LeaveGame(bool bMigrateHost)
m_bLeavingGame = true; m_bLeavingGame = true;
#ifdef _WINDOWS64 #if defined(_WIN32)
WinsockNetLayer::StopAdvertising(); WinsockNetLayer::StopAdvertising();
#endif #endif
@ -325,7 +325,7 @@ bool CPlatformNetworkManagerStub::LeaveGame(bool bMigrateHost)
m_machineQNetPrimaryPlayers.clear(); m_machineQNetPrimaryPlayers.clear();
SystemFlagReset(); SystemFlagReset();
#ifdef _WINDOWS64 #if defined(_WIN32)
WinsockNetLayer::Shutdown(); WinsockNetLayer::Shutdown();
WinsockNetLayer::Initialize(); WinsockNetLayer::Initialize();
#endif #endif
@ -353,7 +353,7 @@ void CPlatformNetworkManagerStub::HostGame(int localUsersMask, bool bOnlineGame,
m_pIQNet->HostGame(); m_pIQNet->HostGame();
#ifdef _WINDOWS64 #if defined(_WIN32)
IQNet::m_player[0].m_smallId = 0; IQNet::m_player[0].m_smallId = 0;
IQNet::m_player[0].m_isRemote = false; IQNet::m_player[0].m_isRemote = false;
// world host is pinned to legacy host XUID to keep old player data compatibility. // 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 ); _HostGame( localUsersMask, publicSlots, privateSlots );
#ifdef _WINDOWS64 #if defined(_WIN32)
int port = WIN64_NET_DEFAULT_PORT; int port = WIN64_NET_DEFAULT_PORT;
const char* bindIp = NULL; const char* bindIp = NULL;
if (g_Win64DedicatedServer) if (g_Win64DedicatedServer)
@ -398,7 +398,7 @@ bool CPlatformNetworkManagerStub::_StartGame()
int CPlatformNetworkManagerStub::JoinGame(FriendSessionInfo* searchResult, int localUsersMask, int primaryUserIndex) int CPlatformNetworkManagerStub::JoinGame(FriendSessionInfo* searchResult, int localUsersMask, int primaryUserIndex)
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
if (searchResult == NULL) if (searchResult == NULL)
return CGameNetworkManager::JOINGAME_FAIL_GENERAL; return CGameNetworkManager::JOINGAME_FAIL_GENERAL;
@ -485,7 +485,7 @@ void CPlatformNetworkManagerStub::HandleSignInChange()
bool CPlatformNetworkManagerStub::_RunNetworkGame() bool CPlatformNetworkManagerStub::_RunNetworkGame()
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
extern QNET_STATE _iQNetStubState; extern QNET_STATE _iQNetStubState;
_iQNetStubState = QNET_STATE_GAME_PLAY; _iQNetStubState = QNET_STATE_GAME_PLAY;
@ -689,7 +689,7 @@ wstring CPlatformNetworkManagerStub::GatherRTTStats()
void CPlatformNetworkManagerStub::TickSearch() void CPlatformNetworkManagerStub::TickSearch()
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
if (m_SessionsUpdatedCallback == NULL) if (m_SessionsUpdatedCallback == NULL)
return; return;
@ -705,7 +705,7 @@ void CPlatformNetworkManagerStub::TickSearch()
void CPlatformNetworkManagerStub::SearchForGames() void CPlatformNetworkManagerStub::SearchForGames()
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
std::vector<Win64LANSession> lanSessions = WinsockNetLayer::GetDiscoveredSessions(); std::vector<Win64LANSession> lanSessions = WinsockNetLayer::GetDiscoveredSessions();
//THEY GET DELETED HERE DAMMIT //THEY GET DELETED HERE DAMMIT

View file

@ -55,7 +55,7 @@ bool ChoiceTask::isCompleted()
{ {
// If the player is under water then allow all keypresses so they can jump out // 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; if (pMinecraft->localplayers[tutorial->getPad()]->isUnderLiquid(Material::water)) return false;
#ifdef _WINDOWS64 #if defined(_WIN32)
if (!m_bConfirmMappingComplete && if (!m_bConfirmMappingComplete &&
(InputManager.GetValue(xboxPad, m_iConfirmMapping) > 0 (InputManager.GetValue(xboxPad, m_iConfirmMapping) > 0
|| g_KBMInput.IsKeyDown(VK_RETURN))) || g_KBMInput.IsKeyDown(VK_RETURN)))
@ -67,7 +67,7 @@ bool ChoiceTask::isCompleted()
m_bConfirmMappingComplete = true; m_bConfirmMappingComplete = true;
} }
#ifdef _WINDOWS64 #if defined(_WIN32)
if (!m_bCancelMappingComplete && if (!m_bCancelMappingComplete &&
(InputManager.GetValue(xboxPad, m_iCancelMapping) > 0 (InputManager.GetValue(xboxPad, m_iCancelMapping) > 0
|| g_KBMInput.IsKeyDown('B'))) || g_KBMInput.IsKeyDown('B')))

View file

@ -66,7 +66,7 @@ bool ControllerTask::isCompleted()
} }
else else
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
bAllComplete = true; bAllComplete = true;
#else #else
bAllComplete = false; bAllComplete = false;
@ -91,7 +91,7 @@ bool ControllerTask::isCompleted()
} }
else else
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
bAllComplete = true; bAllComplete = true;
#else #else
bAllComplete = false; bAllComplete = false;

View file

@ -66,7 +66,7 @@ bool InfoTask::isCompleted()
bool current = it.second; bool current = it.second;
if(!current) if(!current)
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
if (InputManager.GetValue(pMinecraft->player->GetXboxPad(), it.first) > 0 || g_KBMInput.IsKeyDown(VK_SPACE)) if (InputManager.GetValue(pMinecraft->player->GetXboxPad(), it.first) > 0 || g_KBMInput.IsKeyDown(VK_SPACE))
#else #else
if( InputManager.GetValue(pMinecraft->player->GetXboxPad(), it.first) > 0) if( InputManager.GetValue(pMinecraft->player->GetXboxPad(), it.first) > 0)

View file

@ -13,7 +13,7 @@
#include <pad.h> #include <pad.h>
#endif #endif
#ifdef _WINDOWS64 #if defined(_WIN32)
#include "..\..\Windows64\KeyboardMouseInput.h" #include "..\..\Windows64\KeyboardMouseInput.h"
SavedInventoryCursorPos g_savedInventoryCursorPos = { 0.0f, 0.0f, false }; SavedInventoryCursorPos g_savedInventoryCursorPos = { 0.0f, 0.0f, false };
@ -480,7 +480,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick()
} }
#endif #endif
#ifdef _WINDOWS64 #if defined(_WIN32)
if (!g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive()) if (!g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive())
{ {
int deltaX = g_KBMInput.GetMouseDeltaX(); 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. // 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! // 4J - TomK - only if this particular component allows so!
#ifdef _WINDOWS64 #if defined(_WIN32)
if((g_KBMInput.IsMouseGrabbed() || !g_KBMInput.IsKBMActive()) && CanHaveFocus(eSectionUnderPointer)) if((g_KBMInput.IsMouseGrabbed() || !g_KBMInput.IsKBMActive()) && CanHaveFocus(eSectionUnderPointer))
#else #else
if(CanHaveFocus(eSectionUnderPointer)) if(CanHaveFocus(eSectionUnderPointer))

View file

@ -1,6 +1,6 @@
#pragma once #pragma once
#ifdef _WINDOWS64 #if defined(_WIN32)
struct SavedInventoryCursorPos struct SavedInventoryCursorPos
{ {
float x; float x;

View file

@ -1100,7 +1100,7 @@ void IUIScene_CreativeMenu::handleAdditionalKeyPress(int iAction)
case ACTION_MENU_OTHER_STICK_DOWN: case ACTION_MENU_OTHER_STICK_DOWN:
{ {
int pageStep = TabSpec::rows; int pageStep = TabSpec::rows;
#ifdef _WINDOWS64 #if defined(_WIN32)
if (g_KBMInput.WasMouseWheelConsumed()) if (g_KBMInput.WasMouseWheelConsumed())
{ {
pageStep = 1; pageStep = 1;
@ -1120,7 +1120,7 @@ void IUIScene_CreativeMenu::handleAdditionalKeyPress(int iAction)
case ACTION_MENU_OTHER_STICK_UP: case ACTION_MENU_OTHER_STICK_UP:
{ {
int pageStep = TabSpec::rows; int pageStep = TabSpec::rows;
#ifdef _WINDOWS64 #if defined(_WIN32)
if (g_KBMInput.WasMouseWheelConsumed()) if (g_KBMInput.WasMouseWheelConsumed())
{ {
pageStep = 1; pageStep = 1;

View file

@ -21,7 +21,7 @@ UIComponent_DebugUIMarketingGuide::UIComponent_DebugUIMarketingGuide(int iPad, v
value[0].number = (F64)4; value[0].number = (F64)4;
#elif defined __PSVITA__ #elif defined __PSVITA__
value[0].number = (F64)5; value[0].number = (F64)5;
#elif defined _WINDOWS64 #elif defined(_WIN32)
value[0].number = (F64)0; value[0].number = (F64)0;
#endif #endif
IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcSetPlatform , 1 , value ); IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcSetPlatform , 1 , value );

View file

@ -12,7 +12,7 @@
#include "..\..\EnderDragonRenderer.h" #include "..\..\EnderDragonRenderer.h"
#include "..\..\MultiPlayerLocalPlayer.h" #include "..\..\MultiPlayerLocalPlayer.h"
#include "UIFontData.h" #include "UIFontData.h"
#ifdef _WINDOWS64 #if defined(_WIN32)
#include "..\..\Windows64\KeyboardMouseInput.h" #include "..\..\Windows64\KeyboardMouseInput.h"
#endif #endif
#ifdef __PSVITA__ #ifdef __PSVITA__
@ -56,7 +56,7 @@ bool UIController::ms_bReloadSkinCSInitialised = false;
DWORD UIController::m_dwTrialTimerLimitSecs=DYNAMIC_CONFIG_DEFAULT_TRIAL_TIME; DWORD UIController::m_dwTrialTimerLimitSecs=DYNAMIC_CONFIG_DEFAULT_TRIAL_TIME;
#ifdef _WINDOWS64 #if defined(_WIN32)
static UIControl_Slider *FindSliderById(UIScene *pScene, int sliderId) static UIControl_Slider *FindSliderById(UIScene *pScene, int sliderId)
{ {
vector<UIControl *> *controls = pScene->GetControls(); vector<UIControl *> *controls = pScene->GetControls();
@ -198,7 +198,7 @@ UIController::UIController()
#endif #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 // 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_fScreenWidth = 1920.0f;
m_fScreenHeight = 1080.0f; m_fScreenHeight = 1080.0f;
m_bScreenWidthSetup = false; m_bScreenWidthSetup = false;
@ -522,7 +522,7 @@ void UIController::loadSkins()
platformSkinPath = L"skinPS3.swf"; platformSkinPath = L"skinPS3.swf";
#elif defined __PSVITA__ #elif defined __PSVITA__
platformSkinPath = L"skinVita.swf"; platformSkinPath = L"skinVita.swf";
#elif defined _WINDOWS64 #elif defined(_WIN32)
if(m_fScreenHeight>720.0f) if(m_fScreenHeight>720.0f)
{ {
platformSkinPath = L"skinHDWin.swf"; platformSkinPath = L"skinHDWin.swf";
@ -576,7 +576,7 @@ void UIController::loadSkins()
#if ( defined(_WINDOWS64) || defined(_DURANGO) || defined(__ORBIS__) ) #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 // 4J Stu - Load the 720/480 skins so that we have something to fallback on during development
#ifndef _FINAL_BUILD #ifndef _FINAL_BUILD
m_iggyLibraries[eLibraryFallback_GraphicsDefault] = loadSkin(L"skinGraphics.swf", L"skinGraphics.swf"); m_iggyLibraries[eLibraryFallback_GraphicsDefault] = loadSkin(L"skinGraphics.swf", L"skinGraphics.swf");
@ -655,7 +655,7 @@ void UIController::ReloadSkin()
m_iggyLibraries[i] = IGGY_INVALID_LIBRARY; 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 // 4J Stu - Don't load on a thread on windows. I haven't investigated this in detail, so a quick fix
reloadSkinThreadProc(this); reloadSkinThreadProc(this);
#else #else
@ -783,7 +783,7 @@ void UIController::tickInput()
else else
#endif #endif
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
if (!g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive()) if (!g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive())
{ {
UIScene *pScene = NULL; UIScene *pScene = NULL;
@ -1178,7 +1178,7 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key)
pressed = InputManager.ButtonPressed(iPad,key); // Toggle pressed = InputManager.ButtonPressed(iPad,key); // Toggle
released = InputManager.ButtonReleased(iPad,key); // Toggle released = InputManager.ButtonReleased(iPad,key); // Toggle
#ifdef _WINDOWS64 #if defined(_WIN32)
if (iPad == 0) if (iPad == 0)
{ {
int vk = 0; int vk = 0;
@ -1507,7 +1507,7 @@ void UIController::setupCustomDrawGameState()
m_customRenderingClearRect.top = LONG_MAX; m_customRenderingClearRect.top = LONG_MAX;
m_customRenderingClearRect.bottom = LONG_MIN; m_customRenderingClearRect.bottom = LONG_MIN;
#if defined _WINDOWS64 || _DURANGO #if defined(_WIN32) || _DURANGO
PIXBeginNamedEvent(0,"StartFrame"); PIXBeginNamedEvent(0,"StartFrame");
RenderManager.StartFrame(); RenderManager.StartFrame();
PIXEndNamedEvent(); PIXEndNamedEvent();

View file

@ -284,7 +284,7 @@ void UIScene::loadMovie()
#elif defined __PSVITA__ #elif defined __PSVITA__
moviePath.append(L"Vita.swf"); moviePath.append(L"Vita.swf");
m_loadedResolution = eSceneResolution_Vita; m_loadedResolution = eSceneResolution_Vita;
#elif defined _WINDOWS64 #elif defined(_WIN32)
if(ui.getScreenHeight() == 720) if(ui.getScreenHeight() == 720)
{ {
moviePath.append(L"720.swf"); moviePath.append(L"720.swf");

View file

@ -5,7 +5,7 @@
#include "..\..\..\Minecraft.World\net.minecraft.world.inventory.h" #include "..\..\..\Minecraft.World\net.minecraft.world.inventory.h"
#include "..\..\..\Minecraft.World\net.minecraft.world.item.h" #include "..\..\..\Minecraft.World\net.minecraft.world.item.h"
#include "..\..\MultiplayerLocalPlayer.h" #include "..\..\MultiplayerLocalPlayer.h"
#ifdef _WINDOWS64 #if defined(_WIN32)
#include "..\..\Windows64\KeyboardMouseInput.h" #include "..\..\Windows64\KeyboardMouseInput.h"
#endif #endif
@ -39,7 +39,7 @@ void UIScene_AbstractContainerMenu::handleDestroy()
{ {
app.DebugPrintf("UIScene_AbstractContainerMenu::handleDestroy\n"); app.DebugPrintf("UIScene_AbstractContainerMenu::handleDestroy\n");
#ifdef _WINDOWS64 #if defined(_WIN32)
g_savedInventoryCursorPos.x = m_pointerPos.x; g_savedInventoryCursorPos.x = m_pointerPos.x;
g_savedInventoryCursorPos.y = m_pointerPos.y; g_savedInventoryCursorPos.y = m_pointerPos.y;
g_savedInventoryCursorPos.hasSavedPos = true; g_savedInventoryCursorPos.hasSavedPos = true;
@ -83,7 +83,7 @@ void UIScene_AbstractContainerMenu::InitDataAssociations(int iPad, AbstractConta
void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex) void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex)
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
g_KBMInput.SetScreenCursorHidden(true); g_KBMInput.SetScreenCursorHidden(true);
g_KBMInput.SetCursorHiddenForUI(true); g_KBMInput.SetCursorHiddenForUI(true);
#endif #endif
@ -171,7 +171,7 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex)
//m_pointerControl->SetPosition( &vPointerPos ); //m_pointerControl->SetPosition( &vPointerPos );
m_pointerPos = vPointerPos; m_pointerPos = vPointerPos;
#ifdef _WINDOWS64 #if defined(_WIN32)
if (g_savedInventoryCursorPos.hasSavedPos) if (g_savedInventoryCursorPos.hasSavedPos)
{ {
m_pointerPos.x = g_savedInventoryCursorPos.x; m_pointerPos.x = g_savedInventoryCursorPos.x;

View file

@ -17,7 +17,7 @@
#include "PSVita\Network\SQRNetworkManager_AdHoc_Vita.h" #include "PSVita\Network\SQRNetworkManager_AdHoc_Vita.h"
#endif #endif
#ifdef _WINDOWS64 #if defined(_WIN32)
#include <windows.h> #include <windows.h>
#include "Xbox\Resource.h" #include "Xbox\Resource.h"
@ -84,7 +84,7 @@ UIScene_CreateWorldMenu::UIScene_CreateWorldMenu(int iPad, void *initData, UILay
m_iGameModeId = GameType::SURVIVAL->getId(); m_iGameModeId = GameType::SURVIVAL->getId();
m_pDLCPack = NULL; m_pDLCPack = NULL;
m_bRebuildTouchBoxes = false; m_bRebuildTouchBoxes = false;
#ifdef _WINDOWS64 #if defined(_WIN32)
m_bDirectEditing = false; m_bDirectEditing = false;
m_iDirectEditCooldown = 0; m_iDirectEditCooldown = 0;
#endif #endif
@ -293,7 +293,7 @@ void UIScene_CreateWorldMenu::tick()
{ {
UIScene::tick(); UIScene::tick();
#ifdef _WINDOWS64 #if defined(_WIN32)
if (m_iDirectEditCooldown > 0) if (m_iDirectEditCooldown > 0)
m_iDirectEditCooldown--; 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) void UIScene_CreateWorldMenu::handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled)
{ {
if(m_bIgnoreInput) return; if(m_bIgnoreInput) return;
#ifdef _WINDOWS64 #if defined(_WIN32)
if (m_bDirectEditing || m_iDirectEditCooldown > 0) { handled = true; return; } if (m_bDirectEditing || m_iDirectEditCooldown > 0) { handled = true; return; }
#endif #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) void UIScene_CreateWorldMenu::handlePress(F64 controlId, F64 childId)
{ {
if(m_bIgnoreInput) return; if(m_bIgnoreInput) return;
#ifdef _WINDOWS64 #if defined(_WIN32)
if (m_bDirectEditing || m_iDirectEditCooldown > 0) return; if (m_bDirectEditing || m_iDirectEditCooldown > 0) return;
#endif #endif
@ -475,7 +475,7 @@ void UIScene_CreateWorldMenu::handlePress(F64 controlId, F64 childId)
case eControl_EditWorldName: case eControl_EditWorldName:
{ {
m_bIgnoreInput=true; m_bIgnoreInput=true;
#ifdef _WINDOWS64 #if defined(_WIN32)
if (Win64_IsControllerConnected()) if (Win64_IsControllerConnected())
{ {
UIKeyboardInitData kbData; UIKeyboardInitData kbData;
@ -808,7 +808,7 @@ int UIScene_CreateWorldMenu::KeyboardCompleteWorldNameCallback(LPVOID lpParam,bo
{ {
uint16_t pchText[128]; uint16_t pchText[128];
ZeroMemory(pchText, 128 * sizeof(uint16_t) ); ZeroMemory(pchText, 128 * sizeof(uint16_t) );
#ifdef _WINDOWS64 #if defined(_WIN32)
Win64_GetKeyboardText(pchText, 128); Win64_GetKeyboardText(pchText, 128);
#else #else
InputManager.GetText(pchText); InputManager.GetText(pchText);
@ -1041,7 +1041,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
#endif #endif
else else
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
// On Windows64, Xbox Live is unavailable. Skip QuadrantSignin and start directly. // On Windows64, Xbox Live is unavailable. Skip QuadrantSignin and start directly.
CreateGame(this, 0); CreateGame(this, 0);
#else #else
@ -1431,7 +1431,7 @@ int UIScene_CreateWorldMenu::ConfirmCreateReturned(void *pParam,int iPad,C4JStor
if(isClientSide && app.IsLocalMultiplayerAvailable()) if(isClientSide && app.IsLocalMultiplayerAvailable())
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
// On Windows64, Xbox Live is unavailable. Skip QuadrantSignin and start directly. // On Windows64, Xbox Live is unavailable. Skip QuadrantSignin and start directly.
CreateGame(pClass, 0); CreateGame(pClass, 0);
return 0; return 0;

View file

@ -51,7 +51,7 @@ private:
DLCPack * m_pDLCPack; DLCPack * m_pDLCPack;
bool m_bRebuildTouchBoxes; bool m_bRebuildTouchBoxes;
#ifdef _WINDOWS64 #if defined(_WIN32)
bool m_bDirectEditing; bool m_bDirectEditing;
wstring m_worldNameBeforeEdit; wstring m_worldNameBeforeEdit;
int m_iDirectEditCooldown; int m_iDirectEditCooldown;

View file

@ -149,7 +149,7 @@ void UIScene_DLCMainMenu::handleTimerComplete(int id)
switch(id) switch(id)
{ {
case PLAYER_ONLINE_TIMER_ID: case PLAYER_ONLINE_TIMER_ID:
#ifndef _WINDOWS64 #if !defined(_WIN32)
if(ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad())==false) if(ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad())==false)
{ {
// check the player hasn't gone offline // check the player hasn't gone offline

View file

@ -86,7 +86,7 @@ void UIScene_DLCOffersMenu::handleTimerComplete(int id)
switch(id) switch(id)
{ {
case PLAYER_ONLINE_TIMER_ID: case PLAYER_ONLINE_TIMER_ID:
#ifndef _WINDOWS64 #if !defined(_WIN32)
if(ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad())==false) if(ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad())==false)
{ {
// check the player hasn't gone offline // check the player hasn't gone offline

View file

@ -276,7 +276,7 @@ void UIScene_InGameSaveManagementMenu::tick()
#ifdef _DURANGO #ifdef _DURANGO
// Already utf16 on durango // Already utf16 on durango
memcpy(u16Message, m_saveDetails[m_iRequestingThumbnailId].UTF16SaveFilename, MAX_SAVEFILENAME_LENGTH); memcpy(u16Message, m_saveDetails[m_iRequestingThumbnailId].UTF16SaveFilename, MAX_SAVEFILENAME_LENGTH);
#elif defined(_WINDOWS64) #elif defined(_WIN32)
int result = ::MultiByteToWideChar( int result = ::MultiByteToWideChar(
CP_UTF8, // convert from UTF-8 CP_UTF8, // convert from UTF-8
MB_ERR_INVALID_CHARS, // error on invalid chars MB_ERR_INVALID_CHARS, // error on invalid chars

View file

@ -22,7 +22,7 @@ UIScene_Intro::UIScene_Intro(int iPad, void *initData, UILayer *parentLayer) : U
bChina = ProfileManager.LocaleIsChina(); bChina = ProfileManager.LocaleIsChina();
#endif #endif
// 4J Stu - These map to values in the Actionscript // 4J Stu - These map to values in the Actionscript
#ifdef _WINDOWS64 #if defined(_WIN32)
int platformIdx = 0; int platformIdx = 0;
#elif defined(_XBOX) #elif defined(_XBOX)
int platformIdx = 1; int platformIdx = 1;

View file

@ -2,7 +2,7 @@
#include "UI.h" #include "UI.h"
#include "UIScene_Keyboard.h" #include "UIScene_Keyboard.h"
#ifdef _WINDOWS64 #if defined(_WIN32)
// Global buffer that stores the text entered in the native keyboard scene. // Global buffer that stores the text entered in the native keyboard scene.
// Callbacks retrieve it via Win64_GetKeyboardText() declared in UIStructs.h. // Callbacks retrieve it via Win64_GetKeyboardText() declared in UIStructs.h.
wchar_t g_Win64KeyboardResult[256] = {}; 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 // Setup all the Iggy references we need for this scene
initialiseMovie(); initialiseMovie();
#ifdef _WINDOWS64 #if defined(_WIN32)
m_win64Callback = NULL; m_win64Callback = NULL;
m_win64CallbackParam = NULL; m_win64CallbackParam = NULL;
m_win64TextBuffer = L""; m_win64TextBuffer = L"";
@ -62,7 +62,7 @@ UIScene_Keyboard::UIScene_Keyboard(int iPad, void *initData, UILayer *parentLaye
m_ButtonBackspace.init(L"Backspace", -1); m_ButtonBackspace.init(L"Backspace", -1);
// Initialise function keyboard Buttons and set alternative symbol button string // Initialise function keyboard Buttons and set alternative symbol button string
#ifdef _WINDOWS64 #if defined(_WIN32)
if (!m_bPCMode) if (!m_bPCMode)
#endif #endif
{ {
@ -79,7 +79,7 @@ UIScene_Keyboard::UIScene_Keyboard(int iPad, void *initData, UILayer *parentLaye
IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcInitFunctionButtons , 1 , value ); IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcInitFunctionButtons , 1 , value );
} }
#ifdef _WINDOWS64 #if defined(_WIN32)
if (m_bPCMode) if (m_bPCMode)
{ {
// PC text-input mode: hide all on-screen buttons, user types with physical keyboard // 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; return true;
} }
#ifdef _WINDOWS64 #if defined(_WIN32)
void UIScene_Keyboard::tick() void UIScene_Keyboard::tick()
{ {
UIScene::tick(); UIScene::tick();
@ -208,7 +208,7 @@ void UIScene_Keyboard::handleInput(int iPad, int key, bool repeat, bool pressed,
switch(key) switch(key)
{ {
case ACTION_MENU_CANCEL: case ACTION_MENU_CANCEL:
#ifdef _WINDOWS64 #if defined(_WIN32)
{ {
// Cache before navigateBack() destroys this scene // Cache before navigateBack() destroys this scene
int(*cb)(LPVOID, const bool) = m_win64Callback; int(*cb)(LPVOID, const bool) = m_win64Callback;
@ -302,7 +302,7 @@ void UIScene_Keyboard::handleTimerComplete(int id)
void UIScene_Keyboard::KeyboardDonePressed() 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. // 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 // getLabel() reflects both physical keyboard input (pushed via setLabel) and
// on-screen button input (set directly by Flash ActionScript). // on-screen button input (set directly by Flash ActionScript).

View file

@ -7,7 +7,7 @@ class UIScene_Keyboard : public UIScene
private: private:
bool m_bKeyboardDonePressed; bool m_bKeyboardDonePressed;
#ifdef _WINDOWS64 #if defined(_WIN32)
int(*m_win64Callback)(LPVOID, const bool); int(*m_win64Callback)(LPVOID, const bool);
LPVOID m_win64CallbackParam; LPVOID m_win64CallbackParam;
wstring m_win64TextBuffer; wstring m_win64TextBuffer;
@ -57,7 +57,7 @@ public:
// INPUT // INPUT
virtual void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled); virtual void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled);
#ifdef _WINDOWS64 #if defined(_WIN32)
virtual void tick(); virtual void tick();
#endif #endif
@ -87,7 +87,7 @@ public:
#endif #endif
// Returns true if lower scenes in this scenes layer, or in any layer below this scenes layers should be hidden // 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; } virtual bool hidesLowerScenes() { return true; }
#else #else
virtual bool hidesLowerScenes() { return false; } virtual bool hidesLowerScenes() { return false; }

View file

@ -1016,7 +1016,7 @@ void UIScene_LeaderboardsMenu::handleTimerComplete(int id)
switch(id) switch(id)
{ {
case PLAYER_ONLINE_TIMER_ID: case PLAYER_ONLINE_TIMER_ID:
#ifndef _WINDOWS64 #if !defined(_WIN32)
if(ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad())==false) if(ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad())==false)
{ {
// check the player hasn't gone offline // check the player hasn't gone offline

View file

@ -248,7 +248,7 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLaye
m_labelGameName.init(wSaveName); m_labelGameName.init(wSaveName);
#endif #endif
#endif #endif
#ifdef _WINDOWS64 #if defined(_WIN32)
if (params->saveDetails != NULL && params->saveDetails->UTF8SaveName[0] != '\0') if (params->saveDetails != NULL && params->saveDetails->UTF8SaveName[0] != '\0')
{ {
wchar_t wSaveName[128]; wchar_t wSaveName[128];
@ -862,7 +862,7 @@ void UIScene_LoadMenu::StartSharedLaunchFlow()
TelemetryManager->RecordUpsellPresented(m_iPad, eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF); TelemetryManager->RecordUpsellPresented(m_iPad, eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF);
#endif #endif
#if defined(_WINDOWS64) || defined(_DURANGO) #if defined(_WIN32) || defined(_DURANGO)
// trial pack warning // trial pack warning
UINT uiIDA[1]; UINT uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK; uiIDA[0]=IDS_CONFIRM_OK;
@ -1455,7 +1455,7 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam)
#endif #endif
else else
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
// On Windows64, IsSignedInLive() returns true as a stub but Xbox Live is // On Windows64, IsSignedInLive() returns true as a stub but Xbox Live is
// not available. Skip QuadrantSignin and proceed directly with local play. // not available. Skip QuadrantSignin and proceed directly with local play.
DWORD dwLocalUsersMask = CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad()); 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 ); param->settings = app.GetGameHostOption( eGameHostOption_All );
#ifdef _WINDOWS64 #if defined(_WIN32)
{ {
extern wchar_t g_Win64UsernameW[17]; extern wchar_t g_Win64UsernameW[17];
Minecraft::GetInstance()->user->name = g_Win64UsernameW; Minecraft::GetInstance()->user->name = g_Win64UsernameW;

View file

@ -25,7 +25,7 @@
#include "message_dialog.h" #include "message_dialog.h"
#endif #endif
#ifdef _WINDOWS64 #if defined(_WIN32)
#include "..\..\..\Minecraft.World\NbtIo.h" #include "..\..\..\Minecraft.World\NbtIo.h"
#include "..\..\..\Minecraft.World\compression.h" #include "..\..\..\Minecraft.World\compression.h"
@ -730,7 +730,7 @@ void UIScene_LoadOrJoinMenu::tick()
m_saveDetails = new SaveListDetails[m_pSaveDetails->iSaveC]; m_saveDetails = new SaveListDetails[m_pSaveDetails->iSaveC];
m_iSaveDetailsCount = m_pSaveDetails->iSaveC; m_iSaveDetailsCount = m_pSaveDetails->iSaveC;
#ifdef _WINDOWS64 #if defined(_WIN32)
// Build sorted index array (newest-first by filename timestamp YYYYMMDDHHMMSS) // Build sorted index array (newest-first by filename timestamp YYYYMMDDHHMMSS)
int *sortedIdx = new int[m_pSaveDetails->iSaveC]; int *sortedIdx = new int[m_pSaveDetails->iSaveC];
for (int si = 0; si < (int)m_pSaveDetails->iSaveC; ++si) sortedIdx[si] = si; 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].UTF16SaveName, m_pSaveDetails->SaveInfoA[i].UTF16SaveTitle, 128);
memcpy(m_saveDetails[i].UTF16SaveFilename, m_pSaveDetails->SaveInfoA[i].UTF16SaveFilename, MAX_SAVEFILENAME_LENGTH); memcpy(m_saveDetails[i].UTF16SaveFilename, m_pSaveDetails->SaveInfoA[i].UTF16SaveFilename, MAX_SAVEFILENAME_LENGTH);
#else #else
#ifdef _WINDOWS64 #if defined(_WIN32)
{ {
int origIdx = sortedIdx[i]; int origIdx = sortedIdx[i];
wchar_t wFilename[MAX_SAVEFILENAME_LENGTH]; wchar_t wFilename[MAX_SAVEFILENAME_LENGTH];
@ -790,7 +790,7 @@ void UIScene_LoadOrJoinMenu::tick()
#endif #endif
#endif #endif
} }
#ifdef _WINDOWS64 #if defined(_WIN32)
delete[] sortedIdx; delete[] sortedIdx;
#endif #endif
m_controlSavesTimer.setVisible( false ); m_controlSavesTimer.setVisible( false );
@ -808,7 +808,7 @@ void UIScene_LoadOrJoinMenu::tick()
app.DebugPrintf("Requesting the first thumbnail\n"); app.DebugPrintf("Requesting the first thumbnail\n");
// set the save to load // set the save to load
PSAVE_DETAILS pSaveDetails=StorageManager.ReturnSavesInfo(); PSAVE_DETAILS pSaveDetails=StorageManager.ReturnSavesInfo();
#ifdef _WINDOWS64 #if defined(_WIN32)
C4JStorage::ESaveGameState eLoadStatus=StorageManager.LoadSaveDataThumbnail(&pSaveDetails->SaveInfoA[m_saveDetails[m_iRequestingThumbnailId].saveId],&LoadSaveDataThumbnailReturned,this); C4JStorage::ESaveGameState eLoadStatus=StorageManager.LoadSaveDataThumbnail(&pSaveDetails->SaveInfoA[m_saveDetails[m_iRequestingThumbnailId].saveId],&LoadSaveDataThumbnailReturned,this);
#else #else
C4JStorage::ESaveGameState eLoadStatus=StorageManager.LoadSaveDataThumbnail(&pSaveDetails->SaveInfoA[(int)m_iRequestingThumbnailId],&LoadSaveDataThumbnailReturned,this); C4JStorage::ESaveGameState eLoadStatus=StorageManager.LoadSaveDataThumbnail(&pSaveDetails->SaveInfoA[(int)m_iRequestingThumbnailId],&LoadSaveDataThumbnailReturned,this);
@ -834,7 +834,7 @@ void UIScene_LoadOrJoinMenu::tick()
#ifdef _DURANGO #ifdef _DURANGO
// Already utf16 on durango // Already utf16 on durango
memcpy(u16Message, m_saveDetails[m_iRequestingThumbnailId].UTF16SaveFilename, MAX_SAVEFILENAME_LENGTH); memcpy(u16Message, m_saveDetails[m_iRequestingThumbnailId].UTF16SaveFilename, MAX_SAVEFILENAME_LENGTH);
#elif defined(_WINDOWS64) #elif defined(_WIN32)
int result = ::MultiByteToWideChar( int result = ::MultiByteToWideChar(
CP_UTF8, // convert from UTF-8 CP_UTF8, // convert from UTF-8
MB_ERR_INVALID_CHARS, // error on invalid chars MB_ERR_INVALID_CHARS, // error on invalid chars
@ -875,7 +875,7 @@ void UIScene_LoadOrJoinMenu::tick()
app.DebugPrintf("Requesting another thumbnail\n"); app.DebugPrintf("Requesting another thumbnail\n");
// set the save to load // set the save to load
PSAVE_DETAILS pSaveDetails=StorageManager.ReturnSavesInfo(); PSAVE_DETAILS pSaveDetails=StorageManager.ReturnSavesInfo();
#ifdef _WINDOWS64 #if defined(_WIN32)
C4JStorage::ESaveGameState eLoadStatus=StorageManager.LoadSaveDataThumbnail(&pSaveDetails->SaveInfoA[m_saveDetails[m_iRequestingThumbnailId].saveId],&LoadSaveDataThumbnailReturned,this); C4JStorage::ESaveGameState eLoadStatus=StorageManager.LoadSaveDataThumbnail(&pSaveDetails->SaveInfoA[m_saveDetails[m_iRequestingThumbnailId].saveId],&LoadSaveDataThumbnailReturned,this);
#else #else
C4JStorage::ESaveGameState eLoadStatus=StorageManager.LoadSaveDataThumbnail(&pSaveDetails->SaveInfoA[(int)m_iRequestingThumbnailId],&LoadSaveDataThumbnailReturned,this); 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]; uint16_t ui16Text[128];
ZeroMemory(ui16Text, 128 * sizeof(uint16_t) ); ZeroMemory(ui16Text, 128 * sizeof(uint16_t) );
#ifdef _WINDOWS64 #if defined(_WIN32)
Win64_GetKeyboardText(ui16Text, 128); Win64_GetKeyboardText(ui16Text, 128);
#else #else
InputManager.GetText(ui16Text); InputManager.GetText(ui16Text);
@ -1371,7 +1371,7 @@ int UIScene_LoadOrJoinMenu::KeyboardCompleteWorldNameCallback(LPVOID lpParam,boo
#if (defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined(__PSVITA__)) #if (defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined(__PSVITA__))
// open the save and overwrite the metadata // open the save and overwrite the metadata
StorageManager.RenameSaveData(pClass->m_iSaveListIndex - pClass->m_iDefaultButtonsC, ui16Text,&UIScene_LoadOrJoinMenu::RenameSaveDataReturned,pClass); 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; int listPos = pClass->m_iSaveListIndex - pClass->m_iDefaultButtonsC;
@ -2249,7 +2249,7 @@ void UIScene_LoadOrJoinMenu::LoadSaveFromCloud()
#endif //SONY_REMOTE_STORAGE_DOWNLOAD #endif //SONY_REMOTE_STORAGE_DOWNLOAD
#ifdef _WINDOWS64 #if defined(_WIN32)
static bool Win64_DeleteSaveDirectory(const wchar_t* wPath) static bool Win64_DeleteSaveDirectory(const wchar_t* wPath)
{ {
wchar_t wSearch[MAX_PATH]; wchar_t wSearch[MAX_PATH];
@ -2290,7 +2290,7 @@ int UIScene_LoadOrJoinMenu::DeleteSaveDialogReturned(void *pParam,int iPad,C4JSt
} }
else else
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
{ {
// Use m_saveDetails (sorted display order) so the correct folder is targeted // Use m_saveDetails (sorted display order) so the correct folder is targeted
int displayIdx = pClass->m_iSaveListIndex - pClass->m_iDefaultButtonsC; 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 case C4JStorage::EMessage_ResultDecline: // rename
{ {
pClass->m_bIgnoreInput=true; pClass->m_bIgnoreInput=true;
#ifdef _WINDOWS64 #if defined(_WIN32)
{ {
wchar_t wSaveName[128]; wchar_t wSaveName[128];
ZeroMemory(wSaveName, 128 * sizeof(wchar_t)); ZeroMemory(wSaveName, 128 * sizeof(wchar_t));

View file

@ -283,7 +283,7 @@ typedef struct _JoinMenuInitData
} JoinMenuInitData; } JoinMenuInitData;
// Native keyboard (Windows64 replacement for InputManager.RequestKeyboard WinAPI dialog) // Native keyboard (Windows64 replacement for InputManager.RequestKeyboard WinAPI dialog)
#ifdef _WINDOWS64 #if defined(_WIN32)
typedef struct _UIKeyboardInitData typedef struct _UIKeyboardInitData
{ {
const wchar_t* title; const wchar_t* title;

View file

@ -15,7 +15,7 @@
#include "Durango\Social\SocialManager.h" #include "Durango\Social\SocialManager.h"
#include "Durango\Sentient\DynamicConfigurations.h" #include "Durango\Sentient\DynamicConfigurations.h"
#include "Durango\DurangoExtras\xcompress.h" #include "Durango\DurangoExtras\xcompress.h"
#elif defined _WINDOWS64 #elif defined(_WIN32)
#include "Windows64\Sentient\SentientManager.h" #include "Windows64\Sentient\SentientManager.h"
#include "StatsCounter.h" #include "StatsCounter.h"
#include "Windows64\Social\SocialManager.h" #include "Windows64\Social\SocialManager.h"
@ -37,7 +37,7 @@
#endif #endif
#if !defined(__PS3__) && !defined(__ORBIS__) && !defined(__PSVITA__) #if !defined(__PS3__) && !defined(__ORBIS__) && !defined(__PSVITA__)
#ifdef _WINDOWS64 #if defined(_WIN32)
//C4JStorage StorageManager; //C4JStorage StorageManager;
C_4JProfile ProfileManager; C_4JProfile ProfileManager;
#endif #endif
@ -510,7 +510,7 @@ DWORD XEnableGuestSignin(BOOL fEnable) { return 0; }
/////////////////////////////////////////////// Profile library /////////////////////////////////////////////// Profile library
#ifdef _WINDOWS64 #if defined(_WIN32)
static void* profileData[4]; static void* profileData[4];
static bool s_bProfileIsFullVersion; static bool s_bProfileIsFullVersion;
void C_4JProfile::Initialise(DWORD dwTitleID, void C_4JProfile::Initialise(DWORD dwTitleID,
@ -592,7 +592,7 @@ void C_4JProfile::SetPrimaryPlayerChanged(bool bVal) {}
bool C_4JProfile::QuerySigninStatus(void) { return true; } bool C_4JProfile::QuerySigninStatus(void) { return true; }
void C_4JProfile::GetXUID(int iPad, PlayerUID * pXuid, bool bOnlineXuid) void C_4JProfile::GetXUID(int iPad, PlayerUID * pXuid, bool bOnlineXuid)
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
if (iPad != 0) if (iPad != 0)
{ {
*pXuid = INVALID_XUID; *pXuid = INVALID_XUID;
@ -689,7 +689,7 @@ void C_4JProfile::SetDebugFullOverride(bool bVal) { s_bProfileIsFullVersion =
void C_4JProfile::ShowProfileCard(int iPad, PlayerUID targetUid) {} void C_4JProfile::ShowProfileCard(int iPad, PlayerUID targetUid) {}
/////////////////////////////////////////////// Storage library /////////////////////////////////////////////// Storage library
//#ifdef _WINDOWS64 //#if defined(_WIN32)
#if 0 #if 0
C4JStorage::C4JStorage() {} C4JStorage::C4JStorage() {}
void C4JStorage::Tick() {} void C4JStorage::Tick() {}

View file

@ -7,7 +7,7 @@
#include "Input.h" #include "Input.h"
#include "..\Minecraft.Client\LocalPlayer.h" #include "..\Minecraft.Client\LocalPlayer.h"
#include "Options.h" #include "Options.h"
#ifdef _WINDOWS64 #if defined(_WIN32)
#include "Windows64\KeyboardMouseInput.h" #include "Windows64\KeyboardMouseInput.h"
#endif #endif
@ -45,7 +45,7 @@ void Input::tick(LocalPlayer *player)
float kbXA = 0.0f; float kbXA = 0.0f;
float kbYA = 0.0f; float kbYA = 0.0f;
#ifdef _WINDOWS64 #if defined(_WIN32)
if (iPad == 0 && g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive()) if (iPad == 0 && g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive())
{ {
if( pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_LEFT) || pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_RIGHT) ) 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()) if (iPad == 0 && g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive())
{ {
// Left Shift = sneak (hold to crouch) // Left Shift = sneak (hold to crouch)
@ -163,7 +163,7 @@ void Input::tick(LocalPlayer *player)
float turnX = tx * abs(tx) * turnSpeed; float turnX = tx * abs(tx) * turnSpeed;
float turnY = ty * abs(ty) * turnSpeed; float turnY = ty * abs(ty) * turnSpeed;
#ifdef _WINDOWS64 #if defined(_WIN32)
if (iPad == 0 && g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive()) if (iPad == 0 && g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive())
{ {
float mouseSensitivity = ((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity_InGame)) / 100.0f; 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); unsigned int jump = InputManager.GetValue(iPad, MINECRAFT_ACTION_JUMP);
bool kbJump = false; bool kbJump = false;
#ifdef _WINDOWS64 #if defined(_WIN32)
kbJump = (iPad == 0) && g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive() && g_KBMInput.IsKeyDown(KeyboardMouseInput::KEY_JUMP); kbJump = (iPad == 0) && g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive() && g_KBMInput.IsKeyDown(KeyboardMouseInput::KEY_JUMP);
#endif #endif
if( (jump > 0 || kbJump) && pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_JUMP) ) 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; if (app.GetFreezePlayers()) jumping = false;
#endif #endif
#ifdef _WINDOWS64 #if defined(_WIN32)
if (iPad == 0 && g_KBMInput.IsKeyPressed(VK_ESCAPE) && g_KBMInput.IsMouseGrabbed()) if (iPad == 0 && g_KBMInput.IsKeyPressed(VK_ESCAPE) && g_KBMInput.IsMouseGrabbed())
{ {
g_KBMInput.SetMouseGrabbed(false); g_KBMInput.SetMouseGrabbed(false);

View file

@ -52,7 +52,7 @@ public:
static const int CHUNK_SIZE = 16; static const int CHUNK_SIZE = 16;
#endif #endif
static const int CHUNK_Y_COUNT = Level::maxBuildHeight / CHUNK_SIZE; 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. static const int MAX_COMMANDBUFFER_ALLOCATIONS = 2047 * 1024 * 1024; // Changed to 2047. 4J had set to 512.
#elif defined _XBOX_ONE #elif defined _XBOX_ONE
static const int MAX_COMMANDBUFFER_ALLOCATIONS = 512 * 1024 * 1024; // 4J - added static const int MAX_COMMANDBUFFER_ALLOCATIONS = 512 * 1024 * 1024; // 4J - added

View file

@ -277,7 +277,7 @@ void LocalPlayer::aiStep()
} }
} }
if (isSneaking()) sprintTriggerTime = 0; if (isSneaking()) sprintTriggerTime = 0;
#ifdef _WINDOWS64 #if defined(_WIN32)
if (input->sprinting && onGround && enoughFoodToSprint && !isUsingItem() && !hasEffect(MobEffect::blindness) && !isSneaking()) if (input->sprinting && onGround && enoughFoodToSprint && !isUsingItem() && !hasEffect(MobEffect::blindness) && !isSneaking())
{ {
setSprinting(true); setSprinting(true);

View file

@ -503,7 +503,7 @@ void Minecraft::setScreen(Screen *screen)
this->screen->removed(); this->screen->removed();
} }
#ifdef _WINDOWS64 #if defined(_WIN32)
if (screen != NULL && g_KBMInput.IsMouseGrabbed()) if (screen != NULL && g_KBMInput.IsMouseGrabbed())
{ {
g_KBMInput.SetMouseGrabbed(false); g_KBMInput.SetMouseGrabbed(false);
@ -1039,7 +1039,7 @@ shared_ptr<MultiplayerLocalPlayer> Minecraft::createExtraLocalPlayer(int idx, co
PlayerUID playerXUIDOnline = INVALID_XUID; PlayerUID playerXUIDOnline = INVALID_XUID;
ProfileManager.GetXUID(idx,&playerXUIDOffline,false); ProfileManager.GetXUID(idx,&playerXUIDOffline,false);
ProfileManager.GetXUID(idx,&playerXUIDOnline,true); ProfileManager.GetXUID(idx,&playerXUIDOnline,true);
#ifdef _WINDOWS64 #if defined(_WIN32)
// Compatibility rule for Win64 id migration // Compatibility rule for Win64 id migration
// host keeps legacy host XUID, non-host uses persistent uid.dat XUID. // host keeps legacy host XUID, non-host uses persistent uid.dat XUID.
INetworkPlayer *localNetworkPlayer = g_NetworkManager.GetLocalPlayerByUserIndex(idx); INetworkPlayer *localNetworkPlayer = g_NetworkManager.GetLocalPlayerByUserIndex(idx);
@ -1191,7 +1191,7 @@ void Minecraft::createPrimaryLocalPlayer(int iPad)
} }
} }
#ifdef _WINDOWS64 #if defined(_WIN32)
void Minecraft::applyFrameMouseLook() void Minecraft::applyFrameMouseLook()
{ {
// Per-frame mouse look: consume mouse deltas every frame instead of waiting // 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<<MINECRAFT_ACTION_RENDER_THIRD_PERSON; if(InputManager.ButtonPressed(i, MINECRAFT_ACTION_RENDER_THIRD_PERSON)) localplayers[i]->ullButtonsPressed|=1LL<<MINECRAFT_ACTION_RENDER_THIRD_PERSON;
if(InputManager.ButtonPressed(i, MINECRAFT_ACTION_GAME_INFO)) localplayers[i]->ullButtonsPressed|=1LL<<MINECRAFT_ACTION_GAME_INFO; if(InputManager.ButtonPressed(i, MINECRAFT_ACTION_GAME_INFO)) localplayers[i]->ullButtonsPressed|=1LL<<MINECRAFT_ACTION_GAME_INFO;
#ifdef _WINDOWS64 #if defined(_WIN32)
// Keyboard/mouse button presses for player 0 // Keyboard/mouse button presses for player 0
if (i == 0) if (i == 0)
{ {
@ -1572,7 +1572,7 @@ void Minecraft::run_middle()
// 4J Stu - This doesn't make any sense with the way we handle XboxOne users // 4J Stu - This doesn't make any sense with the way we handle XboxOne users
#ifndef _DURANGO #ifndef _DURANGO
// did we just get input from a player who doesn't exist? They'll be wanting to join the game then // did we just get input from a player who doesn't exist? They'll be wanting to join the game then
#ifdef _WINDOWS64 #if defined(_WIN32)
// The 4J toggle system is unreliable here: UIController::handleInput() calls // The 4J toggle system is unreliable here: UIController::handleInput() calls
// ButtonPressed for every ACTION_MENU_* mapped button (which covers all physical // ButtonPressed for every ACTION_MENU_* mapped button (which covers all physical
// buttons) before run_middle() runs. Bypass it with raw XInput and own edge detection. // buttons) before run_middle() runs. Bypass it with raw XInput and own edge detection.
@ -1624,7 +1624,7 @@ void Minecraft::run_middle()
// did we just get input from a player who doesn't exist? They'll be wanting to join the game then // did we just get input from a player who doesn't exist? They'll be wanting to join the game then
#ifdef __ORBIS__ #ifdef __ORBIS__
if(InputManager.ButtonPressed(i, ACTION_MENU_A)) if(InputManager.ButtonPressed(i, ACTION_MENU_A))
#elif defined _WINDOWS64 #elif defined(_WIN32)
if(startJustPressed) if(startJustPressed)
#else #else
if(InputManager.ButtonPressed(i, MINECRAFT_ACTION_PAUSEMENU)) if(InputManager.ButtonPressed(i, MINECRAFT_ACTION_PAUSEMENU))
@ -1633,7 +1633,7 @@ void Minecraft::run_middle()
// Let them join // Let them join
// are they signed in? // are they signed in?
#ifdef _WINDOWS64 #if defined(_WIN32)
if(ProfileManager.IsSignedIn(i) || (g_NetworkManager.IsLocalGame() && InputManager.IsPadConnected(i))) if(ProfileManager.IsSignedIn(i) || (g_NetworkManager.IsLocalGame() && InputManager.IsPadConnected(i)))
#else #else
if(ProfileManager.IsSignedIn(i)) if(ProfileManager.IsSignedIn(i))
@ -2338,7 +2338,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
} }
} }
#ifdef _WINDOWS64 #if defined(_WIN32)
if ((screen != NULL || ui.GetMenuDisplayed(iPad)) && g_KBMInput.IsMouseGrabbed()) if ((screen != NULL || ui.GetMenuDisplayed(iPad)) && g_KBMInput.IsMouseGrabbed())
{ {
g_KBMInput.SetMouseGrabbed(false); g_KBMInput.SetMouseGrabbed(false);
@ -2347,7 +2347,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
if (screen == NULL && !ui.GetMenuDisplayed(iPad) ) if (screen == NULL && !ui.GetMenuDisplayed(iPad) )
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
if (!g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsWindowFocused()) if (!g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsWindowFocused())
{ {
g_KBMInput.SetMouseGrabbed(true); g_KBMInput.SetMouseGrabbed(true);
@ -3505,7 +3505,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
wheel = -1; wheel = -1;
} }
#ifdef _WINDOWS64 #if defined(_WIN32)
if (iPad == 0 && wheel == 0 && g_KBMInput.IsKBMActive()) if (iPad == 0 && wheel == 0 && g_KBMInput.IsKBMActive())
{ {
wheel = g_KBMInput.GetMouseWheel(); wheel = g_KBMInput.GetMouseWheel();
@ -3543,7 +3543,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
player->lastClickTick[0] = ticks; player->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 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)); bool actionHeld = InputManager.ButtonDown(iPad, MINECRAFT_ACTION_ACTION) || (iPad == 0 && g_KBMInput.IsKBMActive() && g_KBMInput.IsMouseButtonDown(KeyboardMouseInput::MOUSE_LEFT));
#else #else
@ -3577,7 +3577,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
lastClickTick = ticks; 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)); bool useHeld = InputManager.ButtonDown(iPad, MINECRAFT_ACTION_USE) || (iPad == 0 && g_KBMInput.IsKBMActive() && g_KBMInput.IsMouseButtonDown(KeyboardMouseInput::MOUSE_RIGHT));
#else #else
bool useHeld = InputManager.ButtonDown(iPad, MINECRAFT_ACTION_USE); bool useHeld = InputManager.ButtonDown(iPad, MINECRAFT_ACTION_USE);
@ -4313,7 +4313,7 @@ void Minecraft::setLevel(MultiPlayerLevel *level, int message /*=-1*/, shared_pt
playerXUIDOnline.setForAdhoc(); playerXUIDOnline.setForAdhoc();
} }
#endif #endif
#ifdef _WINDOWS64 #if defined(_WIN32)
// On Windows, the implementation has been changed to use a per-client pseudo XUID based on `uid.dat`. // 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. // 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); INetworkPlayer *localNetworkPlayer = g_NetworkManager.GetLocalPlayerByUserIndex(iPrimaryPlayer);
@ -4508,7 +4508,7 @@ void Minecraft::respawnPlayer(int iPad, int dimension, int newEntityId)
PlayerUID playerXUIDOnline = INVALID_XUID; PlayerUID playerXUIDOnline = INVALID_XUID;
ProfileManager.GetXUID(iTempPad,&playerXUIDOffline,false); ProfileManager.GetXUID(iTempPad,&playerXUIDOffline,false);
ProfileManager.GetXUID(iTempPad,&playerXUIDOnline,true); ProfileManager.GetXUID(iTempPad,&playerXUIDOnline,true);
#ifdef _WINDOWS64 #if defined(_WIN32)
// Same compatibility rule as create/init paths. // Same compatibility rule as create/init paths.
INetworkPlayer *localNetworkPlayer = g_NetworkManager.GetLocalPlayerByUserIndex(iTempPad); INetworkPlayer *localNetworkPlayer = g_NetworkManager.GetLocalPlayerByUserIndex(iTempPad);
if(localNetworkPlayer != NULL && localNetworkPlayer->IsHost()) if(localNetworkPlayer != NULL && localNetworkPlayer->IsHost())

View file

@ -217,7 +217,7 @@ public:
static Minecraft *GetInstance(); static Minecraft *GetInstance();
void run_middle(); void run_middle();
void run_end(); void run_end();
#ifdef _WINDOWS64 #if defined(_WIN32)
void applyFrameMouseLook(); // Per-frame mouse look to reduce input latency void applyFrameMouseLook(); // Per-frame mouse look to reduce input latency
#endif #endif

View file

@ -31,7 +31,7 @@
#include "..\Minecraft.World\net.minecraft.world.item.h" #include "..\Minecraft.World\net.minecraft.world.item.h"
#include "..\Minecraft.World\net.minecraft.world.item.enchantment.h" #include "..\Minecraft.World\net.minecraft.world.item.enchantment.h"
#include "..\Minecraft.World\net.minecraft.world.damagesource.h" #include "..\Minecraft.World\net.minecraft.world.damagesource.h"
#ifdef _WINDOWS64 #if defined(_WIN32)
#include "Windows64\Network\WinsockNetLayer.h" #include "Windows64\Network\WinsockNetLayer.h"
#endif #endif
#include <sstream> #include <sstream>
@ -88,7 +88,7 @@ unordered_map<wstring, int> MinecraftServer::ironTimers;
static bool ShouldUseDedicatedServerProperties() static bool ShouldUseDedicatedServerProperties()
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
return g_Win64DedicatedServer; return g_Win64DedicatedServer;
#else #else
return false; return false;
@ -1230,7 +1230,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring
if( levels[0]->isNew || levels[1]->isNew || levels[2]->isNew ) 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 // 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. // "Exit without saving" on a new world does not leave an orphaned save folder.
levels[0]->saveToDisc(mcprogress, false); levels[0]->saveToDisc(mcprogress, false);

View file

@ -20,7 +20,7 @@
Random *PendingConnection::random = new Random(); Random *PendingConnection::random = new Random();
#ifdef _WINDOWS64 #if defined(_WIN32)
bool g_bRejectDuplicateNames = true; bool g_bRejectDuplicateNames = true;
#endif #endif
@ -192,7 +192,7 @@ void PendingConnection::handleLogin(shared_ptr<LoginPacket> packet)
app.DebugPrintf("Rejecting duplicate xuid for name: %ls\n", name.c_str()); app.DebugPrintf("Rejecting duplicate xuid for name: %ls\n", name.c_str());
disconnect(DisconnectPacket::eDisconnect_Banned); disconnect(DisconnectPacket::eDisconnect_Banned);
} }
#ifdef _WINDOWS64 #if defined(_WIN32)
else if (g_bRejectDuplicateNames) else if (g_bRejectDuplicateNames)
{ {
bool nameTaken = false; bool nameTaken = false;

View file

@ -56,7 +56,7 @@ PlayerList::PlayerList(MinecraftServer *server)
//int viewDistance = server->settings->getInt(L"view-distance", 10); //int viewDistance = server->settings->getInt(L"view-distance", 10);
#ifdef _WINDOWS64 #if defined(_WIN32)
maxPlayers = MINECRAFT_NET_MAX_PLAYERS; maxPlayers = MINECRAFT_NET_MAX_PLAYERS;
#else #else
maxPlayers = server->settings->getInt(L"max-players", 20); maxPlayers = server->settings->getInt(L"max-players", 20);
@ -106,7 +106,7 @@ void PlayerList::placeNewPlayer(Connection *connection, shared_ptr<ServerPlayer>
} }
} }
#endif #endif
#ifdef _WINDOWS64 #if defined(_WIN32)
if (networkPlayer != NULL) if (networkPlayer != NULL)
{ {
NetworkPlayerXbox* nxp = (NetworkPlayerXbox*)networkPlayer; NetworkPlayerXbox* nxp = (NetworkPlayerXbox*)networkPlayer;
@ -513,7 +513,7 @@ if (player->riding != NULL)
shared_ptr<ServerPlayer> PlayerList::getPlayerForLogin(PendingConnection *pendingConnection, const wstring& userName, PlayerUID xuid, PlayerUID onlineXuid) shared_ptr<ServerPlayer> 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) if (players.size() >= (unsigned int)MINECRAFT_NET_MAX_PLAYERS)
#else #else
if (players.size() >= (unsigned int)maxPlayers) if (players.size() >= (unsigned int)maxPlayers)
@ -526,7 +526,7 @@ shared_ptr<ServerPlayer> PlayerList::getPlayerForLogin(PendingConnection *pendin
player->gameMode->player = player; // 4J added as had to remove this assignment from ServerPlayer ctor player->gameMode->player = player; // 4J added as had to remove this assignment from ServerPlayer ctor
player->setXuid( xuid ); // 4J Added player->setXuid( xuid ); // 4J Added
player->setOnlineXuid( onlineXuid ); // 4J Added player->setOnlineXuid( onlineXuid ); // 4J Added
#ifdef _WINDOWS64 #if defined(_WIN32)
{ {
// Use packet-supplied identity from LoginPacket. // Use packet-supplied identity from LoginPacket.
// Do not recompute from name here: mixed-version clients must stay compatible. // Do not recompute from name here: mixed-version clients must stay compatible.

View file

@ -5,7 +5,7 @@
#include "Tesselator.h" #include "Tesselator.h"
#include "Textures.h" #include "Textures.h"
#include "..\Minecraft.World\SoundTypes.h" #include "..\Minecraft.World\SoundTypes.h"
#ifdef _WINDOWS64 #if defined(_WIN32)
#include "Windows64\KeyboardMouseInput.h" #include "Windows64\KeyboardMouseInput.h"
#endif #endif
@ -103,7 +103,7 @@ void Screen::init()
void Screen::updateEvents() void Screen::updateEvents()
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
// Poll mouse button state and dispatch click/release events // Poll mouse button state and dispatch click/release events
for (int btn = 0; btn < 3; btn++) for (int btn = 0; btn < 3; btn++)
{ {
@ -165,7 +165,7 @@ void Screen::updateEvents()
void Screen::mouseEvent() void Screen::mouseEvent()
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
// Mouse event dispatching is handled directly in updateEvents() for Windows // Mouse event dispatching is handled directly in updateEvents() for Windows
#else #else
/* 4J - TODO /* 4J - TODO

View file

@ -1,6 +1,6 @@
#include "stdafx.h" #include "stdafx.h"
#ifdef _WINDOWS64 #if defined(_WIN32)
#include "KeyboardMouseInput.h" #include "KeyboardMouseInput.h"
#include <cmath> #include <cmath>

View file

@ -1,6 +1,6 @@
#pragma once #pragma once
#ifdef _WINDOWS64 #if defined(_WIN32)
#include <windows.h> #include <windows.h>

View file

@ -3,7 +3,7 @@
#include "stdafx.h" #include "stdafx.h"
#ifdef _WINDOWS64 #if defined(_WIN32)
#include "WinsockNetLayer.h" #include "WinsockNetLayer.h"
#include "..\..\Common\Network\PlatformNetworkManagerStub.h" #include "..\..\Common\Network\PlatformNetworkManagerStub.h"

View file

@ -2,7 +2,7 @@
// https://github.com/LCEMP/LCEMP // https://github.com/LCEMP/LCEMP
#pragma once #pragma once
#ifdef _WINDOWS64 #if defined(_WIN32)
#include <WinSock2.h> #include <WinSock2.h>
#include <WS2tcpip.h> #include <WS2tcpip.h>

View file

@ -1,6 +1,6 @@
#pragma once #pragma once
#ifdef _WINDOWS64 #if defined(_WIN32)
#include <string> #include <string>
#include <cstdio> #include <cstdio>

View file

@ -60,7 +60,7 @@
typedef unsigned __int64 __uint64; typedef unsigned __int64 __uint64;
#endif #endif
#ifdef _WINDOWS64 #if defined(_WIN32)
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files: // Windows Header Files:
#include <windows.h> #include <windows.h>
@ -172,7 +172,7 @@ typedef XUID GameSessionUID;
#include "Durango\4JLibs\inc\4J_Profile.h" #include "Durango\4JLibs\inc\4J_Profile.h"
#include "Durango\4JLibs\inc\4J_Render.h" #include "Durango\4JLibs\inc\4J_Render.h"
#include "Durango\4JLibs\inc\4J_Storage.h" #include "Durango\4JLibs\inc\4J_Storage.h"
#elif defined _WINDOWS64 #elif defined(_WIN32)
#include <Xinput.h> #include <Xinput.h>
#include "Windows64\4JLibs\inc\4J_Input.h" #include "Windows64\4JLibs\inc\4J_Input.h"
#include "Windows64\4JLibs\inc\4J_Profile.h" #include "Windows64\4JLibs\inc\4J_Profile.h"
@ -267,7 +267,7 @@ typedef XUID GameSessionUID;
#include "Durango\Iggy\include\iggy.h" #include "Durango\Iggy\include\iggy.h"
#include "Durango\Iggy\gdraw\gdraw_d3d11.h" #include "Durango\Iggy\gdraw\gdraw_d3d11.h"
#include "Durango\Durango_UIController.h" #include "Durango\Durango_UIController.h"
#elif defined _WINDOWS64 #elif defined(_WIN32)
#include "Windows64\Sentient\MinecraftTelemetry.h" #include "Windows64\Sentient\MinecraftTelemetry.h"
#include "Windows64Media\strings.h" #include "Windows64Media\strings.h"
#include "Windows64\Windows64_App.h" #include "Windows64\Windows64_App.h"

View file

@ -1,6 +1,6 @@
#include "stdafx.h" #include "stdafx.h"
#ifdef _WINDOWS64 #if defined(_WIN32)
#include "Windows64\KeyboardMouseInput.h" #include "Windows64\KeyboardMouseInput.h"
static const int s_keyToVK[] = { static const int s_keyToVK[] = {

View file

@ -186,7 +186,7 @@ class Keyboard
public: public:
static void create() {} static void create() {}
static void destroy() {} static void destroy() {}
#ifdef _WINDOWS64 #if defined(_WIN32)
static bool isKeyDown(int keyCode); static bool isKeyDown(int keyCode);
#else #else
static bool isKeyDown(int) { return false; } static bool isKeyDown(int) { return false; }
@ -251,7 +251,7 @@ public:
static const int KEY_LEFT = 54; static const int KEY_LEFT = 54;
static const int KEY_RIGHT = 55; static const int KEY_RIGHT = 55;
#ifdef _WINDOWS64 #if defined(_WIN32)
// Map LWJGL-style key constant to Windows VK code // Map LWJGL-style key constant to Windows VK code
static int toVK(int keyConst); static int toVK(int keyConst);
#endif #endif
@ -262,7 +262,7 @@ class Mouse
public: public:
static void create() {} static void create() {}
static void destroy() {} static void destroy() {}
#ifdef _WINDOWS64 #if defined(_WIN32)
static int getX(); static int getX();
static int getY(); static int getY();
static bool isButtonDown(int button); static bool isButtonDown(int button);

View file

@ -13,7 +13,7 @@ BiomeOverrideLayer::BiomeOverrideLayer(int seedMixup) : Layer(seedMixup)
wstring path = L"GAME:\\GameRules\\biomemap.bin"; wstring path = L"GAME:\\GameRules\\biomemap.bin";
HANDLE file = CreateFile(path.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); HANDLE file = CreateFile(path.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
#else #else
#ifdef _WINDOWS64 #if defined(_WIN32)
string path = "GameRules\\biomemap.bin"; string path = "GameRules\\biomemap.bin";
#else #else
string path = "GAME:\\GameRules\\biomemap.bin"; string path = "GAME:\\GameRules\\biomemap.bin";

View file

@ -133,7 +133,7 @@ void ConsoleSaveFileConverter::ConvertSave(ConsoleSaveFile *sourceSave, ConsoleS
if(progress) if(progress)
{ {
#ifndef _WINDOWS64 #if !defined(_WIN32)
progress->progressStage(IDS_SAVETRANSFER_STAGE_CONVERTING); progress->progressStage(IDS_SAVETRANSFER_STAGE_CONVERTING);
#endif #endif
} }

View file

@ -24,7 +24,7 @@ CustomLevelSource::CustomLevelSource(Level *level, __int64 seed, bool generateSt
wstring path = L"GAME:\\GameRules\\heightmap.bin"; wstring path = L"GAME:\\GameRules\\heightmap.bin";
#else #else
#ifdef _WINDOWS64 #if defined(_WIN32)
string path = "GameRules\\heightmap.bin"; string path = "GameRules\\heightmap.bin";
#else #else
string path = "GAME:\\GameRules\\heightmap.bin"; 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"; wstring waterHeightPath = L"GAME:\\GameRules\\waterheight.bin";
#else #else
#ifdef _WINDOWS64 #if defined(_WIN32)
string waterHeightPath = "GameRules\\waterheight.bin"; string waterHeightPath = "GameRules\\waterheight.bin";
#else #else
string waterHeightPath = "GAME:\\GameRules\\waterheight.bin"; string waterHeightPath = "GAME:\\GameRules\\waterheight.bin";

View file

@ -284,7 +284,7 @@ LevelData *DirectoryLevelStorage::prepareLevel()
for(unsigned int i = 0; i < count; ++i) for(unsigned int i = 0; i < count; ++i)
{ {
PlayerUID playerUid = dis.readPlayerUID(); PlayerUID playerUid = dis.readPlayerUID();
#ifdef _WINDOWS64 #if defined(_WIN32)
app.DebugPrintf(" -- %d\n", playerUid); app.DebugPrintf(" -- %d\n", playerUid);
#else #else
app.DebugPrintf(" -- %ls\n", playerUid.toString().c_str()); app.DebugPrintf(" -- %ls\n", playerUid.toString().c_str());
@ -684,7 +684,7 @@ void DirectoryLevelStorage::saveMapIdLookup()
app.DebugPrintf("Saving %d mappings\n", m_playerMappings.size()); app.DebugPrintf("Saving %d mappings\n", m_playerMappings.size());
for ( auto& it : m_playerMappings ) for ( auto& it : m_playerMappings )
{ {
#ifdef _WINDOWS64 #if defined(_WIN32)
app.DebugPrintf(" -- %d\n", it.first); app.DebugPrintf(" -- %d\n", it.first);
#else #else
app.DebugPrintf(" -- %ls\n", it.first.toString().c_str()); app.DebugPrintf(" -- %ls\n", it.first.toString().c_str());

View file

@ -36,7 +36,7 @@ File::File( const wstring& pathname ) //: parent( NULL )
else else
m_abstractPathName = pathname; m_abstractPathName = pathname;
#ifdef _WINDOWS64 #if defined(_WIN32)
string path = wstringtochararray(m_abstractPathName); string path = wstringtochararray(m_abstractPathName);
string finalPath = StorageManager.GetMountedPath(path.c_str()); string finalPath = StorageManager.GetMountedPath(path.c_str());
if(finalPath.size() == 0) finalPath = path; if(finalPath.size() == 0) finalPath = path;

View file

@ -68,7 +68,7 @@ enum ESavePlatform
SAVE_FILE_PLATFORM_LOCAL = SAVE_FILE_PLATFORM_PS4 SAVE_FILE_PLATFORM_LOCAL = SAVE_FILE_PLATFORM_PS4
#elif defined __PSVITA__ #elif defined __PSVITA__
SAVE_FILE_PLATFORM_LOCAL = SAVE_FILE_PLATFORM_PSVITA SAVE_FILE_PLATFORM_LOCAL = SAVE_FILE_PLATFORM_PSVITA
#elif defined _WINDOWS64 #elif defined(_WIN32)
SAVE_FILE_PLATFORM_LOCAL = SAVE_FILE_PLATFORM_WIN64 SAVE_FILE_PLATFORM_LOCAL = SAVE_FILE_PLATFORM_WIN64
#endif #endif
}; };

View file

@ -369,7 +369,7 @@ void Player::tick()
if( count++ == 100 ) if( count++ == 100 )
{ {
#if 0 #if 0
#ifdef _WINDOWS64 #if defined(_WIN32)
// Drop some items so we have them in inventory to play with // Drop some items so we have them in inventory to play with
this->drop( shared_ptr<ItemInstance>( new ItemInstance(Tile::recordPlayer) ) ); this->drop( shared_ptr<ItemInstance>( new ItemInstance(Tile::recordPlayer) ) );
this->drop( shared_ptr<ItemInstance>( new ItemInstance(Item::map) ) ); this->drop( shared_ptr<ItemInstance>( new ItemInstance(Item::map) ) );

View file

@ -12,7 +12,7 @@
typedef unsigned __int64 __uint64; typedef unsigned __int64 __uint64;
#endif #endif
#ifdef _WINDOWS64 #if defined(_WIN32)
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files: // Windows Header Files:
#include <windows.h> #include <windows.h>
@ -162,7 +162,7 @@ void MemSect(int sect);
#include "..\Minecraft.Client\Durango\4JLibs\inc\4J_Render.h" #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_Storage.h"
#include "..\Minecraft.Client\Durango\4JLibs\inc\4J_Input.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_Profile.h"
#include "..\Minecraft.Client\Windows64\4JLibs\inc\4J_Render.h" #include "..\Minecraft.Client\Windows64\4JLibs\inc\4J_Render.h"
#include "..\Minecraft.Client\Windows64\4JLibs\inc\4J_Storage.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\MinecraftTelemetry.h"
#include "..\Minecraft.Client\Durango\Sentient\TelemetryEnum.h" #include "..\Minecraft.Client\Durango\Sentient\TelemetryEnum.h"
#elif defined _WINDOWS64 #elif defined(_WIN32)
#include "..\Minecraft.Client\Windows64\Windows64_App.h" #include "..\Minecraft.Client\Windows64\Windows64_App.h"
#include "..\Minecraft.Client\Windows64Media\strings.h" #include "..\Minecraft.Client\Windows64Media\strings.h"
#include "..\Minecraft.Client\Windows64\Sentient\SentientTelemetryCommon.h" #include "..\Minecraft.Client\Windows64\Sentient\SentientTelemetryCommon.h"

View file

@ -52,7 +52,7 @@ void System::arraycopy(arrayWithLength<int> src, unsigned int srcPos, arrayWithL
//The current value of the system timer, in nanoseconds. //The current value of the system timer, in nanoseconds.
__int64 System::nanoTime() __int64 System::nanoTime()
{ {
#if defined _WINDOWS64 || defined _XBOX || defined _WIN32 #if defined(_WIN32) || defined _XBOX || defined _WIN32
static LARGE_INTEGER s_frequency = { 0 }; static LARGE_INTEGER s_frequency = { 0 };
if (s_frequency.QuadPart == 0) if (s_frequency.QuadPart == 0)
{ {