4 Commits
Author SHA1 Message Date
pieeebot 01abe05b18 attempt at trying to get XB360 to work 2026-08-01 06:15:37 +03:00
pieeebot 2170209e26 Merge branch 'main' into networking 2026-08-01 02:04:05 +03:00
pieeebot 991369547a fix compile error 2026-07-31 22:35:05 +03:00
pieeebot dbd90a75c9 add lcemp networking + ps3 support
YES I KNOW ITS GARBAGE, THATS WHY ITS NOT ON MAIN

ILL FIX IT UP IN FUTURE COMMITS THEN MERGE TO MAIN
2026-07-31 22:08:30 +03:00
64 changed files with 2254 additions and 139 deletions
+1 -1
View File
@@ -1941,7 +1941,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
isAtLeastOneFriend = TRUE; isAtLeastOneFriend = TRUE;
cantPlayContentRestricted= FALSE; cantPlayContentRestricted= FALSE;
#if ( defined __PS3__ || defined __ORBIS__ || defined __PSVITA__) #if !defined DISABLE_PSN && ( defined __PS3__ || defined __ORBIS__ || defined __PSVITA__)
if(!g_NetworkManager.IsHost() && !app.GetGameHostOption(eGameHostOption_FriendsOfFriends)) if(!g_NetworkManager.IsHost() && !app.GetGameHostOption(eGameHostOption_FriendsOfFriends))
{ {
+1 -1
View File
@@ -162,7 +162,7 @@ MOJANG_DATA;
typedef struct typedef struct
{ {
eDLCContentType eDLCType; eDLCContentType eDLCType;
#if defined( __PS3__) || defined(__ORBIS__) || defined (__PSVITA__) #if !defined(DISABLE_PSN) && defined( __PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
char chImageURL[256];//SCE_NP_COMMERCE2_URL_LEN char chImageURL[256];//SCE_NP_COMMERCE2_URL_LEN
#else #else
+19 -5
View File
@@ -5094,6 +5094,9 @@ void CMinecraftApp::NotificationsCallback(LPVOID pParam,DWORD dwNotification, un
#if defined __PS3__ || defined __PSVITA__ || defined __ORBIS__ #if defined __PS3__ || defined __PSVITA__ || defined __ORBIS__
int CMinecraftApp::MustSignInFullVersionPurchaseReturned(void *pParam,int iPad,C4JStorage::EMessageResult result) int CMinecraftApp::MustSignInFullVersionPurchaseReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{ {
#ifdef DISABLE_PSN
return 0;
#else
if(result==C4JStorage::EMessage_ResultAccept) if(result==C4JStorage::EMessage_ResultAccept)
{ {
#ifdef __PS3__ #ifdef __PS3__
@@ -5106,11 +5109,15 @@ int CMinecraftApp::MustSignInFullVersionPurchaseReturned(void *pParam,int iPad,C
} }
return 0; return 0;
#endif
} }
#if defined __PS3__ || defined __PSVITA__ || defined __ORBIS__ #if defined __PS3__ || defined __PSVITA__ || defined __ORBIS__
int CMinecraftApp::MustSignInFullVersionPurchaseReturnedExitTrial(void *pParam,int iPad,C4JStorage::EMessageResult result) int CMinecraftApp::MustSignInFullVersionPurchaseReturnedExitTrial(void *pParam,int iPad,C4JStorage::EMessageResult result)
{ {
#ifdef DISABLE_PSN
return 0;
#else
if(result==C4JStorage::EMessage_ResultAccept) if(result==C4JStorage::EMessage_ResultAccept)
{ {
#ifdef __PS3__ #ifdef __PS3__
@@ -5126,6 +5133,7 @@ int CMinecraftApp::MustSignInFullVersionPurchaseReturnedExitTrial(void *pParam,i
app.SetAction(iPad,eAppAction_ExitWorldTrial); app.SetAction(iPad,eAppAction_ExitWorldTrial);
return 0; return 0;
#endif
} }
#endif #endif
@@ -6761,7 +6769,7 @@ wstring CMinecraftApp::GetIconReplacement(unsigned int uiIcon)
#endif #endif
} }
#if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__) #if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
unordered_map<PlayerUID, MOJANG_DATA *, PlayerUID::Hash> CMinecraftApp::MojangData; unordered_map<PlayerUID, MOJANG_DATA *, PlayerUID::Hash> CMinecraftApp::MojangData;
unordered_map<int, char * > CMinecraftApp::DLCTextures_PackID; unordered_map<int, char * > CMinecraftApp::DLCTextures_PackID;
unordered_map<string, DLC_INFO * > CMinecraftApp::DLCInfo; unordered_map<string, DLC_INFO * > CMinecraftApp::DLCInfo;
@@ -6772,6 +6780,12 @@ unordered_map<int, wstring > CMinecraftApp::DLCTextures_PackID; // for mash-up
//unordered_map<ULONGLONG,DLC_INFO * > CMinecraftApp::DLCInfo_Trial; // full offerid, dlc_info //unordered_map<ULONGLONG,DLC_INFO * > CMinecraftApp::DLCInfo_Trial; // full offerid, dlc_info
unordered_map<wstring,DLC_INFO * > CMinecraftApp::DLCInfo_Full; // full offerid, dlc_info unordered_map<wstring,DLC_INFO * > CMinecraftApp::DLCInfo_Full; // full offerid, dlc_info
unordered_map<wstring, wstring > CMinecraftApp::DLCInfo_SkinName; // skin name, full offer id unordered_map<wstring, wstring > CMinecraftApp::DLCInfo_SkinName; // skin name, full offer id
#elif defined(DISABLE_PSN) && defined(__PS3__)
unordered_map<PlayerUID, MOJANG_DATA *, PlayerUID::Hash> CMinecraftApp::MojangData;
unordered_map<int, ULONGLONG > CMinecraftApp::DLCTextures_PackID;
unordered_map<ULONGLONG, DLC_INFO * > CMinecraftApp::DLCInfo_Trial;
unordered_map<ULONGLONG, DLC_INFO * > CMinecraftApp::DLCInfo_Full;
unordered_map<wstring, ULONGLONG > CMinecraftApp::DLCInfo_SkinName;
#else #else
unordered_map<PlayerUID, MOJANG_DATA *> CMinecraftApp::MojangData; unordered_map<PlayerUID, MOJANG_DATA *> CMinecraftApp::MojangData;
unordered_map<int, ULONGLONG > CMinecraftApp::DLCTextures_PackID; unordered_map<int, ULONGLONG > CMinecraftApp::DLCTextures_PackID;
@@ -6854,7 +6868,7 @@ HRESULT CMinecraftApp::RegisterConfigValues(WCHAR *pType, int iValue)
return hr; return hr;
} }
#if (defined _XBOX || defined _WINDOWS64) #if (defined _XBOX || defined _WINDOWS64 || defined DISABLE_PSN)
HRESULT CMinecraftApp::RegisterDLCData(WCHAR *pType, WCHAR *pBannerName, int iGender, __uint64 ullOfferID_Full, __uint64 ullOfferID_Trial, WCHAR *pFirstSkin, unsigned int uiSortIndex, int iConfig, WCHAR *pDataFile) HRESULT CMinecraftApp::RegisterDLCData(WCHAR *pType, WCHAR *pBannerName, int iGender, __uint64 ullOfferID_Full, __uint64 ullOfferID_Trial, WCHAR *pFirstSkin, unsigned int uiSortIndex, int iConfig, WCHAR *pDataFile)
{ {
HRESULT hr=S_OK; HRESULT hr=S_OK;
@@ -7046,7 +7060,7 @@ HRESULT CMinecraftApp::RegisterDLCData(char *pchDLCName, unsigned int uiSortInde
#if defined( __PS3__) || defined(__ORBIS__) || defined(__PSVITA__) #if !defined(DISABLE_PSN) && defined( __PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
bool CMinecraftApp::GetDLCFullOfferIDForSkinID(const wstring &FirstSkin,ULONGLONG *pullVal) bool CMinecraftApp::GetDLCFullOfferIDForSkinID(const wstring &FirstSkin,ULONGLONG *pullVal)
{ {
AUTO_VAR(it, DLCInfo_SkinName.find(FirstSkin)); AUTO_VAR(it, DLCInfo_SkinName.find(FirstSkin));
@@ -7314,7 +7328,7 @@ DLC_INFO *CMinecraftApp::GetDLCInfoForProductName(WCHAR *pwchProductName)
return NULL; return NULL;
} }
#elif defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__) #elif !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
#else #else
DLC_INFO *CMinecraftApp::GetDLCInfoForFullOfferID(ULONGLONG ullOfferID_Full) DLC_INFO *CMinecraftApp::GetDLCInfoForFullOfferID(ULONGLONG ullOfferID_Full)
@@ -9425,7 +9439,7 @@ byteArray CMinecraftApp::getArchiveFile(const wstring &filename)
// DLC // DLC
#if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__) #if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
int CMinecraftApp::GetDLCInfoCount() int CMinecraftApp::GetDLCInfoCount()
{ {
return (int)DLCInfo.size(); return (int)DLCInfo.size();
+9 -3
View File
@@ -594,7 +594,7 @@ public:
MOJANG_DATA *GetMojangDataForXuid(PlayerUID xuid); MOJANG_DATA *GetMojangDataForXuid(PlayerUID xuid);
static HRESULT RegisterConfigValues(WCHAR *pType, int iValue); static HRESULT RegisterConfigValues(WCHAR *pType, int iValue);
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) #if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
HRESULT RegisterDLCData(char *pchDLCName, unsigned int uiSortIndex, char *pchImageURL); HRESULT RegisterDLCData(char *pchDLCName, unsigned int uiSortIndex, char *pchImageURL);
bool GetDLCFullOfferIDForSkinID(const wstring &FirstSkin,ULONGLONG *pullVal); bool GetDLCFullOfferIDForSkinID(const wstring &FirstSkin,ULONGLONG *pullVal);
DLC_INFO *GetDLCInfoForTrialOfferID(ULONGLONG ullOfferID_Trial); DLC_INFO *GetDLCInfoForTrialOfferID(ULONGLONG ullOfferID_Trial);
@@ -631,7 +631,7 @@ private:
std::vector <SCreditTextItemDef *> vDLCCredits; std::vector <SCreditTextItemDef *> vDLCCredits;
#if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__) #if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
static unordered_map<PlayerUID,MOJANG_DATA *, PlayerUID::Hash > MojangData; static unordered_map<PlayerUID,MOJANG_DATA *, PlayerUID::Hash > MojangData;
static unordered_map<int, char * > DLCTextures_PackID; // for mash-up packs & texture packs static unordered_map<int, char * > DLCTextures_PackID; // for mash-up packs & texture packs
static unordered_map<string,DLC_INFO * > DLCInfo; static unordered_map<string,DLC_INFO * > DLCInfo;
@@ -642,6 +642,12 @@ private:
//static unordered_map<wstring,DLC_INFO * > DLCInfo_Trial; // full offerid, dlc_info //static unordered_map<wstring,DLC_INFO * > DLCInfo_Trial; // full offerid, dlc_info
static unordered_map<wstring,DLC_INFO * > DLCInfo_Full; // full offerid, dlc_info static unordered_map<wstring,DLC_INFO * > DLCInfo_Full; // full offerid, dlc_info
static unordered_map<wstring, wstring > DLCInfo_SkinName; // skin name, full offer id static unordered_map<wstring, wstring > DLCInfo_SkinName; // skin name, full offer id
#elif defined(DISABLE_PSN) && defined(__PS3__)
static unordered_map<PlayerUID,MOJANG_DATA *, PlayerUID::Hash > MojangData;
static unordered_map<int, ULONGLONG > DLCTextures_PackID; // for mash-up packs & texture packs
static unordered_map<ULONGLONG,DLC_INFO * > DLCInfo_Trial; // full offerid, dlc_info
static unordered_map<ULONGLONG,DLC_INFO * > DLCInfo_Full; // full offerid, dlc_info
static unordered_map<wstring, ULONGLONG > DLCInfo_SkinName; // skin name, full offer id
#else #else
static unordered_map<PlayerUID,MOJANG_DATA * > MojangData; static unordered_map<PlayerUID,MOJANG_DATA * > MojangData;
static unordered_map<int, ULONGLONG > DLCTextures_PackID; // for mash-up packs & texture packs static unordered_map<int, ULONGLONG > DLCTextures_PackID; // for mash-up packs & texture packs
@@ -772,7 +778,7 @@ public:
void ClearTMSPPFilesRetrieved(); void ClearTMSPPFilesRetrieved();
unsigned int AddTMSPPFileTypeRequest(eDLCContentType eType, bool bPromote=false); unsigned int AddTMSPPFileTypeRequest(eDLCContentType eType, bool bPromote=false);
int GetDLCInfoTexturesOffersCount(); int GetDLCInfoTexturesOffersCount();
#if defined( __PS3__) || defined(__ORBIS__) || defined(__PSVITA__) #if !defined(DISABLE_PSN) && defined( __PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
DLC_INFO *GetDLCInfo(int iIndex); DLC_INFO *GetDLCInfo(int iIndex);
DLC_INFO *GetDLCInfo(char *); DLC_INFO *GetDLCInfo(char *);
DLC_INFO *GetDLCInfoFromTPackID(int iTPID); DLC_INFO *GetDLCInfoFromTPackID(int iTPID);
@@ -66,9 +66,9 @@ void CGameNetworkManager::Initialise()
ServerStoppedCreate( false ); ServerStoppedCreate( false );
ServerReadyCreate( false ); ServerReadyCreate( false );
int flagIndexSize = LevelRenderer::getGlobalChunkCount() / (Level::maxBuildHeight / 16); // dividing here by number of renderer chunks in one column int flagIndexSize = LevelRenderer::getGlobalChunkCount() / (Level::maxBuildHeight / 16); // dividing here by number of renderer chunks in one column
#ifdef _XBOX #if !defined(_DISABLE_XBLIVE) && defined _XBOX
s_pPlatformNetworkManager = new CPlatformNetworkManagerXbox(); s_pPlatformNetworkManager = new CPlatformNetworkManagerXbox();
#elif defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ #elif !defined(DISABLE_PSN) && defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
s_pPlatformNetworkManager = new CPlatformNetworkManagerSony(); s_pPlatformNetworkManager = new CPlatformNetworkManagerSony();
#elif defined _DURANGO #elif defined _DURANGO
s_pPlatformNetworkManager = new CPlatformNetworkManagerDurango(); s_pPlatformNetworkManager = new CPlatformNetworkManagerDurango();
@@ -167,6 +167,11 @@ bool CGameNetworkManager::_RunNetworkGame(LPVOID lpParameter)
return true; return true;
} }
} }
else
{
// Client needs QNET_STATE_GAME_PLAY so that IsInGameplay() returns true
s_pPlatformNetworkManager->SetGamePlayState();
}
if( g_NetworkManager.IsLeavingGame() ) return false; if( g_NetworkManager.IsLeavingGame() ) return false;
@@ -336,10 +341,12 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame
// 4J Stu - Wait a while to make sure that DLC is loaded. This is the last point before the network communication starts // 4J Stu - Wait a while to make sure that DLC is loaded. This is the last point before the network communication starts
// so the latest we can check this // so the latest we can check this
#ifndef DISABLE_PSN
while( !app.DLCInstallProcessCompleted() && app.DLCInstallPending() && !g_NetworkManager.IsLeavingGame() ) while( !app.DLCInstallProcessCompleted() && app.DLCInstallPending() && !g_NetworkManager.IsLeavingGame() )
{ {
Sleep( 10 ); Sleep( 10 );
} }
#endif
if( g_NetworkManager.IsLeavingGame() ) if( g_NetworkManager.IsLeavingGame() )
{ {
MinecraftServer::HaltServer(); MinecraftServer::HaltServer();
@@ -496,7 +503,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame
// The connections should tick at 20 per second // The connections should tick at 20 per second
Sleep(50); Sleep(50);
app.DebugPrintf("<***> %d %d %d %d %d\n",IsInSession(), !connection->isStarted(),!connection->isClosed(),ProfileManager.IsSignedIn(idx),!g_NetworkManager.IsLeavingGame()); app.DebugPrintf("<***> %d %d %d %d %d\n",IsInSession(), !connection->isStarted(),!connection->isClosed(),ProfileManager.IsSignedIn(idx),!g_NetworkManager.IsLeavingGame());
#if defined _XBOX || __PS3__ #if defined _XBOX || defined __PS3__ && !defined DISABLE_PSN
} while (IsInSession() && !connection->isStarted() && !connection->isClosed() && ProfileManager.IsSignedIn(idx) && !g_NetworkManager.IsLeavingGame() ); } while (IsInSession() && !connection->isStarted() && !connection->isClosed() && ProfileManager.IsSignedIn(idx) && !g_NetworkManager.IsLeavingGame() );
#else #else
// TODO - This SHOULD be something just like the code above but temporarily changing here so that we don't have to depend on the profilemanager behaviour // TODO - This SHOULD be something just like the code above but temporarily changing here so that we don't have to depend on the profilemanager behaviour
@@ -794,7 +801,7 @@ int CGameNetworkManager::JoinFromInvite_SignInReturned(void *pParam,bool bContin
// Check if user-created content is allowed, as we cannot play multiplayer if it's not // Check if user-created content is allowed, as we cannot play multiplayer if it's not
bool noUGC = false; bool noUGC = false;
#if defined(__PS3__) || defined(__PSVITA__) #if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__PSVITA__)
ProfileManager.GetChatAndContentRestrictions(iPad,false,&noUGC,NULL,NULL); ProfileManager.GetChatAndContentRestrictions(iPad,false,&noUGC,NULL,NULL);
#elif defined(__ORBIS__) #elif defined(__ORBIS__)
ProfileManager.GetChatAndContentRestrictions(iPad,false,NULL,&noUGC,NULL); ProfileManager.GetChatAndContentRestrictions(iPad,false,NULL,&noUGC,NULL);
@@ -1007,6 +1014,9 @@ int CGameNetworkManager::ExitAndJoinFromInviteThreadProc( void* lpParam )
// The pair of methods MustSignInReturned_0 & PSNSignInReturned_0 handle this // The pair of methods MustSignInReturned_0 & PSNSignInReturned_0 handle this
int CGameNetworkManager::MustSignInReturned_0(void *pParam,int iPad,C4JStorage::EMessageResult result) int CGameNetworkManager::MustSignInReturned_0(void *pParam,int iPad,C4JStorage::EMessageResult result)
{ {
#ifdef DISABLE_PSN
return 0;
#else
if(result==C4JStorage::EMessage_ResultAccept) if(result==C4JStorage::EMessage_ResultAccept)
{ {
#ifdef __PS3__ #ifdef __PS3__
@@ -1025,10 +1035,14 @@ int CGameNetworkManager::MustSignInReturned_0(void *pParam,int iPad,C4JStorage::
} }
return 0; return 0;
#endif
} }
int CGameNetworkManager::PSNSignInReturned_0(void* pParam, bool bContinue, int iPad) int CGameNetworkManager::PSNSignInReturned_0(void* pParam, bool bContinue, int iPad)
{ {
#ifdef DISABLE_PSN
return 0;
#else
JoinFromInviteData *inviteData = (JoinFromInviteData *)pParam; JoinFromInviteData *inviteData = (JoinFromInviteData *)pParam;
// If the invite data isn't set up yet (indicated by it being all zeroes, easiest detected via the net version), then try and get it again... this can happen if we got // If the invite data isn't set up yet (indicated by it being all zeroes, easiest detected via the net version), then try and get it again... this can happen if we got
@@ -1061,12 +1075,16 @@ int CGameNetworkManager::PSNSignInReturned_0(void* pParam, bool bContinue, int i
} }
return 0; return 0;
#endif
} }
// This case happens when we were in the main menus when we got an invite, and weren't signed in... now can proceed with the normal flow of code for this situation // This case happens when we were in the main menus when we got an invite, and weren't signed in... now can proceed with the normal flow of code for this situation
// The pair of methods MustSignInReturned_1 & PSNSignInReturned_1 handle this // The pair of methods MustSignInReturned_1 & PSNSignInReturned_1 handle this
int CGameNetworkManager::MustSignInReturned_1(void *pParam,int iPad,C4JStorage::EMessageResult result) int CGameNetworkManager::MustSignInReturned_1(void *pParam,int iPad,C4JStorage::EMessageResult result)
{ {
#ifdef DISABLE_PSN
return 0;
#else
if(result==C4JStorage::EMessage_ResultAccept) if(result==C4JStorage::EMessage_ResultAccept)
{ {
#ifdef __PS3__ #ifdef __PS3__
@@ -1078,10 +1096,14 @@ int CGameNetworkManager::MustSignInReturned_1(void *pParam,int iPad,C4JStorage::
#endif #endif
} }
return 0; return 0;
#endif
} }
int CGameNetworkManager::PSNSignInReturned_1(void* pParam, bool bContinue, int iPad) int CGameNetworkManager::PSNSignInReturned_1(void* pParam, bool bContinue, int iPad)
{ {
#ifdef DISABLE_PSN
return 0;
#else
INVITE_INFO *inviteInfo = (INVITE_INFO *)pParam; INVITE_INFO *inviteInfo = (INVITE_INFO *)pParam;
// If the invite data isn't set up yet (indicated by it being all zeroes, easiest detected via the net version), then try and get it again... this can happen if we got // If the invite data isn't set up yet (indicated by it being all zeroes, easiest detected via the net version), then try and get it again... this can happen if we got
@@ -1109,6 +1131,7 @@ int CGameNetworkManager::PSNSignInReturned_1(void* pParam, bool bContinue, int i
} }
return 0; return 0;
#endif
} }
#endif #endif
@@ -1446,7 +1469,7 @@ void CGameNetworkManager::StateChange_AnyToEnding(bool bStateWasPlaying)
if(pNetworkPlayer != NULL && ProfileManager.IsSignedIn( i ) ) if(pNetworkPlayer != NULL && ProfileManager.IsSignedIn( i ) )
{ {
app.DebugPrintf("Stats save for an offline game for the player at index %d\n", i ); app.DebugPrintf("Stats save for an offline game for the player at index %d\n", i );
Minecraft::GetInstance()->forceStatsSave(pNetworkPlayer->GetUserIndex()); //Minecraft::GetInstance()->forceStatsSave(pNetworkPlayer->GetUserIndex());
} }
} }
} }
@@ -1789,7 +1812,7 @@ void CGameNetworkManager::GameInviteReceived( int userIndex, const INVITE_INFO *
#endif #endif
if( !g_NetworkManager.IsInSession() ) if( !g_NetworkManager.IsInSession() )
{ {
#if defined (__PS3__) || defined (__PSVITA__) #if !defined(DISABLE_PSN) && defined (__PS3__) || defined (__PSVITA__)
// PS3 is more complicated here - we need to make sure that the player is online. If they are then we can do the same as the xbox, if not we need to try and get them online and then, if they do sign in, go down the same path // PS3 is more complicated here - we need to make sure that the player is online. If they are then we can do the same as the xbox, if not we need to try and get them online and then, if they do sign in, go down the same path
// Determine why they're not "signed in live" // Determine why they're not "signed in live"
@@ -1939,7 +1962,7 @@ void CGameNetworkManager::HandleDisconnect(bool bLostRoomOnly)
if((g_NetworkManager.GetLockedProfile()!=-1) && iPrimaryPlayer!=-1 && g_NetworkManager.IsInSession() ) if((g_NetworkManager.GetLockedProfile()!=-1) && iPrimaryPlayer!=-1 && g_NetworkManager.IsInSession() )
{ {
m_bLastDisconnectWasLostRoomOnly = bLostRoomOnly; m_bLastDisconnectWasLostRoomOnly = bLostRoomOnly;
#if defined __PS3__ || defined __PSVITA__ || defined __ORBIS__ #if !defined(DISABLE_PSN) && defined __PS3__ || defined __PSVITA__ || defined __ORBIS__
m_bSignedOutofPSN=bPSNSignout; m_bSignedOutofPSN=bPSNSignout;
#endif #endif
app.SetAction(iPrimaryPlayer,eAppAction_EthernetDisconnected); app.SetAction(iPrimaryPlayer,eAppAction_EthernetDisconnected);
@@ -1,12 +1,14 @@
#pragma once #pragma once
using namespace std; using namespace std;
#include <vector> #include <vector>
#ifndef _DISABLE_XBLIVE
#include <qnet.h> #include <qnet.h>
#endif
#include "..\..\..\Minecraft.World\C4JThread.h" #include "..\..\..\Minecraft.World\C4JThread.h"
#include "NetworkPlayerInterface.h" #include "NetworkPlayerInterface.h"
#ifdef _XBOX #if defined _XBOX && !defined _DISABLE_XBLIVE
#include "..\..\Xbox\Network\PlatformNetworkManagerXbox.h" #include "..\..\Xbox\Network\PlatformNetworkManagerXbox.h"
#elif defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ #elif !defined DISABLE_PSN && defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
#include "..\..\Common\Network\Sony\PlatformNetworkManagerSony.h" #include "..\..\Common\Network\Sony\PlatformNetworkManagerSony.h"
#elif defined _DURANGO #elif defined _DURANGO
#include "..\..\Durango\Network\PlatformNetworkManagerDurango.h" #include "..\..\Durango\Network\PlatformNetworkManagerDurango.h"
@@ -30,9 +32,9 @@ const int NON_QNET_SENDDATA_ACK_REQUIRED = 1;
class CGameNetworkManager class CGameNetworkManager
{ {
#ifdef _XBOX #if defined _XBOX && !defined _DISABLE_XBLIVE
friend class CPlatformNetworkManagerXbox; friend class CPlatformNetworkManagerXbox;
#elif defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ #elif !defined DISABLE_PSN && defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
friend class CPlatformNetworkManagerSony; friend class CPlatformNetworkManagerSony;
#elif defined _DURANGO #elif defined _DURANGO
friend class CPlatformNetworkManagerDurango; friend class CPlatformNetworkManagerDurango;
+94
View File
@@ -0,0 +1,94 @@
#pragma once
const int QNET_GETSENDQUEUESIZE_SECONDARY_TYPE = 0;
const int QNET_GETSENDQUEUESIZE_MESSAGES = 0;
const int QNET_GETSENDQUEUESIZE_BYTES = 0;
const int QNET_SENDDATA_LOW_PRIORITY = 0;
const int QNET_SENDDATA_SECONDARY = 0;
const int QNET_SENDDATA_RELIABLE = 0;
const int QNET_SENDDATA_SEQUENTIAL = 0;
#define QNET_E_SESSION_FULL 0
#define QNET_USER_MASK_USER0 1
#define QNET_USER_MASK_USER1 2
#define QNET_USER_MASK_USER2 4
#define QNET_USER_MASK_USER3 8
typedef enum _QNET_STATE
{
QNET_STATE_IDLE,
QNET_STATE_SESSION_HOSTING,
QNET_STATE_SESSION_JOINING,
QNET_STATE_GAME_LOBBY,
QNET_STATE_SESSION_REGISTERING,
QNET_STATE_SESSION_STARTING,
QNET_STATE_GAME_PLAY,
QNET_STATE_SESSION_ENDING,
QNET_STATE_SESSION_LEAVING,
QNET_STATE_SESSION_DELETING
} QNET_STATE, * PQNET_STATE;
class IQNetPlayer
{
public:
BYTE GetSmallId();
void SendData(IQNetPlayer *player, const void *pvData, DWORD dwDataSize, DWORD dwFlags);
bool IsSameSystem(IQNetPlayer *player);
DWORD GetSendQueueSize( IQNetPlayer *player, DWORD dwFlags );
DWORD GetCurrentRtt();
bool IsHost();
bool IsGuest();
bool IsLocal();
PlayerUID GetXuid();
LPCWSTR GetGamertag();
int GetSessionIndex();
bool IsTalking();
bool IsMutedByLocalUser(DWORD dwUserIndex);
bool HasVoice();
bool HasCamera();
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);
class IQNetCallbacks
{
};
class IQNetGameSearch
{
};
class IQNet
{
public:
HRESULT AddLocalPlayerByUserIndex(DWORD dwUserIndex);
IQNetPlayer *GetHostPlayer();
IQNetPlayer *GetLocalPlayerByUserIndex(DWORD dwUserIndex);
IQNetPlayer *GetPlayerByIndex(DWORD dwPlayerIndex);
IQNetPlayer *GetPlayerBySmallId(BYTE SmallId);
IQNetPlayer *GetPlayerByXuid(PlayerUID xuid);
DWORD GetPlayerCount();
QNET_STATE GetState();
bool IsHost();
HRESULT JoinGameFromInviteInfo(DWORD dwUserIndex, DWORD dwUserMask, const INVITE_INFO *pInviteInfo);
void HostGame();
void ClientJoinGame();
void EndGame();
static IQNetPlayer m_player[MINECRAFT_NET_MAX_PLAYERS];
static DWORD s_playerCount;
static bool s_isHosting;
};
@@ -1,7 +1,11 @@
#pragma once #pragma once
using namespace std; using namespace std;
#include <vector> #include <vector>
#ifndef _DISABLE_XBLIVE
#include <qnet.h> #include <qnet.h>
#else
#include "IQNet.h"
#endif
#include "..\..\..\Minecraft.World\C4JThread.h" #include "..\..\..\Minecraft.World\C4JThread.h"
#include "NetworkPlayerInterface.h" #include "NetworkPlayerInterface.h"
#include "SessionInfo.h" #include "SessionInfo.h"
@@ -84,7 +88,7 @@ public:
virtual void HandleSignInChange() = 0; virtual void HandleSignInChange() = 0;
virtual bool _RunNetworkGame() = 0; virtual bool _RunNetworkGame() = 0;
virtual void SetGamePlayState() {}
private: private:
virtual bool _LeaveGame(bool bMigrateHost, bool bLeaveRoom) = 0; virtual bool _LeaveGame(bool bMigrateHost, bool bLeaveRoom) = 0;
virtual void _HostGame(int usersMask, unsigned char publicSlots = MINECRAFT_NET_MAX_PLAYERS, unsigned char privateSlots = 0) = 0; virtual void _HostGame(int usersMask, unsigned char publicSlots = MINECRAFT_NET_MAX_PLAYERS, unsigned char privateSlots = 0) = 0;
@@ -3,6 +3,11 @@
#include "..\..\..\Minecraft.World\StringHelpers.h" #include "..\..\..\Minecraft.World\StringHelpers.h"
#include "PlatformNetworkManagerStub.h" #include "PlatformNetworkManagerStub.h"
#include "..\..\Xbox\Network\NetworkPlayerXbox.h" // TODO - stub version of this? #include "..\..\Xbox\Network\NetworkPlayerXbox.h" // TODO - stub version of this?
#include "..\..\Minecraft.h"
#include "..\..\User.h"
#if defined _WINDOWS64 || defined __PS3__ || defined _XBOX
#include "..\..\Common\Network\WinsockNetLayer.h"
#endif
CPlatformNetworkManagerStub *g_pPlatformNetworkManager; CPlatformNetworkManagerStub *g_pPlatformNetworkManager;
@@ -114,10 +119,42 @@ 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) bool CPlatformNetworkManagerStub::Initialise(CGameNetworkManager *pGameNetworkManager, int flagIndexSize)
{ {
m_pGameNetworkManager = pGameNetworkManager; m_pGameNetworkManager = pGameNetworkManager;
m_flagIndexSize = flagIndexSize; m_flagIndexSize = flagIndexSize;
m_pIQNet = new IQNet();
g_pPlatformNetworkManager = this; g_pPlatformNetworkManager = this;
for( int i = 0; i < XUSER_MAX_COUNT; i++ ) for( int i = 0; i < XUSER_MAX_COUNT; i++ )
{ {
@@ -174,6 +211,35 @@ bool CPlatformNetworkManagerStub::isSystemPrimaryPlayer(IQNetPlayer *pQNetPlayer
// We call this twice a frame, either side of the render call so is a good place to "tick" things // We call this twice a frame, either side of the render call so is a good place to "tick" things
void CPlatformNetworkManagerStub::DoWork() void CPlatformNetworkManagerStub::DoWork()
{ {
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--;
}
}
}
} }
int CPlatformNetworkManagerStub::GetPlayerCount() int CPlatformNetworkManagerStub::GetPlayerCount()
@@ -231,6 +297,7 @@ bool CPlatformNetworkManagerStub::LeaveGame(bool bMigrateHost)
if( m_bLeavingGame ) return true; if( m_bLeavingGame ) return true;
m_bLeavingGame = true; m_bLeavingGame = true;
WinsockNetLayer::StopAdvertising();
// If we are the host wait for the game server to end // If we are the host wait for the game server to end
if(m_pIQNet->IsHost() && g_NetworkManager.ServerStoppedValid()) if(m_pIQNet->IsHost() && g_NetworkManager.ServerStoppedValid())
@@ -239,6 +306,20 @@ bool CPlatformNetworkManagerStub::LeaveGame(bool bMigrateHost)
g_NetworkManager.ServerStoppedWait(); g_NetworkManager.ServerStoppedWait();
g_NetworkManager.ServerStoppedDestroy(); 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();
WinsockNetLayer::Shutdown();
WinsockNetLayer::Initialize();
return true; return true;
} }
@@ -262,7 +343,20 @@ void CPlatformNetworkManagerStub::HostGame(int localUsersMask, bool bOnlineGame,
m_pIQNet->HostGame(); m_pIQNet->HostGame();
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;
_HostGame( localUsersMask, publicSlots, privateSlots ); _HostGame( localUsersMask, publicSlots, privateSlots );
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
} }
@@ -277,6 +371,47 @@ bool CPlatformNetworkManagerStub::_StartGame()
int CPlatformNetworkManagerStub::JoinGame(FriendSessionInfo *searchResult, int localUsersMask, int primaryUserIndex) int CPlatformNetworkManagerStub::JoinGame(FriendSessionInfo *searchResult, int localUsersMask, int primaryUserIndex)
{ {
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(IQNet::m_player[0].m_gamertag, searchResult->data.hostName, 31);
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();
wcsncpy(IQNet::m_player[localSmallId].m_gamertag, pMinecraft->user->name.c_str(), 32);
IQNet::s_playerCount = localSmallId + 1;
NotifyPlayerJoined(&IQNet::m_player[0]);
NotifyPlayerJoined(&IQNet::m_player[localSmallId]);
m_pGameNetworkManager->StateChange_AnyToStarting();
return CGameNetworkManager::JOINGAME_SUCCESS; return CGameNetworkManager::JOINGAME_SUCCESS;
} }
@@ -315,6 +450,21 @@ void CPlatformNetworkManagerStub::HandleSignInChange()
bool CPlatformNetworkManagerStub::_RunNetworkGame() bool CPlatformNetworkManagerStub::_RunNetworkGame()
{ {
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());
}
}
}
return true; return true;
} }
@@ -503,10 +653,90 @@ wstring CPlatformNetworkManagerStub::GatherRTTStats()
void CPlatformNetworkManagerStub::TickSearch() void CPlatformNetworkManagerStub::TickSearch()
{ {
if (m_SessionsUpdatedCallback == NULL)
return;
static DWORD lastSearchTime = 0;
DWORD now = GetTickCount();
if (now - lastSearchTime < 2000)
return;
lastSearchTime = now;
SearchForGames();
} }
void CPlatformNetworkManagerStub::SearchForGames() void CPlatformNetworkManagerStub::SearchForGames()
{ {
std::vector<Win64LANSession> lanSessions = WinsockNetLayer::GetDiscoveredSessions();
if (g_Win64MultiplayerJoin)
{
bool alreadyPresent = false;
for (size_t i = 0; i < lanSessions.size(); i++)
{
if (strcmp(lanSessions[i].hostIP, g_Win64MultiplayerIP) == 0 &&
lanSessions[i].hostPort == g_Win64MultiplayerPort)
{
alreadyPresent = true;
break;
}
}
if (!alreadyPresent)
{
Win64LANSession manual;
memset(&manual, 0, sizeof(manual));
strncpy(manual.hostIP, g_Win64MultiplayerIP, sizeof(manual.hostIP) - 1);
manual.hostIP[sizeof(manual.hostIP) - 1] = '\0';
manual.hostPort = g_Win64MultiplayerPort;
swprintf(manual.hostName, 32, L"%hs:%d", g_Win64MultiplayerIP, g_Win64MultiplayerPort);
manual.hostName[31] = L'\0';
manual.playerCount = 0;
manual.maxPlayers = MINECRAFT_NET_MAX_PLAYERS;
manual.isJoinable = true;
manual.lastSeenTick = GetTickCount();
lanSessions.push_back(manual);
}
}
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];
wcsncpy(info->displayLabel, lanSessions[i].hostName, nameLen);
info->displayLabel[nameLen] = L'\0';
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(info->data.hostIP, lanSessions[i].hostIP, sizeof(info->data.hostIP) - 1);
info->data.hostIP[sizeof(info->data.hostIP) - 1] = '\0';
info->data.hostPort = lanSessions[i].hostPort;
wcsncpy(info->data.hostName, lanSessions[i].hostName, XUSER_NAME_SIZE - 1);
info->data.hostName[XUSER_NAME_SIZE - 1] = L'\0';
info->data.playerCount = lanSessions[i].playerCount;
info->data.maxPlayers = lanSessions[i].maxPlayers;
info->sessionId = (ULONGLONG)((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);
} }
int CPlatformNetworkManagerStub::SearchForGamesThreadProc( void* lpParameter ) int CPlatformNetworkManagerStub::SearchForGamesThreadProc( void* lpParameter )
@@ -522,7 +752,9 @@ void CPlatformNetworkManagerStub::SetSearchResultsReady(int resultCount)
vector<FriendSessionInfo *> *CPlatformNetworkManagerStub::GetSessionList(int iPad, int localPlayers, bool partyOnly) vector<FriendSessionInfo *> *CPlatformNetworkManagerStub::GetSessionList(int iPad, int localPlayers, bool partyOnly)
{ {
vector<FriendSessionInfo *> *filteredList = new vector<FriendSessionInfo *>();; vector<FriendSessionInfo *> *filteredList = new vector<FriendSessionInfo *>();
for (size_t i = 0; i < friendsSessions[0].size(); i++)
filteredList->push_back(friendsSessions[0][i]);
return filteredList; return filteredList;
} }
@@ -161,8 +161,9 @@ public:
virtual void GetFullFriendSessionInfo( FriendSessionInfo *foundSession, void (* FriendSessionUpdatedFn)(bool success, void *pParam), void *pParam ); virtual void GetFullFriendSessionInfo( FriendSessionInfo *foundSession, void (* FriendSessionUpdatedFn)(bool success, void *pParam), void *pParam );
virtual void ForceFriendsSessionRefresh(); virtual void ForceFriendsSessionRefresh();
private: public:
void NotifyPlayerJoined( IQNetPlayer *pQNetPlayer ); void NotifyPlayerJoined( IQNetPlayer *pQNetPlayer );
void NotifyPlayerLeaving( IQNetPlayer *pQNetPlayer );
#ifndef _XBOX #ifndef _XBOX
void FakeLocalPlayerJoined() { NotifyPlayerJoined(m_pIQNet->GetLocalPlayerByUserIndex(0)); } void FakeLocalPlayerJoined() { NotifyPlayerJoined(m_pIQNet->GetLocalPlayerByUserIndex(0)); }
+27 -4
View File
@@ -6,7 +6,7 @@
// A struct that we store in the QoS data when we are hosting the session. Max size 1020 bytes. // A struct that we store in the QoS data when we are hosting the session. Max size 1020 bytes.
#ifdef _XBOX #if defined _XBOX && !defined _DISABLE_XBLIVE
typedef struct _GameSessionData typedef struct _GameSessionData
{ {
unsigned short netVersion; // 2 bytes unsigned short netVersion; // 2 bytes
@@ -32,7 +32,7 @@ typedef struct _GameSessionData
subTexturePackId = 0; subTexturePackId = 0;
} }
} GameSessionData; } GameSessionData;
#elif defined __PS3__ || defined __ORBIS__ || defined(__PSVITA__) #elif (defined __PS3__ && !defined DISABLE_PSN) || defined __ORBIS__ || defined(__PSVITA__)
typedef struct _GameSessionData typedef struct _GameSessionData
{ {
unsigned short netVersion; // 2 bytes unsigned short netVersion; // 2 bytes
@@ -47,6 +47,11 @@ typedef struct _GameSessionData
unsigned char playerCount; // 1 byte unsigned char playerCount; // 1 byte
bool isReadyToJoin; // 1 byte bool isReadyToJoin; // 1 byte
char hostIP[64]; // 64 bytes
int hostPort; // 4 bytes
wchar_t hostName[XUSER_NAME_SIZE]; // 64 bytes ( 32*2 )
unsigned char maxPlayers; // 1 byte
_GameSessionData() _GameSessionData()
{ {
netVersion = 0; netVersion = 0;
@@ -57,7 +62,11 @@ typedef struct _GameSessionData
subTexturePackId = 0; subTexturePackId = 0;
playerCount = 0; playerCount = 0;
isReadyToJoin = false; isReadyToJoin = false;
memset(hostIP, 0, sizeof(hostIP));
hostPort = 0;
memset(hostName, 0, sizeof(hostName));
playerCount = 0;
maxPlayers = MINECRAFT_NET_MAX_PLAYERS;
} }
} GameSessionData; } GameSessionData;
#else #else
@@ -69,6 +78,13 @@ typedef struct _GameSessionData
unsigned char subTexturePackId; // 1 byte unsigned char subTexturePackId; // 1 byte
bool isReadyToJoin; // 1 byte bool isReadyToJoin; // 1 byte
bool isJoinable; // 1 byte
char hostIP[64]; // 64 bytes
int hostPort; // 4 bytes
wchar_t hostName[XUSER_NAME_SIZE]; // 64 bytes ( 32*2 )
unsigned char playerCount; // 1 byte
unsigned char maxPlayers; // 1 byte
_GameSessionData() _GameSessionData()
{ {
@@ -76,6 +92,13 @@ typedef struct _GameSessionData
m_uiGameHostSettings = 0; m_uiGameHostSettings = 0;
texturePackParentId = 0; texturePackParentId = 0;
subTexturePackId = 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; } GameSessionData;
#endif #endif
@@ -86,7 +109,7 @@ public:
SessionID sessionId; SessionID sessionId;
#ifdef _XBOX #ifdef _XBOX
XSESSION_SEARCHRESULT searchResult; XSESSION_SEARCHRESULT searchResult;
#elif defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__) #elif (defined __PS3__ && !defined DISABLE_PSN) || defined(__ORBIS__) || defined (__PSVITA__)
SQRNetworkManager::SessionSearchResult searchResult; SQRNetworkManager::SessionSearchResult searchResult;
#elif defined(_DURANGO) #elif defined(_DURANGO)
DQRNetworkManager::SessionSearchResult searchResult; DQRNetworkManager::SessionSearchResult searchResult;
@@ -1,5 +1,6 @@
#include "stdafx.h" #include "stdafx.h"
#include "NetworkPlayerSony.h" #include "NetworkPlayerSony.h"
#ifndef DISABLE_PSN
NetworkPlayerSony::NetworkPlayerSony(SQRNetworkPlayer *qnetPlayer) NetworkPlayerSony::NetworkPlayerSony(SQRNetworkPlayer *qnetPlayer)
{ {
@@ -135,3 +136,4 @@ int NetworkPlayerSony::GetTimeSinceLastChunkPacket_ms()
__int64 currentTime = System::currentTimeMillis(); __int64 currentTime = System::currentTimeMillis();
return (int)( currentTime - m_lastChunkPacketTime ); return (int)( currentTime - m_lastChunkPacketTime );
} }
#endif
@@ -1,5 +1,5 @@
#pragma once #pragma once
#ifndef _DISABLE_PSN
#include "..\..\Common\Network\NetworkPlayerInterface.h" #include "..\..\Common\Network\NetworkPlayerInterface.h"
#include "SQRNetworkPlayer.h" #include "SQRNetworkPlayer.h"
@@ -41,3 +41,4 @@ private:
Socket *m_pSocket; Socket *m_pSocket;
__int64 m_lastChunkPacketTime; __int64 m_lastChunkPacketTime;
}; };
#endif
@@ -1,5 +1,5 @@
#include "stdafx.h" #include "stdafx.h"
#ifndef DISABLE_PSN
#include "SQRNetworkManager.h" #include "SQRNetworkManager.h"
bool SQRNetworkManager::s_safeToRespondToGameBootInvite = false; bool SQRNetworkManager::s_safeToRespondToGameBootInvite = false;
@@ -81,3 +81,4 @@ void SQRNetworkManager::TickWriteAcks()
} }
LeaveCriticalSection(&m_csAckQueue); LeaveCriticalSection(&m_csAckQueue);
} }
#endif
@@ -1,4 +1,5 @@
#include "stdafx.h" #include "stdafx.h"
#ifndef DISABLE_PSN
#include "SQRNetworkPlayer.h" #include "SQRNetworkPlayer.h"
#ifdef __PS3__ #ifdef __PS3__
@@ -609,3 +610,4 @@ bool SQRNetworkPlayer::IsMutedByLocalUser(int userIndex)
return SonyVoiceChat::isMutedPlayer(pMan->m_roomSyncData.players[userIndex].m_roomMemberId); return SonyVoiceChat::isMutedPlayer(pMan->m_roomSyncData.players[userIndex].m_roomMemberId);
#endif #endif
} }
#endif
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,165 @@
#pragma once
#if defined _WINDOWS64
#include <WinSock2.h>
#include <WS2tcpip.h>
#elif defined _XBOX
#include <winsockx.h>
#include <xtl.h>
#elif defined __PS3__
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netex/net.h>
#include <netex/errno.h>
#include <netinet/tcp.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#endif
#include <vector>
#include "..\..\Common\Network\NetworkPlayerInterface.h"
#ifdef _WINDOWS64
#pragma comment(lib, "Ws2_32.lib")
#endif
#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
#ifdef __PS3__
typedef int SOCKET;
#define INVALID_SOCKET -1
#endif
class Socket;
#pragma pack(push, 1)
struct Win64LANBroadcast
{
DWORD magic;
WORD netVersion;
WORD gamePort;
char 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;
C4JThread* 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 vector<Win64LANSession> GetDiscoveredSessions();
static int GetHostPort() { return s_hostGamePort; }
private:
static int AcceptThreadProc(void* param);
static int RecvThreadProc(void* param);
static int ClientRecvThreadProc(void* param);
static int AdvertiseThreadProc(void* param);
static int DiscoveryThreadProc(void* param);
static SOCKET s_listenSocket;
static SOCKET s_hostConnectionSocket;
static C4JThread* s_acceptThread;
static C4JThread* 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<Win64RemoteConnection> s_connections;
static SOCKET s_advertiseSock;
static C4JThread* 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 C4JThread* s_discoveryThread;
static volatile bool s_discovering;
static CRITICAL_SECTION s_discoveryLock;
static std::vector<Win64LANSession> s_discoveredSessions;
static CRITICAL_SECTION s_disconnectLock;
static std::vector<BYTE> s_disconnectedSmallIds;
static CRITICAL_SECTION s_freeSmallIdLock;
static std::vector<BYTE> s_freeSmallIds;
};
extern bool g_Win64MultiplayerHost;
extern bool g_Win64MultiplayerJoin;
extern int g_Win64MultiplayerPort;
extern char g_Win64MultiplayerIP[256];
@@ -54,7 +54,7 @@ void IUIScene_StartGame::HandleDLCMountingComplete()
for(unsigned int i = 0; i < app.GetDLCInfoTexturesOffersCount(); ++i) for(unsigned int i = 0; i < app.GetDLCInfoTexturesOffersCount(); ++i)
{ {
bTexturePackAlreadyListed=false; bTexturePackAlreadyListed=false;
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) #if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
char *pchName=app.GetDLCInfoTextures(i); char *pchName=app.GetDLCInfoTextures(i);
pDLCInfo=app.GetDLCInfo(pchName); pDLCInfo=app.GetDLCInfo(pchName);
#elif defined _XBOX_ONE #elif defined _XBOX_ONE
@@ -502,6 +502,9 @@ UIScene_InGameInfoMenu::PlayerInfo *UIScene_InGameInfoMenu::BuildPlayerInfo(INet
#if defined __PS3__ || defined __PSVITA__ #if defined __PS3__ || defined __PSVITA__
int UIScene_InGameInfoMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result) int UIScene_InGameInfoMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result)
{ {
#ifdef DISABLE_PSN
return 0;
#else
UIScene_InGameInfoMenu* pClass = (UIScene_InGameInfoMenu*)pParam; UIScene_InGameInfoMenu* pClass = (UIScene_InGameInfoMenu*)pParam;
if(result==C4JStorage::EMessage_ResultAccept) if(result==C4JStorage::EMessage_ResultAccept)
@@ -514,6 +517,7 @@ int UIScene_InGameInfoMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStora
} }
return 0; return 0;
#endif
} }
int UIScene_InGameInfoMenu::ViewInvites_SignInReturned(void *pParam,bool bContinue, int iPad) int UIScene_InGameInfoMenu::ViewInvites_SignInReturned(void *pParam,bool bContinue, int iPad)
@@ -59,7 +59,7 @@ void UIScene_JoinMenu::tick()
m_buttonListPlayers.init(eControl_GamePlayers); m_buttonListPlayers.init(eControl_GamePlayers);
#if defined(__PS3__) || defined(__ORBIS__) || defined __PSVITA__ #if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined __PSVITA__
for( int i = 0; i < MINECRAFT_NET_MAX_PLAYERS; i++ ) for( int i = 0; i < MINECRAFT_NET_MAX_PLAYERS; i++ )
{ {
if( m_selectedSession->data.players[i] != NULL ) if( m_selectedSession->data.players[i] != NULL )
@@ -353,6 +353,9 @@ void UIScene_JoinMenu::checkPrivilegeCallback(LPVOID lpParam, bool hasPrivilege,
void UIScene_JoinMenu::StartSharedLaunchFlow() void UIScene_JoinMenu::StartSharedLaunchFlow()
{ {
#if defined DISABLE_PSN && defined __PS3__
JoinGame(this);
#else
if(!app.IsLocalMultiplayerAvailable()) if(!app.IsLocalMultiplayerAvailable())
{ {
JoinGame(this); JoinGame(this);
@@ -366,12 +369,17 @@ void UIScene_JoinMenu::StartSharedLaunchFlow()
info.requireOnline = true; info.requireOnline = true;
ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_QuadrantSignin,&info); ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_QuadrantSignin,&info);
} }
#endif
} }
int UIScene_JoinMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int iPad) int UIScene_JoinMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int iPad)
{ {
UIScene_JoinMenu* pClass = (UIScene_JoinMenu*)ui.GetSceneFromCallbackId((size_t)pParam); UIScene_JoinMenu* pClass = (UIScene_JoinMenu*)ui.GetSceneFromCallbackId((size_t)pParam);
#if defined DISABLE_PSN && defined __PS3__
JoinGame(pClass);
return 0;
#else
if(pClass) if(pClass)
{ {
if(bContinue==true) if(bContinue==true)
@@ -392,6 +400,7 @@ int UIScene_JoinMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int
} }
} }
return 0; return 0;
#endif
} }
// Shared function to join the game that is the same whether we used the sign-in UI or not // Shared function to join the game that is the same whether we used the sign-in UI or not
@@ -431,7 +440,9 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
if( !ProfileManager.AllowedToPlayMultiplayer(ProfileManager.GetPrimaryPad()) ) noPrivileges = true; if( !ProfileManager.AllowedToPlayMultiplayer(ProfileManager.GetPrimaryPad()) ) noPrivileges = true;
dwLocalUsersMask |= CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad()); dwLocalUsersMask |= CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad());
#ifndef DISABLE_PSN
isSignedInLive = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()); isSignedInLive = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad());
#endif
#ifdef __PSVITA__ #ifdef __PSVITA__
if(CGameNetworkManager::usingAdhocMode() && SQRNetworkManager_AdHoc_Vita::GetAdhocStatus()) if(CGameNetworkManager::usingAdhocMode() && SQRNetworkManager_AdHoc_Vita::GetAdhocStatus())
isSignedInLive = true; isSignedInLive = true;
@@ -470,7 +481,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
BOOL pccAllowed = TRUE; BOOL pccAllowed = TRUE;
BOOL pccFriendsAllowed = TRUE; BOOL pccFriendsAllowed = TRUE;
#if defined(__PS3__) || defined(__PSVITA__) #if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__PSVITA__)
if(isSignedInLive) if(isSignedInLive)
{ {
ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,&noUGC,NULL,NULL); ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,&noUGC,NULL,NULL);
@@ -731,7 +731,7 @@ void UIScene_LeaderboardsMenu::CopyLeaderboardEntry(LeaderboardManager::ReadScor
} }
} }
#ifdef __PS3__ #if !defined(DISABLE_PSN) && defined(__PS3__)
// m_name can be unicode characters somehow for Japan - should use m_onlineID // m_name can be unicode characters somehow for Japan - should use m_onlineID
wstring wstr=convStringToWstring(statsRow->m_uid.getOnlineID()); wstring wstr=convStringToWstring(statsRow->m_uid.getOnlineID());
swprintf(leaderboardEntry->m_gamerTag, XUSER_NAME_SIZE, L"%ls",wstr.c_str()); swprintf(leaderboardEntry->m_gamerTag, XUSER_NAME_SIZE, L"%ls",wstr.c_str());
@@ -2385,6 +2385,9 @@ int UIScene_LoadOrJoinMenu::TexturePackDialogReturned(void *pParam,int iPad,C4JS
#if defined __PS3__ || defined __PSVITA__ || defined __ORBIS__ #if defined __PS3__ || defined __PSVITA__ || defined __ORBIS__
int UIScene_LoadOrJoinMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result) int UIScene_LoadOrJoinMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result)
{ {
#ifdef DISABLE_PSN
return 0;
#else
UIScene_LoadOrJoinMenu* pClass = (UIScene_LoadOrJoinMenu*)pParam; UIScene_LoadOrJoinMenu* pClass = (UIScene_LoadOrJoinMenu*)pParam;
if(result==C4JStorage::EMessage_ResultAccept) if(result==C4JStorage::EMessage_ResultAccept)
@@ -2403,6 +2406,7 @@ int UIScene_LoadOrJoinMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStora
} }
return 0; return 0;
#endif
} }
int UIScene_LoadOrJoinMenu::PSN_SignInReturned(void *pParam,bool bContinue, int iPad) int UIScene_LoadOrJoinMenu::PSN_SignInReturned(void *pParam,bool bContinue, int iPad)
@@ -550,6 +550,7 @@ int UIScene_MainMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EM
{ {
UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam; UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam;
#ifndef DISABLE_PSN
if(result==C4JStorage::EMessage_ResultAccept) if(result==C4JStorage::EMessage_ResultAccept)
{ {
#ifdef __PS3__ #ifdef __PS3__
@@ -629,6 +630,9 @@ int UIScene_MainMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EM
pClass->m_bIgnorePress=false; pClass->m_bIgnorePress=false;
} }
} }
#endif
CreateLoad_SignInReturned(pClass, true, 0);
pClass->m_bIgnorePress=false;
return 0; return 0;
} }
@@ -1029,6 +1029,9 @@ int UIScene_PauseMenu::BanGameDialogReturned(void *pParam,int iPad,C4JStorage::E
#if defined(__PS3__) || defined (__PSVITA__) || defined(__ORBIS__) #if defined(__PS3__) || defined (__PSVITA__) || defined(__ORBIS__)
int UIScene_PauseMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result) int UIScene_PauseMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result)
{ {
#ifdef DISABLE_PSN
return 0;
#else
UIScene_PauseMenu* pClass = (UIScene_PauseMenu*)ui.GetSceneFromCallbackId((size_t)pParam); UIScene_PauseMenu* pClass = (UIScene_PauseMenu*)ui.GetSceneFromCallbackId((size_t)pParam);
if(result==C4JStorage::EMessage_ResultAccept && pClass) if(result==C4JStorage::EMessage_ResultAccept && pClass)
{ {
@@ -1091,6 +1094,7 @@ int UIScene_PauseMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::E
} }
return 0; return 0;
#endif
} }
int UIScene_PauseMenu::ViewLeaderboards_SignInReturned(void *pParam,bool bContinue, int iPad) int UIScene_PauseMenu::ViewLeaderboards_SignInReturned(void *pParam,bool bContinue, int iPad)
@@ -1131,6 +1135,9 @@ int UIScene_PauseMenu::ViewLeaderboards_SignInReturned(void *pParam,bool bContin
int UIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4JStorage::EMessageResult result) int UIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{ {
#ifdef DISABLE_PSN
return 0;
#else
UIScene_PauseMenu* pClass = (UIScene_PauseMenu*)ui.GetSceneFromCallbackId((size_t)pParam); UIScene_PauseMenu* pClass = (UIScene_PauseMenu*)ui.GetSceneFromCallbackId((size_t)pParam);
#ifdef __ORBIS__ #ifdef __ORBIS__
@@ -1244,7 +1251,7 @@ int UIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4J
} }
} }
#endif // #endif //
#endif
return 0; return 0;
} }
@@ -110,7 +110,7 @@ void UIScene_SaveMessage::handlePress(F64 controlId, F64 childId)
m_bIgnoreInput=true; m_bIgnoreInput=true;
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) #if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
// wait for the profile to be read - this has been kicked off earlier, so should be read by now // wait for the profile to be read - this has been kicked off earlier, so should be read by now
addTimer(PROFILE_LOADED_TIMER_ID,PROFILE_LOADED_TIMER_TIME); addTimer(PROFILE_LOADED_TIMER_ID,PROFILE_LOADED_TIMER_TIME);
#else #else
@@ -126,7 +126,7 @@ void UIScene_SaveMessage::handleTimerComplete(int id)
{ {
case PROFILE_LOADED_TIMER_ID: case PROFILE_LOADED_TIMER_ID:
{ {
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) #if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
C4JStorage::eOptionsCallback eStatus=app.GetOptionsCallbackStatus(0); C4JStorage::eOptionsCallback eStatus=app.GetOptionsCallbackStatus(0);
switch(eStatus) switch(eStatus)
@@ -1518,7 +1518,7 @@ void UIScene_SkinSelectMenu::HandleDLCMountingComplete()
void UIScene_SkinSelectMenu::showNotOnlineDialog(int iPad) void UIScene_SkinSelectMenu::showNotOnlineDialog(int iPad)
{ {
// need to be signed in to live. get them to sign in to online // need to be signed in to live. get them to sign in to online
#if defined(__PS3__) #if !defined(DISABLE_PSN) && defined(__PS3__)
SQRNetworkManager_PS3::AttemptPSNSignIn(NULL, this); SQRNetworkManager_PS3::AttemptPSNSignIn(NULL, this);
#elif defined(__PSVITA__) #elif defined(__PSVITA__)
@@ -1105,6 +1105,7 @@ void CScene_Leaderboards::CopyLeaderboardEntry(PXUSER_STATS_ROW statsRow, Leader
} }
//Is the player //Is the player
#ifndef _DISABLE_XBLIVE
if( statsRow->xuid == ((XboxLeaderboardManager*)LeaderboardManager::Instance())->GetMyXUID() ) if( statsRow->xuid == ((XboxLeaderboardManager*)LeaderboardManager::Instance())->GetMyXUID() )
{ {
leaderboardEntry->m_bPlayer = true; leaderboardEntry->m_bPlayer = true;
@@ -1143,6 +1144,7 @@ void CScene_Leaderboards::CopyLeaderboardEntry(PXUSER_STATS_ROW statsRow, Leader
} }
} }
} }
#endif
} }
void CScene_Leaderboards::SetLeaderboardHeader() void CScene_Leaderboards::SetLeaderboardHeader()
@@ -37,6 +37,7 @@ HRESULT CScene_MultiGameInfo::OnInit( XUIMessageInit* pInitData, BOOL& bHandled
// 4J-PB - don't delete this - it's part of the joinload structure // 4J-PB - don't delete this - it's part of the joinload structure
//delete initData; //delete initData;
#ifndef _DISABLE_XBLIVE
for(unsigned int i = 0; i < MINECRAFT_NET_MAX_PLAYERS; ++i) for(unsigned int i = 0; i < MINECRAFT_NET_MAX_PLAYERS; ++i)
{ {
if( m_selectedSession->data.players[i] != NULL ) if( m_selectedSession->data.players[i] != NULL )
@@ -59,6 +60,7 @@ HRESULT CScene_MultiGameInfo::OnInit( XUIMessageInit* pInitData, BOOL& bHandled
break; break;
} }
} }
#endif
unsigned int uiGameHostSettings = m_selectedSession->data.m_uiGameHostSettings; unsigned int uiGameHostSettings = m_selectedSession->data.m_uiGameHostSettings;
switch(app.GetGameHostOption(uiGameHostSettings,eGameHostOption_Difficulty)) switch(app.GetGameHostOption(uiGameHostSettings,eGameHostOption_Difficulty))
@@ -185,12 +187,14 @@ HRESULT CScene_MultiGameInfo::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHan
rfHandled = TRUE; rfHandled = TRUE;
break; break;
case VK_PAD_Y: case VK_PAD_Y:
#ifndef _DISABLE_XBLIVE
if(m_selectedSession != NULL && playersList.TreeHasFocus() && playersList.GetItemCount() > 0) if(m_selectedSession != NULL && playersList.TreeHasFocus() && playersList.GetItemCount() > 0)
{ {
PlayerUID xuid = m_selectedSession->data.players[playersList.GetCurSel()]; PlayerUID xuid = m_selectedSession->data.players[playersList.GetCurSel()];
if( xuid != INVALID_XUID ) if( xuid != INVALID_XUID )
hr = XShowGamerCardUI(ProfileManager.GetLockedProfile(), xuid); hr = XShowGamerCardUI(ProfileManager.GetLockedProfile(), xuid);
} }
#endif
break; break;
} }
@@ -351,6 +355,7 @@ HRESULT CScene_MultiGameInfo::OnTimer( XUIMessageTimer *pTimer, BOOL& bHandled )
{ {
if ( pTimer->nId == UPDATE_PLAYERS_TIMER_ID) if ( pTimer->nId == UPDATE_PLAYERS_TIMER_ID)
{ {
#ifndef _DISABLE_XBLIVE
PlayerUID selectedPlayerXUID = m_selectedSession->data.players[playersList.GetCurSel()]; PlayerUID selectedPlayerXUID = m_selectedSession->data.players[playersList.GetCurSel()];
bool success = g_NetworkManager.GetGameSessionInfo(m_iPad, m_selectedSession->sessionId,m_selectedSession); bool success = g_NetworkManager.GetGameSessionInfo(m_iPad, m_selectedSession->sessionId,m_selectedSession);
@@ -384,6 +389,7 @@ HRESULT CScene_MultiGameInfo::OnTimer( XUIMessageTimer *pTimer, BOOL& bHandled )
} }
playersList.SetCurSel(selectedIndex); playersList.SetCurSel(selectedIndex);
} }
#endif
} }
return S_OK; return S_OK;
@@ -1,7 +1,9 @@
#pragma once #pragma once
using namespace std; using namespace std;
#include <vector> #include <vector>
#ifndef _DISABLE_XBLIVE
#include <qnet.h> #include <qnet.h>
#endif
#include "..\Media\xuiscene_multi_gameinfo.h" #include "..\Media\xuiscene_multi_gameinfo.h"
class FriendSessionInfo; class FriendSessionInfo;
@@ -648,9 +648,11 @@ HRESULT CScene_MultiGameJoinLoad::OnKeyDown(XUIMessageInput* pInputData, BOOL& r
DWORD nIndex = m_pGamesList->GetCurSel(); DWORD nIndex = m_pGamesList->GetCurSel();
FriendSessionInfo *pSelectedSession = currentSessions.at( nIndex ); FriendSessionInfo *pSelectedSession = currentSessions.at( nIndex );
#ifndef _DISABLE_XBLIVE
PlayerUID xuid = pSelectedSession->data.hostPlayerUID; PlayerUID xuid = pSelectedSession->data.hostPlayerUID;
if( xuid != INVALID_XUID ) if( xuid != INVALID_XUID )
hr = XShowGamerCardUI(ProfileManager.GetLockedProfile(), xuid); hr = XShowGamerCardUI(ProfileManager.GetLockedProfile(), xuid);
#endif
CXuiSceneBase::PlayUISFX(eSFX_Press); CXuiSceneBase::PlayUISFX(eSFX_Press);
} }
else if(DoesSavesListHaveFocus()) else if(DoesSavesListHaveFocus())
+163 -49
View File
@@ -5,6 +5,7 @@
#ifdef __PS3__ #ifdef __PS3__
#include "PS3\Sentient\SentientManager.h" #include "PS3\Sentient\SentientManager.h"
#include "Common\Network\WinsockNetLayer.h"
#include "StatsCounter.h" #include "StatsCounter.h"
#include "PS3\Social\SocialManager.h" #include "PS3\Social\SocialManager.h"
#include <libsn.h> #include <libsn.h>
@@ -17,6 +18,7 @@
#include "Durango\DurangoExtras\xcompress.h" #include "Durango\DurangoExtras\xcompress.h"
#elif defined _WINDOWS64 #elif defined _WINDOWS64
#include "Windows64\Sentient\SentientManager.h" #include "Windows64\Sentient\SentientManager.h"
#include "Common\Network\WinsockNetLayer.h"
#include "StatsCounter.h" #include "StatsCounter.h"
#include "Windows64\Social\SocialManager.h" #include "Windows64\Social\SocialManager.h"
#include "Windows64\Sentient\DynamicConfigurations.h" #include "Windows64\Sentient\DynamicConfigurations.h"
@@ -26,6 +28,13 @@
#include "PSVita\Social\SocialManager.h" #include "PSVita\Social\SocialManager.h"
#include "PSVita\Sentient\DynamicConfigurations.h" #include "PSVita\Sentient\DynamicConfigurations.h"
#include <libperf.h> #include <libperf.h>
#elif defined _XBOX
#include "Xbox\Sentient\SentientManager.h"
#include "Common\Network\WinsockNetLayer.h"
#include "StatsCounter.h"
#include "Xbox\Social\SocialManager.h"
#include "Xbox\Sentient\DynamicConfigurations.h"x
#include "Common\Network\IQNet.h"
#else #else
#include "Orbis\Sentient\SentientManager.h" #include "Orbis\Sentient\SentientManager.h"
#include "StatsCounter.h" #include "StatsCounter.h"
@@ -34,6 +43,7 @@
#include <perf.h> #include <perf.h>
#endif #endif
#ifndef _DISABLE_XBLIVE
#if !defined(__PS3__) && !defined(__ORBIS__) && !defined(__PSVITA__) #if !defined(__PS3__) && !defined(__ORBIS__) && !defined(__PSVITA__)
#ifdef _WINDOWS64 #ifdef _WINDOWS64
//C4JStorage StorageManager; //C4JStorage StorageManager;
@@ -168,8 +178,10 @@ void PIXSetMarkerDeprecated(int a, char *b, ...) {}
bool IsEqualXUID(PlayerUID a, PlayerUID b) bool IsEqualXUID(PlayerUID a, PlayerUID b)
{ {
#if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__) || defined(_DURANGO) #if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__) || defined(_DURANGO)
return (a == b); return (a == b);
#elif defined(DISABLE_PSN) && defined(__PS3__)
return (a.XUID == b.XUID);
#else #else
return false; return false;
#endif #endif
@@ -185,49 +197,6 @@ D3DXVECTOR3::D3DXVECTOR3() {}
D3DXVECTOR3::D3DXVECTOR3(float x,float y,float z) : x(x), y(y), z(z) {} 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::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)
{
app.DebugPrintf("Sending from 0x%x to 0x%x %d bytes\n",this,player,dwDataSize);
}
bool IQNetPlayer::IsSameSystem(IQNetPlayer *player) { return true; }
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::IsGuest() { return false; }
bool IQNetPlayer::IsLocal() { return true; }
PlayerUID IQNetPlayer::GetXuid() { return INVALID_XUID; }
LPCWSTR IQNetPlayer::GetGamertag() { static const wchar_t *test = L"stub"; return test; }
int IQNetPlayer::GetSessionIndex() { return 0; }
bool IQNetPlayer::IsTalking() { return false; }
bool IQNetPlayer::IsMutedByLocalUser(DWORD dwUserIndex) { return false; }
bool IQNetPlayer::HasVoice() { return false; }
bool IQNetPlayer::HasCamera() { return false; }
int IQNetPlayer::GetUserIndex() { return this - &IQNet::m_player[0]; }
void IQNetPlayer::SetCustomDataValue(ULONG_PTR ulpCustomDataValue) {
m_customData = ulpCustomDataValue;
}
ULONG_PTR IQNetPlayer::GetCustomDataValue() {
return m_customData;
}
IQNetPlayer IQNet::m_player[4];
bool _bQNetStubGameRunning = false;
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; }
DWORD MinecraftDynamicConfigurations::GetTrialTime() { return DYNAMIC_CONFIG_DEFAULT_TRIAL_TIME; } DWORD MinecraftDynamicConfigurations::GetTrialTime() { return DYNAMIC_CONFIG_DEFAULT_TRIAL_TIME; }
void XSetThreadProcessor(HANDLE a, int b) {} void XSetThreadProcessor(HANDLE a, int b) {}
@@ -448,6 +417,137 @@ void C_4JProfile::Initialise( DWORD dwTitleID,
pGameSettings->ucTutorialCompletion[28] |= 1<<0; pGameSettings->ucTutorialCompletion[28] |= 1<<0;
} }
} }
#endif
#endif // DISABLE_XBLIVE
BYTE IQNetPlayer::GetSmallId() { return m_smallId; }
void IQNetPlayer::SendData(IQNetPlayer *player, const void *pvData, DWORD dwDataSize, DWORD dwFlags)
{
if (WinsockNetLayer::IsActive())
{
WinsockNetLayer::SendToSmallId(player->m_smallId, pvData, dwDataSize);
}
}
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 m_isHostPlayer; }
bool IQNetPlayer::IsGuest() { return false; }
bool IQNetPlayer::IsLocal() { return !m_isRemote; }
PlayerUID IQNetPlayer::GetXuid() { return (PlayerUID)(0xe000d45248242f2e + m_smallId); }
LPCWSTR IQNetPlayer::GetGamertag() { return m_gamertag; }
int IQNetPlayer::GetSessionIndex() { return m_smallId; }
bool IQNetPlayer::IsTalking() { return false; }
bool IQNetPlayer::IsMutedByLocalUser(DWORD dwUserIndex) { return false; }
bool IQNetPlayer::HasVoice() { return false; }
bool IQNetPlayer::HasCamera() { return false; }
int IQNetPlayer::GetUserIndex() { return this - &IQNet::m_player[0]; }
void IQNetPlayer::SetCustomDataValue(ULONG_PTR ulpCustomDataValue) {
m_customData = ulpCustomDataValue;
}
ULONG_PTR IQNetPlayer::GetCustomDataValue() {
return m_customData;
}
IQNetPlayer IQNet::m_player[MINECRAFT_NET_MAX_PLAYERS];
DWORD IQNet::s_playerCount = 1;
bool IQNet::s_isHosting = true;
QNET_STATE _iQNetStubState = QNET_STATE_IDLE;
void Win64_SetupRemoteQNetPlayer(IQNetPlayer *player, BYTE smallId, bool isHost, bool isLocal)
{
player->m_smallId = smallId;
player->m_isRemote = !isLocal;
player->m_isHostPlayer = isHost;
swprintf(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);
}
}
#ifndef _DISABLE_XBLIVE
#if defined _WINDOWS64 || (defined(__PS3__) && defined(DISABLE_PSN))
void C_4JProfile::SetTrialTextStringTable(CXuiStringTable *pStringTable,int iAccept,int iReject) {} void C_4JProfile::SetTrialTextStringTable(CXuiStringTable *pStringTable,int iAccept,int iReject) {}
void C_4JProfile::SetTrialAwardText(eAwardType AwardType,int iTitle,int iText) {} void C_4JProfile::SetTrialAwardText(eAwardType AwardType,int iTitle,int iText) {}
int C_4JProfile::GetLockedProfile() { return 0; } int C_4JProfile::GetLockedProfile() { return 0; }
@@ -460,11 +560,24 @@ UINT C_4JProfile::DisplayOfflineProfile(int( *Func)(LPVOID,const bool, const
UINT C_4JProfile::RequestConvertOfflineToGuestUI(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) {} void C_4JProfile::SetPrimaryPlayerChanged(bool bVal) {}
bool C_4JProfile::QuerySigninStatus(void) { return true; } bool C_4JProfile::QuerySigninStatus(void) { return true; }
void C_4JProfile::GetXUID(int iPad, PlayerUID *pXuid,bool bOnlineXuid) {*pXuid = 0xe000d45248242f2e; } void C_4JProfile::GetXUID(int iPad, PlayerUID *pXuid,bool bOnlineXuid)
BOOL C_4JProfile::AreXUIDSEqual(PlayerUID xuid1,PlayerUID xuid2) { return false; } {
if (iPad != 0)
{
// previously INVALID_XUID
*pXuid = 0;
return;
}
if (IQNet::s_isHosting)
*pXuid = 0xe000d45248242f2e;
else
*pXuid = 0xe000d45248242f2e + WinsockNetLayer::GetLocalSmallId();
}
BOOL C_4JProfile::AreXUIDSEqual(PlayerUID xuid1,PlayerUID xuid2) { return xuid1 == xuid2; }
BOOL C_4JProfile::XUIDIsGuest(PlayerUID xuid) { return false; } BOOL C_4JProfile::XUIDIsGuest(PlayerUID xuid) { return false; }
bool C_4JProfile::AllowedToPlayMultiplayer(int iProf) { return true; } bool C_4JProfile::AllowedToPlayMultiplayer(int iProf) { return true; }
#endif
#ifdef _WINDOWS64
#if defined(__ORBIS__) #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)
{ {
@@ -487,8 +600,8 @@ char fakeGamerTag[32] = "PlayerName";
void SetFakeGamertag(char *name){ strcpy_s(fakeGamerTag, name); } void SetFakeGamertag(char *name){ strcpy_s(fakeGamerTag, name); }
char* C_4JProfile::GetGamertag(int iPad){ return fakeGamerTag; } char* C_4JProfile::GetGamertag(int iPad){ return fakeGamerTag; }
#else #else
char* C_4JProfile::GetGamertag(int iPad){ return "PlayerName"; } char* C_4JProfile::GetGamertag(int iPad){ extern char g_Win64Username[17]; return g_Win64Username; }
wstring C_4JProfile::GetDisplayName(int iPad){ return L"PlayerName"; } wstring C_4JProfile::GetDisplayName(int iPad){ extern wchar_t g_Win64UsernameW[17]; return g_Win64UsernameW; }
#endif #endif
bool C_4JProfile::IsFullVersion() { return s_bProfileIsFullVersion; } bool C_4JProfile::IsFullVersion() { return s_bProfileIsFullVersion; }
void C_4JProfile::SetSignInChangeCallback(void ( *Func)(LPVOID, bool, unsigned int),LPVOID lpParam) {} void C_4JProfile::SetSignInChangeCallback(void ( *Func)(LPVOID, bool, unsigned int),LPVOID lpParam) {}
@@ -655,3 +768,4 @@ void StatsCounter::WipeLeaderboards() {}
#ifdef __PS3__ #ifdef __PS3__
bool C_4JProfile::IsFullVersion() { return true; } bool C_4JProfile::IsFullVersion() { return true; }
#endif #endif
#endif
+27 -15
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="ContentPackage_NO_TU|Durango"> <ProjectConfiguration Include="ContentPackage_NO_TU|Durango">
@@ -988,7 +988,7 @@
<BufferSecurityCheck>false</BufferSecurityCheck> <BufferSecurityCheck>false</BufferSecurityCheck>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>_ITERATOR_DEBUG_LEVEL=0;NDEBUG;_XBOX;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DISABLE_XBLIVE;_ITERATOR_DEBUG_LEVEL=0;NDEBUG;_XBOX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeTypeInfo>true</RuntimeTypeInfo> <RuntimeTypeInfo>true</RuntimeTypeInfo>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
@@ -1199,7 +1199,7 @@ if not exist "$(TargetDir)\savedata" mkdir "$(TargetDir)\savedata"</Command>
<BufferSecurityCheck>false</BufferSecurityCheck> <BufferSecurityCheck>false</BufferSecurityCheck>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PreprocessorDefinitions>_DEBUG_MENUS_ENABLED;_ITERATOR_DEBUG_LEVEL=0;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DISABLE_PSN;_DEBUG_MENUS_ENABLED;_ITERATOR_DEBUG_LEVEL=0;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CallAttributedProfiling>Disabled</CallAttributedProfiling> <CallAttributedProfiling>Disabled</CallAttributedProfiling>
<AdditionalIncludeDirectories>PS3\Iggy\include;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>PS3\Iggy\include;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeTypeInfo>true</RuntimeTypeInfo> <RuntimeTypeInfo>true</RuntimeTypeInfo>
@@ -1568,7 +1568,7 @@ xcopy /q /y /i /s /e $(ProjectDir)DurangoMedia\CU $(LayoutDir)Image\Loose\CU</C
<BufferSecurityCheck>false</BufferSecurityCheck> <BufferSecurityCheck>false</BufferSecurityCheck>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>_LARGE_WORLDS;_DEBUG_MENUS_ENABLED;_CRT_NON_CONFORMING_SWPRINTFS;_CRT_SECURE_NO_WARNINGS;_WINDOWS64;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG_MENUS_ENABLED;_CRT_NON_CONFORMING_SWPRINTFS;_CRT_SECURE_NO_WARNINGS;_WINDOWS64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CallAttributedProfiling>Disabled</CallAttributedProfiling> <CallAttributedProfiling>Disabled</CallAttributedProfiling>
<AdditionalIncludeDirectories>Windows64\Iggy\include;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>Windows64\Iggy\include;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeTypeInfo>true</RuntimeTypeInfo> <RuntimeTypeInfo>true</RuntimeTypeInfo>
@@ -3190,6 +3190,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<FileType>XML</FileType> <FileType>XML</FileType>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Xml> </Xml>
<None Include="ClassDiagram1.cd" />
<None Include="Common\Postbuilds\Durango-postbuild.ps1" /> <None Include="Common\Postbuilds\Durango-postbuild.ps1" />
<None Include="Common\Postbuilds\Orbis-postbuild.ps1" /> <None Include="Common\Postbuilds\Orbis-postbuild.ps1" />
<None Include="Common\Postbuilds\PS3-postbuild.ps1" /> <None Include="Common\Postbuilds\PS3-postbuild.ps1" />
@@ -5100,8 +5101,10 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
</ClInclude> </ClInclude>
<ClInclude Include="Common\Network\GameNetworkManager.h" /> <ClInclude Include="Common\Network\GameNetworkManager.h" />
<ClInclude Include="Common\Network\IQNet.h" />
<ClInclude Include="Common\Network\NetworkPlayerInterface.h" /> <ClInclude Include="Common\Network\NetworkPlayerInterface.h" />
<ClInclude Include="Common\Network\PlatformNetworkManagerInterface.h" /> <ClInclude Include="Common\Network\PlatformNetworkManagerInterface.h" />
<ClInclude Include="Common\Network\PlatformNetworkManagerStub.h"> <ClInclude Include="Common\Network\PlatformNetworkManagerStub.h">
@@ -5110,7 +5113,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PS3'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PSVita'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PSVita'">true</ExcludedFromBuild>
@@ -5122,7 +5125,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PSVita'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PSVita'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|PS3'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PSVita'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|PSVita'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|PSVita'">true</ExcludedFromBuild>
@@ -5190,6 +5193,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|PSVita'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|PSVita'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PSVita'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PSVita'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PSVita'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PSVita'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
</ClInclude> </ClInclude>
<ClInclude Include="Common\Network\Sony\SonyCommerce.h"> <ClInclude Include="Common\Network\Sony\SonyCommerce.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild>
@@ -5331,7 +5335,9 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|PSVita'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|PSVita'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PSVita'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PSVita'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PSVita'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PSVita'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">false</ExcludedFromBuild>
</ClInclude> </ClInclude>
<ClInclude Include="Common\Network\WinsockNetLayer.h" />
<ClInclude Include="Common\Potion_Macros.h" /> <ClInclude Include="Common\Potion_Macros.h" />
<ClInclude Include="Common\Telemetry\TelemetryManager.h" /> <ClInclude Include="Common\Telemetry\TelemetryManager.h" />
<ClInclude Include="Common\Trial\TrialMode.h" /> <ClInclude Include="Common\Trial\TrialMode.h" />
@@ -18978,7 +18984,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|x64'">false</ExcludedFromBuild>
@@ -19978,7 +19984,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Xbox 360'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Xbox 360'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
@@ -20020,7 +20026,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PS3'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PS3'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PS3'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|PS3'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PS3'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PS3'">true</ExcludedFromBuild>
@@ -20088,6 +20094,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Durango'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Durango'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Durango'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Durango'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">true</ExcludedFromBuild>
</ClInclude> </ClInclude>
<ClInclude Include="Xbox\Resource.h"> <ClInclude Include="Xbox\Resource.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Durango'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Durango'">true</ExcludedFromBuild>
@@ -25260,6 +25267,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Durango'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Durango'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="Common\Network\GameNetworkManager.cpp" /> <ClCompile Include="Common\Network\GameNetworkManager.cpp" />
<ClCompile Include="Common\Network\PlatformNetworkManagerStub.cpp"> <ClCompile Include="Common\Network\PlatformNetworkManagerStub.cpp">
@@ -25268,7 +25276,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PS3'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PSVita'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PSVita'">true</ExcludedFromBuild>
@@ -25280,7 +25288,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PSVita'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PSVita'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|PS3'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PSVita'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|PSVita'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|PSVita'">true</ExcludedFromBuild>
@@ -25347,6 +25355,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|PSVita'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|PSVita'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PSVita'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PSVita'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PSVita'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PSVita'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="Common\Network\Sony\SonyHttp.cpp"> <ClCompile Include="Common\Network\Sony\SonyHttp.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild>
@@ -25487,7 +25496,9 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|PSVita'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|PSVita'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PSVita'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PSVita'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PSVita'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PSVita'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">false</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="Common\Network\WinsockNetLayer.cpp" />
<ClCompile Include="Common\Telemetry\TelemetryManager.cpp" /> <ClCompile Include="Common\Telemetry\TelemetryManager.cpp" />
<ClCompile Include="Common\Trial\TrialMode.cpp" /> <ClCompile Include="Common\Trial\TrialMode.cpp" />
<ClCompile Include="Common\Tutorial\AreaConstraint.cpp" /> <ClCompile Include="Common\Tutorial\AreaConstraint.cpp" />
@@ -29961,7 +29972,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ClCompile Include="ExplodeParticle.cpp" /> <ClCompile Include="ExplodeParticle.cpp" />
<ClCompile Include="Extrax64Stubs.cpp"> <ClCompile Include="Extrax64Stubs.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
@@ -34029,7 +34040,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Xbox 360'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|ORBIS'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|ORBIS'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|ORBIS'">true</ExcludedFromBuild>
@@ -34361,7 +34372,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Xbox 360'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Xbox 360'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
@@ -34402,7 +34413,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PS3'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PS3'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PS3'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|PS3'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PS3'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PS3'">true</ExcludedFromBuild>
@@ -34470,6 +34481,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Durango'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Durango'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Durango'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Durango'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="Xbox\Sentient\DynamicConfigurations.cpp"> <ClCompile Include="Xbox\Sentient\DynamicConfigurations.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
@@ -726,6 +726,9 @@
<Filter Include="net\minecraft\client\resources"> <Filter Include="net\minecraft\client\resources">
<UniqueIdentifier>{889a84db-3009-4a7c-8234-4bf93d412690}</UniqueIdentifier> <UniqueIdentifier>{889a84db-3009-4a7c-8234-4bf93d412690}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="Windows64\Network">
<UniqueIdentifier>{a86cfe95-eafc-414e-8ba4-190ff049fde4}</UniqueIdentifier>
</Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="ReadMe.txt" /> <None Include="ReadMe.txt" />
@@ -890,6 +893,7 @@
<None Include="Common\Postbuilds\Windows64-postbuild.ps1" /> <None Include="Common\Postbuilds\Windows64-postbuild.ps1" />
<None Include="Common\Postbuilds\Xbox-postbuild.ps1" /> <None Include="Common\Postbuilds\Xbox-postbuild.ps1" />
<None Include="Common\Postbuilds\PSVita-postbuild.ps1" /> <None Include="Common\Postbuilds\PSVita-postbuild.ps1" />
<None Include="ClassDiagram1.cd" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="stdafx.h"> <ClInclude Include="stdafx.h">
@@ -3775,6 +3779,12 @@
<ClInclude Include="PSVita\OldSdk.h"> <ClInclude Include="PSVita\OldSdk.h">
<Filter>PSVita</Filter> <Filter>PSVita</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Common\Network\WinsockNetLayer.h">
<Filter>Common\Source Files\Network</Filter>
</ClInclude>
<ClInclude Include="Common\Network\IQNet.h">
<Filter>Common\Source Files\Network</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="stdafx.cpp"> <ClCompile Include="stdafx.cpp">
@@ -5919,6 +5929,9 @@
<ClCompile Include="PSVita\OldSdk.cpp"> <ClCompile Include="PSVita\OldSdk.cpp">
<Filter>PSVita</Filter> <Filter>PSVita</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Common\Network\WinsockNetLayer.cpp">
<Filter>Common\Source Files\Network</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Library Include="Xbox\4JLibs\libs\4J_Render_d.lib"> <Library Include="Xbox\4JLibs\libs\4J_Render_d.lib">
+2
View File
@@ -3966,6 +3966,7 @@ void Minecraft::releaseLevel(int message)
// time when exiting from an online game // time when exiting from an online game
void Minecraft::forceStatsSave(int idx) void Minecraft::forceStatsSave(int idx)
{ {
#ifndef DISABLE_PSN
//4J Gordon: Force a stats save //4J Gordon: Force a stats save
stats[idx]->save(idx, true); stats[idx]->save(idx, true);
@@ -3977,6 +3978,7 @@ void Minecraft::forceStatsSave(int idx)
stats[idx]->saveLeaderboards(); stats[idx]->saveLeaderboards();
ProfileManager.SetLockedProfile(tempLockedProfile); ProfileManager.SetLockedProfile(tempLockedProfile);
} }
#endif
} }
// 4J Added // 4J Added
@@ -1,4 +1,6 @@
#include "stdafx.h" #include "stdafx.h"
#ifndef DISABLE_PSN
#include "SQRNetworkManager_PS3.h" #include "SQRNetworkManager_PS3.h"
#include "Common/Network/Sony/SQRNetworkPlayer.h" #include "Common/Network/Sony/SQRNetworkPlayer.h"
#ifdef __PS3__ #ifdef __PS3__
@@ -3622,3 +3624,4 @@ int SQRNetworkManager_PS3::GetJoiningReadyPercentage()
return 100; return 100;
} }
} }
#endif
@@ -1,5 +1,13 @@
#include "stdafx.h" #include "stdafx.h"
#ifdef DISABLE_PSN
// global func, so we can call from the profile lib
void SonyCommerce_UpgradeTrial()
{
// we're now calling the app function here, which manages pending requests
app.UpgradeTrial();
}
#else
#include "SonyCommerce_PS3.h" #include "SonyCommerce_PS3.h"
#include "..\PS3Extras\ShutdownManager.h" #include "..\PS3Extras\ShutdownManager.h"
#include <sys/event.h> #include <sys/event.h>
@@ -1511,3 +1519,4 @@ void SonyCommerce_PS3::DownloadAlreadyPurchased( CallbackFunc cb, LPVOID lpParam
#endif
@@ -1,5 +1,5 @@
#include "stdafx.h" #include "stdafx.h"
#ifndef DISABLE_PSN
@@ -762,3 +762,4 @@ void SonyVoiceChat::setState( EAVCState state )
sm_state = state; sm_state = state;
printStateAndEvent(); printStateAndEvent();
} }
#endif
+2 -1
View File
@@ -1,5 +1,5 @@
#pragma once #pragma once
#ifndef _DISABLE_PSN
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@@ -155,3 +155,4 @@ private:
}; };
#endif
+6
View File
@@ -10,7 +10,9 @@
#include "..\..\Minecraft.World\LevelSettings.h" #include "..\..\Minecraft.World\LevelSettings.h"
#include "..\..\Minecraft.World\BiomeSource.h" #include "..\..\Minecraft.World\BiomeSource.h"
#include "..\..\Minecraft.World\LevelType.h" #include "..\..\Minecraft.World\LevelType.h"
#ifndef DISABLE_PSN
#include "..\..\PS3\Network\SonyCommerce_PS3.h" #include "..\..\PS3\Network\SonyCommerce_PS3.h"
#endif
#include "..\..\Minecraft.World\StringHelpers.h" #include "..\..\Minecraft.World\StringHelpers.h"
#include "PS3Extras\ShutdownManager.h" #include "PS3Extras\ShutdownManager.h"
#include "PS3\Network\SonyRemoteStorage_PS3.h" #include "PS3\Network\SonyRemoteStorage_PS3.h"
@@ -560,6 +562,7 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart()
void CConsoleMinecraftApp::CommerceInit() void CConsoleMinecraftApp::CommerceInit()
{ {
#ifndef DISABLE_PSN
m_bCommerceCategoriesRetrieved=false; m_bCommerceCategoriesRetrieved=false;
m_bCommerceProductListRetrieved=false; m_bCommerceProductListRetrieved=false;
m_bCommerceInitialised=false; m_bCommerceInitialised=false;
@@ -572,10 +575,12 @@ void CConsoleMinecraftApp::CommerceInit()
m_iCurrentCategory=0; m_iCurrentCategory=0;
m_iCurrentProduct=0; m_iCurrentProduct=0;
memset(m_pchSkuID,0,48); memset(m_pchSkuID,0,48);
#endif
} }
void CConsoleMinecraftApp::CommerceTick() void CConsoleMinecraftApp::CommerceTick()
{ {
#ifndef DISABLE_PSN
// only tick this if the primary user is signed in to the PSN // only tick this if the primary user is signed in to the PSN
if(ProfileManager.IsSignedInLive(0)) if(ProfileManager.IsSignedInLive(0))
{ {
@@ -695,6 +700,7 @@ void CConsoleMinecraftApp::CommerceTick()
} }
} }
else else
#endif
{ {
// was the primary player signed in and is now signed out? // was the primary player signed in and is now signed out?
if(m_eCommerce_State!=eCommerce_State_Offline) if(m_eCommerce_State!=eCommerce_State_Offline)
+14
View File
@@ -24,6 +24,7 @@ SYS_PROCESS_PARAM(1001, 0x10000); // thread priority, and stack size
#include <sysutil/sysutil_msgdialog.h> #include <sysutil/sysutil_msgdialog.h>
#include "PS3/Network/SonyRemoteStorage_PS3.h" #include "PS3/Network/SonyRemoteStorage_PS3.h"
#include "..\..\Minecraft.Client\Common\Network\WinsockNetLayer.h"
// define to use spurs (otherwise SPU threads or raw will be used) // define to use spurs (otherwise SPU threads or raw will be used)
#define USE_SPURS #define USE_SPURS
@@ -35,6 +36,9 @@ SYS_PROCESS_PARAM(1001, 0x10000); // thread priority, and stack size
#include <sys/spu_image.h> #include <sys/spu_image.h>
#endif #endif
#ifdef DISABLE_PSN
#include "../Passphrase/ps3__np_conf.h"
#endif
/* Encrypted ID for protected data file (*) You must edit these binaries!! */ /* Encrypted ID for protected data file (*) You must edit these binaries!! */
char secureFileId[CELL_SAVEDATA_SECUREFILEID_SIZE] = char secureFileId[CELL_SAVEDATA_SECUREFILEID_SIZE] =
{ {
@@ -519,7 +523,9 @@ void RegisterAwardsWithProfileManager()
// Rich Presence init - number of presences, number of contexts // Rich Presence init - number of presences, number of contexts
//printf("Rich presence strings are hard coded on PS3 for now, must change this!\n"); //printf("Rich presence strings are hard coded on PS3 for now, must change this!\n");
ProfileManager.RichPresenceInit(-1,-1); // 4J-JEV - Presence and Context count not used. ProfileManager.RichPresenceInit(-1,-1); // 4J-JEV - Presence and Context count not used.
#ifndef DISABLE_PSN
ProfileManager.SetRichPresenceSettingFn(SQRNetworkManager_PS3::SetRichPresence); ProfileManager.SetRichPresenceSettingFn(SQRNetworkManager_PS3::SetRichPresence);
#endif
char *pchRichPresenceString; char *pchRichPresenceString;
pchRichPresenceString=(char *)AddRichPresenceString(IDS_RICHPRESENCE_GAMESTATE); pchRichPresenceString=(char *)AddRichPresenceString(IDS_RICHPRESENCE_GAMESTATE);
@@ -855,7 +861,9 @@ int main()
app.CommerceInit(); // MGH - moved this here so GetCommerce isn't NULL app.CommerceInit(); // MGH - moved this here so GetCommerce isn't NULL
// 4J-PB - Kick of the check for trial or full version - requires ui to be initialised // 4J-PB - Kick of the check for trial or full version - requires ui to be initialised
#ifndef DISABLE_PSN
app.GetCommerce()->CheckForTrialUpgradeKey(); app.GetCommerce()->CheckForTrialUpgradeKey();
#endif
static bool bTrialTimerDisplayed=true; static bool bTrialTimerDisplayed=true;
@@ -888,8 +896,13 @@ int main()
// Initialise the profile manager with the game Title ID, Offer ID, a profile version number, and the number of profile values and settings // Initialise the profile manager with the game Title ID, Offer ID, a profile version number, and the number of profile values and settings
#ifndef DISABLE_PSN
ProfileManager.Initialise(SQRNetworkManager_PS3::GetSceNpCommsId(), ProfileManager.Initialise(SQRNetworkManager_PS3::GetSceNpCommsId(),
SQRNetworkManager_PS3::GetSceNpCommsSig(), SQRNetworkManager_PS3::GetSceNpCommsSig(),
#else
ProfileManager.Initialise(&s_npCommunicationId,
&s_npCommunicationSignature,
#endif
PROFILE_VERSION_10, PROFILE_VERSION_10,
NUM_PROFILE_VALUES, NUM_PROFILE_VALUES,
NUM_PROFILE_SETTINGS, NUM_PROFILE_SETTINGS,
@@ -1116,6 +1129,7 @@ int main()
if(ShutdownManager::ShouldRun(ShutdownManager::eMainThread)) if(ShutdownManager::ShouldRun(ShutdownManager::eMainThread))
{ {
g_NetworkManager.Initialise(); g_NetworkManager.Initialise();
WinsockNetLayer::Initialize();
g_NetworkManager.SetLocalGame(true); g_NetworkManager.SetLocalGame(true);
} }
+4
View File
@@ -2,6 +2,7 @@
#pragma once #pragma once
//#include "stdafx.h"
// Note - there are now 3 types of PlayerUID // Note - there are now 3 types of PlayerUID
@@ -19,6 +20,7 @@ class PlayerUID
CellSysutilUserId m_userID; // user logged on to the XMB CellSysutilUserId m_userID; // user logged on to the XMB
public: public:
ULONGLONG XUID;
class Hash class Hash
{ {
@@ -29,6 +31,8 @@ public:
PlayerUID(); PlayerUID();
PlayerUID(CellSysutilUserId userID, SceNpOnlineId& onlineID, bool bSignedInPSN, int quadrant); PlayerUID(CellSysutilUserId userID, SceNpOnlineId& onlineID, bool bSignedInPSN, int quadrant);
PlayerUID(std::wstring fromString); PlayerUID(std::wstring fromString);
PlayerUID(ULONGLONG xuid) { XUID = xuid; }
operator ULONGLONG() const { return XUID; }
bool operator==(const PlayerUID& rhs) const; bool operator==(const PlayerUID& rhs) const;
bool operator!=(const PlayerUID& rhs); bool operator!=(const PlayerUID& rhs);
+24 -1
View File
@@ -157,6 +157,7 @@ void PendingConnection::handleLogin(shared_ptr<LoginPacket> packet)
//if (true)// 4J removed !server->onlineMode) //if (true)// 4J removed !server->onlineMode)
bool sentDisconnect = false; bool sentDisconnect = false;
bool nameTaken = false;
if( sentDisconnect ) if( sentDisconnect )
{ {
@@ -168,7 +169,29 @@ void PendingConnection::handleLogin(shared_ptr<LoginPacket> packet)
} }
else else
{ {
handleAcceptedLogin(packet); vector<shared_ptr<ServerPlayer> > &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());
// to do: replace this with a dedicated duplicate name
// message
disconnect(DisconnectPacket::eDisconnect_Banned);
}
else
{
handleAcceptedLogin(packet);
}
} }
//else //else
{ {
+23 -6
View File
@@ -25,9 +25,9 @@
#include "..\Minecraft.World\net.minecraft.world.level.saveddata.h" #include "..\Minecraft.World\net.minecraft.world.level.saveddata.h"
#include "..\Minecraft.World\JavaMath.h" #include "..\Minecraft.World\JavaMath.h"
#include "..\Minecraft.World\EntityIO.h" #include "..\Minecraft.World\EntityIO.h"
#ifdef _XBOX #if defined(_XBOX) || defined(_WINDOWS64) || defined(DISABLE_PSN)
#include "Xbox\Network\NetworkPlayerXbox.h" #include "Xbox\Network\NetworkPlayerXbox.h"
#elif defined(__PS3__) || defined(__ORBIS__) #elif !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__)
#include "Common\Network\Sony\NetworkPlayerSony.h" #include "Common\Network\Sony\NetworkPlayerSony.h"
#endif #endif
@@ -53,7 +53,11 @@ PlayerList::PlayerList(MinecraftServer *server)
//int viewDistance = server->settings->getInt(L"view-distance", 10); //int viewDistance = server->settings->getInt(L"view-distance", 10);
#ifdef _WINDOWS64
maxPlayers = MINECRAFT_NET_MAX_PLAYERS;
#else
maxPlayers = server->settings->getInt(L"max-players", 20); maxPlayers = server->settings->getInt(L"max-players", 20);
#endif
doWhiteList = false; doWhiteList = false;
InitializeCriticalSection(&m_kickPlayersCS); InitializeCriticalSection(&m_kickPlayersCS);
@@ -90,7 +94,7 @@ void PlayerList::placeNewPlayer(Connection *connection, shared_ptr<ServerPlayer>
player->setPlayerGamePrivilege(Player::ePlayerGamePrivilege_HOST,1); player->setPlayerGamePrivilege(Player::ePlayerGamePrivilege_HOST,1);
} }
#if defined(__PS3__) || defined(__ORBIS__) #if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__)
// PS3 networking library doesn't automatically assign PlayerUIDs to the network players for anything remote, so need to tell it what to set from the data in this packet now // PS3 networking library doesn't automatically assign PlayerUIDs to the network players for anything remote, so need to tell it what to set from the data in this packet now
if( !g_NetworkManager.IsLocalGame() ) if( !g_NetworkManager.IsLocalGame() )
{ {
@@ -99,6 +103,13 @@ void PlayerList::placeNewPlayer(Connection *connection, shared_ptr<ServerPlayer>
((NetworkPlayerSony *)networkPlayer)->SetUID( packet->m_onlineXuid ); ((NetworkPlayerSony *)networkPlayer)->SetUID( packet->m_onlineXuid );
} }
} }
#elif defined(_WINDOWS64) || defined(DISABLE_PSN)
if (networkPlayer != NULL && !networkPlayer->IsLocal())
{
NetworkPlayerXbox *nxp = (NetworkPlayerXbox *)networkPlayer;
IQNetPlayer *qnp = nxp->GetQNetPlayer();
wcsncpy(qnp->m_gamertag, player->name.c_str(), 32);
}
#endif #endif
// 4J Stu - TU-1 hotfix // 4J Stu - TU-1 hotfix
@@ -469,6 +480,7 @@ void PlayerList::remove(shared_ptr<ServerPlayer> 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 //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); if(player->isGuest()) playerIo->deleteMapFilesForPlayer(player);
ServerLevel *level = player->getLevel(); ServerLevel *level = player->getLevel();
level->getTracker()->removeEntity(player);
if (player->riding != NULL) if (player->riding != NULL)
{ {
// remove mount first because the player unmounts when being // remove mount first because the player unmounts when being
@@ -497,7 +509,7 @@ void PlayerList::remove(shared_ptr<ServerPlayer> player)
shared_ptr<ServerPlayer> PlayerList::getPlayerForLogin(PendingConnection *pendingConnection, const wstring& userName, PlayerUID xuid, PlayerUID onlineXuid) shared_ptr<ServerPlayer> PlayerList::getPlayerForLogin(PendingConnection *pendingConnection, const wstring& userName, PlayerUID xuid, PlayerUID onlineXuid)
{ {
if (players.size() >= maxPlayers) if (players.size() >= (unsigned int)MINECRAFT_NET_MAX_PLAYERS)
{ {
pendingConnection->disconnect(DisconnectPacket::eDisconnect_ServerFull); pendingConnection->disconnect(DisconnectPacket::eDisconnect_ServerFull);
return shared_ptr<ServerPlayer>(); return shared_ptr<ServerPlayer>();
@@ -510,9 +522,14 @@ shared_ptr<ServerPlayer> PlayerList::getPlayerForLogin(PendingConnection *pendin
// Work out the base server player settings // Work out the base server player settings
INetworkPlayer *networkPlayer = pendingConnection->connection->getSocket()->getPlayer(); INetworkPlayer *networkPlayer = pendingConnection->connection->getSocket()->getPlayer();
if(networkPlayer != NULL && !networkPlayer->IsHost()) if (networkPlayer != NULL)
{ {
player->enableAllPlayerPrivileges( app.GetGameHostOption(eGameHostOption_TrustPlayers)>0 ); if (!networkPlayer->IsHost())
player->enableAllPlayerPrivileges( app.GetGameHostOption(eGameHostOption_TrustPlayers)>0 );
PlayerUID realXuid = networkPlayer->GetUID();
player->setXuid(realXuid);
player->setOnlineXuid(realXuid);
} }
// 4J Added // 4J Added
+2
View File
@@ -19,7 +19,9 @@
#include "PlayerList.h" #include "PlayerList.h"
#include "EntityTracker.h" #include "EntityTracker.h"
#include "PlayerChunkMap.h" #include "PlayerChunkMap.h"
#ifndef _DISABLE_XBLIVE
#include <qnet.h> #include <qnet.h>
#endif
TrackedEntity::TrackedEntity(shared_ptr<Entity> e, int range, int updateInterval, bool trackDelta) TrackedEntity::TrackedEntity(shared_ptr<Entity> e, int range, int updateInterval, bool trackDelta)
{ {
+2 -1
View File
@@ -55,7 +55,8 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart()
Minecraft *pMinecraft=Minecraft::GetInstance(); Minecraft *pMinecraft=Minecraft::GetInstance();
app.ReleaseSaveThumbnail(); app.ReleaseSaveThumbnail();
ProfileManager.SetLockedProfile(0); ProfileManager.SetLockedProfile(0);
pMinecraft->user->name = L"Windows"; extern wchar_t g_Win64UsernameW[17];
pMinecraft->user->name = g_Win64UsernameW;
app.ApplyGameSettingsChanged(0); app.ApplyGameSettingsChanged(0);
////////////////////////////////////////////////////////////////////////////////////////////// From CScene_MultiGameJoinLoad::OnInit ////////////////////////////////////////////////////////////////////////////////////////////// From CScene_MultiGameJoinLoad::OnInit
@@ -36,6 +36,7 @@
#include "Resource.h" #include "Resource.h"
#include "..\..\Minecraft.World\compression.h" #include "..\..\Minecraft.World\compression.h"
#include "..\..\Minecraft.World\OldChunkStorage.h" #include "..\..\Minecraft.World\OldChunkStorage.h"
#include "..\..\Minecraft.Client\Common\Network\WinsockNetLayer.h"
#include "Xbox/resource.h" #include "Xbox/resource.h"
@@ -68,6 +69,9 @@ DWORD dwProfileSettingsA[NUM_PROFILE_VALUES]=
#endif #endif
}; };
char g_Win64Username[17] = {0};
wchar_t g_Win64UsernameW[17] = {0};
//------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------
// Time Since fAppTime is a float, we need to keep the quadword app time // Time Since fAppTime is a float, we need to keep the quadword app time
// as a LARGE_INTEGER so that we don't lose precision after running // as a LARGE_INTEGER so that we don't lose precision after running
@@ -76,8 +80,8 @@ DWORD dwProfileSettingsA[NUM_PROFILE_VALUES]=
BOOL g_bWidescreen = TRUE; BOOL g_bWidescreen = TRUE;
int g_iScreenWidth = 1920; int g_iScreenWidth = 1280;
int g_iScreenHeight = 1080; int g_iScreenHeight = 720;
void DefineActions(void) void DefineActions(void)
{ {
@@ -629,8 +633,58 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
//g_iScreenWidth = 960; //g_iScreenWidth = 960;
//g_iScreenHeight = 544; //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);
}
char *ipArg = strstr(cmdLineA, "-ip ");
if (ipArg)
{
ipArg += 4;
while (*ipArg == ' ') ipArg++;
char ipBuf[256];
int n = 0;
while (ipArg[n] && ipArg[n] != ' ' && n < 255) { ipBuf[n] = ipArg[n]; n++; }
ipBuf[n] = 0;
strncpy_s(g_Win64MultiplayerIP, 256, ipBuf, _TRUNCATE);
g_Win64MultiplayerJoin = true;
}
char *portArg = strstr(cmdLineA, "-port ");
if (portArg)
{
portArg += 6;
while (*portArg == ' ') portArg++;
char portBuf[16];
int n = 0;
while (portArg[n] && portArg[n] != ' ' && n < 15) { portBuf[n] = portArg[n]; n++; }
portBuf[n] = 0;
g_Win64MultiplayerPort = atoi(portBuf);
if (g_Win64MultiplayerPort <= 0) g_Win64MultiplayerPort = WIN64_NET_DEFAULT_PORT;
}
} }
if (g_Win64Username[0] == 0)
{
DWORD sz = 17;
if (!GetUserNameA(g_Win64Username, &sz))
strncpy_s(g_Win64Username, 17, "Player", _TRUNCATE);
g_Win64Username[16] = 0;
}
MultiByteToWideChar(CP_ACP, 0, g_Win64Username, -1, g_Win64UsernameW, 17);
// Initialize global strings // Initialize global strings
MyRegisterClass(hInstance); MyRegisterClass(hInstance);
@@ -793,7 +847,17 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
// ProfileManager for XN_LIVE_INVITE_ACCEPTED for QNet. // ProfileManager for XN_LIVE_INVITE_ACCEPTED for QNet.
g_NetworkManager.Initialise(); 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 // 4J-PB moved further down
//app.InitGameSettings(); //app.InitGameSettings();
@@ -937,6 +1001,9 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
// app.audio.PlaySound(); // app.audio.PlaySound();
// } // }
bool isActive = (GetForegroundWindow() == g_hWnd) &&
!IsIconic(g_hWnd);
app.UpdateTime(); app.UpdateTime();
PIXBeginNamedEvent(0,"Input manager tick"); PIXBeginNamedEvent(0,"Input manager tick");
InputManager.Tick(); InputManager.Tick();
@@ -964,7 +1031,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
PIXEndNamedEvent(); PIXEndNamedEvent();
PIXBeginNamedEvent(0,"Network manager do work #1"); PIXBeginNamedEvent(0,"Network manager do work #1");
// g_NetworkManager.DoWork(); g_NetworkManager.DoWork();
PIXEndNamedEvent(); PIXEndNamedEvent();
// LeaderboardManager::Instance()->Tick(); // LeaderboardManager::Instance()->Tick();
@@ -1,7 +1,9 @@
#pragma once #pragma once
using namespace std; using namespace std;
#include <vector> #include <vector>
#ifndef _DISABLE_XBLIVE
#include <qnet.h> #include <qnet.h>
#endif
#include "..\..\..\Minecraft.World\C4JThread.h" #include "..\..\..\Minecraft.World\C4JThread.h"
#include "..\..\Common\Network\NetworkPlayerInterface.h" #include "..\..\Common\Network\NetworkPlayerInterface.h"
#include "..\..\Common\Network\PlatformNetworkManagerInterface.h" #include "..\..\Common\Network\PlatformNetworkManagerInterface.h"
+5 -1
View File
@@ -24,7 +24,11 @@
#include "..\..\Minecraft.Client\StatsCounter.h" #include "..\..\Minecraft.Client\StatsCounter.h"
#include "..\ConnectScreen.h" #include "..\ConnectScreen.h"
#include "Social\SocialManager.h" #include "Social\SocialManager.h"
#include "Leaderboards\XboxLeaderboardManager.h" #ifndef _DISABLE_XBLIVE
#include "Leaderboards\XboxLeaderboardManager.h"
#else
#include "..\Windows64\Leaderboards\WindowsLeaderboardManager.h"
#endif
#include "..\Common\XUI\XUI_Scene_Container.h" #include "..\Common\XUI\XUI_Scene_Container.h"
#include "..\..\Minecraft.Client\Tesselator.h" #include "..\..\Minecraft.Client\Tesselator.h"
#include "..\..\Minecraft.Client\Options.h" #include "..\..\Minecraft.Client\Options.h"
+12 -1
View File
@@ -101,10 +101,17 @@ using namespace DirectX;
#include <xuiapp.h> #include <xuiapp.h>
#include <xact3.h> #include <xact3.h>
#include <xact3d3.h> #include <xact3d3.h>
#ifdef _DISABLE_XBLIVE
typedef ULONGLONG PlayerUID;
typedef ULONGLONG SessionID;
typedef PlayerUID GameSessionUID;
class INVITE_INFO;
#else
typedef XINVITE_INFO INVITE_INFO; typedef XINVITE_INFO INVITE_INFO;
typedef XUID PlayerUID; typedef XUID PlayerUID;
typedef XNKID SessionID; typedef XNKID SessionID;
typedef XUID GameSessionUID; typedef XUID GameSessionUID;
#endif // _DISABLE_XBLIVE
#define HRESULT_SUCCEEDED(hr) (((HRESULT)(hr)) >= 0) #define HRESULT_SUCCEEDED(hr) (((HRESULT)(hr)) >= 0)
#include "..\Minecraft.Client\xbox\network\extra.h" #include "..\Minecraft.Client\xbox\network\extra.h"
@@ -231,7 +238,11 @@ typedef XUID GameSessionUID;
#include "Xbox\GameConfig\Minecraft.spa.h" #include "Xbox\GameConfig\Minecraft.spa.h"
#include "XboxMedia\4J_strings.h" #include "XboxMedia\4J_strings.h"
#include "Xbox\XML\ATGXmlParser.h" #include "Xbox\XML\ATGXmlParser.h"
#ifndef _DISABLE_XBLIVE
#include "Xbox\Leaderboards\XboxLeaderboardManager.h" #include "Xbox\Leaderboards\XboxLeaderboardManager.h"
#else
#include "Windows64\Leaderboards\WindowsLeaderboardManager.h"
#endif
#include "Xbox\Social\SocialManager.h" #include "Xbox\Social\SocialManager.h"
#include "Xbox\Audio\SoundEngine.h" #include "Xbox\Audio\SoundEngine.h"
#include "Xbox\Xbox_UIController.h" #include "Xbox\Xbox_UIController.h"
@@ -292,7 +303,7 @@ typedef XUID GameSessionUID;
#include "PSVita\Iggy\include\iggy.h" #include "PSVita\Iggy\include\iggy.h"
#include "PSVita\Iggy\gdraw\gdraw_psp2.h" #include "PSVita\Iggy\gdraw\gdraw_psp2.h"
#include "PSVita\PSVita_UIController.h" #include "PSVita\PSVita_UIController.h"
#else #elif !defined _XBOX
#include "Orbis\Sentient\MinecraftTelemetry.h" #include "Orbis\Sentient\MinecraftTelemetry.h"
#include "OrbisMedia\strings.h" #include "OrbisMedia\strings.h"
#include "Orbis\Orbis_App.h" #include "Orbis\Orbis_App.h"
+1 -1
View File
@@ -255,7 +255,7 @@ bool Connection::writeTick()
// 4J Stu - Changed this so that rather than writing to the network stream through a buffered stream we want to: // 4J Stu - Changed this so that rather than writing to the network stream through a buffered stream we want to:
// a) Only push whole "game" packets to QNet, rather than amalgamated chunks of data that may include many packets, and partial packets // a) Only push whole "game" packets to QNet, rather than amalgamated chunks of data that may include many packets, and partial packets
// b) To be able to change the priority and queue of a packet if required // b) To be able to change the priority and queue of a packet if required
#ifdef _XBOX #if defined _XBOX && !defined _DISABLE_XBLIVE
int flags = QNET_SENDDATA_LOW_PRIORITY | QNET_SENDDATA_SECONDARY; int flags = QNET_SENDDATA_LOW_PRIORITY | QNET_SENDDATA_SECONDARY;
#else #else
int flags = NON_QNET_SENDDATA_ACK_REQUIRED; int flags = NON_QNET_SENDDATA_ACK_REQUIRED;
+1 -1
View File
@@ -30,7 +30,7 @@ public:
virtual vector<FileEntry *> *getFilesWithPrefix(const wstring &prefix) = 0; virtual vector<FileEntry *> *getFilesWithPrefix(const wstring &prefix) = 0;
virtual vector<FileEntry *> *getRegionFilesByDimension(unsigned int dimensionIndex) = 0; virtual vector<FileEntry *> *getRegionFilesByDimension(unsigned int dimensionIndex) = 0;
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) #if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
virtual wstring getPlayerDataFilenameForLoad(const PlayerUID& pUID) = 0; virtual wstring getPlayerDataFilenameForLoad(const PlayerUID& pUID) = 0;
virtual wstring getPlayerDataFilenameForSave(const PlayerUID& pUID) = 0; virtual wstring getPlayerDataFilenameForSave(const PlayerUID& pUID) = 0;
virtual vector<FileEntry *> *getValidPlayerDatFiles() = 0; virtual vector<FileEntry *> *getValidPlayerDatFiles() = 0;
+1 -1
View File
@@ -78,7 +78,7 @@ void ConsoleSaveFileConverter::ConvertSave(ConsoleSaveFile *sourceSave, ConsoleS
} }
// MGH added - find any player data files and copy them across // MGH added - find any player data files and copy them across
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) #if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
vector<FileEntry *>* playerFiles = sourceSave->getValidPlayerDatFiles(); vector<FileEntry *>* playerFiles = sourceSave->getValidPlayerDatFiles();
#else #else
vector<FileEntry *> *playerFiles = sourceSave->getFilesWithPrefix( DirectoryLevelStorage::getPlayerDir() ); vector<FileEntry *> *playerFiles = sourceSave->getFilesWithPrefix( DirectoryLevelStorage::getPlayerDir() );
+1 -1
View File
@@ -920,7 +920,7 @@ vector<FileEntry *> *ConsoleSaveFileOriginal::getRegionFilesByDimension(unsigned
return NULL; return NULL;
} }
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) #if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
wstring ConsoleSaveFileOriginal::getPlayerDataFilenameForLoad(const PlayerUID& pUID) wstring ConsoleSaveFileOriginal::getPlayerDataFilenameForLoad(const PlayerUID& pUID)
{ {
return header.getPlayerDataFilenameForLoad( pUID ); return header.getPlayerDataFilenameForLoad( pUID );
+1 -1
View File
@@ -65,7 +65,7 @@ public:
virtual vector<FileEntry *> *getFilesWithPrefix(const wstring &prefix); virtual vector<FileEntry *> *getFilesWithPrefix(const wstring &prefix);
virtual vector<FileEntry *> *getRegionFilesByDimension(unsigned int dimensionIndex); virtual vector<FileEntry *> *getRegionFilesByDimension(unsigned int dimensionIndex);
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) #if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
virtual wstring getPlayerDataFilenameForLoad(const PlayerUID& pUID); virtual wstring getPlayerDataFilenameForLoad(const PlayerUID& pUID);
virtual wstring getPlayerDataFilenameForSave(const PlayerUID& pUID); virtual wstring getPlayerDataFilenameForSave(const PlayerUID& pUID);
virtual vector<FileEntry *> *getValidPlayerDatFiles(); virtual vector<FileEntry *> *getValidPlayerDatFiles();
+1 -1
View File
@@ -519,7 +519,7 @@ int DataInputStream::readUTFChar()
PlayerUID DataInputStream::readPlayerUID() PlayerUID DataInputStream::readPlayerUID()
{ {
PlayerUID returnValue; PlayerUID returnValue;
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) #if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
for(int idPos=0;idPos<sizeof(PlayerUID); idPos++) for(int idPos=0;idPos<sizeof(PlayerUID); idPos++)
((char*)&returnValue)[idPos] = readByte(); ((char*)&returnValue)[idPos] = readByte();
#elif defined(_DURANGO) #elif defined(_DURANGO)
+3 -1
View File
@@ -265,11 +265,13 @@ void DataOutputStream::writeUTF(const wstring& str)
// 4J Added // 4J Added
void DataOutputStream::writePlayerUID(PlayerUID player) void DataOutputStream::writePlayerUID(PlayerUID player)
{ {
#if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__) #if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
for(int idPos=0;idPos<sizeof(PlayerUID); idPos++) for(int idPos=0;idPos<sizeof(PlayerUID); idPos++)
writeByte(((char*)&player)[idPos]); writeByte(((char*)&player)[idPos]);
#elif defined(_DURANGO) #elif defined(_DURANGO)
writeUTF(player.toString()); writeUTF(player.toString());
#elif defined(DISABLE_PSN) && defined(__PS3__)
writeLong(player.XUID);
#else #else
writeLong(player); writeLong(player);
#endif // PS3 #endif // PS3
+4 -4
View File
@@ -393,7 +393,7 @@ void DirectoryLevelStorage::save(shared_ptr<Player> player)
{ {
CompoundTag *tag = new CompoundTag(); CompoundTag *tag = new CompoundTag();
player->saveWithoutId(tag); player->saveWithoutId(tag);
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) #if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
ConsoleSavePath realFile = ConsoleSavePath( m_saveFile->getPlayerDataFilenameForSave(playerXuid).c_str() ); ConsoleSavePath realFile = ConsoleSavePath( m_saveFile->getPlayerDataFilenameForSave(playerXuid).c_str() );
#elif defined(_DURANGO) #elif defined(_DURANGO)
ConsoleSavePath realFile = ConsoleSavePath( playerDir.getName() + player->getXuid().toString() + L".dat" ); ConsoleSavePath realFile = ConsoleSavePath( playerDir.getName() + player->getXuid().toString() + L".dat" );
@@ -442,7 +442,7 @@ CompoundTag *DirectoryLevelStorage::load(shared_ptr<Player> player)
CompoundTag *DirectoryLevelStorage::loadPlayerDataTag(PlayerUID xuid) CompoundTag *DirectoryLevelStorage::loadPlayerDataTag(PlayerUID xuid)
{ {
// 4J Jev, removed try/catch. // 4J Jev, removed try/catch.
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) #if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
ConsoleSavePath realFile = ConsoleSavePath( m_saveFile->getPlayerDataFilenameForLoad(xuid).c_str() ); ConsoleSavePath realFile = ConsoleSavePath( m_saveFile->getPlayerDataFilenameForLoad(xuid).c_str() );
#elif defined(_DURANGO) #elif defined(_DURANGO)
ConsoleSavePath realFile = ConsoleSavePath( playerDir.getName() + xuid.toString() + L".dat" ); ConsoleSavePath realFile = ConsoleSavePath( playerDir.getName() + xuid.toString() + L".dat" );
@@ -472,7 +472,7 @@ void DirectoryLevelStorage::clearOldPlayerFiles()
{ {
if(StorageManager.GetSaveDisabled() ) return; if(StorageManager.GetSaveDisabled() ) return;
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) #if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
vector<FileEntry *> *playerFiles = m_saveFile->getValidPlayerDatFiles(); vector<FileEntry *> *playerFiles = m_saveFile->getValidPlayerDatFiles();
#else #else
vector<FileEntry *> *playerFiles = m_saveFile->getFilesWithPrefix( playerDir.getName() ); vector<FileEntry *> *playerFiles = m_saveFile->getFilesWithPrefix( playerDir.getName() );
@@ -561,7 +561,7 @@ void DirectoryLevelStorage::resetNetherPlayerPositions()
{ {
if(app.GetResetNether()) if(app.GetResetNether())
{ {
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) #if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
vector<FileEntry *> *playerFiles = m_saveFile->getValidPlayerDatFiles(); vector<FileEntry *> *playerFiles = m_saveFile->getValidPlayerDatFiles();
#else #else
vector<FileEntry *> *playerFiles = m_saveFile->getFilesWithPrefix( playerDir.getName() ); vector<FileEntry *> *playerFiles = m_saveFile->getFilesWithPrefix( playerDir.getName() );
+6 -3
View File
@@ -589,6 +589,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">
<OutputFile>$(OutDir)$(ProjectName).lib</OutputFile> <OutputFile>$(OutDir)$(ProjectName).lib</OutputFile>
<IncludePath>$(Xbox360TechPreviewInclude);$(XDKInstallDir)\include\xbox;</IncludePath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Xbox 360'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Xbox 360'">
<OutputFile>$(OutDir)$(ProjectName).lib</OutputFile> <OutputFile>$(OutDir)$(ProjectName).lib</OutputFile>
@@ -884,7 +885,7 @@
<BufferSecurityCheck>false</BufferSecurityCheck> <BufferSecurityCheck>false</BufferSecurityCheck>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>_ITERATOR_DEBUG_LEVEL=0;NDEBUG;_XBOX;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DISABLE_XBLIVE;_ITERATOR_DEBUG_LEVEL=0;NDEBUG;_XBOX;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeTypeInfo>true</RuntimeTypeInfo> <RuntimeTypeInfo>true</RuntimeTypeInfo>
<ShowIncludes>false</ShowIncludes> <ShowIncludes>false</ShowIncludes>
<UseFullPaths>false</UseFullPaths> <UseFullPaths>false</UseFullPaths>
@@ -1195,7 +1196,7 @@
<BufferSecurityCheck>false</BufferSecurityCheck> <BufferSecurityCheck>false</BufferSecurityCheck>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>_LARGE_WORLDS;_DEBUG_MENUS_ENABLED;_LIB;_CRT_NON_CONFORMING_SWPRINTFS;_CRT_SECURE_NO_WARNINGS;_WINDOWS64;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG_MENUS_ENABLED;_LIB;_CRT_NON_CONFORMING_SWPRINTFS;_CRT_SECURE_NO_WARNINGS;_WINDOWS64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CallAttributedProfiling>Disabled</CallAttributedProfiling> <CallAttributedProfiling>Disabled</CallAttributedProfiling>
<RuntimeTypeInfo>true</RuntimeTypeInfo> <RuntimeTypeInfo>true</RuntimeTypeInfo>
<ShowIncludes>false</ShowIncludes> <ShowIncludes>false</ShowIncludes>
@@ -2589,7 +2590,9 @@
<ClInclude Include="WoolCarpetTile.h" /> <ClInclude Include="WoolCarpetTile.h" />
<ClInclude Include="WorldlyContainer.h" /> <ClInclude Include="WorldlyContainer.h" />
<ClInclude Include="WrittenBookItem.h" /> <ClInclude Include="WrittenBookItem.h" />
<ClInclude Include="x64headers\extraX64.h" /> <ClInclude Include="x64headers\extraX64.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">false</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="x64headers\qnet.h" /> <ClInclude Include="x64headers\qnet.h" />
<ClInclude Include="x64headers\xmcore.h" /> <ClInclude Include="x64headers\xmcore.h" />
<ClInclude Include="x64headers\xrnm.h" /> <ClInclude Include="x64headers\xrnm.h" />
+2
View File
@@ -2,7 +2,9 @@
#include "net.minecraft.world.entity.player.h" #include "net.minecraft.world.entity.player.h"
#include "..\Minecraft.Client\ServerPlayer.h" #include "..\Minecraft.Client\ServerPlayer.h"
#include "..\Minecraft.Client\PlayerConnection.h" #include "..\Minecraft.Client\PlayerConnection.h"
#ifndef _DISABLE_XBLIVE
#include <qnet.h> #include <qnet.h>
#endif
#include "PacketListener.h" #include "PacketListener.h"
#include "InputOutputStream.h" #include "InputOutputStream.h"
#include "PlayerInfoPacket.h" #include "PlayerInfoPacket.h"
+1 -1
View File
@@ -500,7 +500,7 @@ void Socket::SocketOutputStreamNetwork::writeWithFlags(byteArray b, unsigned int
return; return;
} }
#ifdef _XBOX #if defined _XBOX && !defined _DISABLE_XBLIVE
bool lowPriority = ( ( flags & QNET_SENDDATA_LOW_PRIORITY ) == QNET_SENDDATA_LOW_PRIORITY ); bool lowPriority = ( ( flags & QNET_SENDDATA_LOW_PRIORITY ) == QNET_SENDDATA_LOW_PRIORITY );
bool requireAck = lowPriority; bool requireAck = lowPriority;
#else #else
+2
View File
@@ -1,7 +1,9 @@
#pragma once #pragma once
#include <xrnm.h> #include <xrnm.h>
#include <queue> #include <queue>
#ifndef _DISABLE_XBLIVE
#include <qnet.h> #include <qnet.h>
#endif
#include "InputStream.h" #include "InputStream.h"
#include "OutputStream.h" #include "OutputStream.h"
+3 -2
View File
@@ -334,8 +334,9 @@ HRESULT Compression::Decompress(void *pDestination, unsigned int *pDestSize, voi
*pDestSize = (unsigned int)destSize; *pDestSize = (unsigned int)destSize;
return ( ( res == Z_OK ) ? S_OK : -1 ); return ( ( res == Z_OK ) ? S_OK : -1 );
#elif defined __PS3__ #elif defined __PS3__
uint32_t destSize = (uint32_t)(*pDestSize); uLongf destSize = (uLongf)(*pDestSize);
bool res = EdgeZLib::Decompress(pDestination, &destSize, pSource, SrcSize); bool res = uncompress((Bytef*)pDestination, &destSize, (Bytef*)pSource, SrcSize);
*pDestSize = (unsigned int)destSize; *pDestSize = (unsigned int)destSize;
return ( ( res ) ? S_OK : -1 ); return ( ( res ) ? S_OK : -1 );
#else #else
+7
View File
@@ -53,10 +53,17 @@ using namespace DirectX;
#include <xboxmath.h> #include <xboxmath.h>
#include <xuiapp.h> #include <xuiapp.h>
#include <xact3.h> #include <xact3.h>
#ifdef _DISABLE_XBLIVE
typedef ULONGLONG PlayerUID;
typedef ULONGLONG SessionID;
typedef PlayerUID GameSessionUID;
class INVITE_INFO;
#else
typedef XINVITE_INFO INVITE_INFO; typedef XINVITE_INFO INVITE_INFO;
typedef XUID PlayerUID; typedef XUID PlayerUID;
typedef XNKID SessionID; typedef XNKID SessionID;
typedef XUID GameSessionUID; typedef XUID GameSessionUID;
#endif // _DISABLE_XBLIVE
#endif #endif
#ifdef __PS3__ #ifdef __PS3__
+21 -1
View File
@@ -11,6 +11,10 @@
#define MULTITHREAD_ENABLE #define MULTITHREAD_ENABLE
#ifdef __PS3__
#define DISABLE_PSN
#endif
typedef unsigned char byte; typedef unsigned char byte;
const int XUSER_INDEX_ANY = 255; const int XUSER_INDEX_ANY = 255;
@@ -42,9 +46,15 @@ typedef SQRNetworkManager_Orbis::PresenceSyncInfo INVITE_INFO;
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include "..\..\Minecraft.Client\PS3\PS3_PlayerUID.h" #include "..\..\Minecraft.Client\PS3\PS3_PlayerUID.h"
#ifndef DISABLE_PSN
#include "..\..\Minecraft.Client\PS3\Network\SQRNetworkManager_PS3.h" #include "..\..\Minecraft.Client\PS3\Network\SQRNetworkManager_PS3.h"
typedef SQRNetworkManager::SessionID SessionID; typedef SQRNetworkManager::SessionID SessionID;
typedef SQRNetworkManager::PresenceSyncInfo INVITE_INFO; typedef SQRNetworkManager::PresenceSyncInfo INVITE_INFO;
#else
typedef ULONGLONG SessionID;
class INVITE_INFO;
#endif
#elif defined __PSVITA__ #elif defined __PSVITA__
#include <np.h> #include <np.h>
@@ -215,10 +225,17 @@ public:
int GetUserIndex(); int GetUserIndex();
void SetCustomDataValue(ULONG_PTR ulpCustomDataValue); void SetCustomDataValue(ULONG_PTR ulpCustomDataValue);
ULONG_PTR GetCustomDataValue(); ULONG_PTR GetCustomDataValue();
BYTE m_smallId;
bool m_isRemote;
bool m_isHostPlayer;
wchar_t m_gamertag[32];
private: private:
ULONG_PTR m_customData; 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_SECONDARY_TYPE = 0;
const int QNET_GETSENDQUEUESIZE_MESSAGES = 0; const int QNET_GETSENDQUEUESIZE_MESSAGES = 0;
const int QNET_GETSENDQUEUESIZE_BYTES = 0; const int QNET_GETSENDQUEUESIZE_BYTES = 0;
@@ -309,9 +326,12 @@ public:
bool IsHost(); bool IsHost();
HRESULT JoinGameFromInviteInfo(DWORD dwUserIndex, DWORD dwUserMask, const INVITE_INFO *pInviteInfo); HRESULT JoinGameFromInviteInfo(DWORD dwUserIndex, DWORD dwUserMask, const INVITE_INFO *pInviteInfo);
void HostGame(); void HostGame();
void ClientJoinGame();
void EndGame(); 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 #ifdef _DURANGO