diff --git a/.github/IMG_8725.png b/.github/TutorialWorld.png similarity index 100% rename from .github/IMG_8725.png rename to .github/TutorialWorld.png diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 00f18f532..0affa845e 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -5,6 +5,9 @@ on: push: branches: - 'main' + paths-ignore: + - '.gitignore' + - '*.md' jobs: build: diff --git a/.gitignore b/.gitignore index eef95bde6..9caff84a1 100644 --- a/.gitignore +++ b/.gitignore @@ -430,3 +430,6 @@ build/* !x64/**/iggy_w64.dll !x64/**/mss64.dll !x64/**/redist64/ + +# Local saves +Minecraft.Client/Saves/ diff --git a/Minecraft.Client/ClientConnection.cpp b/Minecraft.Client/ClientConnection.cpp index 52cec351c..f3510d336 100644 --- a/Minecraft.Client/ClientConnection.cpp +++ b/Minecraft.Client/ClientConnection.cpp @@ -757,7 +757,7 @@ void ClientConnection::handleAddPlayer(shared_ptr packet) return; } } -#ifdef _WINDOWS64 +/*#ifdef _WINDOWS64 // 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 @@ -771,7 +771,7 @@ void ClientConnection::handleAddPlayer(shared_ptr packet) return; } } -#endif +#endif*/ double x = packet->x / 32.0; double y = packet->y / 32.0; diff --git a/Minecraft.Client/Common/Audio/SoundEngine.cpp b/Minecraft.Client/Common/Audio/SoundEngine.cpp index 4d356c132..e9affe6b8 100644 --- a/Minecraft.Client/Common/Audio/SoundEngine.cpp +++ b/Minecraft.Client/Common/Audio/SoundEngine.cpp @@ -56,7 +56,7 @@ void SoundEngine::playMusicTick() {}; #else #ifdef _WINDOWS64 -char SoundEngine::m_szSoundPath[]={"Windows64\\Sound\\"}; +char SoundEngine::m_szSoundPath[]={"Windows64Media\\Sound\\"}; char SoundEngine::m_szMusicPath[]={"music\\"}; char SoundEngine::m_szRedistName[]={"redist64"}; #elif defined _DURANGO diff --git a/Minecraft.Client/Common/Consoles_App.cpp b/Minecraft.Client/Common/Consoles_App.cpp index 30bc8533f..b476ca909 100644 --- a/Minecraft.Client/Common/Consoles_App.cpp +++ b/Minecraft.Client/Common/Consoles_App.cpp @@ -760,6 +760,43 @@ bool CMinecraftApp::LoadBeaconMenu(int iPad ,shared_ptr inventory, sh ////////////////////////////////////////////// // GAME SETTINGS ////////////////////////////////////////////// + +#ifdef _WINDOWS64 +static void Win64_GetSettingsPath(char *outPath, DWORD size) +{ + GetModuleFileNameA(NULL, outPath, size); + char *lastSlash = strrchr(outPath, '\\'); + if (lastSlash) *(lastSlash + 1) = '\0'; + strncat_s(outPath, size, "settings.dat", _TRUNCATE); +} +static void Win64_SaveSettings(GAME_SETTINGS *gs) +{ + if (!gs) return; + char filePath[MAX_PATH] = {}; + Win64_GetSettingsPath(filePath, MAX_PATH); + FILE *f = NULL; + if (fopen_s(&f, filePath, "wb") == 0 && f) + { + fwrite(gs, sizeof(GAME_SETTINGS), 1, f); + fclose(f); + } +} +static void Win64_LoadSettings(GAME_SETTINGS *gs) +{ + if (!gs) return; + char filePath[MAX_PATH] = {}; + Win64_GetSettingsPath(filePath, MAX_PATH); + FILE *f = NULL; + if (fopen_s(&f, filePath, "rb") == 0 && f) + { + GAME_SETTINGS temp = {}; + if (fread(&temp, sizeof(GAME_SETTINGS), 1, f) == 1) + memcpy(gs, &temp, sizeof(GAME_SETTINGS)); + fclose(f); + } +} +#endif + void CMinecraftApp::InitGameSettings() { for(int i=0;ioptions->set(Options::Option::GAMMA, ((float)GameSettingsA[iPad]->ucGamma) / 100.0f); +#else // ucGamma range is 0-100, UpdateGamma is 0 - 32768 float fVal=((float)GameSettingsA[iPad]->ucGamma)*327.68f; RenderManager.UpdateGamma((unsigned short)fVal); +#endif } break; @@ -2368,6 +2411,9 @@ void CMinecraftApp::CheckGameSettingsChanged(bool bOverride5MinuteTimer, int iPa StorageManager.WriteToProfile(i,true, bOverride5MinuteTimer); #else ProfileManager.WriteToProfile(i,true, bOverride5MinuteTimer); +#ifdef _WINDOWS64 + Win64_SaveSettings(GameSettingsA[i]); +#endif #endif GameSettingsA[i]->bSettingsChanged=false; } @@ -2381,6 +2427,9 @@ void CMinecraftApp::CheckGameSettingsChanged(bool bOverride5MinuteTimer, int iPa StorageManager.WriteToProfile(iPad,true, bOverride5MinuteTimer); #else ProfileManager.WriteToProfile(iPad,true, bOverride5MinuteTimer); +#ifdef _WINDOWS64 + Win64_SaveSettings(GameSettingsA[iPad]); +#endif #endif GameSettingsA[iPad]->bSettingsChanged=false; } @@ -3398,7 +3447,7 @@ void CMinecraftApp::HandleXuiActions(void) bool gameStarted = false; for(int j = 0; j < pMinecraft->levels.length; j++) { - if (pMinecraft->levels.data[i] != NULL) + if (pMinecraft->levels.data[i] != nullptr) { gameStarted = true; break; diff --git a/Minecraft.Client/Common/Media/MediaWindows64.arc b/Minecraft.Client/Common/Media/MediaWindows64.arc index 5ea229dca..9498b91d6 100644 Binary files a/Minecraft.Client/Common/Media/MediaWindows64.arc and b/Minecraft.Client/Common/Media/MediaWindows64.arc differ diff --git a/Minecraft.Client/Common/Network/GameNetworkManager.cpp b/Minecraft.Client/Common/Network/GameNetworkManager.cpp index 940a148ec..b3fb5cd70 100644 --- a/Minecraft.Client/Common/Network/GameNetworkManager.cpp +++ b/Minecraft.Client/Common/Network/GameNetworkManager.cpp @@ -167,6 +167,11 @@ bool CGameNetworkManager::_RunNetworkGame(LPVOID lpParameter) return true; } } + else + { + // Client needs QNET_STATE_GAME_PLAY so that IsInGameplay() returns true + s_pPlatformNetworkManager->SetGamePlayState(); + } if( g_NetworkManager.IsLeavingGame() ) return false; @@ -1479,7 +1484,10 @@ void CGameNetworkManager::CreateSocket( INetworkPlayer *pNetworkPlayer, bool loc Minecraft *pMinecraft = Minecraft::GetInstance(); Socket *socket = NULL; - shared_ptr mpPlayer = pMinecraft->localplayers[pNetworkPlayer->GetUserIndex()]; + shared_ptr mpPlayer = nullptr; + int userIdx = pNetworkPlayer->GetUserIndex(); + if (userIdx >= 0 && userIdx < XUSER_MAX_COUNT) + mpPlayer = pMinecraft->localplayers[userIdx]; if( localPlayer && mpPlayer != NULL && mpPlayer->connection != NULL) { // If we already have a MultiplayerLocalPlayer here then we are doing a session type change diff --git a/Minecraft.Client/Common/Network/PlatformNetworkManagerInterface.h b/Minecraft.Client/Common/Network/PlatformNetworkManagerInterface.h index 901e59e72..31c415a75 100644 --- a/Minecraft.Client/Common/Network/PlatformNetworkManagerInterface.h +++ b/Minecraft.Client/Common/Network/PlatformNetworkManagerInterface.h @@ -84,6 +84,7 @@ public: virtual void HandleSignInChange() = 0; virtual bool _RunNetworkGame() = 0; + virtual void SetGamePlayState() {} private: virtual bool _LeaveGame(bool bMigrateHost, bool bLeaveRoom) = 0; diff --git a/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp b/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp index b6b0fe122..10d1a6a53 100644 --- a/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp +++ b/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp @@ -2,7 +2,12 @@ #include "..\..\..\Minecraft.World\Socket.h" #include "..\..\..\Minecraft.World\StringHelpers.h" #include "PlatformNetworkManagerStub.h" -#include "..\..\Xbox\Network\NetworkPlayerXbox.h" // TODO - stub version of this? +#include "..\..\Xbox\Network\NetworkPlayerXbox.h" +#ifdef _WINDOWS64 +#include "..\..\Windows64\Network\WinsockNetLayer.h" +#include "..\..\Minecraft.h" +#include "..\..\User.h" +#endif CPlatformNetworkManagerStub *g_pPlatformNetworkManager; @@ -114,10 +119,43 @@ void CPlatformNetworkManagerStub::NotifyPlayerJoined(IQNetPlayer *pQNetPlayer ) } } +void CPlatformNetworkManagerStub::NotifyPlayerLeaving(IQNetPlayer* pQNetPlayer) +{ + app.DebugPrintf("Player 0x%p \"%ls\" leaving.\n", pQNetPlayer, pQNetPlayer->GetGamertag()); + + INetworkPlayer* networkPlayer = getNetworkPlayer(pQNetPlayer); + if (networkPlayer == NULL) + return; + + Socket* socket = networkPlayer->GetSocket(); + if (socket != NULL) + { + if (m_pIQNet->IsHost()) + g_NetworkManager.CloseConnection(networkPlayer); + } + + if (m_pIQNet->IsHost()) + { + SystemFlagRemovePlayer(networkPlayer); + } + + g_NetworkManager.PlayerLeaving(networkPlayer); + + for (int idx = 0; idx < XUSER_MAX_COUNT; ++idx) + { + if (playerChangedCallback[idx] != NULL) + playerChangedCallback[idx](playerChangedCallbackParam[idx], networkPlayer, true); + } + + removeNetworkPlayer(pQNetPlayer); +} + + bool CPlatformNetworkManagerStub::Initialise(CGameNetworkManager *pGameNetworkManager, int flagIndexSize) { m_pGameNetworkManager = pGameNetworkManager; m_flagIndexSize = flagIndexSize; + m_pIQNet = new IQNet(); g_pPlatformNetworkManager = this; for( int i = 0; i < XUSER_MAX_COUNT; i++ ) { @@ -174,6 +212,37 @@ 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 + extern QNET_STATE _iQNetStubState; + if (_iQNetStubState == QNET_STATE_SESSION_STARTING && app.GetGameStarted()) + { + _iQNetStubState = QNET_STATE_GAME_PLAY; + if (m_pIQNet->IsHost()) + WinsockNetLayer::UpdateAdvertiseJoinable(true); + } + if (_iQNetStubState == QNET_STATE_IDLE) + TickSearch(); + if (_iQNetStubState == QNET_STATE_GAME_PLAY && m_pIQNet->IsHost()) + { + BYTE disconnectedSmallId; + while (WinsockNetLayer::PopDisconnectedSmallId(&disconnectedSmallId)) + { + IQNetPlayer* qnetPlayer = m_pIQNet->GetPlayerBySmallId(disconnectedSmallId); + if (qnetPlayer != NULL && qnetPlayer->m_smallId == disconnectedSmallId) + { + NotifyPlayerLeaving(qnetPlayer); + qnetPlayer->m_smallId = 0; + qnetPlayer->m_isRemote = false; + qnetPlayer->m_isHostPlayer = false; + qnetPlayer->m_gamertag[0] = 0; + qnetPlayer->SetCustomDataValue(0); + WinsockNetLayer::PushFreeSmallId(disconnectedSmallId); + if (IQNet::s_playerCount > 1) + IQNet::s_playerCount--; + } + } + } +#endif } int CPlatformNetworkManagerStub::GetPlayerCount() @@ -232,6 +301,10 @@ bool CPlatformNetworkManagerStub::LeaveGame(bool bMigrateHost) m_bLeavingGame = true; +#ifdef _WINDOWS64 + WinsockNetLayer::StopAdvertising(); +#endif + // If we are the host wait for the game server to end if(m_pIQNet->IsHost() && g_NetworkManager.ServerStoppedValid()) { @@ -239,6 +312,22 @@ bool CPlatformNetworkManagerStub::LeaveGame(bool bMigrateHost) g_NetworkManager.ServerStoppedWait(); g_NetworkManager.ServerStoppedDestroy(); } + else + { + m_pIQNet->EndGame(); + } + + for (AUTO_VAR(it, currentNetworkPlayers.begin()); it != currentNetworkPlayers.end(); it++) + delete* it; + currentNetworkPlayers.clear(); + m_machineQNetPrimaryPlayers.clear(); + SystemFlagReset(); + +#ifdef _WINDOWS64 + WinsockNetLayer::Shutdown(); + WinsockNetLayer::Initialize(); +#endif + return true; } @@ -262,7 +351,24 @@ void CPlatformNetworkManagerStub::HostGame(int localUsersMask, bool bOnlineGame, m_pIQNet->HostGame(); +#ifdef _WINDOWS64 + IQNet::m_player[0].m_smallId = 0; + IQNet::m_player[0].m_isRemote = false; + IQNet::m_player[0].m_isHostPlayer = true; + IQNet::s_playerCount = 1; +#endif + _HostGame( localUsersMask, publicSlots, privateSlots ); + +#ifdef _WINDOWS64 + int port = WIN64_NET_DEFAULT_PORT; + if (!WinsockNetLayer::IsActive()) + WinsockNetLayer::HostGame(port); + + const wchar_t* hostName = IQNet::m_player[0].m_gamertag; + unsigned int settings = app.GetGameHostOption(eGameHostOption_All); + WinsockNetLayer::StartAdvertising(port, hostName, settings, 0, 0, MINECRAFT_NET_VERSION); +#endif //#endif } @@ -275,9 +381,54 @@ bool CPlatformNetworkManagerStub::_StartGame() return true; } -int CPlatformNetworkManagerStub::JoinGame(FriendSessionInfo *searchResult, int localUsersMask, int primaryUserIndex) +int CPlatformNetworkManagerStub::JoinGame(FriendSessionInfo* searchResult, int localUsersMask, int primaryUserIndex) { +#ifdef _WINDOWS64 + if (searchResult == NULL) + return CGameNetworkManager::JOINGAME_FAIL_GENERAL; + + const char* hostIP = searchResult->data.hostIP; + int hostPort = searchResult->data.hostPort; + + if (hostPort <= 0 || hostIP[0] == 0) + return CGameNetworkManager::JOINGAME_FAIL_GENERAL; + + m_bLeavingGame = false; + IQNet::s_isHosting = false; + m_pIQNet->ClientJoinGame(); + + IQNet::m_player[0].m_smallId = 0; + IQNet::m_player[0].m_isRemote = true; + IQNet::m_player[0].m_isHostPlayer = true; + wcsncpy_s(IQNet::m_player[0].m_gamertag, 32, searchResult->data.hostName, _TRUNCATE); + + WinsockNetLayer::StopDiscovery(); + + if (!WinsockNetLayer::JoinGame(hostIP, hostPort)) + { + app.DebugPrintf("Win64 LAN: Failed to connect to %s:%d\n", hostIP, hostPort); + return CGameNetworkManager::JOINGAME_FAIL_GENERAL; + } + + BYTE localSmallId = WinsockNetLayer::GetLocalSmallId(); + + IQNet::m_player[localSmallId].m_smallId = localSmallId; + IQNet::m_player[localSmallId].m_isRemote = false; + IQNet::m_player[localSmallId].m_isHostPlayer = false; + + Minecraft* pMinecraft = Minecraft::GetInstance(); + wcscpy_s(IQNet::m_player[localSmallId].m_gamertag, 32, pMinecraft->user->name.c_str()); + IQNet::s_playerCount = localSmallId + 1; + + NotifyPlayerJoined(&IQNet::m_player[0]); + NotifyPlayerJoined(&IQNet::m_player[localSmallId]); + + m_pGameNetworkManager->StateChange_AnyToStarting(); + return CGameNetworkManager::JOINGAME_SUCCESS; +#else + return CGameNetworkManager::JOINGAME_SUCCESS; +#endif } bool CPlatformNetworkManagerStub::SetLocalGame(bool isLocal) @@ -315,6 +466,22 @@ void CPlatformNetworkManagerStub::HandleSignInChange() bool CPlatformNetworkManagerStub::_RunNetworkGame() { +#ifdef _WINDOWS64 + extern QNET_STATE _iQNetStubState; + _iQNetStubState = QNET_STATE_GAME_PLAY; + + for (DWORD i = 0; i < IQNet::s_playerCount; i++) + { + if (IQNet::m_player[i].m_isRemote) + { + INetworkPlayer* pNetworkPlayer = getNetworkPlayer(&IQNet::m_player[i]); + if (pNetworkPlayer != NULL && pNetworkPlayer->GetSocket() != NULL) + { + Socket::addIncomingSocket(pNetworkPlayer->GetSocket()); + } + } + } +#endif return true; } @@ -503,10 +670,60 @@ wstring CPlatformNetworkManagerStub::GatherRTTStats() void CPlatformNetworkManagerStub::TickSearch() { +#ifdef _WINDOWS64 + if (m_SessionsUpdatedCallback == NULL) + return; + + static DWORD lastSearchTime = 0; + DWORD now = GetTickCount(); + if (now - lastSearchTime < 2000) + return; + lastSearchTime = now; + + SearchForGames(); +#endif } void CPlatformNetworkManagerStub::SearchForGames() { +#ifdef _WINDOWS64 + std::vector lanSessions = WinsockNetLayer::GetDiscoveredSessions(); + + for (size_t i = 0; i < friendsSessions[0].size(); i++) + delete friendsSessions[0][i]; + friendsSessions[0].clear(); + + for (size_t i = 0; i < lanSessions.size(); i++) + { + FriendSessionInfo* info = new FriendSessionInfo(); + size_t nameLen = wcslen(lanSessions[i].hostName); + info->displayLabel = new wchar_t[nameLen + 1]; + wcscpy_s(info->displayLabel, nameLen + 1, lanSessions[i].hostName); + info->displayLabelLength = (unsigned char)nameLen; + info->displayLabelViewableStartIndex = 0; + + info->data.netVersion = lanSessions[i].netVersion; + info->data.m_uiGameHostSettings = lanSessions[i].gameHostSettings; + info->data.texturePackParentId = lanSessions[i].texturePackParentId; + info->data.subTexturePackId = lanSessions[i].subTexturePackId; + info->data.isReadyToJoin = lanSessions[i].isJoinable; + info->data.isJoinable = lanSessions[i].isJoinable; + strncpy_s(info->data.hostIP, sizeof(info->data.hostIP), lanSessions[i].hostIP, _TRUNCATE); + info->data.hostPort = lanSessions[i].hostPort; + wcsncpy_s(info->data.hostName, XUSER_NAME_SIZE, lanSessions[i].hostName, _TRUNCATE); + info->data.playerCount = lanSessions[i].playerCount; + info->data.maxPlayers = lanSessions[i].maxPlayers; + + info->sessionId = (SessionID)((unsigned __int64)inet_addr(lanSessions[i].hostIP) | ((unsigned __int64)lanSessions[i].hostPort << 32)); + + friendsSessions[0].push_back(info); + } + + m_searchResultsCount[0] = (int)friendsSessions[0].size(); + + if (m_SessionsUpdatedCallback != NULL) + m_SessionsUpdatedCallback(m_pSearchParam); +#endif } int CPlatformNetworkManagerStub::SearchForGamesThreadProc( void* lpParameter ) @@ -522,7 +739,9 @@ void CPlatformNetworkManagerStub::SetSearchResultsReady(int resultCount) vector *CPlatformNetworkManagerStub::GetSessionList(int iPad, int localPlayers, bool partyOnly) { - vector *filteredList = new vector();; + vector* filteredList = new vector(); + for (size_t i = 0; i < friendsSessions[0].size(); i++) + filteredList->push_back(friendsSessions[0][i]); return filteredList; } diff --git a/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.h b/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.h index f997dece5..28953cecb 100644 --- a/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.h +++ b/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.h @@ -161,8 +161,9 @@ public: virtual void GetFullFriendSessionInfo( FriendSessionInfo *foundSession, void (* FriendSessionUpdatedFn)(bool success, void *pParam), void *pParam ); virtual void ForceFriendsSessionRefresh(); -private: +public: void NotifyPlayerJoined( IQNetPlayer *pQNetPlayer ); + void NotifyPlayerLeaving(IQNetPlayer* pQNetPlayer); #ifndef _XBOX void FakeLocalPlayerJoined() { NotifyPlayerJoined(m_pIQNet->GetLocalPlayerByUserIndex(0)); } diff --git a/Minecraft.Client/Common/Network/SessionInfo.h b/Minecraft.Client/Common/Network/SessionInfo.h index 31472a19a..ce6365bc4 100644 --- a/Minecraft.Client/Common/Network/SessionInfo.h +++ b/Minecraft.Client/Common/Network/SessionInfo.h @@ -23,9 +23,9 @@ typedef struct _GameSessionData _GameSessionData() { netVersion = 0; - memset(hostName,0,XUSER_NAME_SIZE); - memset(players,0,MINECRAFT_NET_MAX_PLAYERS*sizeof(players[0])); - memset(szPlayers,0,MINECRAFT_NET_MAX_PLAYERS*XUSER_NAME_SIZE); + memset(hostName, 0, XUSER_NAME_SIZE); + memset(players, 0, MINECRAFT_NET_MAX_PLAYERS * sizeof(players[0])); + memset(szPlayers, 0, MINECRAFT_NET_MAX_PLAYERS * XUSER_NAME_SIZE); isJoinable = true; m_uiGameHostSettings = 0; texturePackParentId = 0; @@ -50,7 +50,7 @@ typedef struct _GameSessionData _GameSessionData() { netVersion = 0; - memset(players,0,MINECRAFT_NET_MAX_PLAYERS*sizeof(players[0])); + memset(players, 0, MINECRAFT_NET_MAX_PLAYERS * sizeof(players[0])); isJoinable = true; m_uiGameHostSettings = 0; texturePackParentId = 0; @@ -63,12 +63,19 @@ typedef struct _GameSessionData #else typedef struct _GameSessionData { - unsigned short netVersion; // 2 bytes - unsigned int m_uiGameHostSettings; // 4 bytes - unsigned int texturePackParentId; // 4 bytes - unsigned char subTexturePackId; // 1 byte + unsigned short netVersion; + unsigned int m_uiGameHostSettings; + unsigned int texturePackParentId; + unsigned char subTexturePackId; - bool isReadyToJoin; // 1 byte + bool isReadyToJoin; + bool isJoinable; + + char hostIP[64]; + int hostPort; + wchar_t hostName[XUSER_NAME_SIZE]; + unsigned char playerCount; + unsigned char maxPlayers; _GameSessionData() { @@ -76,6 +83,13 @@ typedef struct _GameSessionData m_uiGameHostSettings = 0; texturePackParentId = 0; subTexturePackId = 0; + isReadyToJoin = false; + isJoinable = true; + memset(hostIP, 0, sizeof(hostIP)); + hostPort = 0; + memset(hostName, 0, sizeof(hostName)); + playerCount = 0; + maxPlayers = MINECRAFT_NET_MAX_PLAYERS; } } GameSessionData; #endif @@ -91,7 +105,7 @@ public: #elif defined(_DURANGO) DQRNetworkManager::SessionSearchResult searchResult; #endif - wchar_t *displayLabel; + wchar_t* displayLabel; unsigned char displayLabelLength; unsigned char displayLabelViewableStartIndex; GameSessionData data; @@ -107,7 +121,7 @@ public: ~FriendSessionInfo() { - if(displayLabel!=NULL) + if (displayLabel != NULL) delete displayLabel; } }; diff --git a/Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp index 4e48e3959..2059c76fa 100644 --- a/Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp @@ -284,13 +284,8 @@ UIScene_LoadOrJoinMenu::~UIScene_LoadOrJoinMenu() g_NetworkManager.SetSessionsUpdatedCallback( NULL, NULL ); app.SetLiveLinkRequired( false ); - if(m_currentSessions) - { - for(AUTO_VAR(it, m_currentSessions->begin()); it < m_currentSessions->end(); ++it) - { - delete (*it); - } - } + delete m_currentSessions; + m_currentSessions = NULL; #if TO_BE_IMPLEMENTED // Reset the background downloading, in case we changed it by attempting to download a texture pack diff --git a/Minecraft.Client/Common/UI/UIScene_SettingsGraphicsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_SettingsGraphicsMenu.cpp index 1234121e9..9bf3b983b 100644 --- a/Minecraft.Client/Common/UI/UIScene_SettingsGraphicsMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_SettingsGraphicsMenu.cpp @@ -1,11 +1,14 @@ #include "stdafx.h" #include "UI.h" #include "UIScene_SettingsGraphicsMenu.h" +#include "..\..\Minecraft.h" +#include "..\..\GameRenderer.h" UIScene_SettingsGraphicsMenu::UIScene_SettingsGraphicsMenu(int iPad, void *initData, UILayer *parentLayer) : UIScene(iPad, parentLayer) { // Setup all the Iggy references we need for this scene initialiseMovie(); + Minecraft* pMinecraft = Minecraft::GetInstance(); m_bNotInGame=(Minecraft::GetInstance()->level==NULL); @@ -18,6 +21,9 @@ UIScene_SettingsGraphicsMenu::UIScene_SettingsGraphicsMenu(int iPad, void *initD swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_GAMMA ),app.GetGameSettings(m_iPad,eGameSetting_Gamma)); m_sliderGamma.init(TempString,eControl_Gamma,0,100,app.GetGameSettings(m_iPad,eGameSetting_Gamma)); + + swprintf((WCHAR*)TempString, 256, L"FOV: %d%%", (int)pMinecraft->gameRenderer->GetFovVal()); + m_sliderFOV.init(TempString, eControl_FOV, 70, 110, (int)pMinecraft->gameRenderer->GetFovVal()); swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_INTERFACEOPACITY ),app.GetGameSettings(m_iPad,eGameSetting_InterfaceOpacity)); m_sliderInterfaceOpacity.init(TempString,eControl_InterfaceOpacity,0,100,app.GetGameSettings(m_iPad,eGameSetting_InterfaceOpacity)); @@ -141,6 +147,17 @@ void UIScene_SettingsGraphicsMenu::handleSliderMove(F64 sliderId, F64 currentVal m_sliderGamma.setLabel(TempString); break; + + case eControl_FOV: + { + Minecraft* pMinecraft = Minecraft::GetInstance(); + pMinecraft->gameRenderer->SetFovVal((float)currentValue); + WCHAR TempString[256]; + swprintf((WCHAR*)TempString, 256, L"FOV: %d%%", (int)currentValue); + m_sliderFOV.setLabel(TempString); + } + break; + case eControl_InterfaceOpacity: m_sliderInterfaceOpacity.handleSliderMove(value); diff --git a/Minecraft.Client/Common/UI/UIScene_SettingsGraphicsMenu.h b/Minecraft.Client/Common/UI/UIScene_SettingsGraphicsMenu.h index e9c4905cd..c6e1e394f 100644 --- a/Minecraft.Client/Common/UI/UIScene_SettingsGraphicsMenu.h +++ b/Minecraft.Client/Common/UI/UIScene_SettingsGraphicsMenu.h @@ -11,16 +11,18 @@ private: eControl_BedrockFog, eControl_CustomSkinAnim, eControl_Gamma, + eControl_FOV, eControl_InterfaceOpacity }; UIControl_CheckBox m_checkboxClouds, m_checkboxBedrockFog, m_checkboxCustomSkinAnim; // Checkboxes - UIControl_Slider m_sliderGamma, m_sliderInterfaceOpacity; // Sliders + UIControl_Slider m_sliderGamma, m_sliderFOV, m_sliderInterfaceOpacity; // Sliders UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene) UI_MAP_ELEMENT( m_checkboxClouds, "Clouds") UI_MAP_ELEMENT( m_checkboxBedrockFog, "BedrockFog") UI_MAP_ELEMENT( m_checkboxCustomSkinAnim, "CustomSkinAnim") UI_MAP_ELEMENT( m_sliderGamma, "Gamma") + UI_MAP_ELEMENT(m_sliderFOV, "FOV") UI_MAP_ELEMENT( m_sliderInterfaceOpacity, "InterfaceOpacity") UI_END_MAP_ELEMENTS_AND_NAMES() diff --git a/Minecraft.Client/Extrax64Stubs.cpp b/Minecraft.Client/Extrax64Stubs.cpp index f6ad76c17..23b2c7f0e 100644 --- a/Minecraft.Client/Extrax64Stubs.cpp +++ b/Minecraft.Client/Extrax64Stubs.cpp @@ -20,6 +20,7 @@ #include "StatsCounter.h" #include "Windows64\Social\SocialManager.h" #include "Windows64\Sentient\DynamicConfigurations.h" +#include "Windows64\Network\WinsockNetLayer.h" #elif defined __PSVITA__ #include "PSVita\Sentient\SentientManager.h" #include "StatsCounter.h" @@ -46,63 +47,63 @@ CXuiStringTable StringTable; #ifndef _XBOX_ONE ATG::XMLParser::XMLParser() {} ATG::XMLParser::~XMLParser() {} -HRESULT ATG::XMLParser::ParseXMLBuffer( CONST CHAR* strBuffer, UINT uBufferSize ) { return S_OK; } -VOID ATG::XMLParser::RegisterSAXCallbackInterface( ISAXCallback *pISAXCallback ) {} +HRESULT ATG::XMLParser::ParseXMLBuffer(CONST CHAR* strBuffer, UINT uBufferSize) { return S_OK; } +VOID ATG::XMLParser::RegisterSAXCallbackInterface(ISAXCallback* pISAXCallback) {} #endif bool CSocialManager::IsTitleAllowedToPostAnything() { return false; } bool CSocialManager::AreAllUsersAllowedToPostImages() { return false; } bool CSocialManager::IsTitleAllowedToPostImages() { return false; } -bool CSocialManager::PostLinkToSocialNetwork( ESocialNetwork eSocialNetwork, DWORD dwUserIndex, bool bUsingKinect ) { return false; } -bool CSocialManager::PostImageToSocialNetwork( ESocialNetwork eSocialNetwork, DWORD dwUserIndex, bool bUsingKinect ) { return false; } -CSocialManager *CSocialManager::Instance() { return NULL; } +bool CSocialManager::PostLinkToSocialNetwork(ESocialNetwork eSocialNetwork, DWORD dwUserIndex, bool bUsingKinect) { return false; } +bool CSocialManager::PostImageToSocialNetwork(ESocialNetwork eSocialNetwork, DWORD dwUserIndex, bool bUsingKinect) { return false; } +CSocialManager* CSocialManager::Instance() { return NULL; } void CSocialManager::SetSocialPostText(LPCWSTR Title, LPCWSTR Caption, LPCWSTR Desc) {}; DWORD XShowPartyUI(DWORD dwUserIndex) { return 0; } DWORD XShowFriendsUI(DWORD dwUserIndex) { return 0; } -HRESULT XPartyGetUserList(XPARTY_USER_LIST *pUserList) { return S_OK; } -DWORD XContentGetThumbnail(DWORD dwUserIndex, const XCONTENT_DATA *pContentData, PBYTE pbThumbnail, PDWORD pcbThumbnail, PXOVERLAPPED *pOverlapped) { return 0; } +HRESULT XPartyGetUserList(XPARTY_USER_LIST* pUserList) { return S_OK; } +DWORD XContentGetThumbnail(DWORD dwUserIndex, const XCONTENT_DATA* pContentData, PBYTE pbThumbnail, PDWORD pcbThumbnail, PXOVERLAPPED* pOverlapped) { return 0; } void XShowAchievementsUI(int i) {} DWORD XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE Mode) { return 0; } #ifndef _DURANGO -void PIXAddNamedCounter(int a, char *b, ...) {} +void PIXAddNamedCounter(int a, char* b, ...) {} //#define PS3_USE_PIX_EVENTS //#define PS4_USE_PIX_EVENTS -void PIXBeginNamedEvent(int a, char *b, ...) +void PIXBeginNamedEvent(int a, char* b, ...) { #ifdef PS4_USE_PIX_EVENTS char buf[512]; - va_list args; - va_start(args,b); - vsprintf(buf,b,args); + va_list args; + va_start(args, b); + vsprintf(buf, b, args); sceRazorCpuPushMarker(buf, 0xffffffff, SCE_RAZOR_MARKER_ENABLE_HUD); #endif #ifdef PS3_USE_PIX_EVENTS char buf[256]; wchar_t wbuf[256]; - va_list args; - va_start(args,b); - vsprintf(buf,b,args); + va_list args; + va_start(args, b); + vsprintf(buf, b, args); snPushMarker(buf); -// mbstowcs(wbuf,buf,256); -// RenderManager.BeginEvent(wbuf); - va_end(args); + // mbstowcs(wbuf,buf,256); + // RenderManager.BeginEvent(wbuf); + va_end(args); #endif } #if 0//__PSVITA__ - if( PixDepth < 64 ) - { - char buf[512]; - va_list args; - va_start(args,b); - vsprintf(buf,b,args); - sceRazorCpuPushMarkerWithHud(buf, 0xffffffff, SCE_RAZOR_MARKER_ENABLE_HUD); - } - PixDepth += 1; +if (PixDepth < 64) +{ + char buf[512]; + va_list args; + va_start(args, b); + vsprintf(buf, b, args); + sceRazorCpuPushMarkerWithHud(buf, 0xffffffff, SCE_RAZOR_MARKER_ENABLE_HUD); +} +PixDepth += 1; #endif @@ -113,17 +114,17 @@ void PIXEndNamedEvent() #endif #ifdef PS3_USE_PIX_EVENTS snPopMarker(); -// RenderManager.EndEvent(); + // RenderManager.EndEvent(); #endif #if 0//__PSVITA__ - if( PixDepth <= 64 ) + if (PixDepth <= 64) { sceRazorCpuPopMarker(); } PixDepth -= 1; #endif } -void PIXSetMarkerDeprecated(int a, char *b, ...) {} +void PIXSetMarkerDeprecated(int a, char* b, ...) {} #else // 4J Stu - Removed this implementation in favour of a macro that will convert our string format // conversion at compile time rather than at runtime @@ -175,37 +176,33 @@ bool IsEqualXUID(PlayerUID a, PlayerUID b) #endif } -void XMemCpy(void *a, const void *b, size_t s) { memcpy(a, b, s); } -void XMemSet(void *a, int t, size_t s) { memset(a, t, s); } -void XMemSet128(void *a, int t, size_t s) { memset(a, t, s); } -void *XPhysicalAlloc(SIZE_T a, ULONG_PTR b, ULONG_PTR c, DWORD d) { return malloc(a); } -void XPhysicalFree(void *a) { free(a); } +void XMemCpy(void* a, const void* b, size_t s) { memcpy(a, b, s); } +void XMemSet(void* a, int t, size_t s) { memset(a, t, s); } +void XMemSet128(void* a, int t, size_t s) { memset(a, t, s); } +void* XPhysicalAlloc(SIZE_T a, ULONG_PTR b, ULONG_PTR c, DWORD d) { return malloc(a); } +void XPhysicalFree(void* a) { free(a); } D3DXVECTOR3::D3DXVECTOR3() {} -D3DXVECTOR3::D3DXVECTOR3(float x,float y,float z) : x(x), y(y), z(z) {} -D3DXVECTOR3& D3DXVECTOR3::operator += ( CONST D3DXVECTOR3& add ) { x += add.x; y += add.y; z += add.z; return *this; } +D3DXVECTOR3::D3DXVECTOR3(float x, float y, float z) : x(x), y(y), z(z) {} +D3DXVECTOR3& D3DXVECTOR3::operator += (CONST D3DXVECTOR3 & add) { x += add.x; y += add.y; z += add.z; return *this; } -BYTE IQNetPlayer::GetSmallId() { return 0; } -void IQNetPlayer::SendData(IQNetPlayer *player, const void *pvData, DWORD dwDataSize, DWORD dwFlags) +BYTE IQNetPlayer::GetSmallId() { return m_smallId; } +void IQNetPlayer::SendData(IQNetPlayer * player, const void* pvData, DWORD dwDataSize, DWORD dwFlags) { - app.DebugPrintf("Sending from 0x%x to 0x%x %d bytes\n",this,player,dwDataSize); + if (WinsockNetLayer::IsActive()) + { + WinsockNetLayer::SendToSmallId(player->m_smallId, pvData, dwDataSize); + } } -bool IQNetPlayer::IsSameSystem(IQNetPlayer *player) { return true; } -DWORD IQNetPlayer::GetSendQueueSize( IQNetPlayer *player, DWORD dwFlags ) { return 0; } +bool IQNetPlayer::IsSameSystem(IQNetPlayer * player) { return (this == player) || (!m_isRemote && !player->m_isRemote); } +DWORD IQNetPlayer::GetSendQueueSize(IQNetPlayer * player, DWORD dwFlags) { return 0; } DWORD IQNetPlayer::GetCurrentRtt() { return 0; } -bool IQNetPlayer::IsHost() { return this == &IQNet::m_player[0]; } +bool IQNetPlayer::IsHost() { return m_isHostPlayer; } bool IQNetPlayer::IsGuest() { return false; } bool IQNetPlayer::IsLocal() { return true; } PlayerUID IQNetPlayer::GetXuid() { return INVALID_XUID; } -LPCWSTR IQNetPlayer::GetGamertag() -{ - static wchar_t tags[4][16]; - int idx = GetUserIndex(); - if(idx < 0 || idx >= 4) idx = 0; - mbstowcs(tags[idx], ProfileManager.GetGamertag(idx), 15); - tags[idx][15] = L'\0'; - return tags[idx]; -} +extern wstring g_playerName; +LPCWSTR IQNetPlayer::GetGamertag() { return g_playerName.empty() ? L"Windows" : g_playerName.c_str(); } int IQNetPlayer::GetSessionIndex() { return 0; } bool IQNetPlayer::IsTalking() { return false; } bool IQNetPlayer::IsMutedByLocalUser(DWORD dwUserIndex) { return false; } @@ -219,22 +216,104 @@ ULONG_PTR IQNetPlayer::GetCustomDataValue() { return m_customData; } -IQNetPlayer IQNet::m_player[4]; +IQNetPlayer IQNet::m_player[MINECRAFT_NET_MAX_PLAYERS]; +DWORD IQNet::s_playerCount = 1; +bool IQNet::s_isHosting = true; -bool _bQNetStubGameRunning = false; +QNET_STATE _iQNetStubState = QNET_STATE_IDLE; -HRESULT IQNet::AddLocalPlayerByUserIndex(DWORD dwUserIndex){ return S_OK; } -IQNetPlayer *IQNet::GetHostPlayer() { return &m_player[0]; } -IQNetPlayer *IQNet::GetLocalPlayerByUserIndex(DWORD dwUserIndex) { return &m_player[dwUserIndex]; } -IQNetPlayer *IQNet::GetPlayerByIndex(DWORD dwPlayerIndex) { return &m_player[0]; } -IQNetPlayer *IQNet::GetPlayerBySmallId(BYTE SmallId){ return &m_player[0]; } -IQNetPlayer *IQNet::GetPlayerByXuid(PlayerUID xuid){ return &m_player[0]; } -DWORD IQNet::GetPlayerCount() { return 1; } -QNET_STATE IQNet::GetState() { return _bQNetStubGameRunning ? QNET_STATE_GAME_PLAY : QNET_STATE_IDLE; } -bool IQNet::IsHost() { return true; } -HRESULT IQNet::JoinGameFromInviteInfo(DWORD dwUserIndex, DWORD dwUserMask, const INVITE_INFO *pInviteInfo) { return S_OK; } -void IQNet::HostGame() { _bQNetStubGameRunning = true; } -void IQNet::EndGame() { _bQNetStubGameRunning = false; } +void Win64_SetupRemoteQNetPlayer(IQNetPlayer * player, BYTE smallId, bool isHost, bool isLocal) +{ + player->m_smallId = smallId; + player->m_isRemote = !isLocal; + player->m_isHostPlayer = isHost; + swprintf_s(player->m_gamertag, 32, L"Player%d", smallId); + if (smallId >= IQNet::s_playerCount) + IQNet::s_playerCount = smallId + 1; +} + +HRESULT IQNet::AddLocalPlayerByUserIndex(DWORD dwUserIndex) { return S_OK; } +IQNetPlayer* IQNet::GetHostPlayer() { return &m_player[0]; } +IQNetPlayer* IQNet::GetLocalPlayerByUserIndex(DWORD dwUserIndex) +{ + if (s_isHosting) + { + if (dwUserIndex < MINECRAFT_NET_MAX_PLAYERS && !m_player[dwUserIndex].m_isRemote) + return &m_player[dwUserIndex]; + return NULL; + } + if (dwUserIndex != 0) + return NULL; + for (DWORD i = 0; i < s_playerCount; i++) + { + if (!m_player[i].m_isRemote) + return &m_player[i]; + } + return NULL; +} +static bool Win64_IsActivePlayer(IQNetPlayer * p, DWORD index) +{ + if (index == 0) return true; + return (p->GetCustomDataValue() != 0); +} + +IQNetPlayer* IQNet::GetPlayerByIndex(DWORD dwPlayerIndex) +{ + DWORD found = 0; + for (DWORD i = 0; i < s_playerCount; i++) + { + if (Win64_IsActivePlayer(&m_player[i], i)) + { + if (found == dwPlayerIndex) return &m_player[i]; + found++; + } + } + return &m_player[0]; +} +IQNetPlayer* IQNet::GetPlayerBySmallId(BYTE SmallId) +{ + for (DWORD i = 0; i < s_playerCount; i++) + { + if (m_player[i].m_smallId == SmallId && Win64_IsActivePlayer(&m_player[i], i)) return &m_player[i]; + } + return NULL; +} +IQNetPlayer* IQNet::GetPlayerByXuid(PlayerUID xuid) +{ + for (DWORD i = 0; i < s_playerCount; i++) + { + if (Win64_IsActivePlayer(&m_player[i], i) && m_player[i].GetXuid() == xuid) return &m_player[i]; + } + return &m_player[0]; +} +DWORD IQNet::GetPlayerCount() +{ + DWORD count = 0; + for (DWORD i = 0; i < s_playerCount; i++) + { + if (Win64_IsActivePlayer(&m_player[i], i)) count++; + } + return count; +} +QNET_STATE IQNet::GetState() { return _iQNetStubState; } +bool IQNet::IsHost() { return s_isHosting; } +HRESULT IQNet::JoinGameFromInviteInfo(DWORD dwUserIndex, DWORD dwUserMask, const INVITE_INFO * pInviteInfo) { return S_OK; } +void IQNet::HostGame() { _iQNetStubState = QNET_STATE_SESSION_STARTING; s_isHosting = true; } +void IQNet::ClientJoinGame() { _iQNetStubState = QNET_STATE_SESSION_STARTING; s_isHosting = false; } +void IQNet::EndGame() +{ + _iQNetStubState = QNET_STATE_IDLE; + s_isHosting = false; + s_playerCount = 1; + for (int i = 1; i < MINECRAFT_NET_MAX_PLAYERS; i++) + { + m_player[i].m_smallId = 0; + m_player[i].m_isRemote = false; + m_player[i].m_isHostPlayer = false; + m_player[i].m_gamertag[0] = 0; + m_player[i].SetCustomDataValue(0); + } +} DWORD MinecraftDynamicConfigurations::GetTrialTime() { return DYNAMIC_CONFIG_DEFAULT_TRIAL_TIME; } @@ -244,9 +323,9 @@ void XSetThreadProcessor(HANDLE a, int b) {} // #endif // __PS3__ DWORD XUserGetSigninInfo( - DWORD dwUserIndex, - DWORD dwFlags, - PXUSER_SIGNIN_INFO pSigninInfo + DWORD dwUserIndex, + DWORD dwFlags, + PXUSER_SIGNIN_INFO pSigninInfo ) { return 0; @@ -257,16 +336,16 @@ LPCWSTR CXuiStringTable::Lookup(UINT nIndex) { return L"String"; } void CXuiStringTable::Clear() {} HRESULT CXuiStringTable::Load(LPCWSTR szId) { return S_OK; } -DWORD XUserAreUsersFriends( DWORD dwUserIndex, PPlayerUID pXuids, DWORD dwXuidCount, PBOOL pfResult, void *pOverlapped) { return 0; } +DWORD XUserAreUsersFriends(DWORD dwUserIndex, PPlayerUID pXuids, DWORD dwXuidCount, PBOOL pfResult, void* pOverlapped) { return 0; } #if defined __ORBIS__ || defined __PS3__ || defined _XBOX_ONE #else HRESULT XMemDecompress( - XMEMDECOMPRESSION_CONTEXT Context, - VOID *pDestination, - SIZE_T *pDestSize, - CONST VOID *pSource, - SIZE_T SrcSize + XMEMDECOMPRESSION_CONTEXT Context, + VOID * pDestination, + SIZE_T * pDestSize, + CONST VOID * pSource, + SIZE_T SrcSize ) { memcpy(pDestination, pSource, SrcSize); @@ -276,12 +355,12 @@ HRESULT XMemDecompress( /* DECOMPRESSOR_HANDLE Decompressor = (DECOMPRESSOR_HANDLE)Context; if( Decompress( - Decompressor, // Decompressor handle - (void *)pSource, // Compressed data - SrcSize, // Compressed data size - pDestination, // Decompressed buffer - *pDestSize, // Decompressed buffer size - pDestSize) ) // Decompressed data size + Decompressor, // Decompressor handle + (void *)pSource, // Compressed data + SrcSize, // Compressed data size + pDestination, // Decompressed buffer + *pDestSize, // Decompressed buffer size + pDestSize) ) // Decompressed data size { return S_OK; } @@ -293,11 +372,11 @@ HRESULT XMemDecompress( } HRESULT XMemCompress( - XMEMCOMPRESSION_CONTEXT Context, - VOID *pDestination, - SIZE_T *pDestSize, - CONST VOID *pSource, - SIZE_T SrcSize + XMEMCOMPRESSION_CONTEXT Context, + VOID * pDestination, + SIZE_T * pDestSize, + CONST VOID * pSource, + SIZE_T SrcSize ) { memcpy(pDestination, pSource, SrcSize); @@ -324,10 +403,10 @@ HRESULT XMemCompress( } HRESULT XMemCreateCompressionContext( - XMEMCODEC_TYPE CodecType, - CONST VOID *pCodecParams, - DWORD Flags, - XMEMCOMPRESSION_CONTEXT *pContext + XMEMCODEC_TYPE CodecType, + CONST VOID * pCodecParams, + DWORD Flags, + XMEMCOMPRESSION_CONTEXT * pContext ) { /* @@ -345,10 +424,10 @@ HRESULT XMemCreateCompressionContext( } HRESULT XMemCreateDecompressionContext( - XMEMCODEC_TYPE CodecType, - CONST VOID *pCodecParams, - DWORD Flags, - XMEMDECOMPRESSION_CONTEXT *pContext + XMEMCODEC_TYPE CodecType, + CONST VOID * pCodecParams, + DWORD Flags, + XMEMDECOMPRESSION_CONTEXT * pContext ) { /* @@ -367,14 +446,14 @@ HRESULT XMemCreateDecompressionContext( void XMemDestroyCompressionContext(XMEMCOMPRESSION_CONTEXT Context) { -// COMPRESSOR_HANDLE Compressor = (COMPRESSOR_HANDLE)Context; -// CloseCompressor(Compressor); + // COMPRESSOR_HANDLE Compressor = (COMPRESSOR_HANDLE)Context; + // CloseCompressor(Compressor); } void XMemDestroyDecompressionContext(XMEMDECOMPRESSION_CONTEXT Context) { -// DECOMPRESSOR_HANDLE Decompressor = (DECOMPRESSOR_HANDLE)Context; -// CloseDecompressor(Decompressor); + // DECOMPRESSOR_HANDLE Decompressor = (DECOMPRESSOR_HANDLE)Context; + // CloseDecompressor(Decompressor); } #endif @@ -389,62 +468,62 @@ DWORD XEnableGuestSignin(BOOL fEnable) { return 0; } /////////////////////////////////////////////// Profile library #ifdef _WINDOWS64 -static void *profileData[4]; +static void* profileData[4]; static bool s_bProfileIsFullVersion; -void C_4JProfile::Initialise( DWORD dwTitleID, - DWORD dwOfferID, - unsigned short usProfileVersion, - UINT uiProfileValuesC, - UINT uiProfileSettingsC, - DWORD *pdwProfileSettingsA, - int iGameDefinedDataSizeX4, - unsigned int *puiGameDefinedDataChangedBitmask) +void C_4JProfile::Initialise(DWORD dwTitleID, + DWORD dwOfferID, + unsigned short usProfileVersion, + UINT uiProfileValuesC, + UINT uiProfileSettingsC, + DWORD * pdwProfileSettingsA, + int iGameDefinedDataSizeX4, + unsigned int* puiGameDefinedDataChangedBitmask) { - for( int i = 0; i < 4; i++ ) + for (int i = 0; i < 4; i++) { - profileData[i] = new byte[iGameDefinedDataSizeX4/4]; - ZeroMemory(profileData[i],sizeof(byte)*iGameDefinedDataSizeX4/4); + profileData[i] = new byte[iGameDefinedDataSizeX4 / 4]; + ZeroMemory(profileData[i], sizeof(byte) * iGameDefinedDataSizeX4 / 4); // Set some sane initial values! - GAME_SETTINGS *pGameSettings = (GAME_SETTINGS *)profileData[i]; - pGameSettings->ucMenuSensitivity=100; //eGameSetting_Sensitivity_InMenu - pGameSettings->ucInterfaceOpacity=80; //eGameSetting_Sensitivity_InMenu - pGameSettings->usBitmaskValues|=0x0200; //eGameSetting_DisplaySplitscreenGamertags - on - pGameSettings->usBitmaskValues|=0x0400; //eGameSetting_Hints - on - pGameSettings->usBitmaskValues|=0x1000; //eGameSetting_Autosave - 2 - pGameSettings->usBitmaskValues|=0x8000; //eGameSetting_Tooltips - on - pGameSettings->uiBitmaskValues=0L; // reset - pGameSettings->uiBitmaskValues|=GAMESETTING_CLOUDS; //eGameSetting_Clouds - on - pGameSettings->uiBitmaskValues|=GAMESETTING_ONLINE; //eGameSetting_GameSetting_Online - on - pGameSettings->uiBitmaskValues|=GAMESETTING_FRIENDSOFFRIENDS; //eGameSetting_GameSetting_FriendsOfFriends - on - pGameSettings->uiBitmaskValues|=GAMESETTING_DISPLAYUPDATEMSG; //eGameSetting_DisplayUpdateMessage (counter) - pGameSettings->uiBitmaskValues&=~GAMESETTING_BEDROCKFOG; //eGameSetting_BedrockFog - off - pGameSettings->uiBitmaskValues|=GAMESETTING_DISPLAYHUD; //eGameSetting_DisplayHUD - on - pGameSettings->uiBitmaskValues|=GAMESETTING_DISPLAYHAND; //eGameSetting_DisplayHand - on - pGameSettings->uiBitmaskValues|=GAMESETTING_CUSTOMSKINANIM; //eGameSetting_CustomSkinAnim - on - pGameSettings->uiBitmaskValues|=GAMESETTING_DEATHMESSAGES; //eGameSetting_DeathMessages - on - pGameSettings->uiBitmaskValues|=(GAMESETTING_UISIZE&0x00000800); // uisize 2 - pGameSettings->uiBitmaskValues|=(GAMESETTING_UISIZE_SPLITSCREEN&0x00004000); // splitscreen ui size 3 - pGameSettings->uiBitmaskValues|=GAMESETTING_ANIMATEDCHARACTER; //eGameSetting_AnimatedCharacter - on + GAME_SETTINGS* pGameSettings = (GAME_SETTINGS*)profileData[i]; + pGameSettings->ucMenuSensitivity = 100; //eGameSetting_Sensitivity_InMenu + pGameSettings->ucInterfaceOpacity = 80; //eGameSetting_Sensitivity_InMenu + pGameSettings->usBitmaskValues |= 0x0200; //eGameSetting_DisplaySplitscreenGamertags - on + pGameSettings->usBitmaskValues |= 0x0400; //eGameSetting_Hints - on + pGameSettings->usBitmaskValues |= 0x1000; //eGameSetting_Autosave - 2 + pGameSettings->usBitmaskValues |= 0x8000; //eGameSetting_Tooltips - on + pGameSettings->uiBitmaskValues = 0L; // reset + pGameSettings->uiBitmaskValues |= GAMESETTING_CLOUDS; //eGameSetting_Clouds - on + pGameSettings->uiBitmaskValues |= GAMESETTING_ONLINE; //eGameSetting_GameSetting_Online - on + pGameSettings->uiBitmaskValues |= GAMESETTING_FRIENDSOFFRIENDS; //eGameSetting_GameSetting_FriendsOfFriends - on + pGameSettings->uiBitmaskValues |= GAMESETTING_DISPLAYUPDATEMSG; //eGameSetting_DisplayUpdateMessage (counter) + pGameSettings->uiBitmaskValues &= ~GAMESETTING_BEDROCKFOG; //eGameSetting_BedrockFog - off + pGameSettings->uiBitmaskValues |= GAMESETTING_DISPLAYHUD; //eGameSetting_DisplayHUD - on + pGameSettings->uiBitmaskValues |= GAMESETTING_DISPLAYHAND; //eGameSetting_DisplayHand - on + pGameSettings->uiBitmaskValues |= GAMESETTING_CUSTOMSKINANIM; //eGameSetting_CustomSkinAnim - on + pGameSettings->uiBitmaskValues |= GAMESETTING_DEATHMESSAGES; //eGameSetting_DeathMessages - on + pGameSettings->uiBitmaskValues |= (GAMESETTING_UISIZE & 0x00000800); // uisize 2 + pGameSettings->uiBitmaskValues |= (GAMESETTING_UISIZE_SPLITSCREEN & 0x00004000); // splitscreen ui size 3 + pGameSettings->uiBitmaskValues |= GAMESETTING_ANIMATEDCHARACTER; //eGameSetting_AnimatedCharacter - on // TU12 // favorite skins added, but only set in TU12 - set to FFs - for(int i=0;iuiFavoriteSkinA[i]=0xFFFFFFFF; + pGameSettings->uiFavoriteSkinA[i] = 0xFFFFFFFF; } - pGameSettings->ucCurrentFavoriteSkinPos=0; + pGameSettings->ucCurrentFavoriteSkinPos = 0; // Added a bitmask in TU13 to enable/disable display of the Mash-up pack worlds in the saves list pGameSettings->uiMashUpPackWorldsDisplay = 0xFFFFFFFF; // PS3DEC13 - pGameSettings->uiBitmaskValues&=~GAMESETTING_PS3EULAREAD; //eGameSetting_PS3_EULA_Read - off + pGameSettings->uiBitmaskValues &= ~GAMESETTING_PS3EULAREAD; //eGameSetting_PS3_EULA_Read - off // PS3 1.05 - added Greek pGameSettings->ucLanguage = MINECRAFT_LANGUAGE_DEFAULT; // use the system language // PS Vita - network mode added - pGameSettings->uiBitmaskValues&=~GAMESETTING_PSVITANETWORKMODEADHOC; //eGameSetting_PSVita_NetworkModeAdhoc - off + pGameSettings->uiBitmaskValues &= ~GAMESETTING_PSVITANETWORKMODEADHOC; //eGameSetting_PSVita_NetworkModeAdhoc - off // Tutorials for most menus, and a few other things @@ -453,90 +532,91 @@ void C_4JProfile::Initialise( DWORD dwTitleID, pGameSettings->ucTutorialCompletion[2] = 0xF; // Has gone halfway through the tutorial - pGameSettings->ucTutorialCompletion[28] |= 1<<0; + pGameSettings->ucTutorialCompletion[28] |= 1 << 0; } } -void C_4JProfile::SetTrialTextStringTable(CXuiStringTable *pStringTable,int iAccept,int iReject) {} -void C_4JProfile::SetTrialAwardText(eAwardType AwardType,int iTitle,int iText) {} +void C_4JProfile::SetTrialTextStringTable(CXuiStringTable * pStringTable, int iAccept, int iReject) {} +void C_4JProfile::SetTrialAwardText(eAwardType AwardType, int iTitle, int iText) {} int C_4JProfile::GetLockedProfile() { return 0; } void C_4JProfile::SetLockedProfile(int iProf) {} -bool C_4JProfile::IsSignedIn(int iQuadrant) { return ( iQuadrant == 0); } +bool C_4JProfile::IsSignedIn(int iQuadrant) { return (iQuadrant == 0); } bool C_4JProfile::IsSignedInLive(int iProf) { return true; } bool C_4JProfile::IsGuest(int iQuadrant) { return false; } -UINT C_4JProfile::RequestSignInUI(bool bFromInvite,bool bLocalGame,bool bNoGuestsAllowed,bool bMultiplayerSignIn,bool bAddUser, int( *Func)(LPVOID,const bool, const int iPad),LPVOID lpParam,int iQuadrant) { return 0; } -UINT C_4JProfile::DisplayOfflineProfile(int( *Func)(LPVOID,const bool, const int iPad),LPVOID lpParam,int iQuadrant) { return 0; } -UINT C_4JProfile::RequestConvertOfflineToGuestUI(int( *Func)(LPVOID,const bool, const int iPad),LPVOID lpParam,int iQuadrant) { return 0; } +UINT C_4JProfile::RequestSignInUI(bool bFromInvite, bool bLocalGame, bool bNoGuestsAllowed, bool bMultiplayerSignIn, bool bAddUser, int(*Func)(LPVOID, const bool, const int iPad), LPVOID lpParam, int iQuadrant) { return 0; } +UINT C_4JProfile::DisplayOfflineProfile(int(*Func)(LPVOID, const bool, const int iPad), LPVOID lpParam, int iQuadrant) { return 0; } +UINT C_4JProfile::RequestConvertOfflineToGuestUI(int(*Func)(LPVOID, const bool, const int iPad), LPVOID lpParam, int iQuadrant) { return 0; } void C_4JProfile::SetPrimaryPlayerChanged(bool bVal) {} bool C_4JProfile::QuerySigninStatus(void) { return true; } -void C_4JProfile::GetXUID(int iPad, PlayerUID *pXuid,bool bOnlineXuid) {*pXuid = 0xe000d45248242f2e; } -BOOL C_4JProfile::AreXUIDSEqual(PlayerUID xuid1,PlayerUID xuid2) { return false; } +void C_4JProfile::GetXUID(int iPad, PlayerUID * pXuid, bool bOnlineXuid) +{ +#ifdef _WINDOWS64 + if (iPad != 0) + { + *pXuid = INVALID_XUID; + return; + } + if (IQNet::s_isHosting) + *pXuid = 0xe000d45248242f2e; + else + *pXuid = 0xe000d45248242f2e + WinsockNetLayer::GetLocalSmallId(); +#else + * pXuid = 0xe000d45248242f2e + iPad; +#endif +} +BOOL C_4JProfile::AreXUIDSEqual(PlayerUID xuid1, PlayerUID xuid2) { return xuid1 == xuid2; } BOOL C_4JProfile::XUIDIsGuest(PlayerUID xuid) { return false; } bool C_4JProfile::AllowedToPlayMultiplayer(int iProf) { return true; } #if defined(__ORBIS__) -bool C_4JProfile::GetChatAndContentRestrictions(int iPad, bool thisQuadrantOnly, bool *pbChatRestricted,bool *pbContentRestricted,int *piAge) +bool C_4JProfile::GetChatAndContentRestrictions(int iPad, bool thisQuadrantOnly, bool* pbChatRestricted, bool* pbContentRestricted, int* piAge) { - if(pbChatRestricted) *pbChatRestricted = false; - if(pbContentRestricted) *pbContentRestricted = false; - if(piAge) *piAge = 100; + if (pbChatRestricted) *pbChatRestricted = false; + if (pbContentRestricted) *pbContentRestricted = false; + if (piAge) *piAge = 100; return true; } #endif void C_4JProfile::StartTrialGame() {} -void C_4JProfile::AllowedPlayerCreatedContent(int iPad, bool thisQuadrantOnly, BOOL *allAllowed, BOOL *friendsAllowed) {} -BOOL C_4JProfile::CanViewPlayerCreatedContent(int iPad, bool thisQuadrantOnly, PPlayerUID pXuids, DWORD dwXuidCount ) { return true; } -bool C_4JProfile::GetProfileAvatar(int iPad,int( *Func)(LPVOID lpParam,PBYTE pbThumbnail,DWORD dwThumbnailBytes), LPVOID lpParam) { return false; } +void C_4JProfile::AllowedPlayerCreatedContent(int iPad, bool thisQuadrantOnly, BOOL * allAllowed, BOOL * friendsAllowed) {} +BOOL C_4JProfile::CanViewPlayerCreatedContent(int iPad, bool thisQuadrantOnly, PPlayerUID pXuids, DWORD dwXuidCount) { return true; } +bool C_4JProfile::GetProfileAvatar(int iPad, int(*Func)(LPVOID lpParam, PBYTE pbThumbnail, DWORD dwThumbnailBytes), LPVOID lpParam) { return false; } void C_4JProfile::CancelProfileAvatarRequest() {} int C_4JProfile::GetPrimaryPad() { return 0; } void C_4JProfile::SetPrimaryPad(int iPad) {} #ifdef _DURANGO char fakeGamerTag[32] = "PlayerName"; -void SetFakeGamertag(char *name){ strcpy_s(fakeGamerTag, name); } -char* C_4JProfile::GetGamertag(int iPad){ return fakeGamerTag; } +void SetFakeGamertag(char* name) { strcpy_s(fakeGamerTag, name); } +char* C_4JProfile::GetGamertag(int iPad) { return fakeGamerTag; } #else -char* C_4JProfile::GetGamertag(int iPad) -{ - static char tags[4][16] = { "Player 1", "Player 2", "Player 3", "Player 4" }; - if(iPad >= 0 && iPad < 4) return tags[iPad]; - return tags[0]; -} -wstring C_4JProfile::GetDisplayName(int iPad) -{ - switch(iPad) - { - case 1: return L"Player 2"; - case 2: return L"Player 3"; - case 3: return L"Player 4"; - default: return L"Player 1"; - } -} +char* C_4JProfile::GetGamertag(int iPad) { extern char g_Win64Username[17]; return g_Win64Username; } +wstring C_4JProfile::GetDisplayName(int iPad) { extern wchar_t g_Win64UsernameW[17]; return g_Win64UsernameW; } #endif bool C_4JProfile::IsFullVersion() { return s_bProfileIsFullVersion; } -void C_4JProfile::SetSignInChangeCallback(void ( *Func)(LPVOID, bool, unsigned int),LPVOID lpParam) {} -void C_4JProfile::SetNotificationsCallback(void ( *Func)(LPVOID, DWORD, unsigned int),LPVOID lpParam) {} +void C_4JProfile::SetSignInChangeCallback(void (*Func)(LPVOID, bool, unsigned int), LPVOID lpParam) {} +void C_4JProfile::SetNotificationsCallback(void (*Func)(LPVOID, DWORD, unsigned int), LPVOID lpParam) {} bool C_4JProfile::RegionIsNorthAmerica(void) { return false; } bool C_4JProfile::LocaleIsUSorCanada(void) { return false; } HRESULT C_4JProfile::GetLiveConnectionStatus() { return S_OK; } bool C_4JProfile::IsSystemUIDisplayed() { return false; } -void C_4JProfile::SetProfileReadErrorCallback(void ( *Func)(LPVOID), LPVOID lpParam) {} -int( *defaultOptionsCallback)(LPVOID,C_4JProfile::PROFILESETTINGS *, const int iPad) = NULL; +void C_4JProfile::SetProfileReadErrorCallback(void (*Func)(LPVOID), LPVOID lpParam) {} +int(*defaultOptionsCallback)(LPVOID, C_4JProfile::PROFILESETTINGS*, const int iPad) = NULL; LPVOID lpProfileParam = NULL; -int C_4JProfile::SetDefaultOptionsCallback(int( *Func)(LPVOID,PROFILESETTINGS *, const int iPad),LPVOID lpParam) +int C_4JProfile::SetDefaultOptionsCallback(int(*Func)(LPVOID, PROFILESETTINGS*, const int iPad), LPVOID lpParam) { defaultOptionsCallback = Func; lpProfileParam = lpParam; return 0; } -int C_4JProfile::SetOldProfileVersionCallback(int( *Func)(LPVOID,unsigned char *, const unsigned short,const int),LPVOID lpParam) { return 0; } +int C_4JProfile::SetOldProfileVersionCallback(int(*Func)(LPVOID, unsigned char*, const unsigned short, const int), LPVOID lpParam) { return 0; } // To store the dashboard preferences for controller flipped, etc. C_4JProfile::PROFILESETTINGS ProfileSettingsA[XUSER_MAX_COUNT]; -C_4JProfile::PROFILESETTINGS * C_4JProfile::GetDashboardProfileSettings(int iPad) { return &ProfileSettingsA[iPad]; } +C_4JProfile::PROFILESETTINGS* C_4JProfile::GetDashboardProfileSettings(int iPad) { return &ProfileSettingsA[iPad]; } void C_4JProfile::WriteToProfile(int iQuadrant, bool bGameDefinedDataChanged, bool bOverride5MinuteLimitOnProfileWrites) {} void C_4JProfile::ForceQueuedProfileWrites(int iPad) {} -void *C_4JProfile::GetGameDefinedProfileData(int iQuadrant) +void* C_4JProfile::GetGameDefinedProfileData(int iQuadrant) { // 4J Stu - Don't reset the options when we call this!! //defaultOptionsCallback(lpProfileParam, (C_4JProfile::PROFILESETTINGS *)profileData[iQuadrant], iQuadrant); @@ -545,9 +625,10 @@ void *C_4JProfile::GetGameDefinedProfileData(int iQuadrant) return profileData[iQuadrant]; } void C_4JProfile::ResetProfileProcessState() {} -void C_4JProfile::Tick( void ) {} -void C_4JProfile::RegisterAward(int iAwardNumber,int iGamerconfigID, eAwardType eType, bool bLeaderboardAffected, - CXuiStringTable*pStringTable, int iTitleStr, int iTextStr, int iAcceptStr, char *pszThemeName, unsigned int ulThemeSize) {} +void C_4JProfile::Tick(void) {} +void C_4JProfile::RegisterAward(int iAwardNumber, int iGamerconfigID, eAwardType eType, bool bLeaderboardAffected, + CXuiStringTable * pStringTable, int iTitleStr, int iTextStr, int iAcceptStr, char* pszThemeName, unsigned int ulThemeSize) { +} int C_4JProfile::GetAwardId(int iAwardNumber) { return 0; } eAwardType C_4JProfile::GetAwardType(int iAwardNumber) { return eAwardType_Achievement; } bool C_4JProfile::CanBeAwarded(int iQuadrant, int iAwardNumber) { return false; } @@ -555,11 +636,11 @@ void C_4JProfile::Award(int iQuadrant, int iAwardNumber, bool bForce) {} bool C_4JProfile::IsAwardsFlagSet(int iQuadrant, int iAward) { return false; } void C_4JProfile::RichPresenceInit(int iPresenceCount, int iContextCount) {} void C_4JProfile::RegisterRichPresenceContext(int iGameConfigContextID) {} -void C_4JProfile::SetRichPresenceContextValue(int iPad,int iContextID, int iVal) {} -void C_4JProfile::SetCurrentGameActivity(int iPad,int iNewPresence, bool bSetOthersToIdle) {} +void C_4JProfile::SetRichPresenceContextValue(int iPad, int iContextID, int iVal) {} +void C_4JProfile::SetCurrentGameActivity(int iPad, int iNewPresence, bool bSetOthersToIdle) {} void C_4JProfile::DisplayFullVersionPurchase(bool bRequired, int iQuadrant, int iUpsellParam) {} -void C_4JProfile::SetUpsellCallback(void ( *Func)(LPVOID lpParam, eUpsellType type, eUpsellResponse response, int iUserData),LPVOID lpParam) {} -void C_4JProfile::SetDebugFullOverride(bool bVal) {s_bProfileIsFullVersion = bVal;} +void C_4JProfile::SetUpsellCallback(void (*Func)(LPVOID lpParam, eUpsellType type, eUpsellResponse response, int iUserData), LPVOID lpParam) {} +void C_4JProfile::SetDebugFullOverride(bool bVal) { s_bProfileIsFullVersion = bVal; } void C_4JProfile::ShowProfileCard(int iPad, PlayerUID targetUid) {} /////////////////////////////////////////////// Storage library @@ -567,60 +648,60 @@ void C_4JProfile::ShowProfileCard(int iPad, PlayerUID targetUid) {} #if 0 C4JStorage::C4JStorage() {} void C4JStorage::Tick() {} -C4JStorage::EMessageResult C4JStorage::RequestMessageBox(UINT uiTitle, UINT uiText, UINT *uiOptionA,UINT uiOptionC, DWORD dwPad, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult),LPVOID lpParam, C4JStringTable *pStringTable, WCHAR *pwchFormatString,DWORD dwFocusButton) { return C4JStorage::EMessage_Undefined; } -C4JStorage::EMessageResult C4JStorage::GetMessageBoxResult() { return C4JStorage::EMessage_Undefined; } -bool C4JStorage::SetSaveDevice(int( *Func)(LPVOID,const bool),LPVOID lpParam, bool bForceResetOfSaveDevice) { return true; } -void C4JStorage::Init(LPCWSTR pwchDefaultSaveName,char *pszSavePackName,int iMinimumSaveSize, int( *Func)(LPVOID, const ESavingMessage, int),LPVOID lpParam) {} +C4JStorage::EMessageResult C4JStorage::RequestMessageBox(UINT uiTitle, UINT uiText, UINT * uiOptionA, UINT uiOptionC, DWORD dwPad, int(*Func)(LPVOID, int, const C4JStorage::EMessageResult), LPVOID lpParam, C4JStringTable * pStringTable, WCHAR * pwchFormatString, DWORD dwFocusButton) { return C4JStorage::EMessage_Undefined; } +C4JStorage::EMessageResult C4JStorage::GetMessageBoxResult() { return C4JStorage::EMessage_Undefined; } +bool C4JStorage::SetSaveDevice(int(*Func)(LPVOID, const bool), LPVOID lpParam, bool bForceResetOfSaveDevice) { return true; } +void C4JStorage::Init(LPCWSTR pwchDefaultSaveName, char* pszSavePackName, int iMinimumSaveSize, int(*Func)(LPVOID, const ESavingMessage, int), LPVOID lpParam) {} void C4JStorage::ResetSaveData() {} void C4JStorage::SetDefaultSaveNameForKeyboardDisplay(LPCWSTR pwchDefaultSaveName) {} void C4JStorage::SetSaveTitle(LPCWSTR pwchDefaultSaveName) {} LPCWSTR C4JStorage::GetSaveTitle() { return L""; } -bool C4JStorage::GetSaveUniqueNumber(INT *piVal) { return true; } -bool C4JStorage::GetSaveUniqueFilename(char *pszName) { return true; } -void C4JStorage::SetSaveUniqueFilename(char *szFilename) { } -void C4JStorage::SetState(ESaveGameControlState eControlState,int( *Func)(LPVOID,const bool),LPVOID lpParam) {} +bool C4JStorage::GetSaveUniqueNumber(INT * piVal) { return true; } +bool C4JStorage::GetSaveUniqueFilename(char* pszName) { return true; } +void C4JStorage::SetSaveUniqueFilename(char* szFilename) {} +void C4JStorage::SetState(ESaveGameControlState eControlState, int(*Func)(LPVOID, const bool), LPVOID lpParam) {} void C4JStorage::SetSaveDisabled(bool bDisable) {} bool C4JStorage::GetSaveDisabled(void) { return false; } unsigned int C4JStorage::GetSaveSize() { return 0; } -void C4JStorage::GetSaveData(void *pvData,unsigned int *pulBytes) {} +void C4JStorage::GetSaveData(void* pvData, unsigned int* pulBytes) {} PVOID C4JStorage::AllocateSaveData(unsigned int ulBytes) { return new char[ulBytes]; } -void C4JStorage::SaveSaveData(unsigned int ulBytes,PBYTE pbThumbnail,DWORD cbThumbnail,PBYTE pbTextData, DWORD dwTextLen) {} -void C4JStorage::CopySaveDataToNewSave(PBYTE pbThumbnail,DWORD cbThumbnail,WCHAR *wchNewName,int ( *Func)(LPVOID lpParam, bool), LPVOID lpParam) {} -void C4JStorage::SetSaveDeviceSelected(unsigned int uiPad,bool bSelected) {} +void C4JStorage::SaveSaveData(unsigned int ulBytes, PBYTE pbThumbnail, DWORD cbThumbnail, PBYTE pbTextData, DWORD dwTextLen) {} +void C4JStorage::CopySaveDataToNewSave(PBYTE pbThumbnail, DWORD cbThumbnail, WCHAR * wchNewName, int (*Func)(LPVOID lpParam, bool), LPVOID lpParam) {} +void C4JStorage::SetSaveDeviceSelected(unsigned int uiPad, bool bSelected) {} bool C4JStorage::GetSaveDeviceSelected(unsigned int iPad) { return true; } -C4JStorage::ELoadGameStatus C4JStorage::DoesSaveExist(bool *pbExists) { return C4JStorage::ELoadGame_Idle; } +C4JStorage::ELoadGameStatus C4JStorage::DoesSaveExist(bool* pbExists) { return C4JStorage::ELoadGame_Idle; } bool C4JStorage::EnoughSpaceForAMinSaveGame() { return true; } void C4JStorage::SetSaveMessageVPosition(float fY) {} //C4JStorage::ESGIStatus C4JStorage::GetSavesInfo(int iPad,bool ( *Func)(LPVOID, int, CACHEINFOSTRUCT *, int, HRESULT),LPVOID lpParam,char *pszSavePackName) { return C4JStorage::ESGIStatus_Idle; } -C4JStorage::ESaveGameState C4JStorage::GetSavesInfo(int iPad,int ( *Func)(LPVOID lpParam,SAVE_DETAILS *pSaveDetails,const bool),LPVOID lpParam,char *pszSavePackName) { return C4JStorage::ESaveGame_Idle; } +C4JStorage::ESaveGameState C4JStorage::GetSavesInfo(int iPad, int (*Func)(LPVOID lpParam, SAVE_DETAILS * pSaveDetails, const bool), LPVOID lpParam, char* pszSavePackName) { return C4JStorage::ESaveGame_Idle; } -void C4JStorage::GetSaveCacheFileInfo(DWORD dwFile,XCONTENT_DATA &xContentData) {} -void C4JStorage::GetSaveCacheFileInfo(DWORD dwFile, PBYTE *ppbImageData, DWORD *pdwImageBytes) {} -C4JStorage::ESaveGameState C4JStorage::LoadSaveData(PSAVE_INFO pSaveInfo,int( *Func)(LPVOID lpParam,const bool, const bool), LPVOID lpParam) {return C4JStorage::ESaveGame_Idle;} -C4JStorage::EDeleteGameStatus C4JStorage::DeleteSaveData(PSAVE_INFO pSaveInfo,int( *Func)(LPVOID lpParam,const bool), LPVOID lpParam) { return C4JStorage::EDeleteGame_Idle; } -PSAVE_DETAILS C4JStorage::ReturnSavesInfo() {return NULL;} +void C4JStorage::GetSaveCacheFileInfo(DWORD dwFile, XCONTENT_DATA & xContentData) {} +void C4JStorage::GetSaveCacheFileInfo(DWORD dwFile, PBYTE * ppbImageData, DWORD * pdwImageBytes) {} +C4JStorage::ESaveGameState C4JStorage::LoadSaveData(PSAVE_INFO pSaveInfo, int(*Func)(LPVOID lpParam, const bool, const bool), LPVOID lpParam) { return C4JStorage::ESaveGame_Idle; } +C4JStorage::EDeleteGameStatus C4JStorage::DeleteSaveData(PSAVE_INFO pSaveInfo, int(*Func)(LPVOID lpParam, const bool), LPVOID lpParam) { return C4JStorage::EDeleteGame_Idle; } +PSAVE_DETAILS C4JStorage::ReturnSavesInfo() { return NULL; } -void C4JStorage::RegisterMarketplaceCountsCallback(int ( *Func)(LPVOID lpParam, C4JStorage::DLC_TMS_DETAILS *, int), LPVOID lpParam ) {} -void C4JStorage::SetDLCPackageRoot(char *pszDLCRoot) {} -C4JStorage::EDLCStatus C4JStorage::GetDLCOffers(int iPad,int( *Func)(LPVOID, int, DWORD, int),LPVOID lpParam, DWORD dwOfferTypesBitmaskT) { return C4JStorage::EDLC_Idle; } +void C4JStorage::RegisterMarketplaceCountsCallback(int (*Func)(LPVOID lpParam, C4JStorage::DLC_TMS_DETAILS*, int), LPVOID lpParam) {} +void C4JStorage::SetDLCPackageRoot(char* pszDLCRoot) {} +C4JStorage::EDLCStatus C4JStorage::GetDLCOffers(int iPad, int(*Func)(LPVOID, int, DWORD, int), LPVOID lpParam, DWORD dwOfferTypesBitmaskT) { return C4JStorage::EDLC_Idle; } DWORD C4JStorage::CancelGetDLCOffers() { return 0; } void C4JStorage::ClearDLCOffers() {} -XMARKETPLACE_CONTENTOFFER_INFO& C4JStorage::GetOffer(DWORD dw) { static XMARKETPLACE_CONTENTOFFER_INFO retval = {0}; return retval; } +XMARKETPLACE_CONTENTOFFER_INFO& C4JStorage::GetOffer(DWORD dw) { static XMARKETPLACE_CONTENTOFFER_INFO retval = { 0 }; return retval; } int C4JStorage::GetOfferCount() { return 0; } -DWORD C4JStorage::InstallOffer(int iOfferIDC,ULONGLONG *ullOfferIDA,int( *Func)(LPVOID, int, int),LPVOID lpParam, bool bTrial) { return 0; } -DWORD C4JStorage::GetAvailableDLCCount( int iPad) { return 0; } -XCONTENT_DATA& C4JStorage::GetDLC(DWORD dw) { static XCONTENT_DATA retval = {0}; return retval; } -C4JStorage::EDLCStatus C4JStorage::GetInstalledDLC(int iPad,int( *Func)(LPVOID, int, int),LPVOID lpParam) { return C4JStorage::EDLC_Idle; } -DWORD C4JStorage::MountInstalledDLC(int iPad,DWORD dwDLC,int( *Func)(LPVOID, int, DWORD,DWORD),LPVOID lpParam,LPCSTR szMountDrive) { return 0; } +DWORD C4JStorage::InstallOffer(int iOfferIDC, ULONGLONG * ullOfferIDA, int(*Func)(LPVOID, int, int), LPVOID lpParam, bool bTrial) { return 0; } +DWORD C4JStorage::GetAvailableDLCCount(int iPad) { return 0; } +XCONTENT_DATA& C4JStorage::GetDLC(DWORD dw) { static XCONTENT_DATA retval = { 0 }; return retval; } +C4JStorage::EDLCStatus C4JStorage::GetInstalledDLC(int iPad, int(*Func)(LPVOID, int, int), LPVOID lpParam) { return C4JStorage::EDLC_Idle; } +DWORD C4JStorage::MountInstalledDLC(int iPad, DWORD dwDLC, int(*Func)(LPVOID, int, DWORD, DWORD), LPVOID lpParam, LPCSTR szMountDrive) { return 0; } DWORD C4JStorage::UnmountInstalledDLC(LPCSTR szMountDrive) { return 0; } -C4JStorage::ETMSStatus C4JStorage::ReadTMSFile(int iQuadrant,eGlobalStorage eStorageFacility,C4JStorage::eTMS_FileType eFileType, WCHAR *pwchFilename,BYTE **ppBuffer,DWORD *pdwBufferSize,int( *Func)(LPVOID, WCHAR *,int, bool, int),LPVOID lpParam, int iAction) { return C4JStorage::ETMSStatus_Idle; } -bool C4JStorage::WriteTMSFile(int iQuadrant,eGlobalStorage eStorageFacility,WCHAR *pwchFilename,BYTE *pBuffer,DWORD dwBufferSize) { return true; } -bool C4JStorage::DeleteTMSFile(int iQuadrant,eGlobalStorage eStorageFacility,WCHAR *pwchFilename) { return true; } -void C4JStorage::StoreTMSPathName(WCHAR *pwchName) {} -unsigned int C4JStorage::CRC(unsigned char *buf, int len) { return 0; } +C4JStorage::ETMSStatus C4JStorage::ReadTMSFile(int iQuadrant, eGlobalStorage eStorageFacility, C4JStorage::eTMS_FileType eFileType, WCHAR * pwchFilename, BYTE * *ppBuffer, DWORD * pdwBufferSize, int(*Func)(LPVOID, WCHAR*, int, bool, int), LPVOID lpParam, int iAction) { return C4JStorage::ETMSStatus_Idle; } +bool C4JStorage::WriteTMSFile(int iQuadrant, eGlobalStorage eStorageFacility, WCHAR * pwchFilename, BYTE * pBuffer, DWORD dwBufferSize) { return true; } +bool C4JStorage::DeleteTMSFile(int iQuadrant, eGlobalStorage eStorageFacility, WCHAR * pwchFilename) { return true; } +void C4JStorage::StoreTMSPathName(WCHAR * pwchName) {} +unsigned int C4JStorage::CRC(unsigned char* buf, int len) { return 0; } struct PTMSPP_FILEDATA; -C4JStorage::ETMSStatus C4JStorage::TMSPP_ReadFile(int iPad,C4JStorage::eGlobalStorage eStorageFacility,C4JStorage::eTMS_FILETYPEVAL eFileTypeVal,LPCSTR szFilename,int( *Func)(LPVOID,int,int,PTMSPP_FILEDATA, LPCSTR)/*=NULL*/,LPVOID lpParam/*=NULL*/, int iUserData/*=0*/) {return C4JStorage::ETMSStatus_Idle;} +C4JStorage::ETMSStatus C4JStorage::TMSPP_ReadFile(int iPad, C4JStorage::eGlobalStorage eStorageFacility, C4JStorage::eTMS_FILETYPEVAL eFileTypeVal, LPCSTR szFilename, int(*Func)(LPVOID, int, int, PTMSPP_FILEDATA, LPCSTR)/*=NULL*/, LPVOID lpParam/*=NULL*/, int iUserData/*=0*/) { return C4JStorage::ETMSStatus_Idle; } #endif // _WINDOWS64 #endif // __PS3__ @@ -636,8 +717,8 @@ BOOL CSentientManager::RecordHeartBeat(DWORD dwUserId) { return true; } BOOL CSentientManager::RecordLevelStart(DWORD dwUserId, ESen_FriendOrMatch friendsOrMatch, ESen_CompeteOrCoop competeOrCoop, int difficulty, DWORD numberOfLocalPlayers, DWORD numberOfOnlinePlayers) { return true; } BOOL CSentientManager::RecordLevelExit(DWORD dwUserId, ESen_LevelExitStatus levelExitStatus) { return true; } BOOL CSentientManager::RecordLevelSaveOrCheckpoint(DWORD dwUserId, INT saveOrCheckPointID, INT saveSizeInBytes) { return true; } -BOOL CSentientManager::RecordLevelResume(DWORD dwUserId, ESen_FriendOrMatch friendsOrMatch, ESen_CompeteOrCoop competeOrCoop, int difficulty, DWORD numberOfLocalPlayers, DWORD numberOfOnlinePlayers, INT saveOrCheckPointID) { return true; } -BOOL CSentientManager::RecordPauseOrInactive(DWORD dwUserId) { return true; } +BOOL CSentientManager::RecordLevelResume(DWORD dwUserId, ESen_FriendOrMatch friendsOrMatch, ESen_CompeteOrCoop competeOrCoop, int difficulty, DWORD numberOfLocalPlayers, DWORD numberOfOnlinePlayers, INT saveOrCheckPointID) { return true; } +BOOL CSentientManager::RecordPauseOrInactive(DWORD dwUserId) { return true; } BOOL CSentientManager::RecordUnpauseOrActive(DWORD dwUserId) { return true; } BOOL CSentientManager::RecordMenuShown(DWORD dwUserId, INT menuID, INT optionalMenuSubID) { return true; } BOOL CSentientManager::RecordAchievementUnlocked(DWORD dwUserId, INT achievementID, INT achievementGamerscore) { return true; } diff --git a/Minecraft.Client/GameRenderer.cpp b/Minecraft.Client/GameRenderer.cpp index 5e52459cb..08c20cfb4 100644 --- a/Minecraft.Client/GameRenderer.cpp +++ b/Minecraft.Client/GameRenderer.cpp @@ -903,7 +903,7 @@ void GameRenderer::updateLightTexture(float a) if (_g > 1) _g = 1; if (_b > 1) _b = 1; - float brightness = 0.0f; // 4J - TODO - was mc->options->gamma; + float brightness = mc->options->gamma; float ir = 1 - _r; float ig = 1 - _g; diff --git a/Minecraft.Client/Minecraft.Client.vcxproj b/Minecraft.Client/Minecraft.Client.vcxproj index 2398f0bfc..5135fec9e 100644 --- a/Minecraft.Client/Minecraft.Client.vcxproj +++ b/Minecraft.Client/Minecraft.Client.vcxproj @@ -310,6 +310,7 @@ Application MultiByte v143 + true Application @@ -774,7 +775,7 @@ - true + false $(OutDir)$(ProjectName)_D.xex $(ProjectDir)\..\Minecraft.World\x64headers;$(ProjectDir)\Xbox\Sentient\Include;$(IncludePath) @@ -1754,7 +1755,7 @@ xcopy /q /y /i /s /e $(ProjectDir)DurangoMedia\CU $(LayoutDir)Image\Loose\CU Use - Level3 + TurnOffAllWarnings ProgramDatabase Full Sync @@ -1776,6 +1777,7 @@ xcopy /q /y /i /s /e $(ProjectDir)DurangoMedia\CU $(LayoutDir)Image\Loose\CUlegacy_stdio_definitions.lib;d3d11.lib;..\Minecraft.World\x64_Release\Minecraft.World.lib;XInput9_1_0.lib;Windows64\Iggy\lib\iggy_w64.lib;%(AdditionalDependencies) NotSet false + UseLinkTimeCodeGeneration Run postbuild script @@ -21547,6 +21549,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CUtrue true + true true @@ -38310,6 +38313,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CUtrue true + true true diff --git a/Minecraft.Client/Minecraft.Client.vcxproj.filters b/Minecraft.Client/Minecraft.Client.vcxproj.filters index ab31a46e8..708fe0b0a 100644 --- a/Minecraft.Client/Minecraft.Client.vcxproj.filters +++ b/Minecraft.Client/Minecraft.Client.vcxproj.filters @@ -1,6289 +1,1868 @@  - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {e23474e2-447c-41a9-82be-e32747f5b196} - - - {d7b60dd5-624a-46b3-b81d-f5f74550f613} - - - {68105641-375c-4565-9945-7890df6d82d9} - - - {8be4617d-3699-46a4-8769-28edb23c89f0} - - - {0b94741f-653f-48c2-874f-6aa69e7e9622} - - - {20606602-63d3-460c-b33e-d3e747a3d8db} - - - {4afb96fe-3fcb-4bd1-89a1-adfea86c73fb} - - - {304b5ee1-bfdb-489f-8e24-0a4e61177ca1} - - - {225f9542-472d-45c1-9046-eb2a46ab029c} - - - {14e20ee1-fe3b-481b-acce-7a634ee9c1d6} - - - {486b537f-d140-4a23-8409-fe3bc4184009} - - - {91ef92f9-432b-4b8f-9f16-4efd211003a1} - - - {66656f96-a5da-48c6-a7f9-79ab343dbd2f} - - - {3423fd63-b0d7-4f50-b0ca-549386c6cf57} - - - {d097d6ee-2ae4-48d8-8b5a-9b48882bdb2c} - - - {1d0a6eec-14cd-4e6d-8a0a-f5f8f0ab5240} - - - {269fab49-d870-4358-baef-32ed6ac9eca7} - - - {fef42379-3d37-4ef3-aa73-b19aaa77e3cc} - - - {bce4041a-9336-45e7-bd40-ed057ed96ee8} - - - {9756cb73-3f40-4fcb-9bab-5a3ce3c4d2f6} - - - {bb820acc-a8eb-4e36-8b4e-9517263ed51b} - - - {3c3aca1d-0e3e-43f1-b4cd-f8dfce2d29e7} - - - {9f1bf1ed-5366-4a29-b3f3-296725a7b01c} - - - {3e905494-b5dc-4084-a1fe-cbd91b9af667} - - - {afb98298-0033-42ec-98a5-93f8d347ee0d} - - - {1953b4f7-41ea-430b-ad2d-e3d7c352b647} - - - {39ab4d1f-8199-4ec7-948e-3d42ad8c8573} - - - {73bbdc5b-04f3-42f8-bf3b-769335e19178} - - - {385338b7-fa77-4c46-a7f2-89c82dc6e192} - - - {0f94b57d-88f8-4a20-b4e4-d1fa95d8f439} - - - {abe2942f-f984-4930-9e2d-9c9c2b35ac74} - - - {a2be9911-8785-4f6a-932e-e03321ee466b} - - - {7cb56f76-52cf-4303-8631-e1471fdc09a0} - - - {098e2985-9c15-450f-baa2-78604e7c1f54} - - - {6c286ad1-f871-408a-be6e-db44e7edcd2c} - - - {7c254dd0-f36f-4001-83cc-1634a2c792c2} - - - {2a26afce-4160-4fb0-8d01-e394a669dae6} - - - {9229f78c-152c-47d5-858a-fd054b856a1c} - - - {81ab078c-fc67-460c-befd-616dbe4bc3bc} - - - {db324829-af2c-428d-9710-8ad20ecc3fd0} - - - {758ac0be-6bd7-42c0-9b09-fdd452c0e134} - - - {c2dcdce8-b00f-4094-b0de-dad838d49525} - - - {8fd2f4e7-b93a-4067-93b8-a7ebac6d4a9c} - - - {93a41380-e12e-4f7a-bb7b-459f7169faed} - - - {4eb1ba28-620f-4136-979c-4dc91c44b666} - - - {5ac21685-36c0-4cd1-8861-e6a0e4a37c62} - - - {1b4710ff-c513-4a11-9d34-ff36fe1b4246} - - - {f4877497-fdf4-48a8-ada4-e6042f632e7a} - - - {45f40847-5b95-4dca-82f2-7616d7a35e54} - - - {1a98ef4c-6c9d-4a22-93d7-89f0fc3320fd} - - - {3be02e3c-c628-4315-a507-a9fe7733af01} - - - {c6dffb6d-2cf6-4c3e-89a3-fb05229b98aa} - - - {7d088a48-eeda-4783-94f7-c0d09b06f347} - - - {a466219c-afde-4184-8b84-91df32e5b892} - - - {40d6ff43-3d13-42ab-99ae-ebc9d585110f} - - - {047a3693-2040-404d-a386-2e5795b231d3} - - - {2509ddc5-330c-45da-a6f9-d37b858acd34} - - - {b2935b29-33d3-4d57-a145-753a646e5de4} - - - {26661545-d0a0-438a-a775-31cec1fb7849} - - - {5f5f5678-57b0-4f7f-b7dc-1ddd01ea2774} - - - {a19d2d41-9a2f-4631-941b-c3bfa7c2fdfd} - - - {bcdb8322-b7e6-482b-a3da-eb3f84dac713} - - - {e2959475-d5c8-4874-a782-fb5266e4441c} - - - {794dfcdb-98c6-4939-b04d-86b9657d4ff6} - - - {775f3088-bc52-43a3-b9ec-7f3f58508240} - - - {ebe1835b-76a8-408d-b3ee-70ffa4db7907} - - - {45bddf1c-e6d6-4a78-9b7d-73d7511e070d} - - - {16186163-4c73-4fa8-85c7-57d2b34e3fe9} - - - {b33b6793-e585-487e-8626-0096242f8e04} - - - {1264d92e-fa06-40ef-846c-4ce2a99e8ccc} - - - {b28c2ec8-a257-41ca-aad2-cf2ced04e4fa} - - - {7369fca1-3096-4b7d-a93e-924587f23108} - - - {e0eabf73-2721-46f9-bc46-4e0292bb53d3} - - - {bf450dfd-c9e8-4120-8a4c-3860b606637e} - - - {4412cd12-307d-407c-8d4a-34df3274c892} - - - {91fbb0f7-3d94-4786-aa07-c9c57a6db9a9} - - - {afb9404f-f23d-46b1-b4d5-4b1096d5bf40} - - - {716a30f7-f9dd-43bf-9228-646dff4c58b1} - - - {3531c304-b08e-48ae-860c-773f6702ec4d} - - - {924f367a-618c-429e-9866-f60821f21d4a} - - - {e3e43b8f-e455-4222-a92e-f6567a41e326} - - - {61ac879d-17b0-402b-b29f-88c60a1161c7} - - - {4f5c7e99-5cbc-4db4-99c4-37db45537198} - - - {33341824-5702-4a56-b75c-9dac57e49349} - - - {4dbeff57-70bc-4b4c-b5d0-4c6834968d85} - - - {4be5c8d2-8944-4e8f-9d79-b1abc4b66f8f} - - - {ba24985e-3b16-45af-963e-9f2edca20b1a} - - - {77957a66-a869-4b9b-bbda-e7f43e01096f} - - - {fa09ab64-0a3f-429b-93cb-149ee490767b} - - - {dec59bc5-d9d3-4be5-b449-3df3b430eb39} - - - {0bcca89e-0d2d-407b-b1e4-878465404901} - - - {395a09e4-1ff9-458c-8fb8-a4cb28aa4881} - - - {056ec81c-c93f-4c56-9bcb-697cda24a612} - - - {d3d4cc74-edfa-4bbb-8e66-7252dbbc131b} - - - {1511a94f-13bc-49e0-bf75-7cdf98f1e77f} - - - {f0b2e12a-e042-49bc-a5fa-78d1cf79e5d3} - - - {d2020762-d261-4c89-bbb9-0c7113012882} - - - {88ebd63d-2bbc-438a-a810-9b26fcfdd908} - - - {2cf98618-28c5-46df-9ff7-3d331ee4a275} - - - {3c643f18-092d-4870-a206-8dc906748a64} - - - {11cc2598-d569-47ad-8843-7a8296878be9} - - - {33371180-d4ec-4439-8a95-059babcc1db9} - - - {c6d264ea-d4ac-4f3f-81f7-0d91fdc27713} - - - {bde45e25-7dce-4a39-a2bf-dad234708b07} - - - {9685dbaa-ed65-453c-ba57-ec01e59022ae} - - - {92ead381-f2b8-4c6d-a3ca-c6fbc7753361} - - - {2031e778-56ff-4126-b09d-4ec59453b21c} - - - {98e39923-fe62-42d5-8650-746c2d61efd2} - - - {094cddb4-1ac5-424b-80e3-e3b0e9bb3b05} - - - {914f66a5-b1a7-4615-9adc-287d28158eee} - - - {36ba326b-c3a1-473e-8cb4-054e34c276a8} - - - {f9dae5df-fabf-41f9-9b13-8d32e5b5baa5} - - - {e634a43c-ee4c-4adc-8847-c667fdc73c5f} - - - {71d6ccac-7a6e-4399-987b-06b606056f59} - - - {05765c7e-26d6-4760-b0f6-7aa9f374d163} - - - {02363026-02fd-4efc-a115-6ae3dc652546} - - - {d71c6707-d6ba-4ab5-a505-a916e007e60d} - - - {eb5eb5f3-0ea7-4658-a8fb-634eb289941d} - - - {46d5754b-1818-4685-a16d-f7415f61868c} - - - {541f67ae-2627-40af-8316-d76ee9bb6985} - - - {ccfdb851-7965-4551-88bb-4312ddbf830a} - - - {2b9abc76-798a-4aae-ba50-2dfc8f78ae81} - - - {35491a01-dd6f-4313-b857-5e3eb323b44f} - - - {bcac2142-c160-4a73-96c5-cbdf681a16f0} - - - {290b2f1c-dcd8-4ebc-9d6d-fa6de190117e} - - - {a7ec80a7-ea10-438c-a10f-7eeef759c32d} - - - {9a2c49f6-2f9d-4e9d-a4ea-a0a04ecba75f} - - - {24e96065-3dd4-4150-bde2-128d133fd2c4} - - - {10961b95-cb43-4a00-b999-04b66a1a0b43} - - - {6aaa8af3-3df6-43f4-9346-9adfe45ca3a7} - - - {aba0f713-fcfb-417e-9616-c8474225de71} - - - {94298ae6-25e0-4cc9-8c5a-efd53e156baa} - - - {6ec99327-b465-4e61-b064-023a09bdf907} - - - {2095b7df-1779-4788-b004-3479d5ab59d8} - - - {4c9eb137-a48c-44a4-be08-ef1745834ece} - - - {2bae7445-385f-4b0e-a3ec-11c1c584f930} - - - {7c655cf2-f74e-4e6a-9114-405f5bc28a56} - - - {a392080f-8e8b-42be-832a-a35869dba580} - - - {42dca5dc-e462-4537-9929-847a044eb116} - - - {0da3a534-f8c9-4d0c-a73f-dfeb402b27c1} - - - {2e1858a4-a24b-49d8-b19c-c24b45f75a4f} - - - {096eb9da-ee6c-46ba-a0f4-dd8d1748b6a1} - - - {50dc7509-93df-4e0a-8a9a-cea040e92180} - - - {67544d93-633f-46a8-9cdf-8ae646a745d1} - - - {08da2d2a-3276-4109-b190-05fbc4709398} - - - {cef89641-7631-4c30-855f-603163446077} - - - {a15076ff-0dbe-4fb5-8b58-4ceb4b189c8f} - - - {a36a05f3-bc99-4097-b7a8-f81c37eec6e3} - - - {c9fd57aa-ede6-46f3-b968-0f4a7c64f7f1} - - - {bcd2eaff-60b9-41f4-8e1a-258639b27f99} - - - {ebc154be-8d55-478b-9038-856d445aaf15} - - - {0749340b-e216-450a-a02e-001917097ba5} - - - {6b6c31a6-0b8d-4dc0-8d6e-38ab6de709ff} - - - {d7537fdd-877b-461c-9c86-3235843fcfc0} - - - {61e77fc3-d018-4e08-985c-9871eca81fe2} - - - {2c983999-feb8-40db-885b-abf061e2ab58} - - - {093a811c-5f90-4c0e-b260-4b637079730a} - - - {c2fdb165-80e4-4ce0-9bf1-12e5c58f83a5} - - - {ad68d69a-99d0-4eea-9bb4-58cb7083a7a1} - - - {a04f2d63-3e47-470f-b4ac-c1d5caf8ce56} - - - {a0aa2098-142e-4688-8d73-00ec7e5e9361} - - - {f7fc551a-1d1a-4584-af3b-2eadb712b0f7} - - - {7155e1ba-d9b6-473b-8c59-77dd883b766f} - - - {017984f1-6659-4a44-96fd-7dbb8f9b2654} - - - {5d6f34a3-c647-479d-a1a9-89a9ffca4ab9} - - - {6f049254-6585-4a90-be74-70d3878d864f} - - - {e4051e75-f566-41ce-b86a-46c838872963} - - - {18d3c9bc-132e-4770-a665-fc030eb86394} - - - {8a2156f5-3462-447b-b04d-e555a917fbf2} - - - {e0cb4d67-dd35-43ab-88cc-63173cc31125} - - - {090821e7-2a93-44de-bf5e-d5dbbcb41621} - - - {11f70fef-83b4-4fb9-85ab-51109fbb6a56} - - - {7b594635-988d-40aa-8a00-0d60b1f49a5a} - - - {e7df083d-5b13-46bc-a5b9-610c3ffb33bc} - - - {2ef42e03-cbaa-4077-a7f4-008150037f01} - - - {4d1da71a-dd84-4073-be6d-1e534eca98f3} - - - {acb27adb-45a3-45cf-85f5-3ae00cf3357d} - - - {3a9d8989-ff64-411c-84ad-b7dfb2520d5a} - - - {de5f0642-c9ab-431b-a255-a936076ffed2} - - - {76ac5981-4824-487a-992f-273bfa73fb68} - - - {b1794e73-9397-4e45-8a0d-a4f6dc72c321} - - - {ff6b8d80-d0ed-4225-b56c-1d0a19824e2f} - - - {4d0806f8-ae38-4bac-8469-0a82fc61eecd} - - - {67f51112-db23-4c8a-af1b-f748f7bbce8f} - - - {a47c9da7-bf36-42ae-aedf-c00c071c0582} - - - {017967fb-353e-448b-ae2c-639a182f3ee0} - - - {f4d6c5f9-40d6-4e52-bc03-fef06e9f0221} - - - {122ac1f3-113d-4f91-8676-bbe16e236f4f} - - - {1d28fadf-f748-4616-830b-ec2faa1b5f8e} - - - {bf865c6c-8bf4-4bd6-aaed-ff2a7c92706a} - - - {3eefa342-44e2-493a-9165-40f85bcef557} - - - {f88c0f6a-8051-41e7-9bf6-b9d3c7bb2937} - - - {a6b9803b-8dc2-4552-856e-470f78757533} - - - {21ba77e3-ca31-4dbb-b85d-48ddf892e1da} - - - {06443c48-8447-447b-895f-da725cc13c0c} - - - {ba60dadb-f607-49b7-ab07-0da3a6e06138} - - - {abc41045-2c80-41e8-a8e5-80383e3331b7} - - - {6e66e638-15af-47a6-83de-93bb0cb8ae3d} - - - {b2a3a14e-806c-4ebf-9413-0bbca21b6699} - - - {57a41953-69e1-408c-94ca-5a0fc35bee3d} - - - {afe55d4b-8cbd-4fc0-b4b5-e823d35ac9f6} - - - {ff3c3e8d-02aa-446f-912b-876aad8bb71a} - - - {5ce05bd9-a7f6-47cf-81c3-8c95d3627c5c} - - - {f90e55f2-d904-4421-8284-db37fe80c549} - - - {4c8bf8d5-d6d9-4b6b-96dd-00d64f476027} - - - {90c63e2f-0b47-4aca-a1df-26c436af7c69} - - - {ad3528e0-0c39-42d5-b756-fdf691df5f17} - - - {262a14ae-51b7-4d11-be00-2bf7840dc67d} - - - {40ad6aa5-e972-4aaf-bbb0-c783e72fb341} - - - {d705167f-d99e-49b5-a667-24c0c2fe7bcc} - - - {d52b4de1-b2d7-4c80-afb4-7c6edae1efcb} - - - {61ac299e-6446-4df9-b5cc-9b2c0890b47c} - - - {147837b5-da79-4938-abcf-f8926a72b25c} - - - {34edb787-189e-49c7-8412-f5def16b6f99} - - - {1f029554-0246-45da-8bfd-8d4bc8d4cffc} - - - {15633337-4260-4618-bffa-df945dba2b1a} - - - {81d283e0-15b7-4dcf-a85d-961169a993cd} - - - {dea799c3-4584-461c-a788-9766f61cea56} - - - {619bbb82-dfbc-499e-b078-048ad7e26222} - - - {f5065760-0ad8-4fb3-b6a9-f3ba06be0e51} - - - {360a336e-01e3-4a34-8608-efd2c7c72ef7} - - - {1d9e76bb-7f51-487f-b0b4-de3419fd1925} - - - {177ed754-f97c-4e53-9e75-1f548ae2a0b4} - - - {4b317e13-b7e6-4468-8a2e-bfbbe3bb272b} - - - {acc4e8ae-a1f1-4f2b-9bf2-e12b74fa3a1a} - - - {893769f2-22f7-4c41-ad2b-cb8668fb3b66} - - - {c1441371-f323-4549-90a0-53c6f743b4b1} - - - {b043e348-607a-4ac2-95de-f573db5dd04f} - - - {af98fe8e-ce25-437a-8ab9-efa9d8f0a5b0} - - - {9a61fbe5-f9a2-4c83-b407-5a295808664e} - - - {f55d07b2-80f2-4a01-8fb8-0b09545bf916} - - - {829b148f-b0d9-4a70-87ea-22f57281ac1f} - - - {08832b8f-5370-4c06-95ab-b5b285eb5fc5} - - - {918450ce-de83-4daf-8f25-7aaa8afcb856} - - - {5d807c82-39b9-4651-ab8a-14244deff851} - - - {9dee27ed-5aaf-4fad-b219-faebcebbe450} - - - {22d0b2d5-3279-4144-a23c-8eafb9d90e63} - - - {0061db22-43de-4b54-a161-c43958cdcd7e} - - - {889a84db-3009-4a7c-8234-4bf93d412690} - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - Xbox\GameConfig - - - Xbox\GameConfig - - - Xbox\res\audio - - - Xbox\res\audio - - - Xbox\res\audio - - - Xbox\4JLibs\Media - - - Xbox\res - - - Xbox\res - - - Xbox\xexxml - - - Xbox\xexxml - - - Xbox\Source Files\Sentient\Telemetry - - - Xbox\Source Files\Sentient\DynamicConf - - - - Windows64\GameConfig - - - Windows64\GameConfig - - - Durango - - - Durango - - - Durango - - - - Orbis\4JLibs\libs - - - Orbis\4JLibs\libs - - - Orbis\4JLibs\libs - - - Orbis\4JLibs\libs - - - Orbis\Miles Sound System\lib - - - PS3\Miles Sound System\lib - - - PS3\Miles Sound System\lib - - - PS3\Miles Sound System\lib - - - PS3\Miles Sound System\lib\spu - - - PS3\Miles Sound System\lib\spu - - - PS3\Miles Sound System\lib\spu - - - PS3\Miles Sound System\lib\spu - - - PS3\Miles Sound System\lib\spu - - - PS3\Miles Sound System\lib\spu - - - PS3\Miles Sound System\lib\spu - - - PS3\Miles Sound System\lib\spu - - - Windows64\Iggy\gdraw - - - Windows64\Iggy\gdraw - - - Windows64\Iggy\gdraw - - - Windows64\Iggy\gdraw - - - Durango\Iggy\gdraw - - - Durango\Iggy\gdraw - - - Durango\Iggy\gdraw - - - PS3\Iggy\gdraw - - - PS3\Iggy\gdraw - - - Windows64\Iggy\gdraw - - - Orbis\Iggy\gdraw - - - Orbis\Iggy\gdraw - - - Common\Source Files\Network - - - PSVita\GameConfig - - - PSVita\GameConfig - - - Orbis\4JLibs\libs - - - PSVita\Iggy\gdraw - - - PSVita\Iggy\gdraw - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - Header Files - - - net\minecraft\client\renderer\culling - - - net\minecraft\client\renderer\culling - - - net\minecraft\client\renderer\culling - - - net\minecraft\client\renderer\culling - - - Header Files - - - net\minecraft\client\renderer\culling - - - net\minecraft\client\renderer\culling - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\player - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\tileentity - - - net\minecraft\client\renderer\tileentity - - - net\minecraft\client\renderer\tileentity - - - net\minecraft\client\renderer\tileentity - - - net\minecraft\client\renderer - - - net\minecraft\client\skins - - - net\minecraft\client\skins - - - net\minecraft\client\skins - - - net\minecraft\client\skins - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client - - - net\minecraft\client\player - - - net\minecraft\stats - - - net\minecraft\stats - - - net\minecraft\client\player - - - net\minecraft\client - - - net\minecraft\client - - - net\minecraft\client - - - net\minecraft\client - - - net\minecraft\client - - - net\minecraft\client - - - net\minecraft\client - - - net\minecraft\client\level - - - net\minecraft\client - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui\particle - - - net\minecraft\client\gui\particle - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\title - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui\inventory - - - net\minecraft\client\gui\inventory - - - net\minecraft\client\gui\inventory - - - net\minecraft\client\gui\inventory - - - net\minecraft\client\gui\inventory - - - net\minecraft\client\gui\inventory - - - net\minecraft\client\gui\inventory - - - net\minecraft\client\gui\achievement - - - net\minecraft\client\gui\achievement - - - net\minecraft\client\gui\achievement - - - Xbox\4JLibs\inc - - - Xbox\4JLibs\inc - - - Xbox\4JLibs\inc - - - Xbox\4JLibs\inc - - - Xbox\GameConfig - - - Xbox\Source Files - - - net\minecraft\server\network - - - net\minecraft\server\network - - - net\minecraft\server\level - - - net\minecraft\server\level - - - net\minecraft\server\level - - - net\minecraft\server\level - - - net\minecraft\server\level - - - net\minecraft\server\level - - - net\minecraft\server\level - - - net\minecraft\server - - - net\minecraft\server - - - net\minecraft\server - - - net\minecraft\server - - - net\minecraft\server - - - net\minecraft\server\level - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens - - - net\minecraft\client\multiplayer - - - net\minecraft\client\multiplayer - - - net\minecraft\client\multiplayer - - - net\minecraft\client\multiplayer - - - net\minecraft\client\multiplayer - - - net\minecraft\client\multiplayer - - - net\minecraft\client\multiplayer - - - net\minecraft\client\multiplayer - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens\Help & Options - - - Xbox\Source Files\XUI\Menu screens\Help & Options\Controls - - - Xbox\Source Files\XUI\Menu screens\Help & Options\Credits - - - Xbox\Source Files\XUI\Menu screens\Help & Options\How To Play - - - Xbox\Source Files\XUI\Menu screens\Help & Options\How To Play - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens\Tutorial - - - Xbox\Source Files\XUI\Menu screens\Leaderboards - - - Xbox\Source Files\XUI\Menu screens\Pause - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens\Debug - - - Xbox\Source Files\XUI\Menu screens\Debug - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Menu screens\Social - - - Header Files - - - Header Files - - - Header Files - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\XML - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\SentientLibs\inc - - - Xbox\Source Files\Sentient\Telemetry - - - Xbox\Source Files\Sentient\Telemetry - - - Xbox\Source Files\Sentient\Telemetry - - - Xbox\Source Files\XUI\Menu screens\Help & Options\Settings - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\Sentient\DynamicConf - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\Font - - - Xbox\Source Files\Font - - - Xbox\Source Files\Font - - - Xbox\Source Files\XUI\Menu screens\Debug - - - net\minecraft\server\network - - - Xbox\Source Files\XUI\Menu screens\Help & Options\Settings - - - Xbox\Source Files\XUI\Controls - - - net\minecraft\client\renderer\tileentity - - - Xbox\Source Files\Sentient - - - Xbox\Source Files\Sentient\Telemetry - - - Xbox\Source Files\XUI\Menu screens\Help & Options\Settings - - - Xbox\Source Files\XUI\Menu screens\Help & Options\Settings - - - Xbox\Source Files\XUI\Menu screens\Help & Options\Settings - - - Xbox\Source Files\XUI\Menu screens\Help & Options\Settings - - - Xbox\XML - - - net\minecraft\server\level - - - net\minecraft\server\network - - - net\minecraft\client - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\multiplayer - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\tileentity - - - Xbox\Source Files\XUI\Menu screens\Debug - - - Xbox\Source Files\XUI\Menu screens\Debug - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens - - - net\minecraft\client - - - Xbox\Source Files\XUI\Menu screens - - - net\minecraft\server - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\tileentity - - - net\minecraft\client\renderer\tileentity - - - net\minecraft\client\model\geom - - - net\minecraft\client\model\geom - - - net\minecraft\client\model\dragon - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\model\geom - - - net\minecraft\client\particle - - - net\minecraft\client\model\geom - - - net\minecraft\client\model\dragon - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model\geom - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model\geom - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Header Files - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\Social - - - Header Files - - - Windows - - - Windows - - - Durango\4JLibs\inc - - - Durango\4JLibs\inc - - - Durango\4JLibs\inc - - - Durango\4JLibs\inc - - - Common\Source Files\Trial - - - Common\Source Files\Tutorial\Constraints - - - Common\Source Files\Tutorial\Constraints - - - Common\Source Files\Tutorial\Constraints - - - Common\Source Files\Tutorial\Constraints - - - Common\Source Files\Tutorial\Constraints - - - Common\Source Files\Tutorial\Hints - - - Common\Source Files\Tutorial\Hints - - - Common\Source Files\Tutorial\Hints - - - Common\Source Files\Tutorial\Hints - - - Common\Source Files\Tutorial\Hints - - - Common\Source Files\Tutorial\Hints - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\GameRules\LevelGeneration\StructureActions - - - Common\Source Files\GameRules\LevelGeneration\StructureActions - - - Common\Source Files\GameRules\LevelGeneration\StructureActions - - - Common\Source Files\GameRules\LevelGeneration\StructureActions - - - Common\Source Files\GameRules\LevelGeneration - - - Common\Source Files\GameRules\LevelRules\RuleDefinitions - - - Common\Source Files\GameRules\LevelRules\RuleDefinitions - - - Common\Source Files\GameRules\LevelRules\RuleDefinitions - - - Common\Source Files\GameRules\LevelRules\RuleDefinitions - - - Common\Source Files\GameRules\LevelRules\RuleDefinitions - - - Common\Source Files\GameRules\LevelRules\RuleDefinitions - - - Common\Source Files\GameRules\LevelRules\RuleDefinitions - - - Common\Source Files\Tutorial - - - Common\Source Files\Tutorial - - - Common\Source Files\Tutorial - - - Common\Source Files\Tutorial - - - Common\Source Files\Tutorial - - - Common\Source Files\Tutorial - - - Durango\Source Files - - - Common\Source Files\Tutorial\Hints - - - Durango\Source Files\Sentient - - - Durango\Source Files\Sentient - - - Durango\Source Files\Sentient - - - Durango\Source Files\Sentient - - - Durango\Source Files\Sentient - - - Durango\XML - - - Durango\Source Files\Sentient - - - Durango\Source Files\Social - - - Durango - - - Common - - - PS3\4JLibs\inc - - - PS3\4JLibs\inc - - - PS3\4JLibs\inc - - - PS3\4JLibs\inc - - - PS3\Source Files\Social - - - PS3\Source Files\Sentient - - - PS3\Source Files\Sentient - - - PS3\Source Files\Sentient - - - PS3\Source Files\Sentient - - - PS3\Source Files\Sentient - - - PS3\Source Files\Sentient - - - PS3\Source Files - - - PS3\PS3Extras - - - PS3\PS3Extras - - - Durango - - - Common\Source Files - - - Common\Source Files - - - Common\Source Files - - - Common\Source Files\GameRules\LevelGeneration - - - Common\Source Files\GameRules\LevelGeneration - - - Common\Source Files\GameRules - - - Common\Source Files\GameRules - - - PS3 - - - Xbox\Source Files\XUI - - - Xbox\Source Files\XUI - - - Xbox\Source Files\XUI - - - Xbox\Source Files\XUI\Base Scene - - - Xbox\Source Files\XUI\Base Scene - - - Xbox\Source Files\XUI\Base Scene - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - net\minecraft\client\skins - - - net\minecraft\client\particle - - - net\minecraft\client\skins - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer\texture - - - net\minecraft\client\renderer\texture - - - net\minecraft\client\renderer\texture - - - net\minecraft\client\renderer\texture - - - net\minecraft\client\renderer\texture - - - net\minecraft\client\renderer\texture - - - net\minecraft\client\renderer\texture - - - net\minecraft\client\renderer\texture\custom - - - net\minecraft\client\renderer\texture\custom - - - Xbox\Source Files\XUI\Menu screens\Help & Options\Settings - - - Xbox\Source Files\XUI - - - PS3\PS3Extras - - - PS3\PS3Extras - - - net\minecraft\client\renderer\texture - - - net\minecraft\client\renderer\texture - - - net\minecraft\client\skins - - - Common\Source Files\DLC - - - Common\Source Files\DLC - - - Common\Source Files\DLC - - - Common\Source Files\DLC - - - Common\Source Files\DLC - - - Common\Source Files\DLC - - - Header Files - - - Windows64\4JLibs\inc - - - Windows64\4JLibs\inc - - - Windows64\4JLibs\inc - - - Windows64\4JLibs\inc - - - Windows64\GameConfig - - - Windows64\XML - - - Windows64\Source Files - - - Windows64\Source Files\Social - - - Windows64\Source Files\Sentient - - - Windows64\Source Files\Sentient - - - Windows64\Source Files\Sentient - - - Windows64\Source Files\Sentient - - - Windows64\Source Files\Sentient - - - Windows64\Source Files\Sentient - - - Windows64 - - - Windows64\Source Files - - - Windows64 - - - Durango\Source Files - - - Orbis\OrbisExtras - - - Orbis\4JLibs\inc - - - Orbis\4JLibs\inc - - - Orbis\4JLibs\inc - - - Orbis\4JLibs\inc - - - Orbis\OrbisExtras - - - Orbis\OrbisExtras - - - Xbox\Source Files\XUI\Base Scene - - - Header Files - - - Common\Source Files\DLC - - - Orbis - - - Orbis\OrbisExtras - - - Orbis\Source Files\Sentient - - - Orbis\Source Files\Sentient - - - Orbis\Source Files\Sentient - - - Orbis\Source Files\Sentient - - - Orbis\Source Files\Sentient - - - Orbis\Source Files\Sentient - - - Orbis\Source Files\Social - - - Orbis\XML - - - Orbis\Source Files - - - Orbis\OrbisExtras - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - Common - - - Common - - - Common - - - Common - - - net\minecraft\client\model - - - net\minecraft\client\renderer\entity - - - Windows64\Miles Sound System\Include - - - Windows64\Miles Sound System\Include - - - Orbis\Miles Sound System\include - - - Orbis\Miles Sound System\include - - - Durango\Miles Sound System\include - - - Durango\Miles Sound System\include - - - PS3\Miles Sound System\include - - - PS3\Miles Sound System\include - - - Common\Source Files\Audio - - - Xbox\Source Files\Audio - - - Common\Source Files\Audio - - - PS3\PS3Extras - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\CompressedTile_SPU - - - Common\Source Files\Localisation - - - Common\Source Files\DLC - - - Common\Source Files\GameRules\LevelGeneration - - - Common\Source Files\GameRules\LevelGeneration - - - Common\Source Files\GameRules\LevelGeneration - - - Common\Source Files\GameRules\LevelRules\RuleDefinitions - - - Common\Source Files\GameRules\LevelRules\Rules - - - Common\Source Files\GameRules\LevelRules - - - Common\Source Files\DLC - - - PS3 - - - Common\Source Files\GameRules\LevelRules\Rules - - - Common\Source Files\GameRules - - - Common\Source Files\GameRules - - - Common\Source Files\GameRules\LevelRules\RuleDefinitions - - - Common\Source Files\GameRules\LevelRules\RuleDefinitions - - - Common\Source Files\UI - - - Windows64\Iggy\include - - - Windows64\Iggy\include - - - Windows64\Iggy\include - - - Windows64\Iggy\include - - - Windows64\Iggy\include - - - Windows64\Iggy\gdraw - - - Windows64 - - - Common\Source Files\UI - - - Common\Source Files\UI - - - Common\Source Files\UI - - - Common\Source Files\UI - - - Common\Source Files\GameRules\LevelGeneration - - - net\minecraft\client\renderer\tileentity - - - net\minecraft\client\model - - - Xbox\Source Files\XUI\Menu screens\Debug - - - Common\Source Files\DLC - - - Common\Source Files\Colours - - - Common\Source Files\DLC - - - Common\Source Files\DLC - - - Common\Source Files\DLC - - - Durango\DurangoExtras - - - Durango\Iggy\include - - - Durango\Iggy\include - - - Durango\Iggy\include - - - Durango\Iggy\include - - - Durango\Iggy\include - - - Durango\Iggy\gdraw - - - Durango - - - PS3 - - - PS3\Iggy\gdraw - - - PS3\Iggy\include - - - PS3\Iggy\include - - - PS3\Iggy\include - - - PS3\Iggy\include - - - PS3\Iggy\include - - - PS3\Iggy\include - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Orbis\Iggy\gdraw - - - Orbis\Iggy\include - - - Orbis\Iggy\include - - - Orbis\Iggy\include - - - Orbis\Iggy\include - - - Orbis\Iggy\include - - - Orbis\Iggy\include - - - Common\Source Files\Network - - - Common\Source Files\UI - - - Common\Source Files\UI - - - Common\Source Files\UI\Scenes\Debug - - - Xbox\Source Files - - - Common\Source Files\Network - - - Common\Source Files\Network - - - PS3\PS3Extras - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - PS3\PS3Extras - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\UI\Scenes - - - Common\Source Files\UI\Components - - - Common\Source Files\UI\Components - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\Network - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\Scenes\Debug - - - Common\Source Files\UI\Components - - - Xbox\Source Files\Network - - - Common\Source Files\Network - - - Xbox\Source Files\Network - - - Orbis - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\UI\Components - - - Common\Source Files\UI\Components - - - Common\Source Files\UI\Scenes\In-Game Menu Screens - - - Common\Source Files\UI\Scenes\In-Game Menu Screens - - - Common\Source Files\UI\Scenes - - - Common\Source Files\BuildVer - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\Scenes\In-Game Menu Screens - - - Common\Source Files\UI\Components - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - PS3 - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Scenes\In-Game Menu Screens - - - Common\Source Files\UI\Scenes - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\Components - - - Common\Source Files\UI\Scenes - - - Common\Source Files\UI\Controls - - - PS3\Source Files\Network - - - PS3\Source Files\Leaderboards - - - Common\Source Files\Leaderboards - - - Xbox\Source Files\Leaderboards - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Scenes\In-Game Menu Screens - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\UI\Controls - - - Windows64\Source Files\Leaderboards - - - Orbis\Source Files\Leaderboards - - - Durango\Source Files\Leaderboards - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Scenes - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - PS3\PS3Extras - - - Common\Source Files\UI\Scenes\In-Game Menu Screens - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Scenes\In-Game Menu Screens - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Scenes\In-Game Menu Screens - - - PS3\PS3Extras - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Components - - - PS3\4JLibs - - - Common\Source Files\UI\Components - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - PS3\Source Files - - - Common\Source Files\UI\Controls - - - Xbox\Source Files\XUI\Menu screens - - - net\minecraft\client\renderer\tileentity - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Durango\Source Files\Achievements - - - Common\Source Files\UI\Scenes\Debug - - - Xbox\Source Files\XUI\Containers - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\All Platforms - - - Xbox\Source Files\XUI\Containers - - - net\minecraft\client\model - - - net\minecraft\client\renderer\entity - - - Orbis - - - Orbis\Source Files - - - Orbis\Network - - - net\minecraft\server\commands - - - net\minecraft\server\commands - - - Durango\Network - - - Durango\Network - - - Durango\Network - - - Common\Source Files\Network\Sony - - - Common\Source Files\Network\Sony - - - Orbis\Network - - - PS3\Source Files\Network - - - Common\Source Files\Network\Sony - - - Common\Source Files\Network\Sony - - - Orbis\Network - - - Common\Source Files\Network\Sony - - - Common\Source Files\Network\Sony - - - PS3\Source Files\Network - - - PS3\Source Files\Network - - - Orbis\Network - - - Common\Source Files\GameRules\LevelGeneration - - - Durango\Network - - - Common\Source Files\UI\Scenes\In-Game Menu Screens - - - Xbox\Source Files\XUI\Menu screens - - - Durango\Network - - - PSVita\4JLibs\inc - - - PSVita\4JLibs\inc - - - PSVita\4JLibs\inc - - - PSVita\4JLibs\inc - - - PSVita\PSVitaExtras - - - PSVita\PSVitaExtras - - - PSVita\PSVitaExtras - - - PSVita - - - PSVita\Source Files\Sentient - - - PSVita\Source Files\Sentient - - - PSVita\Source Files\Sentient - - - PSVita\Source Files\Sentient - - - PSVita\Source Files\Sentient - - - PSVita\Source Files\Sentient - - - PSVita\Source Files\Social - - - PSVita\XML - - - PSVita - - - PSVita\GameConfig - - - Orbis\Network - - - Common\Source Files\UI\Scenes\Debug - - - Durango\Source Files - - - Durango\Network - - - Durango\Source Files\Leaderboards - - - Common\Source Files\Telemetry - - - Durango\Source Files\Sentient - - - Durango\ServiceConfig - - - Common\Source Files\UI - - - Common\Source Files\Network\Sony - - - Orbis\Network - - - PS3\Source Files\Network - - - Common\Source Files\UI\Components - - - Durango\Network - - - Durango\XML - - - PSVita\Iggy\gdraw - - - PSVita\Iggy\include - - - PSVita\Iggy\include - - - PSVita\Iggy\include - - - PSVita\Iggy\include - - - PSVita\Iggy\include - - - PSVita\Iggy\include - - - PSVita\PSVitaExtras - - - PSVita\PSVitaExtras - - - PSVita\PSVitaExtras - - - PSVita\PSVitaExtras - - - PSVita\PSVitaExtras - - - PSVita\PSVitaExtras - - - PSVita\PSVitaExtras - - - Common\Source Files\UI\Controls - - - PSVita\Source Files\Network - - - PSVita\Source Files\Network - - - PSVita\Source Files\Network - - - PSVita\Source Files\Leaderboards - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - PSVita\Miles Sound System\Include - - - PSVita\Miles Sound System\Include - - - Durango\Source Files\Leaderboards - - - PSVita\Source Files\Network - - - PSVita\Source Files\Network - - - PSVita\PSVitaExtras - - - PSVita\PSVitaExtras - - - Xbox\4JLibs\inc - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Scenes\In-Game Menu Screens - - - PSVita\Source Files\Network - - - PSVita\Source Files\Network - - - Orbis\Network - - - Xbox\Source Files\Network - - - Common\Source Files\UI\Scenes - - - Common\Source Files\Leaderboards - - - Common\Source Files\Leaderboards - - - net\minecraft\server - - - net\minecraft\server - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\particle - - - net\minecraft\client\resources - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\tileentity - - - net\minecraft\client\renderer\texture - - - net\minecraft\client\renderer - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - net\minecraft\client\model - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Controls - - - Common\Source Files\UI\All Platforms - - - Xbox\Source Files\XUI\Containers - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI - - - Common\Source Files\UI\Controls - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\Leaderboards - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - Source Files - - - net\minecraft\client\renderer\culling - - - net\minecraft\client\renderer\culling - - - net\minecraft\client\renderer\culling - - - net\minecraft\client\renderer\culling - - - net\minecraft\client\renderer\culling - - - Source Files - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\tileentity - - - net\minecraft\client\renderer\tileentity - - - net\minecraft\client\renderer\tileentity - - - net\minecraft\client\renderer\tileentity - - - net\minecraft\client\renderer - - - net\minecraft\client\skins - - - net\minecraft\client\skins - - - net\minecraft\client\skins - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client - - - net\minecraft\client\player - - - net\minecraft\client\player - - - net\minecraft\stats - - - net\minecraft\stats - - - net\minecraft\client\player - - - net\minecraft\client - - - net\minecraft\client - - - net\minecraft\client - - - net\minecraft\client - - - net\minecraft\client - - - net\minecraft\client - - - net\minecraft\client - - - net\minecraft\client\level - - - net\minecraft\client - - - net\minecraft\client\gui - - - net\minecraft\client - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui\particle - - - net\minecraft\client\gui\particle - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\title - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui - - - net\minecraft\client\gui\inventory - - - net\minecraft\client\gui\inventory - - - net\minecraft\client\gui\inventory - - - net\minecraft\client\gui\inventory - - - net\minecraft\client\gui\inventory - - - net\minecraft\client\gui\inventory - - - net\minecraft\client\gui\inventory - - - net\minecraft\client\gui\achievement - - - net\minecraft\client\gui\achievement - - - net\minecraft\client\gui\achievement - - - Source Files - - - Source Files - - - Xbox\Source Files - - - Xbox\Source Files - - - net\minecraft\server\network - - - net\minecraft\server\network - - - net\minecraft\server\network - - - net\minecraft\server - - - net\minecraft\server - - - net\minecraft\server\level - - - net\minecraft\server\level - - - net\minecraft\server\level - - - net\minecraft\server\level - - - net\minecraft\server - - - net\minecraft\server\level - - - net\minecraft\server - - - net\minecraft\server\level - - - net\minecraft\server\level - - - net\minecraft\server\level - - - Xbox\Source Files\XUI\Menu screens - - - net\minecraft\client\multiplayer - - - net\minecraft\client\multiplayer - - - net\minecraft\client\multiplayer - - - net\minecraft\client\multiplayer - - - net\minecraft\client\multiplayer - - - net\minecraft\client\multiplayer - - - net\minecraft\client\multiplayer - - - net\minecraft\client\multiplayer - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens\Help & Options - - - Xbox\Source Files\XUI\Menu screens\Help & Options\Controls - - - Xbox\Source Files\XUI\Menu screens\Help & Options\Credits - - - Xbox\Source Files\XUI\Menu screens\Help & Options\How To Play - - - Xbox\Source Files\XUI\Menu screens\Help & Options\How To Play - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens\Tutorial - - - Xbox\Source Files\XUI\Menu screens\Leaderboards - - - Xbox\Source Files\XUI\Menu screens\Pause - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens\Debug - - - Xbox\Source Files\XUI\Menu screens\Debug - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Menu screens\Social - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\XML - - - Xbox\Source Files\Sentient\Telemetry - - - Xbox\Source Files\XUI\Menu screens\Help & Options\Settings - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\Sentient\DynamicConf - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\Font - - - Xbox\Source Files\Font - - - Xbox\Source Files\Font - - - Xbox\Source Files\XUI\Menu screens\Debug - - - Xbox\Source Files\Sentient - - - Xbox\Source Files\XUI\Menu screens\Help & Options\Settings - - - Xbox\Source Files\XUI\Controls - - - net\minecraft\client\renderer\tileentity - - - Xbox\Source Files\XUI\Menu screens\Help & Options\Settings - - - Xbox\Source Files\XUI\Menu screens\Help & Options\Settings - - - Xbox\Source Files\XUI\Menu screens\Help & Options\Settings - - - Xbox\Source Files\XUI\Menu screens\Help & Options\Settings - - - net\minecraft\server\level - - - net\minecraft\client - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\tileentity - - - Xbox\Source Files\XUI\Menu screens\Debug - - - Xbox\Source Files\XUI\Menu screens\Debug - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\XUI\Menu screens - - - net\minecraft\client - - - Xbox\Source Files\XUI\Menu screens - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\tileentity - - - net\minecraft\client\renderer\tileentity - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - net\minecraft\client\model\geom - - - net\minecraft\client\model\geom - - - net\minecraft\client\model\geom - - - net\minecraft\client\model\dragon - - - net\minecraft\client\model\geom - - - net\minecraft\client\model\dragon - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model\geom - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Menu screens - - - Xbox\Source Files\Social - - - Source Files - - - Common\Source Files\Trial - - - Common\Source Files\Tutorial\Constraints - - - Common\Source Files\Tutorial\Constraints - - - Common\Source Files\Tutorial\Constraints - - - Common\Source Files\Tutorial\Hints - - - Common\Source Files\Tutorial\Hints - - - Common\Source Files\Tutorial\Hints - - - Common\Source Files\Tutorial\Hints - - - Common\Source Files\Tutorial\Hints - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\GameRules\LevelGeneration\StructureActions - - - Common\Source Files\GameRules\LevelGeneration\StructureActions - - - Common\Source Files\GameRules\LevelGeneration\StructureActions - - - Common\Source Files\GameRules\LevelGeneration\StructureActions - - - Common\Source Files\GameRules\LevelGeneration - - - Common\Source Files\GameRules\LevelRules\RuleDefinitions - - - Common\Source Files\GameRules\LevelRules\RuleDefinitions - - - Common\Source Files\GameRules\LevelRules\RuleDefinitions - - - Common\Source Files\GameRules\LevelRules\RuleDefinitions - - - Common\Source Files\GameRules\LevelRules\RuleDefinitions - - - Common\Source Files\GameRules\LevelRules\RuleDefinitions - - - Common\Source Files\GameRules\LevelRules\RuleDefinitions - - - Common\Source Files\Tutorial - - - Common\Source Files\Tutorial - - - Common\Source Files\Tutorial - - - Common\Source Files\Tutorial - - - Common\Source Files\Tutorial - - - Common\Source Files\Tutorial\Hints - - - PS3\Source Files - - - PS3\PS3Extras - - - Durango - - - Durango\Source Files - - - Common\Source Files - - - Common\Source Files - - - Common\Source Files\GameRules\LevelGeneration - - - PS3 - - - Xbox\Source Files\XUI - - - Xbox\Source Files\XUI - - - Xbox\Source Files\XUI\Base Scene - - - Xbox\Source Files\XUI\Base Scene - - - Xbox\Source Files\XUI\Base Scene - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Controls - - - net\minecraft\client\skins - - - net\minecraft\client\particle - - - net\minecraft\client\skins - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer - - - net\minecraft\client\renderer\texture - - - net\minecraft\client\renderer\texture - - - net\minecraft\client\renderer\texture - - - net\minecraft\client\renderer\texture - - - net\minecraft\client\renderer\texture - - - net\minecraft\client\renderer\texture - - - net\minecraft\client\renderer\texture - - - net\minecraft\client\renderer\texture\custom - - - net\minecraft\client\renderer\texture\custom - - - Xbox\Source Files\XUI\Menu screens\Help & Options\Settings - - - PS3\PS3Extras - - - Xbox\Source Files\XUI\Menu screens - - - net\minecraft\client\skins - - - net\minecraft\client\renderer\texture - - - net\minecraft\client\renderer\texture - - - net\minecraft\client\skins - - - Common\Source Files\DLC - - - Common\Source Files\DLC - - - Common\Source Files\DLC - - - Common\Source Files\DLC - - - Common\Source Files\DLC - - - Common\Source Files\DLC - - - Windows64\Source Files - - - Windows64\Source Files - - - Windows64 - - - Durango\Source Files - - - Orbis\OrbisExtras - - - Xbox\Source Files\XUI\Base Scene - - - Common\Source Files\DLC - - - Orbis\OrbisExtras - - - Orbis - - - Orbis\Source Files - - - net\minecraft\client\particle - - - net\minecraft\client\particle - - - Common - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\model - - - Xbox\Source Files\Audio - - - Common\Source Files\Audio - - - Common\Source Files\Audio - - - PS3\PS3Extras - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\ChunkRebuild_SPU - - - PS3\CompressedTile_SPU - - - Common\Source Files\Localisation - - - Common\Source Files\DLC - - - Common\Source Files\GameRules\LevelGeneration - - - Common\Source Files\GameRules\LevelGeneration - - - Common\Source Files\GameRules\LevelGeneration - - - Common\Source Files\GameRules\LevelRules\RuleDefinitions - - - Common\Source Files\GameRules\LevelRules\Rules - - - Common\Source Files\GameRules\LevelRules - - - Common\Source Files\DLC - - - PS3 - - - Common\Source Files\GameRules - - - Common\Source Files\GameRules - - - Common\Source Files\GameRules\LevelRules\RuleDefinitions - - - Common\Source Files\GameRules\LevelRules\RuleDefinitions - - - Common\Source Files\UI - - - Windows64\Iggy\gdraw - - - Windows64 - - - Common\Source Files\UI - - - Common\Source Files\UI - - - Common\Source Files\UI - - - Common\Source Files\GameRules\LevelGeneration - - - net\minecraft\client\renderer\tileentity - - - net\minecraft\client\model - - - Xbox\Source Files\XUI\Menu screens\Debug - - - Common\Source Files\DLC - - - Common\Source Files\Colours - - - Common\Source Files\DLC - - - Common\Source Files\DLC - - - Durango\DurangoExtras - - - Durango\Iggy\gdraw - - - Durango - - - PS3 - - - PS3\Iggy\gdraw - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - Common\Source Files\zlib - - - PS3\Source Files\Audio - - - Common\Source Files\UI - - - Common\Source Files\UI - - - Orbis\Iggy\gdraw - - - Common\Source Files\UI\Scenes\Debug - - - Xbox\Source Files - - - Common\Source Files\Network - - - PS3\PS3Extras - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\UI\Scenes - - - Common\Source Files\UI\Components - - - Common\Source Files\UI\Components - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\Scenes\Debug - - - Common\Source Files\UI\Components - - - Xbox\Source Files\Network - - - Common\Source Files\Network - - - Xbox\Source Files\Network - - - Orbis - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\UI\Components - - - Common\Source Files\UI\Components - - - Common\Source Files\UI\Scenes\In-Game Menu Screens - - - Common\Source Files\UI\Scenes\In-Game Menu Screens - - - Common\Source Files\UI\Scenes - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\Scenes\In-Game Menu Screens - - - Common\Source Files\UI\Components - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Scenes\In-Game Menu Screens - - - Common\Source Files\UI\Scenes - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\Components - - - Common\Source Files\UI\Scenes - - - Common\Source Files\UI\Controls - - - PS3\Source Files\Network - - - PS3\Source Files\Leaderboards - - - Common\Source Files\Leaderboards - - - Xbox\Source Files\Leaderboards - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Scenes\In-Game Menu Screens - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\UI\Controls - - - Windows64\Source Files\Leaderboards - - - Orbis\Source Files\Leaderboards - - - Durango\Source Files\Leaderboards - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Scenes - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - PS3\PS3Extras - - - Common\Source Files\UI\Scenes\In-Game Menu Screens - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Scenes\In-Game Menu Screens - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Scenes\In-Game Menu Screens - - - PS3\PS3Extras - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI\Components - - - PS3\4JLibs - - - Common\Source Files\UI\Components - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\Audio - - - PS3\Source Files - - - Common\Source Files\UI\Controls - - - Xbox\Source Files\XUI\Menu screens - - - net\minecraft\client\renderer\tileentity - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Durango\Source Files\Achievements - - - Common\Source Files\UI\Scenes\Debug - - - Xbox\Source Files\XUI\Containers - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Xbox\Source Files\XUI\Containers - - - net\minecraft\client\model - - - net\minecraft\client\renderer\entity - - - Orbis - - - Orbis\Network - - - net\minecraft\server\commands - - - net\minecraft\server\commands - - - Durango\Network - - - Durango\Network - - - Durango\Network - - - Common\Source Files\Network\Sony - - - Common\Source Files\Network\Sony - - - Common\Source Files\Network\Sony - - - PS3\Source Files\Network - - - Orbis\Network - - - Orbis\Network - - - Common\Source Files\Network\Sony - - - PS3\Source Files\Network - - - PS3\Source Files\Network - - - Orbis\Network - - - Common\Source Files\GameRules\LevelGeneration - - - Durango\Network - - - Common\Source Files\UI\Scenes\In-Game Menu Screens - - - Xbox\Source Files\XUI\Menu screens - - - Durango\Network - - - PSVita - - - PSVita - - - PSVita\Source Files - - - PSVita\PSVitaExtras - - - Orbis\Network - - - Common\Source Files\Network\Sony - - - Common\Source Files\UI\Scenes\Debug - - - Durango\Network - - - Durango\Source Files\Leaderboards - - - Common\Source Files\Telemetry - - - Durango\Source Files\Sentient - - - Common\Source Files\UI - - - Orbis\Network - - - PS3\Source Files\Network - - - Common\Source Files\Network\Sony - - - Orbis - - - Orbis - - - Orbis - - - Common\Source Files\UI\Components - - - Durango\Network - - - Durango\Network - - - Durango\Network - - - Durango\Network - - - Durango\Network - - - Durango\XML - - - PSVita\Iggy\gdraw - - - PSVita\PSVitaExtras - - - PSVita\PSVitaExtras - - - PSVita\PSVitaExtras - - - PSVita\PSVitaExtras - - - PSVita\PSVitaExtras - - - PSVita\PSVitaExtras - - - Common\Source Files\UI\Controls - - - PSVita\Source Files\Network - - - PSVita\Source Files\Network - - - PSVita\Source Files\Network - - - PSVita\Source Files\Leaderboards - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Durango\Source Files\Leaderboards - - - PSVita\Source Files\Network - - - PSVita\Source Files\Network - - - PSVita\PSVitaExtras - - - PSVita\PSVitaExtras - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Scenes\In-Game Menu Screens - - - PSVita\Source Files\Network - - - PSVita\Source Files\Network - - - Orbis\Network - - - Common\Source Files\UI\Scenes - - - Common\Source Files\Leaderboards - - - Common\Source Files\Leaderboards - - - Common\Source Files\UI\Scenes\Help & Options - - - Common\Source Files\UI - - - net\minecraft\server - - - net\minecraft\server - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\model - - - net\minecraft\client\particle - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\entity - - - net\minecraft\client\renderer\tileentity - - - net\minecraft\client\renderer\texture - - - net\minecraft\client\renderer - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\All Platforms - - - net\minecraft\client\model - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Controls - - - Xbox\Source Files\XUI\Containers - - - Xbox\Source Files\XUI\Controls - - - Common\Source Files\UI\All Platforms - - - Xbox\Source Files\XUI\Containers - - - Common\Source Files\UI\Controls - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\Scenes\In-Game Menu Screens\Containers - - - Common\Source Files\UI\All Platforms - - - Common\Source Files\UI\Controls - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\Tutorial\Tasks - - - Common\Source Files\UI\Scenes\Frontend Menu screens - - - Common\Source Files\Leaderboards - - - Source Files - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - Xbox\4JLibs\libs - - - Xbox\4JLibs\libs - - - Durango\4JLibs\libs - - - Xbox\4JLibs\libs - - - Xbox\4JLibs\libs - - - Xbox\4JLibs\libs - - - Xbox\4JLibs\libs - - - Xbox\4JLibs\libs - - - Xbox\4JLibs\libs - - - Xbox\4JLibs\libs - - - Xbox\4JLibs\libs - - - Xbox\4JLibs\libs - - - Durango\4JLibs\libs - - - Durango\4JLibs\libs - - - Durango\4JLibs\libs - - - Windows64\4JLibs\libs - - - Windows64\4JLibs\libs - - - Windows64\4JLibs\libs - - - Windows64\4JLibs\libs - - - Windows64\Miles Sound System\lib - - - Windows64\Iggy\lib - - - Windows64\Iggy\lib - - - Windows64\Iggy\lib - - - Durango\Iggy\lib - - - Durango\Iggy\lib - - - Durango\Iggy\lib - - - Durango\Iggy\lib - - - PS3\Iggy\lib - - - PS3\Iggy\lib - - - PS3\Iggy\lib - - - Orbis\Iggy\lib - - - Orbis\Iggy\lib - - - PS3\4JLibs\libs - - - PS3\4JLibs\libs - - - PS3\4JLibs\libs - - - PS3\4JLibs\libs - - - PS3\4JLibs\libs - - - PS3\4JLibs\libs - - - PS3\4JLibs\libs - - - PS3\4JLibs\libs - - - Durango\Miles Sound System\lib - - - Durango\Miles Sound System\lib - - - PS3\4JLibs\libs - - - PS3\4JLibs\libs - - - PS3\4JLibs\libs - - - PS3\4JLibs\libs - - - Orbis\4JLibs\libs - - - Orbis\4JLibs\libs - - - Orbis\4JLibs\libs - - - Durango\4JLibs\libs - - - Durango\4JLibs\libs - - - Durango\4JLibs\libs - - - Windows64\4JLibs\libs - - - Windows64\4JLibs\libs - - - Durango\4JLibs\libs - - - Durango\4JLibs\libs - - - Orbis\4JLibs\libs - - - Orbis\4JLibs\libs - - - Orbis\4JLibs\libs - - - Durango\4JLibs\libs - - - Durango\4JLibs\libs - - - PSVita\4JLibs\libs - - - PSVita\4JLibs\libs - - - PSVita\4JLibs\libs - - - PSVita\4JLibs\libs - - - PSVita\4JLibs\libs - - - PSVita\4JLibs\libs - - - PSVita\4JLibs\libs - - - PSVita\4JLibs\libs - - - PSVita\4JLibs\libs - - - PSVita\4JLibs\libs - - - PSVita\4JLibs\libs - - - PSVita\4JLibs\libs - - - PSVita\Iggy\Lib - - - PSVita\Iggy\Lib - - - Xbox\4JLibs\libs - - - Xbox\4JLibs\libs - - - - - - Xbox\SentientLibs - - - - - Windows - - - Windows - - - Durango - - - - - Windows - - - - - PS3\SPUObjFiles\Release - - - PS3\SPUObjFiles\Release - - - PS3\SPUObjFiles\Release - - - PS3\SPUObjFiles\Release - - - PS3\SPUObjFiles\Release - - - PS3\SPUObjFiles\Release - - - PS3\SPUObjFiles\Release - - - PS3\SPUObjFiles\Release - - - PS3\SPUObjFiles\Release - - - PS3\SPUObjFiles\Debug - - - PS3\SPUObjFiles\Debug - - - PS3\SPUObjFiles\Debug - - - PS3\SPUObjFiles\Debug - - - PS3\SPUObjFiles\Debug - - - PS3\SPUObjFiles\Debug - - - PS3\SPUObjFiles\Debug - - - PS3\SPUObjFiles\Debug - - - PS3\SPUObjFiles\Debug - - - PS3\SPUObjFiles\ContentPackage - - - PS3\SPUObjFiles\ContentPackage - - - PS3\SPUObjFiles\ContentPackage - - - PS3\SPUObjFiles\ContentPackage - - - PS3\SPUObjFiles\ContentPackage - - - PS3\SPUObjFiles\ContentPackage - - - PS3\SPUObjFiles\ContentPackage - - - PS3\SPUObjFiles\ContentPackage - - - PS3\SPUObjFiles\ContentPackage - - - PS3\SPUObjFiles\Release - - - PS3\SPUObjFiles\Debug - - - PS3\SPUObjFiles\ContentPackage - + - - Source Files - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Minecraft.Client/MultiPlayerGameMode.cpp b/Minecraft.Client/MultiPlayerGameMode.cpp index cbf8a7ab3..e7611b37c 100644 --- a/Minecraft.Client/MultiPlayerGameMode.cpp +++ b/Minecraft.Client/MultiPlayerGameMode.cpp @@ -6,6 +6,7 @@ #include "Minecraft.h" #include "ClientConnection.h" #include "LevelRenderer.h" +#include "Common\Network\GameNetworkManager.h" #include "..\Minecraft.World\net.minecraft.world.level.h" #include "..\Minecraft.World\net.minecraft.world.item.h" #include "..\Minecraft.World\net.minecraft.world.entity.player.h" @@ -85,6 +86,14 @@ bool MultiPlayerGameMode::destroyBlock(int x, int y, int z, int face) if (oldTile == NULL) return false; +#ifdef _WINDOWS64 + if (g_NetworkManager.IsHost()) + { + level->levelEvent(LevelEvent::PARTICLES_DESTROY_BLOCK, x, y, z, oldTile->id + (level->getData(x, y, z) << Tile::TILE_NUM_SHIFT)); + return true; + } +#endif + level->levelEvent(LevelEvent::PARTICLES_DESTROY_BLOCK, x, y, z, oldTile->id + (level->getData(x, y, z) << Tile::TILE_NUM_SHIFT)); int data = level->getData(x, y, z); diff --git a/Minecraft.Client/PendingConnection.cpp b/Minecraft.Client/PendingConnection.cpp index e9b37fc61..8034dff2b 100644 --- a/Minecraft.Client/PendingConnection.cpp +++ b/Minecraft.Client/PendingConnection.cpp @@ -20,6 +20,10 @@ Random *PendingConnection::random = new Random(); +#ifdef _WINDOWS64 +bool g_bRejectDuplicateNames = true; +#endif + PendingConnection::PendingConnection(MinecraftServer *server, Socket *socket, const wstring& id) { // 4J - added initialisers @@ -166,6 +170,30 @@ void PendingConnection::handleLogin(shared_ptr packet) { disconnect(DisconnectPacket::eDisconnect_Banned); } +#ifdef _WINDOWS64 + else if (g_bRejectDuplicateNames) + { + bool nameTaken = false; + vector >& pl = server->getPlayers()->players; + for (unsigned int i = 0; i < pl.size(); i++) + { + if (pl[i] != NULL && pl[i]->name == name) + { + nameTaken = true; + break; + } + } + if (nameTaken) + { + app.DebugPrintf("Rejecting duplicate name: %ls\n", name.c_str()); + disconnect(DisconnectPacket::eDisconnect_Banned); + } + else + { + handleAcceptedLogin(packet); + } + } +#endif else { handleAcceptedLogin(packet); diff --git a/Minecraft.Client/PlayerList.cpp b/Minecraft.Client/PlayerList.cpp index 9fbef2a2a..3cf47a1cf 100644 --- a/Minecraft.Client/PlayerList.cpp +++ b/Minecraft.Client/PlayerList.cpp @@ -25,7 +25,7 @@ #include "..\Minecraft.World\net.minecraft.world.level.saveddata.h" #include "..\Minecraft.World\JavaMath.h" #include "..\Minecraft.World\EntityIO.h" -#ifdef _XBOX +#if defined(_XBOX) || defined(_WINDOWS64) #include "Xbox\Network\NetworkPlayerXbox.h" #elif defined(__PS3__) || defined(__ORBIS__) #include "Common\Network\Sony\NetworkPlayerSony.h" @@ -56,6 +56,11 @@ PlayerList::PlayerList(MinecraftServer *server) maxPlayers = server->settings->getInt(L"max-players", 20); doWhiteList = false; +#ifdef _WINDOWS64 + maxPlayers = MINECRAFT_NET_MAX_PLAYERS; +#else + maxPlayers = server->settings->getInt(L"max-players", 20); +#endif InitializeCriticalSection(&m_kickPlayersCS); InitializeCriticalSection(&m_closePlayersCS); } @@ -100,7 +105,14 @@ void PlayerList::placeNewPlayer(Connection *connection, shared_ptr } } #endif - +#ifdef _WINDOWS64 + if (networkPlayer != NULL && !networkPlayer->IsLocal()) + { + NetworkPlayerXbox* nxp = (NetworkPlayerXbox*)networkPlayer; + IQNetPlayer* qnp = nxp->GetQNetPlayer(); + wcsncpy_s(qnp->m_gamertag, 32, player->name.c_str(), _TRUNCATE); + } +#endif // 4J Stu - TU-1 hotfix // Fix for #13150 - When a player loads/joins a game after saving/leaving in the nether, sometimes they are spawned on top of the nether and cannot mine down validatePlayerSpawnPosition(player); @@ -227,7 +239,7 @@ void PlayerList::placeNewPlayer(Connection *connection, shared_ptr sendLevelInfo(player, level); // 4J-PB - removed, since it needs to be localised in the language the client is in - //server->players->broadcastAll( shared_ptr( new ChatPacket(L"§e" + playerEntity->name + L" joined the game.") ) ); + //server->players->broadcastAll( shared_ptr( new ChatPacket(L"�e" + playerEntity->name + L" joined the game.") ) ); broadcastAll( shared_ptr( new ChatPacket(player->name, ChatPacket::e_ChatPlayerJoinedGame) ) ); MemSect(14); @@ -428,7 +440,7 @@ void PlayerList::add(shared_ptr player) // Some code from here has been moved to the above validatePlayerSpawnPosition function // 4J Stu - Swapped these lines about so that we get the chunk visiblity packet way ahead of all the add tracked entity packets - // Fix for #9169 - ART : Sign text is replaced with the words “Awaiting approval”. + // Fix for #9169 - ART : Sign text is replaced with the words �Awaiting approval�. changeDimension(player, NULL); level->addEntity(player); @@ -469,14 +481,12 @@ void PlayerList::remove(shared_ptr player) //4J Stu - We don't want to save the map data for guests, so when we are sure that the player is gone delete the map if(player->isGuest()) playerIo->deleteMapFilesForPlayer(player); ServerLevel *level = player->getLevel(); - if (player->riding != NULL) +if (player->riding != NULL) { - // remove mount first because the player unmounts when being - // removed, also remove mount because it's saved in the player's - // save tag level->removeEntityImmediately(player->riding); app.DebugPrintf("removing player mount"); } + level->getTracker()->removeEntity(player); level->removeEntity(player); level->getChunkMap()->remove(player); AUTO_VAR(it, find(players.begin(),players.end(),player)); @@ -497,17 +507,30 @@ void PlayerList::remove(shared_ptr player) shared_ptr PlayerList::getPlayerForLogin(PendingConnection *pendingConnection, const wstring& userName, PlayerUID xuid, PlayerUID onlineXuid) { - if (players.size() >= maxPlayers) +#ifdef _WINDOWS64 + if (players.size() >= (unsigned int)MINECRAFT_NET_MAX_PLAYERS) +#else + if (players.size() >= (unsigned int)maxPlayers) +#endif { pendingConnection->disconnect(DisconnectPacket::eDisconnect_ServerFull); return shared_ptr(); } - shared_ptr player = shared_ptr(new ServerPlayer(server, server->getLevel(0), userName, new ServerPlayerGameMode(server->getLevel(0)) )); 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 + { + INetworkPlayer* np = pendingConnection->connection->getSocket()->getPlayer(); + if (np != NULL) + { + PlayerUID realXuid = np->GetUID(); + player->setXuid(realXuid); + player->setOnlineXuid(realXuid); + } + } +#endif // Work out the base server player settings INetworkPlayer *networkPlayer = pendingConnection->connection->getSocket()->getPlayer(); if(networkPlayer != NULL && !networkPlayer->IsHost()) diff --git a/Minecraft.Client/Windows64/Network/WinsockNetLayer.cpp b/Minecraft.Client/Windows64/Network/WinsockNetLayer.cpp new file mode 100644 index 000000000..19fc25987 --- /dev/null +++ b/Minecraft.Client/Windows64/Network/WinsockNetLayer.cpp @@ -0,0 +1,844 @@ +#include "stdafx.h" + +#ifdef _WINDOWS64 + +#include "WinsockNetLayer.h" +#include "..\..\Common\Network\PlatformNetworkManagerStub.h" +#include "..\..\..\Minecraft.World\Socket.h" + +SOCKET WinsockNetLayer::s_listenSocket = INVALID_SOCKET; +SOCKET WinsockNetLayer::s_hostConnectionSocket = INVALID_SOCKET; +HANDLE WinsockNetLayer::s_acceptThread = NULL; +HANDLE WinsockNetLayer::s_clientRecvThread = NULL; + +bool WinsockNetLayer::s_isHost = false; +bool WinsockNetLayer::s_connected = false; +bool WinsockNetLayer::s_active = false; +bool WinsockNetLayer::s_initialized = false; + +BYTE WinsockNetLayer::s_localSmallId = 0; +BYTE WinsockNetLayer::s_hostSmallId = 0; +BYTE WinsockNetLayer::s_nextSmallId = 1; + +CRITICAL_SECTION WinsockNetLayer::s_sendLock; +CRITICAL_SECTION WinsockNetLayer::s_connectionsLock; + +std::vector WinsockNetLayer::s_connections; + +SOCKET WinsockNetLayer::s_advertiseSock = INVALID_SOCKET; +HANDLE WinsockNetLayer::s_advertiseThread = NULL; +volatile bool WinsockNetLayer::s_advertising = false; +Win64LANBroadcast WinsockNetLayer::s_advertiseData = {}; +CRITICAL_SECTION WinsockNetLayer::s_advertiseLock; +int WinsockNetLayer::s_hostGamePort = WIN64_NET_DEFAULT_PORT; + +SOCKET WinsockNetLayer::s_discoverySock = INVALID_SOCKET; +HANDLE WinsockNetLayer::s_discoveryThread = NULL; +volatile bool WinsockNetLayer::s_discovering = false; +CRITICAL_SECTION WinsockNetLayer::s_discoveryLock; +std::vector WinsockNetLayer::s_discoveredSessions; + +CRITICAL_SECTION WinsockNetLayer::s_disconnectLock; +std::vector WinsockNetLayer::s_disconnectedSmallIds; + +CRITICAL_SECTION WinsockNetLayer::s_freeSmallIdLock; +std::vector WinsockNetLayer::s_freeSmallIds; + +bool g_Win64MultiplayerHost = false; +bool g_Win64MultiplayerJoin = false; +int g_Win64MultiplayerPort = WIN64_NET_DEFAULT_PORT; +char g_Win64MultiplayerIP[256] = "127.0.0.1"; + +bool WinsockNetLayer::Initialize() +{ + if (s_initialized) return true; + + WSADATA wsaData; + int result = WSAStartup(MAKEWORD(2, 2), &wsaData); + if (result != 0) + { + app.DebugPrintf("WSAStartup failed: %d\n", result); + return false; + } + + InitializeCriticalSection(&s_sendLock); + InitializeCriticalSection(&s_connectionsLock); + InitializeCriticalSection(&s_advertiseLock); + InitializeCriticalSection(&s_discoveryLock); + InitializeCriticalSection(&s_disconnectLock); + InitializeCriticalSection(&s_freeSmallIdLock); + + s_initialized = true; + + StartDiscovery(); + + return true; +} + +void WinsockNetLayer::Shutdown() +{ + StopAdvertising(); + StopDiscovery(); + + s_active = false; + s_connected = false; + + if (s_listenSocket != INVALID_SOCKET) + { + closesocket(s_listenSocket); + s_listenSocket = INVALID_SOCKET; + } + + if (s_hostConnectionSocket != INVALID_SOCKET) + { + closesocket(s_hostConnectionSocket); + s_hostConnectionSocket = INVALID_SOCKET; + } + + EnterCriticalSection(&s_connectionsLock); + for (size_t i = 0; i < s_connections.size(); i++) + { + s_connections[i].active = false; + if (s_connections[i].tcpSocket != INVALID_SOCKET) + { + closesocket(s_connections[i].tcpSocket); + } + } + s_connections.clear(); + LeaveCriticalSection(&s_connectionsLock); + + if (s_acceptThread != NULL) + { + WaitForSingleObject(s_acceptThread, 2000); + CloseHandle(s_acceptThread); + s_acceptThread = NULL; + } + + if (s_clientRecvThread != NULL) + { + WaitForSingleObject(s_clientRecvThread, 2000); + CloseHandle(s_clientRecvThread); + s_clientRecvThread = NULL; + } + + if (s_initialized) + { + DeleteCriticalSection(&s_sendLock); + DeleteCriticalSection(&s_connectionsLock); + DeleteCriticalSection(&s_advertiseLock); + DeleteCriticalSection(&s_discoveryLock); + DeleteCriticalSection(&s_disconnectLock); + s_disconnectedSmallIds.clear(); + DeleteCriticalSection(&s_freeSmallIdLock); + s_freeSmallIds.clear(); + WSACleanup(); + s_initialized = false; + } +} + +bool WinsockNetLayer::HostGame(int port) +{ + if (!s_initialized && !Initialize()) return false; + + s_isHost = true; + s_localSmallId = 0; + s_hostSmallId = 0; + s_nextSmallId = 1; + s_hostGamePort = port; + + EnterCriticalSection(&s_freeSmallIdLock); + s_freeSmallIds.clear(); + LeaveCriticalSection(&s_freeSmallIdLock); + + struct addrinfo hints = {}; + struct addrinfo *result = NULL; + + hints.ai_family = AF_INET; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = IPPROTO_TCP; + hints.ai_flags = AI_PASSIVE; + + char portStr[16]; + sprintf_s(portStr, "%d", port); + + int iResult = getaddrinfo(NULL, portStr, &hints, &result); + if (iResult != 0) + { + app.DebugPrintf("getaddrinfo failed: %d\n", iResult); + return false; + } + + s_listenSocket = socket(result->ai_family, result->ai_socktype, result->ai_protocol); + if (s_listenSocket == INVALID_SOCKET) + { + app.DebugPrintf("socket() failed: %d\n", WSAGetLastError()); + freeaddrinfo(result); + return false; + } + + int opt = 1; + setsockopt(s_listenSocket, SOL_SOCKET, SO_REUSEADDR, (const char *)&opt, sizeof(opt)); + + iResult = ::bind(s_listenSocket, result->ai_addr, (int)result->ai_addrlen); + freeaddrinfo(result); + if (iResult == SOCKET_ERROR) + { + app.DebugPrintf("bind() failed: %d\n", WSAGetLastError()); + closesocket(s_listenSocket); + s_listenSocket = INVALID_SOCKET; + return false; + } + + iResult = listen(s_listenSocket, SOMAXCONN); + if (iResult == SOCKET_ERROR) + { + app.DebugPrintf("listen() failed: %d\n", WSAGetLastError()); + closesocket(s_listenSocket); + s_listenSocket = INVALID_SOCKET; + return false; + } + + s_active = true; + s_connected = true; + + s_acceptThread = CreateThread(NULL, 0, AcceptThreadProc, NULL, 0, NULL); + + app.DebugPrintf("Win64 LAN: Hosting on port %d\n", port); + return true; +} + +bool WinsockNetLayer::JoinGame(const char *ip, int port) +{ + if (!s_initialized && !Initialize()) return false; + + s_isHost = false; + s_hostSmallId = 0; + + struct addrinfo hints = {}; + struct addrinfo *result = NULL; + + hints.ai_family = AF_INET; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = IPPROTO_TCP; + + char portStr[16]; + sprintf_s(portStr, "%d", port); + + int iResult = getaddrinfo(ip, portStr, &hints, &result); + if (iResult != 0) + { + app.DebugPrintf("getaddrinfo failed for %s:%d - %d\n", ip, port, iResult); + return false; + } + + s_hostConnectionSocket = socket(result->ai_family, result->ai_socktype, result->ai_protocol); + if (s_hostConnectionSocket == INVALID_SOCKET) + { + app.DebugPrintf("socket() failed: %d\n", WSAGetLastError()); + freeaddrinfo(result); + return false; + } + + int noDelay = 1; + setsockopt(s_hostConnectionSocket, IPPROTO_TCP, TCP_NODELAY, (const char *)&noDelay, sizeof(noDelay)); + + iResult = connect(s_hostConnectionSocket, result->ai_addr, (int)result->ai_addrlen); + freeaddrinfo(result); + if (iResult == SOCKET_ERROR) + { + app.DebugPrintf("connect() to %s:%d failed: %d\n", ip, port, WSAGetLastError()); + closesocket(s_hostConnectionSocket); + s_hostConnectionSocket = INVALID_SOCKET; + return false; + } + + BYTE assignBuf[1]; + int bytesRecv = recv(s_hostConnectionSocket, (char *)assignBuf, 1, 0); + if (bytesRecv != 1) + { + app.DebugPrintf("Failed to receive small ID assignment from host\n"); + closesocket(s_hostConnectionSocket); + s_hostConnectionSocket = INVALID_SOCKET; + return false; + } + s_localSmallId = assignBuf[0]; + + app.DebugPrintf("Win64 LAN: Connected to %s:%d, assigned smallId=%d\n", ip, port, s_localSmallId); + + s_active = true; + s_connected = true; + + s_clientRecvThread = CreateThread(NULL, 0, ClientRecvThreadProc, NULL, 0, NULL); + + return true; +} + +bool WinsockNetLayer::SendOnSocket(SOCKET sock, const void *data, int dataSize) +{ + if (sock == INVALID_SOCKET || dataSize <= 0) return false; + + EnterCriticalSection(&s_sendLock); + + BYTE header[4]; + header[0] = (BYTE)((dataSize >> 24) & 0xFF); + header[1] = (BYTE)((dataSize >> 16) & 0xFF); + header[2] = (BYTE)((dataSize >> 8) & 0xFF); + header[3] = (BYTE)(dataSize & 0xFF); + + int totalSent = 0; + int toSend = 4; + while (totalSent < toSend) + { + int sent = send(sock, (const char *)header + totalSent, toSend - totalSent, 0); + if (sent == SOCKET_ERROR || sent == 0) + { + LeaveCriticalSection(&s_sendLock); + return false; + } + totalSent += sent; + } + + totalSent = 0; + while (totalSent < dataSize) + { + int sent = send(sock, (const char *)data + totalSent, dataSize - totalSent, 0); + if (sent == SOCKET_ERROR || sent == 0) + { + LeaveCriticalSection(&s_sendLock); + return false; + } + totalSent += sent; + } + + LeaveCriticalSection(&s_sendLock); + return true; +} + +bool WinsockNetLayer::SendToSmallId(BYTE targetSmallId, const void *data, int dataSize) +{ + if (!s_active) return false; + + if (s_isHost) + { + SOCKET sock = GetSocketForSmallId(targetSmallId); + if (sock == INVALID_SOCKET) return false; + return SendOnSocket(sock, data, dataSize); + } + else + { + return SendOnSocket(s_hostConnectionSocket, data, dataSize); + } +} + +SOCKET WinsockNetLayer::GetSocketForSmallId(BYTE smallId) +{ + EnterCriticalSection(&s_connectionsLock); + for (size_t i = 0; i < s_connections.size(); i++) + { + if (s_connections[i].smallId == smallId && s_connections[i].active) + { + SOCKET sock = s_connections[i].tcpSocket; + LeaveCriticalSection(&s_connectionsLock); + return sock; + } + } + LeaveCriticalSection(&s_connectionsLock); + return INVALID_SOCKET; +} + +static bool RecvExact(SOCKET sock, BYTE *buf, int len) +{ + int totalRecv = 0; + while (totalRecv < len) + { + int r = recv(sock, (char *)buf + totalRecv, len - totalRecv, 0); + if (r <= 0) return false; + totalRecv += r; + } + return true; +} + +void WinsockNetLayer::HandleDataReceived(BYTE fromSmallId, BYTE toSmallId, unsigned char *data, unsigned int dataSize) +{ + INetworkPlayer *pPlayerFrom = g_NetworkManager.GetPlayerBySmallId(fromSmallId); + INetworkPlayer *pPlayerTo = g_NetworkManager.GetPlayerBySmallId(toSmallId); + + if (pPlayerFrom == NULL || pPlayerTo == NULL) return; + + if (s_isHost) + { + ::Socket *pSocket = pPlayerFrom->GetSocket(); + if (pSocket != NULL) + pSocket->pushDataToQueue(data, dataSize, false); + } + else + { + ::Socket *pSocket = pPlayerTo->GetSocket(); + if (pSocket != NULL) + pSocket->pushDataToQueue(data, dataSize, true); + } +} + +DWORD WINAPI WinsockNetLayer::AcceptThreadProc(LPVOID param) +{ + while (s_active) + { + SOCKET clientSocket = accept(s_listenSocket, NULL, NULL); + if (clientSocket == INVALID_SOCKET) + { + if (s_active) + app.DebugPrintf("accept() failed: %d\n", WSAGetLastError()); + break; + } + + int noDelay = 1; + setsockopt(clientSocket, IPPROTO_TCP, TCP_NODELAY, (const char *)&noDelay, sizeof(noDelay)); + + extern QNET_STATE _iQNetStubState; + if (_iQNetStubState != QNET_STATE_GAME_PLAY) + { + app.DebugPrintf("Win64 LAN: Rejecting connection, game not ready\n"); + closesocket(clientSocket); + continue; + } + + BYTE assignedSmallId; + EnterCriticalSection(&s_freeSmallIdLock); + if (!s_freeSmallIds.empty()) + { + assignedSmallId = s_freeSmallIds.back(); + s_freeSmallIds.pop_back(); + } + else if (s_nextSmallId < MINECRAFT_NET_MAX_PLAYERS) + { + assignedSmallId = s_nextSmallId++; + } + else + { + LeaveCriticalSection(&s_freeSmallIdLock); + app.DebugPrintf("Win64 LAN: Server full, rejecting connection\n"); + closesocket(clientSocket); + continue; + } + LeaveCriticalSection(&s_freeSmallIdLock); + + BYTE assignBuf[1] = { assignedSmallId }; + int sent = send(clientSocket, (const char *)assignBuf, 1, 0); + if (sent != 1) + { + app.DebugPrintf("Failed to send small ID to client\n"); + closesocket(clientSocket); + continue; + } + + Win64RemoteConnection conn; + conn.tcpSocket = clientSocket; + conn.smallId = assignedSmallId; + conn.active = true; + conn.recvThread = NULL; + + EnterCriticalSection(&s_connectionsLock); + s_connections.push_back(conn); + int connIdx = (int)s_connections.size() - 1; + LeaveCriticalSection(&s_connectionsLock); + + app.DebugPrintf("Win64 LAN: Client connected, assigned smallId=%d\n", assignedSmallId); + + IQNetPlayer *qnetPlayer = &IQNet::m_player[assignedSmallId]; + + extern void Win64_SetupRemoteQNetPlayer(IQNetPlayer *player, BYTE smallId, bool isHost, bool isLocal); + Win64_SetupRemoteQNetPlayer(qnetPlayer, assignedSmallId, false, false); + + extern CPlatformNetworkManagerStub *g_pPlatformNetworkManager; + g_pPlatformNetworkManager->NotifyPlayerJoined(qnetPlayer); + + DWORD *threadParam = new DWORD; + *threadParam = connIdx; + HANDLE hThread = CreateThread(NULL, 0, RecvThreadProc, threadParam, 0, NULL); + + EnterCriticalSection(&s_connectionsLock); + if (connIdx < (int)s_connections.size()) + s_connections[connIdx].recvThread = hThread; + LeaveCriticalSection(&s_connectionsLock); + } + return 0; +} + +DWORD WINAPI WinsockNetLayer::RecvThreadProc(LPVOID param) +{ + DWORD connIdx = *(DWORD *)param; + delete (DWORD *)param; + + EnterCriticalSection(&s_connectionsLock); + if (connIdx >= (DWORD)s_connections.size()) + { + LeaveCriticalSection(&s_connectionsLock); + return 0; + } + SOCKET sock = s_connections[connIdx].tcpSocket; + BYTE clientSmallId = s_connections[connIdx].smallId; + LeaveCriticalSection(&s_connectionsLock); + + BYTE *recvBuf = new BYTE[WIN64_NET_RECV_BUFFER_SIZE]; + + while (s_active) + { + BYTE header[4]; + if (!RecvExact(sock, header, 4)) + { + app.DebugPrintf("Win64 LAN: Client smallId=%d disconnected (header)\n", clientSmallId); + break; + } + + int packetSize = (header[0] << 24) | (header[1] << 16) | (header[2] << 8) | header[3]; + + if (packetSize <= 0 || packetSize > WIN64_NET_RECV_BUFFER_SIZE) + { + app.DebugPrintf("Win64 LAN: Invalid packet size %d from client smallId=%d\n", packetSize, clientSmallId); + break; + } + + if (!RecvExact(sock, recvBuf, packetSize)) + { + app.DebugPrintf("Win64 LAN: Client smallId=%d disconnected (body)\n", clientSmallId); + break; + } + + HandleDataReceived(clientSmallId, s_hostSmallId, recvBuf, packetSize); + } + + delete[] recvBuf; + + EnterCriticalSection(&s_connectionsLock); + for (size_t i = 0; i < s_connections.size(); i++) + { + if (s_connections[i].smallId == clientSmallId) + { + s_connections[i].active = false; + closesocket(s_connections[i].tcpSocket); + s_connections[i].tcpSocket = INVALID_SOCKET; + break; + } + } + LeaveCriticalSection(&s_connectionsLock); + + EnterCriticalSection(&s_disconnectLock); + s_disconnectedSmallIds.push_back(clientSmallId); + LeaveCriticalSection(&s_disconnectLock); + + return 0; +} + +bool WinsockNetLayer::PopDisconnectedSmallId(BYTE *outSmallId) +{ + bool found = false; + EnterCriticalSection(&s_disconnectLock); + if (!s_disconnectedSmallIds.empty()) + { + *outSmallId = s_disconnectedSmallIds.back(); + s_disconnectedSmallIds.pop_back(); + found = true; + } + LeaveCriticalSection(&s_disconnectLock); + return found; +} + +void WinsockNetLayer::PushFreeSmallId(BYTE smallId) +{ + EnterCriticalSection(&s_freeSmallIdLock); + s_freeSmallIds.push_back(smallId); + LeaveCriticalSection(&s_freeSmallIdLock); +} + +DWORD WINAPI WinsockNetLayer::ClientRecvThreadProc(LPVOID param) +{ + BYTE *recvBuf = new BYTE[WIN64_NET_RECV_BUFFER_SIZE]; + + while (s_active && s_hostConnectionSocket != INVALID_SOCKET) + { + BYTE header[4]; + if (!RecvExact(s_hostConnectionSocket, header, 4)) + { + app.DebugPrintf("Win64 LAN: Disconnected from host (header)\n"); + break; + } + + int packetSize = (header[0] << 24) | (header[1] << 16) | (header[2] << 8) | header[3]; + + if (packetSize <= 0 || packetSize > WIN64_NET_RECV_BUFFER_SIZE) + { + app.DebugPrintf("Win64 LAN: Invalid packet size %d from host\n", packetSize); + break; + } + + if (!RecvExact(s_hostConnectionSocket, recvBuf, packetSize)) + { + app.DebugPrintf("Win64 LAN: Disconnected from host (body)\n"); + break; + } + + HandleDataReceived(s_hostSmallId, s_localSmallId, recvBuf, packetSize); + } + + delete[] recvBuf; + + s_connected = false; + return 0; +} + +bool WinsockNetLayer::StartAdvertising(int gamePort, const wchar_t *hostName, unsigned int gameSettings, unsigned int texPackId, unsigned char subTexId, unsigned short netVer) +{ + if (s_advertising) return true; + if (!s_initialized) return false; + + EnterCriticalSection(&s_advertiseLock); + memset(&s_advertiseData, 0, sizeof(s_advertiseData)); + s_advertiseData.magic = WIN64_LAN_BROADCAST_MAGIC; + s_advertiseData.netVersion = netVer; + s_advertiseData.gamePort = (WORD)gamePort; + wcsncpy_s(s_advertiseData.hostName, 32, hostName, _TRUNCATE); + s_advertiseData.playerCount = 1; + s_advertiseData.maxPlayers = MINECRAFT_NET_MAX_PLAYERS; + s_advertiseData.gameHostSettings = gameSettings; + s_advertiseData.texturePackParentId = texPackId; + s_advertiseData.subTexturePackId = subTexId; + s_advertiseData.isJoinable = 0; + s_hostGamePort = gamePort; + LeaveCriticalSection(&s_advertiseLock); + + s_advertiseSock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + if (s_advertiseSock == INVALID_SOCKET) + { + app.DebugPrintf("Win64 LAN: Failed to create advertise socket: %d\n", WSAGetLastError()); + return false; + } + + BOOL broadcast = TRUE; + setsockopt(s_advertiseSock, SOL_SOCKET, SO_BROADCAST, (const char *)&broadcast, sizeof(broadcast)); + + s_advertising = true; + s_advertiseThread = CreateThread(NULL, 0, AdvertiseThreadProc, NULL, 0, NULL); + + app.DebugPrintf("Win64 LAN: Started advertising on UDP port %d\n", WIN64_LAN_DISCOVERY_PORT); + return true; +} + +void WinsockNetLayer::StopAdvertising() +{ + s_advertising = false; + + if (s_advertiseSock != INVALID_SOCKET) + { + closesocket(s_advertiseSock); + s_advertiseSock = INVALID_SOCKET; + } + + if (s_advertiseThread != NULL) + { + WaitForSingleObject(s_advertiseThread, 2000); + CloseHandle(s_advertiseThread); + s_advertiseThread = NULL; + } +} + +void WinsockNetLayer::UpdateAdvertisePlayerCount(BYTE count) +{ + EnterCriticalSection(&s_advertiseLock); + s_advertiseData.playerCount = count; + LeaveCriticalSection(&s_advertiseLock); +} + +void WinsockNetLayer::UpdateAdvertiseJoinable(bool joinable) +{ + EnterCriticalSection(&s_advertiseLock); + s_advertiseData.isJoinable = joinable ? 1 : 0; + LeaveCriticalSection(&s_advertiseLock); +} + +DWORD WINAPI WinsockNetLayer::AdvertiseThreadProc(LPVOID param) +{ + struct sockaddr_in broadcastAddr; + memset(&broadcastAddr, 0, sizeof(broadcastAddr)); + broadcastAddr.sin_family = AF_INET; + broadcastAddr.sin_port = htons(WIN64_LAN_DISCOVERY_PORT); + broadcastAddr.sin_addr.s_addr = INADDR_BROADCAST; + + while (s_advertising) + { + EnterCriticalSection(&s_advertiseLock); + Win64LANBroadcast data = s_advertiseData; + LeaveCriticalSection(&s_advertiseLock); + + int sent = sendto(s_advertiseSock, (const char *)&data, sizeof(data), 0, + (struct sockaddr *)&broadcastAddr, sizeof(broadcastAddr)); + + if (sent == SOCKET_ERROR && s_advertising) + { + app.DebugPrintf("Win64 LAN: Broadcast sendto failed: %d\n", WSAGetLastError()); + } + + Sleep(1000); + } + + return 0; +} + +bool WinsockNetLayer::StartDiscovery() +{ + if (s_discovering) return true; + if (!s_initialized) return false; + + s_discoverySock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + if (s_discoverySock == INVALID_SOCKET) + { + app.DebugPrintf("Win64 LAN: Failed to create discovery socket: %d\n", WSAGetLastError()); + return false; + } + + BOOL reuseAddr = TRUE; + setsockopt(s_discoverySock, SOL_SOCKET, SO_REUSEADDR, (const char *)&reuseAddr, sizeof(reuseAddr)); + + struct sockaddr_in bindAddr; + memset(&bindAddr, 0, sizeof(bindAddr)); + bindAddr.sin_family = AF_INET; + bindAddr.sin_port = htons(WIN64_LAN_DISCOVERY_PORT); + bindAddr.sin_addr.s_addr = INADDR_ANY; + + if (::bind(s_discoverySock, (struct sockaddr *)&bindAddr, sizeof(bindAddr)) == SOCKET_ERROR) + { + app.DebugPrintf("Win64 LAN: Discovery bind failed: %d\n", WSAGetLastError()); + closesocket(s_discoverySock); + s_discoverySock = INVALID_SOCKET; + return false; + } + + DWORD timeout = 500; + setsockopt(s_discoverySock, SOL_SOCKET, SO_RCVTIMEO, (const char *)&timeout, sizeof(timeout)); + + s_discovering = true; + s_discoveryThread = CreateThread(NULL, 0, DiscoveryThreadProc, NULL, 0, NULL); + + app.DebugPrintf("Win64 LAN: Listening for LAN games on UDP port %d\n", WIN64_LAN_DISCOVERY_PORT); + return true; +} + +void WinsockNetLayer::StopDiscovery() +{ + s_discovering = false; + + if (s_discoverySock != INVALID_SOCKET) + { + closesocket(s_discoverySock); + s_discoverySock = INVALID_SOCKET; + } + + if (s_discoveryThread != NULL) + { + WaitForSingleObject(s_discoveryThread, 2000); + CloseHandle(s_discoveryThread); + s_discoveryThread = NULL; + } + + EnterCriticalSection(&s_discoveryLock); + s_discoveredSessions.clear(); + LeaveCriticalSection(&s_discoveryLock); +} + +std::vector WinsockNetLayer::GetDiscoveredSessions() +{ + std::vector result; + EnterCriticalSection(&s_discoveryLock); + result = s_discoveredSessions; + LeaveCriticalSection(&s_discoveryLock); + return result; +} + +DWORD WINAPI WinsockNetLayer::DiscoveryThreadProc(LPVOID param) +{ + char recvBuf[512]; + + while (s_discovering) + { + struct sockaddr_in senderAddr; + int senderLen = sizeof(senderAddr); + + int recvLen = recvfrom(s_discoverySock, recvBuf, sizeof(recvBuf), 0, + (struct sockaddr *)&senderAddr, &senderLen); + + if (recvLen == SOCKET_ERROR) + { + continue; + } + + if (recvLen < (int)sizeof(Win64LANBroadcast)) + continue; + + Win64LANBroadcast *broadcast = (Win64LANBroadcast *)recvBuf; + if (broadcast->magic != WIN64_LAN_BROADCAST_MAGIC) + continue; + + char senderIP[64]; + inet_ntop(AF_INET, &senderAddr.sin_addr, senderIP, sizeof(senderIP)); + + DWORD now = GetTickCount(); + + EnterCriticalSection(&s_discoveryLock); + + bool found = false; + for (size_t i = 0; i < s_discoveredSessions.size(); i++) + { + if (strcmp(s_discoveredSessions[i].hostIP, senderIP) == 0 && + s_discoveredSessions[i].hostPort == (int)broadcast->gamePort) + { + s_discoveredSessions[i].netVersion = broadcast->netVersion; + wcsncpy_s(s_discoveredSessions[i].hostName, 32, broadcast->hostName, _TRUNCATE); + s_discoveredSessions[i].playerCount = broadcast->playerCount; + s_discoveredSessions[i].maxPlayers = broadcast->maxPlayers; + s_discoveredSessions[i].gameHostSettings = broadcast->gameHostSettings; + s_discoveredSessions[i].texturePackParentId = broadcast->texturePackParentId; + s_discoveredSessions[i].subTexturePackId = broadcast->subTexturePackId; + s_discoveredSessions[i].isJoinable = (broadcast->isJoinable != 0); + s_discoveredSessions[i].lastSeenTick = now; + found = true; + break; + } + } + + if (!found) + { + Win64LANSession session; + memset(&session, 0, sizeof(session)); + strncpy_s(session.hostIP, sizeof(session.hostIP), senderIP, _TRUNCATE); + session.hostPort = (int)broadcast->gamePort; + session.netVersion = broadcast->netVersion; + wcsncpy_s(session.hostName, 32, broadcast->hostName, _TRUNCATE); + session.playerCount = broadcast->playerCount; + session.maxPlayers = broadcast->maxPlayers; + session.gameHostSettings = broadcast->gameHostSettings; + session.texturePackParentId = broadcast->texturePackParentId; + session.subTexturePackId = broadcast->subTexturePackId; + session.isJoinable = (broadcast->isJoinable != 0); + session.lastSeenTick = now; + s_discoveredSessions.push_back(session); + + app.DebugPrintf("Win64 LAN: Discovered game \"%ls\" at %s:%d\n", + session.hostName, session.hostIP, session.hostPort); + } + + for (size_t i = s_discoveredSessions.size(); i > 0; i--) + { + if (now - s_discoveredSessions[i - 1].lastSeenTick > 5000) + { + app.DebugPrintf("Win64 LAN: Session \"%ls\" at %s timed out\n", + s_discoveredSessions[i - 1].hostName, s_discoveredSessions[i - 1].hostIP); + s_discoveredSessions.erase(s_discoveredSessions.begin() + (i - 1)); + } + } + + LeaveCriticalSection(&s_discoveryLock); + } + + return 0; +} + +#endif diff --git a/Minecraft.Client/Windows64/Network/WinsockNetLayer.h b/Minecraft.Client/Windows64/Network/WinsockNetLayer.h new file mode 100644 index 000000000..96b03c9ba --- /dev/null +++ b/Minecraft.Client/Windows64/Network/WinsockNetLayer.h @@ -0,0 +1,147 @@ +#pragma once + +#ifdef _WINDOWS64 + +#include +#include +#include +#include "..\..\Common\Network\NetworkPlayerInterface.h" + +#pragma comment(lib, "Ws2_32.lib") + +#define WIN64_NET_DEFAULT_PORT 25565 +#define WIN64_NET_MAX_CLIENTS 7 +#define WIN64_NET_RECV_BUFFER_SIZE 65536 +#define WIN64_LAN_DISCOVERY_PORT 25566 +#define WIN64_LAN_BROADCAST_MAGIC 0x4D434C4E + +class Socket; + +#pragma pack(push, 1) +struct Win64LANBroadcast +{ + DWORD magic; + WORD netVersion; + WORD gamePort; + wchar_t hostName[32]; + BYTE playerCount; + BYTE maxPlayers; + DWORD gameHostSettings; + DWORD texturePackParentId; + BYTE subTexturePackId; + BYTE isJoinable; +}; +#pragma pack(pop) + +struct Win64LANSession +{ + char hostIP[64]; + int hostPort; + wchar_t hostName[32]; + unsigned short netVersion; + unsigned char playerCount; + unsigned char maxPlayers; + unsigned int gameHostSettings; + unsigned int texturePackParentId; + unsigned char subTexturePackId; + bool isJoinable; + DWORD lastSeenTick; +}; + +struct Win64RemoteConnection +{ + SOCKET tcpSocket; + BYTE smallId; + HANDLE recvThread; + volatile bool active; +}; + +class WinsockNetLayer +{ +public: + static bool Initialize(); + static void Shutdown(); + + static bool HostGame(int port); + static bool JoinGame(const char *ip, int port); + + static bool SendToSmallId(BYTE targetSmallId, const void *data, int dataSize); + static bool SendOnSocket(SOCKET sock, const void *data, int dataSize); + + static bool IsHosting() { return s_isHost; } + static bool IsConnected() { return s_connected; } + static bool IsActive() { return s_active; } + + static BYTE GetLocalSmallId() { return s_localSmallId; } + static BYTE GetHostSmallId() { return s_hostSmallId; } + + static SOCKET GetSocketForSmallId(BYTE smallId); + + static void HandleDataReceived(BYTE fromSmallId, BYTE toSmallId, unsigned char *data, unsigned int dataSize); + + static bool PopDisconnectedSmallId(BYTE *outSmallId); + static void PushFreeSmallId(BYTE smallId); + + static bool StartAdvertising(int gamePort, const wchar_t *hostName, unsigned int gameSettings, unsigned int texPackId, unsigned char subTexId, unsigned short netVer); + static void StopAdvertising(); + static void UpdateAdvertisePlayerCount(BYTE count); + static void UpdateAdvertiseJoinable(bool joinable); + + static bool StartDiscovery(); + static void StopDiscovery(); + static std::vector GetDiscoveredSessions(); + + static int GetHostPort() { return s_hostGamePort; } + +private: + static DWORD WINAPI AcceptThreadProc(LPVOID param); + static DWORD WINAPI RecvThreadProc(LPVOID param); + static DWORD WINAPI ClientRecvThreadProc(LPVOID param); + static DWORD WINAPI AdvertiseThreadProc(LPVOID param); + static DWORD WINAPI DiscoveryThreadProc(LPVOID param); + + static SOCKET s_listenSocket; + static SOCKET s_hostConnectionSocket; + static HANDLE s_acceptThread; + static HANDLE s_clientRecvThread; + + static bool s_isHost; + static bool s_connected; + static bool s_active; + static bool s_initialized; + + static BYTE s_localSmallId; + static BYTE s_hostSmallId; + static BYTE s_nextSmallId; + + static CRITICAL_SECTION s_sendLock; + static CRITICAL_SECTION s_connectionsLock; + + static std::vector s_connections; + + static SOCKET s_advertiseSock; + static HANDLE s_advertiseThread; + static volatile bool s_advertising; + static Win64LANBroadcast s_advertiseData; + static CRITICAL_SECTION s_advertiseLock; + static int s_hostGamePort; + + static SOCKET s_discoverySock; + static HANDLE s_discoveryThread; + static volatile bool s_discovering; + static CRITICAL_SECTION s_discoveryLock; + static std::vector s_discoveredSessions; + + static CRITICAL_SECTION s_disconnectLock; + static std::vector s_disconnectedSmallIds; + + static CRITICAL_SECTION s_freeSmallIdLock; + static std::vector s_freeSmallIds; +}; + +extern bool g_Win64MultiplayerHost; +extern bool g_Win64MultiplayerJoin; +extern int g_Win64MultiplayerPort; +extern char g_Win64MultiplayerIP[256]; + +#endif diff --git a/Minecraft.Client/Windows64/Sound/Minecraft.msscmp b/Minecraft.Client/Windows64/Sound/Minecraft.msscmp deleted file mode 100644 index 13983f6d2..000000000 Binary files a/Minecraft.Client/Windows64/Sound/Minecraft.msscmp and /dev/null differ diff --git a/Minecraft.Client/Windows64/Windows64_App.cpp b/Minecraft.Client/Windows64/Windows64_App.cpp index bba33cadc..461e8c348 100644 --- a/Minecraft.Client/Windows64/Windows64_App.cpp +++ b/Minecraft.Client/Windows64/Windows64_App.cpp @@ -10,11 +10,46 @@ #include "..\..\Minecraft.World\BiomeSource.h" #include "..\..\Minecraft.World\LevelType.h" +wstring g_playerName; + CConsoleMinecraftApp app; +static void LoadPlayerName() +{ + if (!g_playerName.empty()) return; + g_playerName = L"Windows"; + + char exePath[MAX_PATH] = {}; + GetModuleFileNameA(NULL, exePath, MAX_PATH); + char *lastSlash = strrchr(exePath, '\\'); + if (lastSlash) *(lastSlash + 1) = '\0'; + char filePath[MAX_PATH] = {}; + _snprintf_s(filePath, sizeof(filePath), _TRUNCATE, "%susername.txt", exePath); + + FILE *f = NULL; + if (fopen_s(&f, filePath, "r") == 0 && f) + { + char buf[128] = {}; + if (fgets(buf, sizeof(buf), f)) + { + int len = (int)strlen(buf); + while (len > 0 && (buf[len-1] == '\n' || buf[len-1] == '\r' || buf[len-1] == ' ')) + buf[--len] = '\0'; + if (len > 0) + { + wchar_t wbuf[128] = {}; + mbstowcs(wbuf, buf, 127); + g_playerName = wbuf; + } + } + fclose(f); + } +} + CConsoleMinecraftApp::CConsoleMinecraftApp() : CMinecraftApp() { m_bShutdown = false; + LoadPlayerName(); } void CConsoleMinecraftApp::SetRichPresenceContext(int iPad, int contextId) @@ -35,9 +70,27 @@ void CConsoleMinecraftApp::FatalLoadError() void CConsoleMinecraftApp::CaptureSaveThumbnail() { + RenderManager.CaptureThumbnail(&m_ThumbnailBuffer); } void CConsoleMinecraftApp::GetSaveThumbnail(PBYTE *pbData,DWORD *pdwSize) { + // On a save caused by a create world, the thumbnail capture won't have happened + if (m_ThumbnailBuffer.Allocated()) + { + if (pbData) + { + *pbData = new BYTE[m_ThumbnailBuffer.GetBufferSize()]; + *pdwSize = m_ThumbnailBuffer.GetBufferSize(); + memcpy(*pbData, m_ThumbnailBuffer.GetBufferPointer(), *pdwSize); + } + m_ThumbnailBuffer.Release(); + } + else + { + // No capture happened (e.g. first save on world creation) leave thumbnail as NULL + if (pbData) *pbData = NULL; + if (pdwSize) *pdwSize = 0; + } } void CConsoleMinecraftApp::ReleaseSaveThumbnail() { @@ -57,7 +110,8 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart() Minecraft *pMinecraft=Minecraft::GetInstance(); app.ReleaseSaveThumbnail(); ProfileManager.SetLockedProfile(0); - pMinecraft->user->name = L"Windows"; + LoadPlayerName(); + pMinecraft->user->name = g_playerName; app.ApplyGameSettingsChanged(0); ////////////////////////////////////////////////////////////////////////////////////////////// From CScene_MultiGameJoinLoad::OnInit diff --git a/Minecraft.Client/Windows64/Windows64_App.h b/Minecraft.Client/Windows64/Windows64_App.h index de8f6d85f..bff916ec7 100644 --- a/Minecraft.Client/Windows64/Windows64_App.h +++ b/Minecraft.Client/Windows64/Windows64_App.h @@ -1,7 +1,9 @@ #pragma once +#include "4JLibs\inc\4J_Render.h" class CConsoleMinecraftApp : public CMinecraftApp { + ImageFileBuffer m_ThumbnailBuffer; public: CConsoleMinecraftApp(); diff --git a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp index 2ac1cd8d4..290835647 100644 --- a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp +++ b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp @@ -37,6 +37,7 @@ #include "Resource.h" #include "..\..\Minecraft.World\compression.h" #include "..\..\Minecraft.World\OldChunkStorage.h" +#include "Network\WinsockNetLayer.h" #include "Xbox/resource.h" @@ -84,6 +85,11 @@ BOOL g_bWidescreen = TRUE; int g_iScreenWidth = 1920; int g_iScreenHeight = 1080; +char g_Win64Username[17] = { 0 }; +wchar_t g_Win64UsernameW[17] = { 0 }; +UINT g_ScreenWidth = 1920; +UINT g_ScreenHeight = 1080; + // Fullscreen toggle state static bool g_isFullscreen = false; static WINDOWPLACEMENT g_wpPrev = { sizeof(g_wpPrev) }; @@ -723,20 +729,6 @@ void CleanupDevice() if( g_pd3dDevice ) g_pd3dDevice->Release(); } -typedef HRESULT(__stdcall* SetProcessDpiAwareness_f)(PROCESS_DPI_AWARENESS); -static HRESULT dyn_SetProcessDpiAwareness(PROCESS_DPI_AWARENESS value) -{ - static const auto ptr = reinterpret_cast( - reinterpret_cast(::GetProcAddress(static_cast(LoadLibraryExW(L"Shcore.dll", nullptr, 0)), "SetProcessDpiAwareness"))); - if (ptr == nullptr) - { - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return E_NOTIMPL; - } - - return ptr(value); -} - int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPTSTR lpCmdLine, @@ -745,7 +737,16 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); - dyn_SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE); + // 4J-Win64: set CWD to exe dir so asset paths resolve correctly + { + char szExeDir[MAX_PATH] = {}; + GetModuleFileNameA(NULL, szExeDir, MAX_PATH); + char *pSlash = strrchr(szExeDir, '\\'); + if (pSlash) { *(pSlash + 1) = '\0'; SetCurrentDirectoryA(szExeDir); } + } + + // Declare DPI awareness so GetSystemMetrics returns physical pixels + SetProcessDPIAware(); g_iScreenWidth = GetSystemMetrics(SM_CXSCREEN); g_iScreenHeight = GetSystemMetrics(SM_CYSCREEN); @@ -771,8 +772,41 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, //g_iScreenWidth = 960; //g_iScreenHeight = 544; } + + char cmdLineA[1024]; + strncpy_s(cmdLineA, sizeof(cmdLineA), lpCmdLine, _TRUNCATE); + + char* nameArg = strstr(cmdLineA, "-name "); + if (nameArg) + { + nameArg += 6; + while (*nameArg == ' ') nameArg++; + char nameBuf[17]; + int n = 0; + while (nameArg[n] && nameArg[n] != ' ' && n < 16) { nameBuf[n] = nameArg[n]; n++; } + nameBuf[n] = 0; + strncpy_s(g_Win64Username, 17, nameBuf, _TRUNCATE); + } } + if (g_Win64Username[0] == 0) + { + DWORD sz = 17; + static bool seeded = false; + if (!seeded) + { + seeded = true; + srand((unsigned int)time(NULL)); + } + + int r = rand() % 10000; // 0�9999 + + snprintf(g_Win64Username, 17, "Player%04d", r); + + g_Win64Username[16] = 0; + } + + MultiByteToWideChar(CP_ACP, 0, g_Win64Username, -1, g_Win64UsernameW, 17); // Initialize global strings MyRegisterClass(hInstance); @@ -938,7 +972,17 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, // ProfileManager for XN_LIVE_INVITE_ACCEPTED for QNet. g_NetworkManager.Initialise(); + for (int i = 0; i < MINECRAFT_NET_MAX_PLAYERS; i++) + { + IQNet::m_player[i].m_smallId = (BYTE)i; + IQNet::m_player[i].m_isRemote = false; + IQNet::m_player[i].m_isHostPlayer = (i == 0); + swprintf_s(IQNet::m_player[i].m_gamertag, 32, L"Player%d", i); + } + extern wchar_t g_Win64UsernameW[17]; + wcscpy_s(IQNet::m_player[0].m_gamertag, 32, g_Win64UsernameW); + WinsockNetLayer::Initialize(); // 4J-PB moved further down //app.InitGameSettings(); @@ -1110,7 +1154,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, PIXEndNamedEvent(); PIXBeginNamedEvent(0,"Network manager do work #1"); - // g_NetworkManager.DoWork(); + g_NetworkManager.DoWork(); PIXEndNamedEvent(); // LeaderboardManager::Instance()->Tick(); @@ -1236,19 +1280,34 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, } } - // F11 toggles fullscreen + // F3 toggles the debug console overlay, F11 toggles fullscreen + if (KMInput.IsKeyPressed(VK_F3)) + { + static bool s_debugConsole = false; + s_debugConsole = !s_debugConsole; + ui.ShowUIDebugConsole(s_debugConsole); + } + +#ifdef _DEBUG_MENUS_ENABLED + if (KMInput.IsKeyPressed(VK_F4)) + { + ui.NavigateToScene(ProfileManager.GetPrimaryPad(), eUIScene_DebugOverlay, NULL, eUILayer_Debug); + } +#endif + if (KMInput.IsKeyPressed(VK_F11)) { ToggleFullscreen(); } - // TAB opens host options menu. - Vvis :3 + // TAB opens game info menu. - Vvis :3 - Updated by detectiveren if (KMInput.IsKeyPressed(VK_TAB) && !ui.GetMenuDisplayed(0)) { if (Minecraft* pMinecraft = Minecraft::GetInstance()) { { - ui.NavigateToScene(0, eUIScene_InGameHostOptionsMenu); + ui.NavigateToScene(0, eUIScene_InGameInfoMenu); + } } } @@ -1271,7 +1330,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, { if (Minecraft* pMinecraft = Minecraft::GetInstance()) { - if (pMinecraft->options && app.DebugSettingsOn() && + if (pMinecraft->options && app.DebugSettingsOn() && app.GetGameStarted() && !ui.GetMenuDisplayed(0) && pMinecraft->screen == NULL) { ui.NavigateToScene(0, eUIScene_DebugOverlay, NULL, eUILayer_Debug); diff --git a/Minecraft.World/ArmorSlot.cpp b/Minecraft.World/ArmorSlot.cpp index 27993d770..7707635a5 100644 --- a/Minecraft.World/ArmorSlot.cpp +++ b/Minecraft.World/ArmorSlot.cpp @@ -12,7 +12,7 @@ ArmorSlot::ArmorSlot(int slotNum, shared_ptr container, int id, int x { } -int ArmorSlot::getMaxStackSize() +int ArmorSlot::getMaxStackSize() const { return 1; } diff --git a/Minecraft.World/ArmorSlot.h b/Minecraft.World/ArmorSlot.h index a9797be2d..d9d769ced 100644 --- a/Minecraft.World/ArmorSlot.h +++ b/Minecraft.World/ArmorSlot.h @@ -16,7 +16,7 @@ public: ArmorSlot(int slotNum, shared_ptr container, int id, int x, int y); virtual ~ArmorSlot() {} - virtual int getMaxStackSize(); + virtual int getMaxStackSize() const; virtual bool mayPlace(shared_ptr item); Icon *getNoItemIcon(); //virtual bool mayCombine(shared_ptr item); // 4J Added diff --git a/Minecraft.World/BeaconMenu.cpp b/Minecraft.World/BeaconMenu.cpp index 707e9ebfb..62908b4f4 100644 --- a/Minecraft.World/BeaconMenu.cpp +++ b/Minecraft.World/BeaconMenu.cpp @@ -134,7 +134,7 @@ bool BeaconMenu::PaymentSlot::mayPlace(shared_ptr item) return false; } -int BeaconMenu::PaymentSlot::getMaxStackSize() +int BeaconMenu::PaymentSlot::getMaxStackSize() const { return 1; } \ No newline at end of file diff --git a/Minecraft.World/BeaconMenu.h b/Minecraft.World/BeaconMenu.h index 8d3afba65..9394d83f7 100644 --- a/Minecraft.World/BeaconMenu.h +++ b/Minecraft.World/BeaconMenu.h @@ -14,7 +14,7 @@ private: PaymentSlot(shared_ptr container, int slot, int x, int y); bool mayPlace(shared_ptr item); - int getMaxStackSize(); + int getMaxStackSize() const; }; public: diff --git a/Minecraft.World/BeaconTileEntity.cpp b/Minecraft.World/BeaconTileEntity.cpp index 4b9a38823..9cfb0d675 100644 --- a/Minecraft.World/BeaconTileEntity.cpp +++ b/Minecraft.World/BeaconTileEntity.cpp @@ -346,7 +346,7 @@ void BeaconTileEntity::setCustomName(const wstring &name) this->name = name; } -int BeaconTileEntity::getMaxStackSize() +int BeaconTileEntity::getMaxStackSize() const { return 1; } diff --git a/Minecraft.World/BeaconTileEntity.h b/Minecraft.World/BeaconTileEntity.h index 1b6067a1f..caab25e7c 100644 --- a/Minecraft.World/BeaconTileEntity.h +++ b/Minecraft.World/BeaconTileEntity.h @@ -64,7 +64,7 @@ public: wstring getCustomName(); bool hasCustomName(); void setCustomName(const wstring &name); - int getMaxStackSize(); + int getMaxStackSize() const; bool stillValid(shared_ptr player); void startOpen(); void stopOpen(); diff --git a/Minecraft.World/BrewingStandMenu.cpp b/Minecraft.World/BrewingStandMenu.cpp index 55eb953fa..eaf78329c 100644 --- a/Minecraft.World/BrewingStandMenu.cpp +++ b/Minecraft.World/BrewingStandMenu.cpp @@ -101,7 +101,7 @@ shared_ptr BrewingStandMenu::quickMoveStack(shared_ptr pla else if (slotIndex >= INV_SLOT_START && slotIndex < INV_SLOT_END) { // 4J-PB - if the item is an ingredient, quickmove it into the ingredient slot - if( (Item::items[stack->id]->hasPotionBrewingFormula() || (stack->id == Item::netherwart_seeds_Id) ) && + if( (Item::items[stack->id]->hasPotionBrewingFormula() || (stack->id == Item::netherwart_seeds_Id) ) && (!IngredientSlot->hasItem() || (stack->id==IngredientSlot->getItem()->id) ) ) { if(!moveItemStackTo(stack, INGREDIENT_SLOT, INGREDIENT_SLOT+1, false)) @@ -125,7 +125,7 @@ shared_ptr BrewingStandMenu::quickMoveStack(shared_ptr pla else if (slotIndex >= USE_ROW_SLOT_START && slotIndex < USE_ROW_SLOT_END) { // 4J-PB - if the item is an ingredient, quickmove it into the ingredient slot - if((Item::items[stack->id]->hasPotionBrewingFormula() || (stack->id == Item::netherwart_seeds_Id)) && + if((Item::items[stack->id]->hasPotionBrewingFormula() || (stack->id == Item::netherwart_seeds_Id)) && (!IngredientSlot->hasItem() || (stack->id==IngredientSlot->getItem()->id) )) { if(!moveItemStackTo(stack, INGREDIENT_SLOT, INGREDIENT_SLOT+1, false)) @@ -140,7 +140,7 @@ shared_ptr BrewingStandMenu::quickMoveStack(shared_ptr pla { return nullptr; } - } + } else if (!moveItemStackTo(stack, INV_SLOT_START, INV_SLOT_END, false)) { return nullptr; @@ -183,7 +183,7 @@ bool BrewingStandMenu::PotionSlot::mayPlace(shared_ptr item) return mayPlaceItem(item); } -int BrewingStandMenu::PotionSlot::getMaxStackSize() +int BrewingStandMenu::PotionSlot::getMaxStackSize() const { return 1; } @@ -231,7 +231,7 @@ bool BrewingStandMenu::IngredientsSlot::mayCombine(shared_ptr seco return false; } -int BrewingStandMenu::IngredientsSlot::getMaxStackSize() +int BrewingStandMenu::IngredientsSlot::getMaxStackSize() const { return 64; } diff --git a/Minecraft.World/BrewingStandMenu.h b/Minecraft.World/BrewingStandMenu.h index 1f8d705d9..fded12d2b 100644 --- a/Minecraft.World/BrewingStandMenu.h +++ b/Minecraft.World/BrewingStandMenu.h @@ -47,7 +47,7 @@ private: PotionSlot(shared_ptr player, shared_ptr container, int slot, int x, int y); virtual bool mayPlace(shared_ptr item); - virtual int getMaxStackSize(); + virtual int getMaxStackSize() const; virtual void onTake(shared_ptr player, shared_ptr carried); static bool mayPlaceItem(shared_ptr item); virtual bool mayCombine(shared_ptr item); // 4J Added @@ -59,7 +59,7 @@ private: IngredientsSlot(shared_ptr container, int slot, int x, int y); virtual bool mayPlace(shared_ptr item); - virtual int getMaxStackSize(); + virtual int getMaxStackSize() const; virtual bool mayCombine(shared_ptr item); // 4J Added }; }; \ No newline at end of file diff --git a/Minecraft.World/BrewingStandTileEntity.cpp b/Minecraft.World/BrewingStandTileEntity.cpp index 00170d7bd..5bc6fd27d 100644 --- a/Minecraft.World/BrewingStandTileEntity.cpp +++ b/Minecraft.World/BrewingStandTileEntity.cpp @@ -10,7 +10,7 @@ int slotsForUp [] = { BrewingStandTileEntity::INGREDIENT_SLOT }; int slotsForOtherFaces [] = { 0, 1, 2 }; -intArray BrewingStandTileEntity::SLOTS_FOR_UP = intArray(slotsForUp, 1); +intArray BrewingStandTileEntity::SLOTS_FOR_UP = intArray(slotsForUp, 1); intArray BrewingStandTileEntity::SLOTS_FOR_OTHER_FACES = intArray(slotsForOtherFaces, 3); BrewingStandTileEntity::BrewingStandTileEntity() @@ -156,7 +156,7 @@ bool BrewingStandTileEntity::isBrewable() } else { - if (!Item::items[ingredient->id]->hasPotionBrewingFormula() && ingredient->id != Item::bucket_water_Id && ingredient->id != Item::netherwart_seeds_Id) + if (!Item::items[ingredient->id]->hasPotionBrewingFormula() && ingredient->id != Item::bucket_water_Id && ingredient->id != Item::netherwart_seeds_Id) { return false; } @@ -327,7 +327,7 @@ void BrewingStandTileEntity::save(CompoundTag *base) for (int i = 0; i < items.length; i++) { - if (items[i] != NULL) + if (items[i] != NULL) { CompoundTag *tag = new CompoundTag(); tag->putByte(L"Slot", (byte) i); @@ -356,7 +356,7 @@ shared_ptr BrewingStandTileEntity::removeItem(unsigned int slot, i if (slot >= 0 && slot < items.length && items[slot] != NULL) { - if (items[slot]->count <= count) + if (items[slot]->count <= count) { shared_ptr item = items[slot]; items[slot] = nullptr; @@ -364,8 +364,8 @@ shared_ptr BrewingStandTileEntity::removeItem(unsigned int slot, i // 4J Stu - Fix for duplication glitch if(item->count <= 0) return nullptr; return item; - } - else + } + else { shared_ptr i = items[slot]->remove(count); if (items[slot]->count == 0) items[slot] = nullptr; @@ -397,7 +397,7 @@ void BrewingStandTileEntity::setItem(unsigned int slot, shared_ptr } } -int BrewingStandTileEntity::getMaxStackSize() +int BrewingStandTileEntity::getMaxStackSize() const { // this value is not used for the potion slots return 64; diff --git a/Minecraft.World/BrewingStandTileEntity.h b/Minecraft.World/BrewingStandTileEntity.h index 52d3a0f13..c848767eb 100644 --- a/Minecraft.World/BrewingStandTileEntity.h +++ b/Minecraft.World/BrewingStandTileEntity.h @@ -12,7 +12,7 @@ public: private: ItemInstanceArray items; - static intArray SLOTS_FOR_UP; + static intArray SLOTS_FOR_UP; static intArray SLOTS_FOR_OTHER_FACES; int brewTime; @@ -37,7 +37,7 @@ private: void doBrew(); int applyIngredient(int currentBrew, shared_ptr ingredient); - + public: virtual void load(CompoundTag *base); virtual void save(CompoundTag *base); @@ -45,7 +45,7 @@ public: virtual shared_ptr removeItem(unsigned int slot, int i); virtual shared_ptr removeItemNoUpdate(int slot); virtual void setItem(unsigned int slot, shared_ptr item); - virtual int getMaxStackSize(); + virtual int getMaxStackSize() const; virtual bool stillValid(shared_ptr player); virtual void startOpen(); virtual void stopOpen(); diff --git a/Minecraft.World/ChestTileEntity.cpp b/Minecraft.World/ChestTileEntity.cpp index 39f957bd8..fded7d28c 100644 --- a/Minecraft.World/ChestTileEntity.cpp +++ b/Minecraft.World/ChestTileEntity.cpp @@ -53,7 +53,7 @@ ChestTileEntity::~ChestTileEntity() delete items; } -unsigned int ChestTileEntity::getContainerSize() +unsigned int ChestTileEntity::getContainerSize() { return 9 * 3; } @@ -63,11 +63,11 @@ shared_ptr ChestTileEntity::getItem(unsigned int slot) return items->data[slot]; } -shared_ptr ChestTileEntity::removeItem(unsigned int slot, int count) +shared_ptr ChestTileEntity::removeItem(unsigned int slot, int count) { if (items->data[slot] != NULL) { - if (items->data[slot]->count <= count) + if (items->data[slot]->count <= count) { shared_ptr item = items->data[slot]; items->data[slot] = nullptr; @@ -75,8 +75,8 @@ shared_ptr ChestTileEntity::removeItem(unsigned int slot, int coun // 4J Stu - Fix for duplication glitch if(item->count <= 0) return nullptr; return item; - } - else + } + else { shared_ptr i = items->data[slot]->remove(count); if (items->data[slot]->count == 0) items->data[slot] = nullptr; @@ -154,7 +154,7 @@ void ChestTileEntity::save(CompoundTag *base) for (unsigned int i = 0; i < items->length; i++) { - if (items->data[i] != NULL) + if (items->data[i] != NULL) { CompoundTag *tag = new CompoundTag(); tag->putByte(L"Slot", (byte) i); @@ -167,7 +167,7 @@ void ChestTileEntity::save(CompoundTag *base) base->putBoolean(L"bonus", isBonusChest); } -int ChestTileEntity::getMaxStackSize() +int ChestTileEntity::getMaxStackSize() const { return Container::LARGE_MAX_STACK_SIZE; } @@ -179,7 +179,7 @@ bool ChestTileEntity::stillValid(shared_ptr player) return true; } -void ChestTileEntity::setChanged() +void ChestTileEntity::setChanged() { TileEntity::setChanged(); } @@ -302,7 +302,7 @@ void ChestTileEntity::tick() if (s.lock() != NULL) zc += 0.5; if (e.lock() != NULL) xc += 0.5; - // 4J-PB - Seems the chest open volume is much louder than other sounds from user reports. We'll tone it down a bit + // 4J-PB - Seems the chest open volume is much louder than other sounds from user reports. We'll tone it down a bit level->playSound(xc, y + 0.5, zc, eSoundType_RANDOM_CHEST_OPEN, 0.2f, level->random->nextFloat() * 0.1f + 0.9f); } } @@ -327,7 +327,7 @@ void ChestTileEntity::tick() if (s.lock() != NULL) zc += 0.5; if (e.lock() != NULL) xc += 0.5; - // 4J-PB - Seems the chest open volume is much louder than other sounds from user reports. We'll tone it down a bit + // 4J-PB - Seems the chest open volume is much louder than other sounds from user reports. We'll tone it down a bit level->playSound(xc, y + 0.5, zc, eSoundType_RANDOM_CHEST_CLOSE, 0.2f, level->random->nextFloat() * 0.1f + 0.9f); } } diff --git a/Minecraft.World/ChestTileEntity.h b/Minecraft.World/ChestTileEntity.h index 77c11e99e..d655340f4 100644 --- a/Minecraft.World/ChestTileEntity.h +++ b/Minecraft.World/ChestTileEntity.h @@ -59,7 +59,7 @@ public: virtual void setCustomName(const wstring &name); virtual void load(CompoundTag *base); virtual void save(CompoundTag *base); - virtual int getMaxStackSize(); + virtual int getMaxStackSize() const; virtual bool stillValid(shared_ptr player); virtual void setChanged(); virtual void clearCache(); diff --git a/Minecraft.World/CompoundContainer.cpp b/Minecraft.World/CompoundContainer.cpp index 674f15db3..39da0e58f 100644 --- a/Minecraft.World/CompoundContainer.cpp +++ b/Minecraft.World/CompoundContainer.cpp @@ -70,7 +70,7 @@ void CompoundContainer::setItem(unsigned int slot, shared_ptr item else c1->setItem(slot, item); } -int CompoundContainer::getMaxStackSize() +int CompoundContainer::getMaxStackSize() const { return c1->getMaxStackSize(); } diff --git a/Minecraft.World/CompoundContainer.h b/Minecraft.World/CompoundContainer.h index 126a712af..906a06188 100644 --- a/Minecraft.World/CompoundContainer.h +++ b/Minecraft.World/CompoundContainer.h @@ -24,7 +24,7 @@ public: virtual shared_ptr removeItem(unsigned int slot, int i); virtual shared_ptr removeItemNoUpdate(int slot); virtual void setItem(unsigned int slot, shared_ptr item); - virtual int getMaxStackSize(); + virtual int getMaxStackSize() const; virtual void setChanged(); virtual bool stillValid(shared_ptr player); diff --git a/Minecraft.World/Container.h b/Minecraft.World/Container.h index 8fa213450..bfd7a9b75 100644 --- a/Minecraft.World/Container.h +++ b/Minecraft.World/Container.h @@ -20,7 +20,7 @@ public: virtual wstring getName() = 0; virtual wstring getCustomName() = 0; // 4J Stu added for sending over the network virtual bool hasCustomName() = 0; - virtual int getMaxStackSize() = 0; + virtual int getMaxStackSize() const = 0; virtual void setChanged() = 0; virtual bool stillValid(shared_ptr player) = 0; virtual void startOpen() = 0; diff --git a/Minecraft.World/CraftingContainer.cpp b/Minecraft.World/CraftingContainer.cpp index 7057edfec..47a11eb49 100644 --- a/Minecraft.World/CraftingContainer.cpp +++ b/Minecraft.World/CraftingContainer.cpp @@ -95,7 +95,7 @@ void CraftingContainer::setItem(unsigned int slot, shared_ptr item if(menu) menu->slotsChanged(); } -int CraftingContainer::getMaxStackSize() +int CraftingContainer::getMaxStackSize() const { return Container::LARGE_MAX_STACK_SIZE; } diff --git a/Minecraft.World/CraftingContainer.h b/Minecraft.World/CraftingContainer.h index fc8c2967e..489dc84d5 100644 --- a/Minecraft.World/CraftingContainer.h +++ b/Minecraft.World/CraftingContainer.h @@ -24,7 +24,7 @@ public: virtual shared_ptr removeItemNoUpdate(int slot); virtual shared_ptr removeItem(unsigned int slot, int count); virtual void setItem(unsigned int slot, shared_ptr item); - virtual int getMaxStackSize(); + virtual int getMaxStackSize() const; virtual void setChanged(); bool stillValid(shared_ptr player); diff --git a/Minecraft.World/DispenserTileEntity.cpp b/Minecraft.World/DispenserTileEntity.cpp index b087e535d..3e743e22e 100644 --- a/Minecraft.World/DispenserTileEntity.cpp +++ b/Minecraft.World/DispenserTileEntity.cpp @@ -23,7 +23,7 @@ DispenserTileEntity::~DispenserTileEntity() delete random; } -unsigned int DispenserTileEntity::getContainerSize() +unsigned int DispenserTileEntity::getContainerSize() { return 9; } @@ -33,7 +33,7 @@ shared_ptr DispenserTileEntity::getItem(unsigned int slot) return items[slot]; } -shared_ptr DispenserTileEntity::removeItem(unsigned int slot, int count) +shared_ptr DispenserTileEntity::removeItem(unsigned int slot, int count) { if (items[slot] != NULL) { @@ -45,8 +45,8 @@ shared_ptr DispenserTileEntity::removeItem(unsigned int slot, int // 4J Stu - Fix for duplication glitch if(item->count <= 0) return nullptr; return item; - } - else + } + else { shared_ptr i = items[slot]->remove(count); if (items[slot]->count == 0) items[slot] = nullptr; @@ -71,7 +71,7 @@ shared_ptr DispenserTileEntity::removeItemNoUpdate(int slot) } // 4J-PB added for spawn eggs not being useable due to limits, so add them in again -void DispenserTileEntity::AddItemBack(shared_ptritem, unsigned int slot) +void DispenserTileEntity::AddItemBack(shared_ptritem, unsigned int slot) { if (items[slot] != NULL) { @@ -80,7 +80,7 @@ void DispenserTileEntity::AddItemBack(shared_ptritem, unsigned int { items[slot]->count++; setChanged(); - } + } } else { @@ -91,7 +91,7 @@ void DispenserTileEntity::AddItemBack(shared_ptritem, unsigned int } /** * Removes an item with the given id and returns true if one was found. -* +* * @param itemId * @return */ @@ -114,7 +114,7 @@ int DispenserTileEntity::getRandomSlot() int replaceOdds = 1; for (unsigned int i = 0; i < items.length; i++) { - if (items[i] != NULL && random->nextInt(replaceOdds++) == 0) + if (items[i] != NULL && random->nextInt(replaceOdds++) == 0) { replaceSlot = i; } @@ -123,7 +123,7 @@ int DispenserTileEntity::getRandomSlot() return replaceSlot; } -void DispenserTileEntity::setItem(unsigned int slot, shared_ptr item) +void DispenserTileEntity::setItem(unsigned int slot, shared_ptr item) { items[slot] = item; if (item != NULL && item->count > getMaxStackSize()) item->count = getMaxStackSize(); @@ -144,7 +144,7 @@ int DispenserTileEntity::addItem(shared_ptr item) return -1; } -wstring DispenserTileEntity::getName() +wstring DispenserTileEntity::getName() { return hasCustomName() ? name : app.GetString(IDS_TILE_DISPENSER); } @@ -184,7 +184,7 @@ void DispenserTileEntity::save(CompoundTag *base) TileEntity::save(base); ListTag *listTag = new ListTag; - for (unsigned int i = 0; i < items.length; i++) + for (unsigned int i = 0; i < items.length; i++) { if (items[i] != NULL) { @@ -198,7 +198,7 @@ void DispenserTileEntity::save(CompoundTag *base) if (hasCustomName()) base->putString(L"CustomName", name); } -int DispenserTileEntity::getMaxStackSize() +int DispenserTileEntity::getMaxStackSize() const { return Container::LARGE_MAX_STACK_SIZE; } diff --git a/Minecraft.World/DispenserTileEntity.h b/Minecraft.World/DispenserTileEntity.h index fc0c1f398..6c87d9243 100644 --- a/Minecraft.World/DispenserTileEntity.h +++ b/Minecraft.World/DispenserTileEntity.h @@ -45,7 +45,7 @@ public: virtual bool hasCustomName(); virtual void load(CompoundTag *base); virtual void save(CompoundTag *base); - virtual int getMaxStackSize(); + virtual int getMaxStackSize() const; virtual bool stillValid(shared_ptr player); virtual void setChanged(); @@ -55,5 +55,5 @@ public: // 4J Added virtual shared_ptr clone(); - void AddItemBack(shared_ptritem, unsigned int slot); + void AddItemBack(shared_ptritem, unsigned int slot); }; \ No newline at end of file diff --git a/Minecraft.World/EnchantmentContainer.cpp b/Minecraft.World/EnchantmentContainer.cpp index 166e8d5fc..068b66720 100644 --- a/Minecraft.World/EnchantmentContainer.cpp +++ b/Minecraft.World/EnchantmentContainer.cpp @@ -6,7 +6,7 @@ EnchantmentContainer::EnchantmentContainer(EnchantmentMenu *menu) : SimpleContai { } -int EnchantmentContainer::getMaxStackSize() +int EnchantmentContainer::getMaxStackSize() const { return 1; } diff --git a/Minecraft.World/EnchantmentContainer.h b/Minecraft.World/EnchantmentContainer.h index 8b337f487..4ccbea69c 100644 --- a/Minecraft.World/EnchantmentContainer.h +++ b/Minecraft.World/EnchantmentContainer.h @@ -13,7 +13,7 @@ private: EnchantmentMenu *m_menu; public: EnchantmentContainer(EnchantmentMenu *menu); - virtual int getMaxStackSize(); + virtual int getMaxStackSize() const; virtual void setChanged(); virtual bool canPlaceItem(int slot, shared_ptr item); }; \ No newline at end of file diff --git a/Minecraft.World/Entity.cpp b/Minecraft.World/Entity.cpp index f1c2259ca..cfae17726 100644 --- a/Minecraft.World/Entity.cpp +++ b/Minecraft.World/Entity.cpp @@ -420,7 +420,7 @@ void Entity::remove() void Entity::setSize(float w, float h) { - if (w != bbWidth || h != bbHeight) + if (w != bbWidth || h != bbHeight) { float oldW = bbWidth; @@ -431,7 +431,7 @@ void Entity::setSize(float w, float h) bb->z1 = bb->z0 + bbWidth; bb->y1 = bb->y0 + bbHeight; - if (bbWidth > oldW && !firstTick && !level->isClientSide) + if (bbWidth > oldW && !firstTick && !level->isClientSide) { move(oldW - bbWidth, 0, oldW - bbWidth); } @@ -449,7 +449,7 @@ void Entity::setPos(EntityPos *pos) void Entity::setRot(float yRot, float xRot) { - /* JAVA: + /* JAVA: this->yRot = yRot % 360.0f; this->xRot = xRot % 360.0f; @@ -585,7 +585,7 @@ void Entity::baseTick() { onFire = 0; } - else + else { if (onFire > 0) { @@ -1031,7 +1031,7 @@ void Entity::checkFallDamage(double ya, bool onGround) causeFallDamage(fallDistance); fallDistance = 0; } - } + } else { if (ya < 0) fallDistance -= (float) ya; @@ -1100,7 +1100,7 @@ bool Entity::updateInWaterState() fallDistance = 0; wasInWater = true; onFire = 0; - } + } else { wasInWater = false; @@ -1468,25 +1468,17 @@ void Entity::onLoadedFromSave() } -ListTag *Entity::newDoubleList(unsigned int number, double firstValue, ...) +template +ListTag *Entity::newDoubleList(unsigned int, double firstValue, Args... args) { ListTag *res = new ListTag(); // Add the first parameter to the ListTag res->add( new DoubleTag(L"", firstValue ) ); - va_list vl; - va_start(vl,firstValue); - - double val; - - for (unsigned int i=1;iadd(new DoubleTag(L"", val)); - } - - va_end(vl); + // use pre-C++17 fold trick (TODO: once we drop C++14 support, use C++14 fold expression) + using expander = int[]; + (void)expander{0, (res->add(new DoubleTag(L"", static_cast(args))), 0)...}; return res; } @@ -1573,7 +1565,7 @@ bool Entity::interact(shared_ptr player) return false; } -AABB *Entity::getCollideAgainstBox(shared_ptr entity) +AABB *Entity::getCollideAgainstBox(shared_ptr entity) { return NULL; } @@ -1842,7 +1834,7 @@ void Entity::setSharedFlag(int flag, bool value) if( entityData ) { byte currentValue = entityData->getByte(DATA_SHARED_FLAGS_ID); - if (value) + if (value) { entityData->set(DATA_SHARED_FLAGS_ID, (byte) (currentValue | (1 << flag))); } @@ -2121,13 +2113,13 @@ wstring Entity::getNetworkName() return getDisplayName(); } -void Entity::setAnimOverrideBitmask(unsigned int uiBitmask) +void Entity::setAnimOverrideBitmask(unsigned int uiBitmask) { m_uiAnimOverrideBitmask=uiBitmask; app.DebugPrintf("!!! Setting anim override bitmask to %d\n",uiBitmask); } -unsigned int Entity::getAnimOverrideBitmask() -{ +unsigned int Entity::getAnimOverrideBitmask() +{ if(app.GetGameSettings(eGameSetting_CustomSkinAnim)==0 ) { // We have a force animation for some skins (claptrap) diff --git a/Minecraft.World/Entity.h b/Minecraft.World/Entity.h index e2a262900..a738c2ba7 100644 --- a/Minecraft.World/Entity.h +++ b/Minecraft.World/Entity.h @@ -304,7 +304,8 @@ public: virtual void onLoadedFromSave(); protected: - ListTag *newDoubleList(unsigned int number, double firstValue, ...); + template + ListTag *newDoubleList(unsigned int, double firstValue, Args... args); ListTag *newFloatList(unsigned int number, float firstValue, float secondValue); public: diff --git a/Minecraft.World/FurnaceTileEntity.cpp b/Minecraft.World/FurnaceTileEntity.cpp index a11e85276..1aa2c3005 100644 --- a/Minecraft.World/FurnaceTileEntity.cpp +++ b/Minecraft.World/FurnaceTileEntity.cpp @@ -160,7 +160,7 @@ void FurnaceTileEntity::save(CompoundTag *base) } -int FurnaceTileEntity::getMaxStackSize() +int FurnaceTileEntity::getMaxStackSize() const { return Container::LARGE_MAX_STACK_SIZE; } @@ -205,7 +205,7 @@ void FurnaceTileEntity::tick() if (items[SLOT_FUEL] != NULL) { // 4J Added: Keep track of whether charcoal was used in production of current stack. - if ( items[SLOT_FUEL]->getItem()->id == Item::coal_Id + if ( items[SLOT_FUEL]->getItem()->id == Item::coal_Id && items[SLOT_FUEL]->getAuxValue() == CoalItem::CHAR_COAL) { m_charcoalUsed = true; @@ -250,7 +250,7 @@ void FurnaceTileEntity::tick() bool FurnaceTileEntity::canBurn() { if (items[SLOT_INPUT] == NULL) return false; - ItemInstance *burnResult = FurnaceRecipes::getInstance()->getResult(items[SLOT_INPUT]->getItem()->id); + const ItemInstance *burnResult = FurnaceRecipes::getInstance()->getResult(items[SLOT_INPUT]->getItem()->id); if (burnResult == NULL) return false; if (items[SLOT_RESULT] == NULL) return true; if (!items[SLOT_RESULT]->sameItem_not_shared(burnResult)) return false; @@ -264,7 +264,7 @@ void FurnaceTileEntity::burn() { if (!canBurn()) return; - ItemInstance *result = FurnaceRecipes::getInstance()->getResult(items[SLOT_INPUT]->getItem()->id); + const ItemInstance *result = FurnaceRecipes::getInstance()->getResult(items[SLOT_INPUT]->getItem()->id); if (items[SLOT_RESULT] == NULL) items[SLOT_RESULT] = result->copy(); else if (items[SLOT_RESULT]->id == result->id) items[SLOT_RESULT]->count++; diff --git a/Minecraft.World/FurnaceTileEntity.h b/Minecraft.World/FurnaceTileEntity.h index 2907a4ca8..c77f8e44b 100644 --- a/Minecraft.World/FurnaceTileEntity.h +++ b/Minecraft.World/FurnaceTileEntity.h @@ -57,7 +57,7 @@ public: virtual void setCustomName(const wstring &name); virtual void load(CompoundTag *base); virtual void save(CompoundTag *base); - virtual int getMaxStackSize(); + virtual int getMaxStackSize() const; int getBurnProgress(int max); int getLitProgress(int max); bool isLit(); diff --git a/Minecraft.World/HopperTileEntity.cpp b/Minecraft.World/HopperTileEntity.cpp index 77cb81525..38a0e817d 100644 --- a/Minecraft.World/HopperTileEntity.cpp +++ b/Minecraft.World/HopperTileEntity.cpp @@ -131,7 +131,7 @@ void HopperTileEntity::setCustomName(const wstring &name) this->name = name; } -int HopperTileEntity::getMaxStackSize() +int HopperTileEntity::getMaxStackSize() const { return Container::LARGE_MAX_STACK_SIZE; } diff --git a/Minecraft.World/HopperTileEntity.h b/Minecraft.World/HopperTileEntity.h index 2e84ffdb7..cfd2fabf5 100644 --- a/Minecraft.World/HopperTileEntity.h +++ b/Minecraft.World/HopperTileEntity.h @@ -35,7 +35,7 @@ public: virtual wstring getCustomName(); virtual bool hasCustomName(); virtual void setCustomName(const wstring &name); - virtual int getMaxStackSize(); + virtual int getMaxStackSize() const; virtual bool stillValid(shared_ptr player); virtual void startOpen(); virtual void stopOpen(); diff --git a/Minecraft.World/I18n.cpp b/Minecraft.World/I18n.cpp index 81d3dff59..4805cdfee 100644 --- a/Minecraft.World/I18n.cpp +++ b/Minecraft.World/I18n.cpp @@ -3,20 +3,3 @@ #include "I18n.h" Language *I18n::lang = Language::getInstance(); -wstring I18n::get(const wstring& id, ...) -{ -#ifdef __PSVITA__ // 4J - vita doesn't like having a reference type as the last parameter passed to va_start - we shouldn't need this method anyway - return L""; -#elif _MSC_VER >= 1930 // VS2022+ also disallows va_start with reference types - return id; -#else - va_list va; - va_start(va, id); - return I18n::get(id, va); -#endif -} - -wstring I18n::get(const wstring& id, va_list args) -{ - return lang->getElement(id, args); -} diff --git a/Minecraft.World/I18n.h b/Minecraft.World/I18n.h index 0a43fe20b..f459f4deb 100644 --- a/Minecraft.World/I18n.h +++ b/Minecraft.World/I18n.h @@ -10,6 +10,9 @@ private: static Language *lang; public: - static wstring get(const wstring& id, ...); - static wstring get(const wstring& id, va_list args); + template + static wstring get(Args... args) + { + return lang->getElement(std::forward(args)...); + } }; \ No newline at end of file diff --git a/Minecraft.World/Inventory.cpp b/Minecraft.World/Inventory.cpp index f6a136c90..1b9ff630b 100644 --- a/Minecraft.World/Inventory.cpp +++ b/Minecraft.World/Inventory.cpp @@ -87,7 +87,7 @@ int Inventory::getSlotWithRemainingSpace(shared_ptr item) { for (unsigned int i = 0; i < items.length; i++) { - if (items[i] != NULL && items[i]->id == item->id && items[i]->isStackable() + if (items[i] != NULL && items[i]->id == item->id && items[i]->isStackable() && items[i]->count < items[i]->getMaxStackSize() && items[i]->count < getMaxStackSize() && (!items[i]->isStackedByData() || items[i]->getAuxValue() == item->getAuxValue()) && ItemInstance::tagMatches(items[i], item)) @@ -228,7 +228,7 @@ int Inventory::addResource(shared_ptr itemInstance) if (slot < 0) return count; if (items[slot] == NULL) { - items[slot] = ItemInstance::clone(itemInstance); + items[slot] = ItemInstance::clone(itemInstance); player->handleCollectItem(itemInstance); } return 0; @@ -299,14 +299,14 @@ bool Inventory::removeResource(int type,int iAuxVal) void Inventory::removeResources(shared_ptr item) { - if(item == NULL) return; + if(item == NULL) return; int countToRemove = item->count; for (unsigned int i = 0; i < items.length; i++) { if (items[i] != NULL && items[i]->sameItemWithTags(item)) { - int slotCount = items[i]->count; + int slotCount = items[i]->count; items[i]->count -= countToRemove; if(slotCount < countToRemove) { @@ -387,7 +387,7 @@ bool Inventory::add(shared_ptr item) { player->handleCollectItem(item); - player->awardStat( + player->awardStat( GenericStats::itemsCollected(item->id, item->getAuxValue()), GenericStats::param_itemsCollected(item->id, item->getAuxValue(), item->GetCount())); @@ -475,7 +475,7 @@ void Inventory::setItem(unsigned int slot, shared_ptr item) else { items[slot] = item; - } + } player->handleCollectItem(item); /* ItemInstanceArray& pile = items; @@ -592,7 +592,7 @@ bool Inventory::hasCustomName() return false; } -int Inventory::getMaxStackSize() +int Inventory::getMaxStackSize() const { return MAX_INVENTORY_STACK_SIZE; } diff --git a/Minecraft.World/Inventory.h b/Minecraft.World/Inventory.h index 5c49e9040..db5f42d60 100644 --- a/Minecraft.World/Inventory.h +++ b/Minecraft.World/Inventory.h @@ -81,7 +81,7 @@ public: wstring getName(); wstring getCustomName(); bool hasCustomName(); - int getMaxStackSize(); + int getMaxStackSize() const; bool canDestroy(Tile *tile); shared_ptr getArmor(int layer); int getArmorValue(); diff --git a/Minecraft.World/Item.cpp b/Minecraft.World/Item.cpp index 35768ac1b..2f23ab8cb 100644 --- a/Minecraft.World/Item.cpp +++ b/Minecraft.World/Item.cpp @@ -291,12 +291,12 @@ void Item::staticCtor() Item::helmet_iron = (ArmorItem *) ( ( new ArmorItem(50, ArmorItem::ArmorMaterial::IRON, 2, ArmorItem::SLOT_HEAD) ) ->setBaseItemTypeAndMaterial(eBaseItemType_helmet, eMaterial_iron) ->setIconName(L"helmetIron")->setDescriptionId(IDS_ITEM_HELMET_IRON)->setUseDescriptionId(IDS_DESC_HELMET_IRON) ); Item::helmet_diamond = (ArmorItem *) ( ( new ArmorItem(54, ArmorItem::ArmorMaterial::DIAMOND, 3, ArmorItem::SLOT_HEAD) ) ->setBaseItemTypeAndMaterial(eBaseItemType_helmet, eMaterial_diamond) ->setIconName(L"helmetDiamond")->setDescriptionId(IDS_ITEM_HELMET_DIAMOND)->setUseDescriptionId(IDS_DESC_HELMET_DIAMOND) ); Item::helmet_gold = (ArmorItem *) ( ( new ArmorItem(58, ArmorItem::ArmorMaterial::GOLD, 4, ArmorItem::SLOT_HEAD) ) ->setBaseItemTypeAndMaterial(eBaseItemType_helmet, eMaterial_gold) ->setIconName(L"helmetGold")->setDescriptionId(IDS_ITEM_HELMET_GOLD)->setUseDescriptionId(IDS_DESC_HELMET_GOLD) ); - + Item::chestplate_leather = (ArmorItem *) ( ( new ArmorItem(43, ArmorItem::ArmorMaterial::CLOTH, 0, ArmorItem::SLOT_TORSO) ) ->setBaseItemTypeAndMaterial(eBaseItemType_chestplate, eMaterial_cloth) ->setIconName(L"chestplateCloth")->setDescriptionId(IDS_ITEM_CHESTPLATE_CLOTH)->setUseDescriptionId(IDS_DESC_CHESTPLATE_LEATHER) ); Item::chestplate_iron = (ArmorItem *) ( ( new ArmorItem(51, ArmorItem::ArmorMaterial::IRON, 2, ArmorItem::SLOT_TORSO) ) ->setBaseItemTypeAndMaterial(eBaseItemType_chestplate, eMaterial_iron) ->setIconName(L"chestplateIron")->setDescriptionId(IDS_ITEM_CHESTPLATE_IRON)->setUseDescriptionId(IDS_DESC_CHESTPLATE_IRON) ); Item::chestplate_diamond = (ArmorItem *) ( ( new ArmorItem(55, ArmorItem::ArmorMaterial::DIAMOND, 3, ArmorItem::SLOT_TORSO) ) ->setBaseItemTypeAndMaterial(eBaseItemType_chestplate, eMaterial_diamond) ->setIconName(L"chestplateDiamond")->setDescriptionId(IDS_ITEM_CHESTPLATE_DIAMOND)->setUseDescriptionId(IDS_DESC_CHESTPLATE_DIAMOND) ); Item::chestplate_gold = (ArmorItem *) ( ( new ArmorItem(59, ArmorItem::ArmorMaterial::GOLD, 4, ArmorItem::SLOT_TORSO) ) ->setBaseItemTypeAndMaterial(eBaseItemType_chestplate, eMaterial_gold) ->setIconName(L"chestplateGold")->setDescriptionId(IDS_ITEM_CHESTPLATE_GOLD)->setUseDescriptionId(IDS_DESC_CHESTPLATE_GOLD) ); - + Item::leggings_leather = (ArmorItem *) ( ( new ArmorItem(44, ArmorItem::ArmorMaterial::CLOTH, 0, ArmorItem::SLOT_LEGS) ) ->setBaseItemTypeAndMaterial(eBaseItemType_leggings, eMaterial_cloth) ->setIconName(L"leggingsCloth")->setDescriptionId(IDS_ITEM_LEGGINGS_CLOTH)->setUseDescriptionId(IDS_DESC_LEGGINGS_LEATHER) ); Item::leggings_iron = (ArmorItem *) ( ( new ArmorItem(52, ArmorItem::ArmorMaterial::IRON, 2, ArmorItem::SLOT_LEGS) ) ->setBaseItemTypeAndMaterial(eBaseItemType_leggings, eMaterial_iron) ->setIconName(L"leggingsIron")->setDescriptionId(IDS_ITEM_LEGGINGS_IRON)->setUseDescriptionId(IDS_DESC_LEGGINGS_IRON) ); Item::leggings_diamond = (ArmorItem *) ( ( new ArmorItem(56, ArmorItem::ArmorMaterial::DIAMOND, 3, ArmorItem::SLOT_LEGS) ) ->setBaseItemTypeAndMaterial(eBaseItemType_leggings, eMaterial_diamond) ->setIconName(L"leggingsDiamond")->setDescriptionId(IDS_ITEM_LEGGINGS_DIAMOND)->setUseDescriptionId(IDS_DESC_LEGGINGS_DIAMOND) ); @@ -319,14 +319,14 @@ void Item::staticCtor() // 4J-PB - todo - add materials and base types to the ones below Item::bucket_empty = ( new BucketItem(69, 0) ) ->setBaseItemTypeAndMaterial(eBaseItemType_utensil, eMaterial_water)->setIconName(L"bucket")->setDescriptionId(IDS_ITEM_BUCKET)->setUseDescriptionId(IDS_DESC_BUCKET)->setMaxStackSize(16); Item::bowl = ( new Item(25) ) ->setBaseItemTypeAndMaterial(eBaseItemType_utensil, eMaterial_wood)->setIconName(L"bowl")->setDescriptionId(IDS_ITEM_BOWL)->setUseDescriptionId(IDS_DESC_BOWL)->setMaxStackSize(64); - + Item::bucket_water = ( new BucketItem(70, Tile::water_Id) ) ->setIconName(L"bucketWater")->setDescriptionId(IDS_ITEM_BUCKET_WATER)->setCraftingRemainingItem(Item::bucket_empty)->setUseDescriptionId(IDS_DESC_BUCKET_WATER); Item::bucket_lava = ( new BucketItem(71, Tile::lava_Id) ) ->setIconName(L"bucketLava")->setDescriptionId(IDS_ITEM_BUCKET_LAVA)->setCraftingRemainingItem(Item::bucket_empty)->setUseDescriptionId(IDS_DESC_BUCKET_LAVA); Item::bucket_milk = ( new MilkBucketItem(79) )->setIconName(L"milk")->setDescriptionId(IDS_ITEM_BUCKET_MILK)->setCraftingRemainingItem(Item::bucket_empty)->setUseDescriptionId(IDS_DESC_BUCKET_MILK); Item::bow = (BowItem *)( new BowItem(5) ) ->setIconName(L"bow")->setBaseItemTypeAndMaterial(eBaseItemType_bow, eMaterial_bow) ->setDescriptionId(IDS_ITEM_BOW)->setUseDescriptionId(IDS_DESC_BOW); Item::arrow = ( new Item(6) ) ->setIconName(L"arrow")->setBaseItemTypeAndMaterial(eBaseItemType_bow, eMaterial_arrow) ->setDescriptionId(IDS_ITEM_ARROW)->setUseDescriptionId(IDS_DESC_ARROW); - + Item::compass = ( new CompassItem(89) ) ->setIconName(L"compass")->setBaseItemTypeAndMaterial(eBaseItemType_pockettool, eMaterial_compass) ->setDescriptionId(IDS_ITEM_COMPASS)->setUseDescriptionId(IDS_DESC_COMPASS); Item::clock = ( new ClockItem(91) ) ->setIconName(L"clock")->setBaseItemTypeAndMaterial(eBaseItemType_pockettool, eMaterial_clock) ->setDescriptionId(IDS_ITEM_CLOCK)->setUseDescriptionId(IDS_DESC_CLOCK); Item::map = (MapItem *) ( new MapItem(102) ) ->setIconName(L"map")->setBaseItemTypeAndMaterial(eBaseItemType_pockettool, eMaterial_map) ->setDescriptionId(IDS_ITEM_MAP)->setUseDescriptionId(IDS_DESC_MAP); @@ -357,7 +357,7 @@ void Item::staticCtor() ->setBaseItemTypeAndMaterial(eBaseItemType_giltFruit,eMaterial_apple)->setIconName(L"appleGold")->setDescriptionId(IDS_ITEM_APPLE_GOLD);//->setUseDescriptionId(IDS_DESC_GOLDENAPPLE); Item::sign = ( new SignItem(67) ) ->setBaseItemTypeAndMaterial(eBaseItemType_HangingItem, eMaterial_wood)->setIconName(L"sign")->setDescriptionId(IDS_ITEM_SIGN)->setUseDescriptionId(IDS_DESC_SIGN); - + Item::minecart = ( new MinecartItem(72, Minecart::TYPE_RIDEABLE) ) ->setIconName(L"minecart")->setDescriptionId(IDS_ITEM_MINECART)->setUseDescriptionId(IDS_DESC_MINECART); @@ -396,7 +396,7 @@ void Item::staticCtor() Item::cookie = ( new FoodItem(101, 2, FoodConstants::FOOD_SATURATION_POOR, false) ) ->setIconName(L"cookie")->setDescriptionId(IDS_ITEM_COOKIE)->setUseDescriptionId(IDS_DESC_COOKIE); - Item::shears = (ShearsItem *)( new ShearsItem(103) ) ->setIconName(L"shears")->setBaseItemTypeAndMaterial(eBaseItemType_devicetool, eMaterial_shears)->setDescriptionId(IDS_ITEM_SHEARS)->setUseDescriptionId(IDS_DESC_SHEARS); + Item::shears = (ShearsItem *)( new ShearsItem(103) ) ->setIconName(L"shears")->setBaseItemTypeAndMaterial(eBaseItemType_devicetool, eMaterial_shears)->setDescriptionId(IDS_ITEM_SHEARS)->setUseDescriptionId(IDS_DESC_SHEARS); Item::melon = (new FoodItem(104, 2, FoodConstants::FOOD_SATURATION_LOW, false)) ->setIconName(L"melon")->setDescriptionId(IDS_ITEM_MELON_SLICE)->setUseDescriptionId(IDS_DESC_MELON_SLICE); @@ -455,7 +455,7 @@ void Item::staticCtor() // putting the fire charge in as a torch, so that it stacks without being near the middle of the selection boxes Item::fireball = (new FireChargeItem(129)) ->setBaseItemTypeAndMaterial(eBaseItemType_torch, eMaterial_setfire)->setIconName(L"fireball")->setDescriptionId(IDS_ITEM_FIREBALL)->setUseDescriptionId(IDS_DESC_FIREBALL); Item::frame = (new HangingEntityItem(133,eTYPE_ITEM_FRAME)) ->setBaseItemTypeAndMaterial(eBaseItemType_HangingItem, eMaterial_glass)->setIconName(L"frame")->setDescriptionId(IDS_ITEM_ITEMFRAME)->setUseDescriptionId(IDS_DESC_ITEMFRAME); - + // TU12 Item::skull = (new SkullItem(141)) ->setIconName(L"skull")->setDescriptionId(IDS_ITEM_SKULL)->setUseDescriptionId(IDS_DESC_SKULL); @@ -501,7 +501,7 @@ void Item::staticCtor() void Item::staticInit() { Stats::buildItemStats(); -} +} _Tier::Tier(int level, int uses, float speed, float damage, int enchantmentValue) : @@ -668,7 +668,7 @@ shared_ptr Item::useTimeDepleted(shared_ptr itemInst return itemInstance; } -int Item::getMaxStackSize() +int Item::getMaxStackSize() const { return maxStackSize; } @@ -711,7 +711,7 @@ bool Item::canBeDepleted() /** * Returns true when the item was used to deal more than default damage -* +* * @param itemInstance * @param mob * @param attacker @@ -724,7 +724,7 @@ bool Item::hurtEnemy(shared_ptr itemInstance, shared_ptr itemInstance, Level *level, shared_ptr player); virtual shared_ptr use(shared_ptr itemInstance, Level *level, shared_ptr player); virtual shared_ptr useTimeDepleted(shared_ptr itemInstance, Level *level, shared_ptr player); - virtual int getMaxStackSize(); + virtual int getMaxStackSize() const; virtual int getLevelDataForAuxValue(int auxValue); bool isStackedByData(); @@ -686,7 +686,7 @@ public: /** * Returns true when the item was used to deal more than default damage - * + * * @param itemInstance * @param mob * @param attacker @@ -696,7 +696,7 @@ public: /** * Returns true when the item was used to mine more efficiently - * + * * @param itemInstance * @param tile * @param x diff --git a/Minecraft.World/ItemInstance.cpp b/Minecraft.World/ItemInstance.cpp index c83b67ddc..32367b120 100644 --- a/Minecraft.World/ItemInstance.cpp +++ b/Minecraft.World/ItemInstance.cpp @@ -31,17 +31,17 @@ void ItemInstance::_init(int id, int count, int auxValue) this->m_bForceNumberDisplay=false; } -ItemInstance::ItemInstance(Tile *tile) +ItemInstance::ItemInstance(Tile *tile) { _init(tile->id, 1, 0); } -ItemInstance::ItemInstance(Tile *tile, int count) +ItemInstance::ItemInstance(Tile *tile, int count) { _init(tile->id, count, 0); } // 4J-PB - added -ItemInstance::ItemInstance(MapItem *item, int count) +ItemInstance::ItemInstance(MapItem *item, int count) { _init(item->id, count, 0); } @@ -51,19 +51,19 @@ ItemInstance::ItemInstance(Tile *tile, int count, int auxValue) _init(tile->id, count, auxValue); } -ItemInstance::ItemInstance(Item *item) +ItemInstance::ItemInstance(Item *item) { _init(item->id, 1, 0); } -ItemInstance::ItemInstance(Item *item, int count) +ItemInstance::ItemInstance(Item *item, int count) { _init(item->id, count, 0); } -ItemInstance::ItemInstance(Item *item, int count, int auxValue) +ItemInstance::ItemInstance(Item *item, int count, int auxValue) { _init(item->id, count, auxValue); } @@ -89,7 +89,7 @@ ItemInstance::~ItemInstance() if(tag != NULL) delete tag; } -shared_ptr ItemInstance::remove(int count) +shared_ptr ItemInstance::remove(int count) { shared_ptr ii = shared_ptr( new ItemInstance(id, count, auxValue) ); if (tag != NULL) ii->tag = (CompoundTag *) tag->copy(); @@ -123,17 +123,17 @@ bool ItemInstance::useOn(shared_ptr player, Level *level, int x, int y, return getItem()->useOn(shared_from_this(), player, level, x, y, z, face, clickX, clickY, clickZ, bTestUseOnOnly); } -float ItemInstance::getDestroySpeed(Tile *tile) +float ItemInstance::getDestroySpeed(Tile *tile) { return getItem()->getDestroySpeed(shared_from_this(), tile); } -bool ItemInstance::TestUse(shared_ptr itemInstance, Level *level, shared_ptr player) +bool ItemInstance::TestUse(shared_ptr itemInstance, Level *level, shared_ptr player) { return getItem()->TestUse( itemInstance, level, player); } -shared_ptr ItemInstance::use(Level *level, shared_ptr player) +shared_ptr ItemInstance::use(Level *level, shared_ptr player) { return getItem()->use(shared_from_this(), level, player); } @@ -143,7 +143,7 @@ shared_ptr ItemInstance::useTimeDepleted(Level *level, shared_ptr< return getItem()->useTimeDepleted(shared_from_this(), level, player); } -CompoundTag *ItemInstance::save(CompoundTag *compoundTag) +CompoundTag *ItemInstance::save(CompoundTag *compoundTag) { compoundTag->putShort(L"id", (short) id); compoundTag->putByte(L"Count", (byte) count); @@ -169,7 +169,7 @@ void ItemInstance::load(CompoundTag *compoundTag) } } -int ItemInstance::getMaxStackSize() +int ItemInstance::getMaxStackSize() const { return getItem()->getMaxStackSize(); } @@ -179,7 +179,7 @@ bool ItemInstance::isStackable() return getMaxStackSize() > 1 && (!isDamageableItem() || !isDamaged()); } -bool ItemInstance::isDamageableItem() +bool ItemInstance::isDamageableItem() { return Item::items[id]->getMaxDamage() > 0; } @@ -187,7 +187,7 @@ bool ItemInstance::isDamageableItem() /** * Returns true if this item type only can be stacked with items that have * the same auxValue data. -* +* * @return */ @@ -196,7 +196,7 @@ bool ItemInstance::isStackedByData() return Item::items[id]->isStackedByData(); } -bool ItemInstance::isDamaged() +bool ItemInstance::isDamaged() { return isDamageableItem() && auxValue > 0; } @@ -280,13 +280,13 @@ void ItemInstance::hurtAndBreak(int dmg, shared_ptr owner) void ItemInstance::hurtEnemy(shared_ptr mob, shared_ptr attacker) { - //bool used = + //bool used = Item::items[id]->hurtEnemy(shared_from_this(), mob, attacker); } -void ItemInstance::mineBlock(Level *level, int tile, int x, int y, int z, shared_ptr owner) +void ItemInstance::mineBlock(Level *level, int tile, int x, int y, int z, shared_ptr owner) { - //bool used = + //bool used = Item::items[id]->mineBlock( shared_from_this(), level, tile, x, y, z, owner); } @@ -342,7 +342,7 @@ bool ItemInstance::tagMatches(shared_ptr a, shared_ptr a, shared_ptr b) +bool ItemInstance::matches(shared_ptr a, shared_ptr b) { if (a == NULL && b == NULL) return true; if (a == NULL || b == NULL) return false; @@ -368,7 +368,7 @@ bool ItemInstance::matches(shared_ptr b) /** * Checks if this item is the same item as the other one, disregarding the * 'count' value. -* +* * @param b * @return */ @@ -393,17 +393,17 @@ bool ItemInstance::sameItemWithTags(shared_ptr b) } // 4J Stu - Added this for the one time when we compare with a non-shared pointer -bool ItemInstance::sameItem_not_shared(ItemInstance *b) +bool ItemInstance::sameItem_not_shared(const ItemInstance *b) { return id == b->id && auxValue == b->auxValue; } -unsigned int ItemInstance::getUseDescriptionId() +unsigned int ItemInstance::getUseDescriptionId() { return Item::items[id]->getUseDescriptionId(shared_from_this()); } -unsigned int ItemInstance::getDescriptionId(int iData /*= -1*/) +unsigned int ItemInstance::getDescriptionId(int iData /*= -1*/) { return Item::items[id]->getDescriptionId(shared_from_this()); } @@ -420,7 +420,7 @@ shared_ptr ItemInstance::clone(shared_ptr item) return item == NULL ? nullptr : item->copy(); } -wstring ItemInstance::toString() +wstring ItemInstance::toString() { //return count + "x" + Item::items[id]->getDescriptionId() + "@" + auxValue; @@ -661,7 +661,7 @@ vector *ItemInstance::getHoverText(shared_ptr player, bool a lines->push_back(it->second->getHoverText(it->first)); } } - + // Delete modifiers map for (AUTO_VAR(it, modifiers->begin()); it != modifiers->end(); ++it) { @@ -760,17 +760,17 @@ bool ItemInstance::mayBePlacedInAdventureMode() return getItem()->mayBePlacedInAdventureMode(); } -bool ItemInstance::isFramed() +bool ItemInstance::isFramed() { return frame != NULL; } -void ItemInstance::setFramed(shared_ptr frame) +void ItemInstance::setFramed(shared_ptr frame) { this->frame = frame; } -shared_ptr ItemInstance::getFrame() +shared_ptr ItemInstance::getFrame() { return frame; } @@ -807,8 +807,8 @@ attrAttrModMap *ItemInstance::getAttributeModifiers() CompoundTag *entry = entries->get(i); AttributeModifier *attribute = SharedMonsterAttributes::loadAttributeModifier(entry); - // 4J Not sure why but this is a check that the attribute ID is not empty - /*if (attribute->getId()->getLeastSignificantBits() != 0 && attribute->getId()->getMostSignificantBits() != 0) + // 4J Not sure why but this is a check that the attribute ID is not empty + /*if (attribute->getId()->getLeastSignificantBits() != 0 && attribute->getId()->getMostSignificantBits() != 0) {*/ result->insert(std::pair(static_cast(entry->getInt(L"ID")), attribute)); /*}*/ @@ -848,7 +848,7 @@ int ItemInstance::get4JData() } } // 4J Added - to show strength on potions -bool ItemInstance::hasPotionStrengthBar() +bool ItemInstance::hasPotionStrengthBar() { // exclude a bottle of water from this if((id==Item::potion_Id) && (auxValue !=0))// && (!MACRO_POTION_IS_AKWARD(auxValue))) 4J-PB leaving the bar on an awkward potion so we can differentiate it from a water bottle @@ -859,7 +859,7 @@ bool ItemInstance::hasPotionStrengthBar() return false; } -int ItemInstance::GetPotionStrength() +int ItemInstance::GetPotionStrength() { if(MACRO_POTION_IS_INSTANTDAMAGE(auxValue) || MACRO_POTION_IS_INSTANTHEALTH(auxValue) ) { diff --git a/Minecraft.World/ItemInstance.h b/Minecraft.World/ItemInstance.h index 034c72f8e..cff33a972 100644 --- a/Minecraft.World/ItemInstance.h +++ b/Minecraft.World/ItemInstance.h @@ -77,12 +77,12 @@ public: int getIconType(); bool useOn(shared_ptr player, Level *level, int x, int y, int z, int face, float clickX, float clickY, float clickZ, bool bTestUseOnOnly=false); float getDestroySpeed(Tile *tile); - bool TestUse(shared_ptr itemInstance, Level *level, shared_ptr player); + bool TestUse(shared_ptr itemInstance, Level *level, shared_ptr player); shared_ptr use(Level *level, shared_ptr player); shared_ptr useTimeDepleted(Level *level, shared_ptr player); CompoundTag *save(CompoundTag *compoundTag); void load(CompoundTag *compoundTag); - int getMaxStackSize(); + int getMaxStackSize() const; bool isStackable(); bool isDamageableItem(); bool isStackedByData(); @@ -113,7 +113,7 @@ private: public: bool sameItem(shared_ptr b); bool sameItemWithTags(shared_ptr b); //4J Added - bool sameItem_not_shared(ItemInstance *b); // 4J Stu - Added this for the one time I need it + bool sameItem_not_shared(const ItemInstance *b); // 4J Stu - Added this for the one time I need it virtual unsigned int getUseDescriptionId(); // 4J Added virtual unsigned int getDescriptionId(int iData = -1); virtual ItemInstance *setDescriptionId(unsigned int id); diff --git a/Minecraft.World/Language.cpp b/Minecraft.World/Language.cpp index 73e56a470..2fdc47555 100644 --- a/Minecraft.World/Language.cpp +++ b/Minecraft.World/Language.cpp @@ -14,37 +14,12 @@ Language *Language::getInstance() return singleton; } -/* 4J Jev, creates 2 identical functions. -wstring Language::getElement(const wstring& elementId) -{ - return elementId; -} */ - -wstring Language::getElement(const wstring& elementId, ...) -{ -#ifdef __PSVITA__ // 4J - vita doesn't like having a reference type as the last parameter passed to va_start - we shouldn't need this method anyway - return L""; -#elif _MSC_VER >= 1930 // VS2022+ also disallows va_start with reference types - return elementId; -#else - va_list args; - va_start(args, elementId); - return getElement(elementId, args); -#endif -} - -wstring Language::getElement(const wstring& elementId, va_list args) -{ - // 4J TODO - return elementId; -} - -wstring Language::getElementName(const wstring& elementId) +std::wstring Language::getElementName(const std::wstring& elementId) { return elementId; } -wstring Language::getElementDescription(const wstring& elementId) +std::wstring Language::getElementDescription(const std::wstring& elementId) { return elementId; } \ No newline at end of file diff --git a/Minecraft.World/Language.h b/Minecraft.World/Language.h index 10e2951f2..9c7c85244 100644 --- a/Minecraft.World/Language.h +++ b/Minecraft.World/Language.h @@ -1,5 +1,7 @@ #pragma once +#include + class Language { private: @@ -7,8 +9,11 @@ private: public: Language(); static Language *getInstance(); - wstring getElement(const wstring& elementId, ...); - wstring getElement(const wstring& elementId, va_list args); - wstring getElementName(const wstring& elementId); - wstring getElementDescription(const wstring& elementId); + template + inline std::wstring getElement(const std::wstring& elementId, Args...) + { + return elementId; + } + std::wstring getElementName(const std::wstring& elementId); + std::wstring getElementDescription(const std::wstring& elementId); }; \ No newline at end of file diff --git a/Minecraft.World/MerchantContainer.cpp b/Minecraft.World/MerchantContainer.cpp index cd3fde5ec..7ceb47455 100644 --- a/Minecraft.World/MerchantContainer.cpp +++ b/Minecraft.World/MerchantContainer.cpp @@ -105,7 +105,7 @@ bool MerchantContainer::hasCustomName() return false; } -int MerchantContainer::getMaxStackSize() +int MerchantContainer::getMaxStackSize() const { return Container::LARGE_MAX_STACK_SIZE; } diff --git a/Minecraft.World/MerchantContainer.h b/Minecraft.World/MerchantContainer.h index 91893c1b3..e2e639702 100644 --- a/Minecraft.World/MerchantContainer.h +++ b/Minecraft.World/MerchantContainer.h @@ -33,7 +33,7 @@ public: wstring getName(); wstring getCustomName(); bool hasCustomName(); - int getMaxStackSize(); + int getMaxStackSize() const; bool stillValid(shared_ptr player); void startOpen(); void stopOpen(); diff --git a/Minecraft.World/MinecartContainer.cpp b/Minecraft.World/MinecartContainer.cpp index 61d0d32b7..20bfc4ea8 100644 --- a/Minecraft.World/MinecartContainer.cpp +++ b/Minecraft.World/MinecartContainer.cpp @@ -127,7 +127,7 @@ wstring MinecartContainer::getName() return hasCustomName() ? getCustomName() : app.GetString(IDS_CONTAINER_MINECART); } -int MinecartContainer::getMaxStackSize() +int MinecartContainer::getMaxStackSize() const { return Container::LARGE_MAX_STACK_SIZE; } diff --git a/Minecraft.World/MinecartContainer.h b/Minecraft.World/MinecartContainer.h index 895176584..c7bb72986 100644 --- a/Minecraft.World/MinecartContainer.h +++ b/Minecraft.World/MinecartContainer.h @@ -26,7 +26,7 @@ public: virtual void stopOpen(); virtual bool canPlaceItem(int slot, shared_ptr item); virtual wstring getName(); - virtual int getMaxStackSize(); + virtual int getMaxStackSize() const; virtual void changeDimension(int i); virtual void remove(); @@ -41,7 +41,7 @@ protected: virtual void applyNaturalSlowdown(); public: - + // 4J Stu - For container virtual bool hasCustomName() { return Minecart::hasCustomName(); } virtual wstring getCustomName() { return Minecart::getCustomName(); } diff --git a/Minecraft.World/MinecartHopper.h b/Minecraft.World/MinecartHopper.h index 874bab6ae..54c97b383 100644 --- a/Minecraft.World/MinecartHopper.h +++ b/Minecraft.World/MinecartHopper.h @@ -54,7 +54,7 @@ public: virtual wstring getName() { return MinecartContainer::getName(); } virtual wstring getCustomName() { return MinecartContainer::getCustomName(); } virtual bool hasCustomName() { return MinecartContainer::hasCustomName(); } - virtual int getMaxStackSize() { return MinecartContainer::getMaxStackSize(); } + virtual int getMaxStackSize() const { return MinecartContainer::getMaxStackSize(); } virtual void setChanged() { MinecartContainer::setChanged(); } virtual bool stillValid(shared_ptr player) { return MinecartContainer::stillValid(player); } diff --git a/Minecraft.World/Minecraft.World.vcxproj b/Minecraft.World/Minecraft.World.vcxproj index c9516552c..16a93e1af 100644 --- a/Minecraft.World/Minecraft.World.vcxproj +++ b/Minecraft.World/Minecraft.World.vcxproj @@ -307,6 +307,7 @@ StaticLibrary MultiByte v143 + true StaticLibrary @@ -1336,7 +1337,7 @@ Use - Level3 + TurnOffAllWarnings ProgramDatabase Full Sync diff --git a/Minecraft.World/ResultContainer.cpp b/Minecraft.World/ResultContainer.cpp index f2f273c2c..8c85d0c32 100644 --- a/Minecraft.World/ResultContainer.cpp +++ b/Minecraft.World/ResultContainer.cpp @@ -58,7 +58,7 @@ void ResultContainer::setItem(unsigned int slot, shared_ptr item) items[0] = item; } -int ResultContainer::getMaxStackSize() +int ResultContainer::getMaxStackSize() const { return Container::LARGE_MAX_STACK_SIZE; } diff --git a/Minecraft.World/ResultContainer.h b/Minecraft.World/ResultContainer.h index f99cf806d..53d804032 100644 --- a/Minecraft.World/ResultContainer.h +++ b/Minecraft.World/ResultContainer.h @@ -19,7 +19,7 @@ public: virtual shared_ptr removeItem(unsigned int slot, int count); virtual shared_ptr removeItemNoUpdate(int slot); virtual void setItem(unsigned int slot, shared_ptr item); - virtual int getMaxStackSize(); + virtual int getMaxStackSize() const; virtual void setChanged(); virtual bool stillValid(shared_ptr player); virtual void startOpen() { } // TODO Auto-generated method stub diff --git a/Minecraft.World/SimpleContainer.cpp b/Minecraft.World/SimpleContainer.cpp index 147bab0a2..a5f551e2a 100644 --- a/Minecraft.World/SimpleContainer.cpp +++ b/Minecraft.World/SimpleContainer.cpp @@ -106,7 +106,7 @@ void SimpleContainer::setCustomName(const wstring &name) this->stringName = name; } -int SimpleContainer::getMaxStackSize() +int SimpleContainer::getMaxStackSize() const { return Container::LARGE_MAX_STACK_SIZE; } diff --git a/Minecraft.World/SimpleContainer.h b/Minecraft.World/SimpleContainer.h index b0baed703..bb22d1419 100644 --- a/Minecraft.World/SimpleContainer.h +++ b/Minecraft.World/SimpleContainer.h @@ -28,7 +28,7 @@ public: virtual wstring getCustomName(); virtual bool hasCustomName(); virtual void setCustomName(const wstring &name); - virtual int getMaxStackSize(); + virtual int getMaxStackSize() const; virtual void setChanged(); virtual bool stillValid(shared_ptr player); virtual void startOpen() { } // TODO Auto-generated method stub diff --git a/Minecraft.World/Slot.cpp b/Minecraft.World/Slot.cpp index c7d1a029a..a5a53a481 100644 --- a/Minecraft.World/Slot.cpp +++ b/Minecraft.World/Slot.cpp @@ -91,7 +91,7 @@ void Slot::setChanged() container->setChanged(); } -int Slot::getMaxStackSize() +int Slot::getMaxStackSize() const { return container->getMaxStackSize(); } diff --git a/Minecraft.World/Slot.h b/Minecraft.World/Slot.h index 123997835..70f9a3c32 100644 --- a/Minecraft.World/Slot.h +++ b/Minecraft.World/Slot.h @@ -31,7 +31,7 @@ public: virtual bool hasItem(); virtual void set(shared_ptr item); virtual void setChanged(); - virtual int getMaxStackSize(); + virtual int getMaxStackSize() const; virtual Icon *getNoItemIcon(); virtual shared_ptr remove(int c); virtual bool isAt(shared_ptr c, int s); diff --git a/Minecraft.World/x64headers/extraX64.h b/Minecraft.World/x64headers/extraX64.h index 2205ae054..b89998ace 100644 --- a/Minecraft.World/x64headers/extraX64.h +++ b/Minecraft.World/x64headers/extraX64.h @@ -215,10 +215,17 @@ public: int GetUserIndex(); void SetCustomDataValue(ULONG_PTR ulpCustomDataValue); ULONG_PTR GetCustomDataValue(); + + BYTE m_smallId; + bool m_isRemote; + bool m_isHostPlayer; + wchar_t m_gamertag[32]; private: ULONG_PTR m_customData; }; +void Win64_SetupRemoteQNetPlayer(IQNetPlayer* player, BYTE smallId, bool isHost, bool isLocal); + const int QNET_GETSENDQUEUESIZE_SECONDARY_TYPE = 0; const int QNET_GETSENDQUEUESIZE_MESSAGES = 0; const int QNET_GETSENDQUEUESIZE_BYTES = 0; @@ -309,9 +316,12 @@ public: bool IsHost(); HRESULT JoinGameFromInviteInfo(DWORD dwUserIndex, DWORD dwUserMask, const INVITE_INFO *pInviteInfo); void HostGame(); - void EndGame(); + void ClientJoinGame(); + void EndGame(); - static IQNetPlayer m_player[4]; + static IQNetPlayer m_player[MINECRAFT_NET_MAX_PLAYERS]; + static DWORD s_playerCount; + static bool s_isHosting; }; #ifdef _DURANGO diff --git a/README.md b/README.md index 92aa2d7d3..84d0186d8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Discord](https://img.shields.io/badge/Discord-Join%20Server-5865F2?logo=discord&logoColor=white)](https://discord.gg/5CSzhc9t) -![Tutorial World](.github/IMG_8725.png) +![Tutorial World](.github/TutorialWorld.png) ## Introduction @@ -23,6 +23,25 @@ This project contains the source code of Minecraft Legacy Console Edition v1.6.0 - Disabled V-Sync for better performance - Added a high-resolution timer path on Windows for smoother high-FPS gameplay timing - Device's screen resolution will be used as the game resolution instead of using a fixed resolution (1920x1080) +- LAN Multiplayer & Discovery + +## Multiplayer + +Basic LAN multiplayer is available on the Windows build + +- Hosting a multiplayer world automatically advertises it on the local network +- Other players on the same LAN can discover the session from the in-game Join Game menu +- Game connections use TCP port `25565` by default +- LAN discovery uses UDP port `25566` +- You can override your in-game username at launch with `-name` + +Example: + +```powershell +Minecraft.Client.exe -name Steve +``` + +This feature is based on [LCEMP](https://github.com/LCEMP/LCEMP/) ## Controls (Keyboard & Mouse) @@ -41,7 +60,7 @@ This project contains the source code of Minecraft Legacy Console Edition v1.6.0 - **Use / Place**: `Right Click` - **Select Item**: `Mouse Wheel` or keys `1` to `9` - **Accept or Decline Tutorial hints**: `Enter` to accept and `B` to decline -- **Host Options**: `TAB` +- **Game Info (Player list and Host Options)**: `TAB` - **Toggle Debug Info**: `F3` - **Open Debug Overlay**: `F4` diff --git a/cmake/ClientSources.cmake b/cmake/ClientSources.cmake index f56b7ef08..c75b3bf34 100644 --- a/cmake/ClientSources.cmake +++ b/cmake/ClientSources.cmake @@ -476,6 +476,7 @@ set(MINECRAFT_CLIENT_SOURCES "Windows64/Windows64_App.cpp" "Windows64/Windows64_Minecraft.cpp" "Windows64/Windows64_UIController.cpp" + "Windows64/Network/WinsockNetLayer.cpp" "WitchModel.cpp" "WitchRenderer.cpp" "WitherBossModel.cpp" diff --git a/cmake/CopyAssets.cmake b/cmake/CopyAssets.cmake index 47b19ca79..a0252f730 100644 --- a/cmake/CopyAssets.cmake +++ b/cmake/CopyAssets.cmake @@ -12,9 +12,28 @@ set(_project_dir "${PROJECT_SOURCE_DIR}/Minecraft.Client") function(copy_tree_if_exists src_rel dst_rel) set(_src "${_project_dir}/${src_rel}") set(_dst "${OUTPUT_DIR}/${dst_rel}") + if(EXISTS "${_src}") file(MAKE_DIRECTORY "${_dst}") - execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${_src}" "${_dst}") + file(GLOB_RECURSE _files RELATIVE "${_src}" "${_src}/*") + + foreach(_file IN LISTS _files) # if not a source file + if(NOT _file MATCHES "\\.(cpp|c|h|hpp|xml|lang)$") + set(_full_src "${_src}/${_file}") + set(_full_dst "${_dst}/${_file}") + + if(IS_DIRECTORY "${_full_src}") + file(MAKE_DIRECTORY "${_full_dst}") + else() + get_filename_component(_dst_dir "${_full_dst}" DIRECTORY) + file(MAKE_DIRECTORY "${_dst_dir}") + execute_process( + COMMAND "${CMAKE_COMMAND}" -E copy_if_different + "${_full_src}" "${_full_dst}" + ) + endif() + endif() + endforeach() endif() endfunction() @@ -25,10 +44,15 @@ endfunction() function(copy_file_if_exists src_rel dst_rel) set(_src "${PROJECT_SOURCE_DIR}/${src_rel}") set(_dst "${OUTPUT_DIR}/${dst_rel}") + + get_filename_component(_dst_dir "${_dst}" DIRECTORY) + file(MAKE_DIRECTORY "${_dst_dir}") + if(EXISTS "${_src}") - get_filename_component(_dst_dir "${_dst}" DIRECTORY) - file(MAKE_DIRECTORY "${_dst_dir}") - execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${_src}" "${_dst}") + execute_process( + COMMAND "${CMAKE_COMMAND}" -E copy_if_different + "${_src}" "${_dst}" + ) endif() endfunction() @@ -46,24 +70,24 @@ function(copy_first_existing dst_rel) endif() endfunction() -if(CONFIGURATION STREQUAL "Debug") - copy_tree_if_exists("Durango/Sound" "Durango/Sound") - copy_tree_if_exists("music" "music") - copy_tree_if_exists("Windows64/GameHDD" "Windows64/GameHDD") - copy_tree_if_exists("Common/Media" "Common/Media") - copy_tree_if_exists("Common/res" "Common/res") - copy_tree_if_exists("Common/Trial" "Common/Trial") - copy_tree_if_exists("Common/Tutorial" "Common/Tutorial") -else() - copy_tree_if_exists("music" "music") - copy_tree_if_exists("Windows64/GameHDD" "Windows64/GameHDD") - copy_tree_if_exists("Common/Media" "Common/Media") - copy_tree_if_exists("Common/res" "Common/res") - copy_tree_if_exists("Common/Trial" "Common/Trial") - copy_tree_if_exists("Common/Tutorial" "Common/Tutorial") - copy_tree_if_exists("DurangoMedia" "Windows64Media") - copy_tree_if_exists("Windows64Media" "Windows64Media") -endif() +function(remove_directory_if_exists rel_path) + set(_dir "${OUTPUT_DIR}/${rel_path}") + if(EXISTS "${_dir}") + file(REMOVE_RECURSE "${_dir}") + endif() +endfunction() + +copy_tree_if_exists("Durango/Sound" "Windows64/Sound") +copy_tree_if_exists("music" "music") +copy_tree_if_exists("Windows64/GameHDD" "Windows64/GameHDD") +copy_file_if_exists("Minecraft.Client/Common/Media/MediaWindows64.arc" "Common/Media/MediaWindows64.arc") +copy_tree_if_exists("Common/res" "Common/res") +copy_tree_if_exists("Common/Trial" "Common/Trial") +copy_tree_if_exists("Common/Tutorial" "Common/Tutorial") +copy_tree_if_exists("DurangoMedia" "Windows64Media") +copy_tree_if_exists("Windows64Media" "Windows64Media") + +remove_directory_if_exists("Windows64Media/Layout") # Some runtime code asserts if this directory tree is missing. ensure_dir("Windows64/GameHDD")