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
#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<AddPlayerPacket> 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<AddPlayerPacket> 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<AddPlayerPacket> 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<MoveEntityPacketSmall> p
void ClientConnection::handleRemoveEntity(shared_ptr<RemoveEntitiesPacket> packet)
{
#ifdef _WINDOWS64
#if defined(_WIN32)
if (!g_NetworkManager.IsHost())
{
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
#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

View file

@ -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"};

View file

@ -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;

View file

@ -760,7 +760,7 @@ bool CMinecraftApp::LoadBeaconMenu(int iPad ,shared_ptr<Inventory> 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/";

View file

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

View file

@ -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);

View file

@ -1,7 +1,7 @@
#include "stdafx.h"
#include "Filesystem.h"
#ifdef _WINDOWS64
#if defined(_WIN32)
#include <windows.h>
#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);

View file

@ -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__)

View file

@ -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();

View file

@ -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<Win64LANSession> lanSessions = WinsockNetLayer::GetDiscoveredSessions();
//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 (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')))

View file

@ -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;

View file

@ -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)

View file

@ -13,7 +13,7 @@
#include <pad.h>
#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))

View file

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

View file

@ -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;

View file

@ -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 );

View file

@ -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<UIControl *> *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();

View file

@ -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");

View file

@ -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;

View file

@ -17,7 +17,7 @@
#include "PSVita\Network\SQRNetworkManager_AdHoc_Vita.h"
#endif
#ifdef _WINDOWS64
#if defined(_WIN32)
#include <windows.h>
#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;

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -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).

View file

@ -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; }

View file

@ -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

View file

@ -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;

View file

@ -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));

View file

@ -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;

View file

@ -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() {}

View file

@ -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);

View file

@ -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

View file

@ -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);

View file

@ -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<MultiplayerLocalPlayer> 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<<MINECRAFT_ACTION_RENDER_THIRD_PERSON;
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
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
#ifndef _DURANGO
// 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
// 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.
@ -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
#ifdef __ORBIS__
if(InputManager.ButtonPressed(i, ACTION_MENU_A))
#elif defined _WINDOWS64
#elif defined(_WIN32)
if(startJustPressed)
#else
if(InputManager.ButtonPressed(i, MINECRAFT_ACTION_PAUSEMENU))
@ -1633,7 +1633,7 @@ void Minecraft::run_middle()
// Let them join
// are they signed in?
#ifdef _WINDOWS64
#if defined(_WIN32)
if(ProfileManager.IsSignedIn(i) || (g_NetworkManager.IsLocalGame() && InputManager.IsPadConnected(i)))
#else
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())
{
g_KBMInput.SetMouseGrabbed(false);
@ -2347,7 +2347,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
if (screen == NULL && !ui.GetMenuDisplayed(iPad) )
{
#ifdef _WINDOWS64
#if defined(_WIN32)
if (!g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsWindowFocused())
{
g_KBMInput.SetMouseGrabbed(true);
@ -3505,7 +3505,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
wheel = -1;
}
#ifdef _WINDOWS64
#if defined(_WIN32)
if (iPad == 0 && wheel == 0 && g_KBMInput.IsKBMActive())
{
wheel = g_KBMInput.GetMouseWheel();
@ -3543,7 +3543,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
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 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())

View file

@ -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

View file

@ -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 <sstream>
@ -88,7 +88,7 @@ unordered_map<wstring, int> 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);

View file

@ -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<LoginPacket> 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;

View file

@ -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<ServerPlayer>
}
}
#endif
#ifdef _WINDOWS64
#if defined(_WIN32)
if (networkPlayer != NULL)
{
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)
{
#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<ServerPlayer> 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.

View file

@ -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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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 <windows.h>
@ -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 <Xinput.h>
#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"

View file

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

View file

@ -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);

View file

@ -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";

View file

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

View file

@ -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";

View file

@ -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());

View file

@ -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;

View file

@ -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
};

View file

@ -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<ItemInstance>( new ItemInstance(Tile::recordPlayer) ) );
this->drop( shared_ptr<ItemInstance>( new ItemInstance(Item::map) ) );

View file

@ -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 <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_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"

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.
__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)
{