forked from cafeberry/cafeberry
added 360 support and fixed vita again again
This commit is contained in:
1 parent
92891de261
commit
1005e64629
17 files changed
+591
-208
No files matched your search
@@ -1,4 +1,5 @@
|
||||
#include "stdafx.h"
|
||||
#include "..\LivePrivileges.h"
|
||||
#include <xuiresource.h>
|
||||
#include <xuiapp.h>
|
||||
#include <assert.h>
|
||||
@@ -76,7 +77,7 @@ HRESULT CScene_LoadGameSettings::OnInit( XUIMessageInit* pInitData, BOOL& bHandl
|
||||
XuiControlSetText(m_ButtonLoad,app.GetString(IDS_LOAD));
|
||||
XuiControlSetText(m_pTexturePacksList->m_hObj,app.GetString(IDS_DLC_MENU_TEXTUREPACKS));
|
||||
|
||||
m_bMultiplayerAllowed = ProfileManager.IsSignedInLive( m_iPad ) && ProfileManager.AllowedToPlayMultiplayer(m_iPad);
|
||||
m_bMultiplayerAllowed = Live_MultiplayerAllowed( m_iPad );
|
||||
// 4J-PB - read the settings for the online flag. We'll only save this setting if the user changed it.
|
||||
bool bGameSetting_Online=(app.GetGameSettings(m_iPad,eGameSetting_Online)!=0);
|
||||
m_MoreOptionsParams.bOnlineSettingChangedBySystem=false;
|
||||
@@ -741,7 +742,7 @@ HRESULT CScene_LoadGameSettings::OnTimer( XUIMessageTimer *pTimer, BOOL& bHandle
|
||||
{
|
||||
case GAME_CREATE_ONLINE_TIMER_ID:
|
||||
{
|
||||
bool bMultiplayerAllowed = ProfileManager.IsSignedInLive( m_iPad ) && ProfileManager.AllowedToPlayMultiplayer(m_iPad);
|
||||
bool bMultiplayerAllowed = Live_MultiplayerAllowed( m_iPad );
|
||||
|
||||
if(bMultiplayerAllowed != m_bMultiplayerAllowed)
|
||||
{
|
||||
@@ -859,7 +860,7 @@ int CScene_LoadGameSettings::LoadSaveDataReturned(void *pParam,bool bContinue)
|
||||
bool noUGC = false;
|
||||
BOOL pccAllowed = TRUE;
|
||||
BOOL pccFriendsAllowed = TRUE;
|
||||
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
|
||||
Live_AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
|
||||
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
|
||||
|
||||
if(isClientSide && noUGC )
|
||||
@@ -1015,7 +1016,7 @@ int CScene_LoadGameSettings::StartGame_SignInReturned(void *pParam,bool bContinu
|
||||
{
|
||||
if(ProfileManager.IsSignedIn(index) )
|
||||
{
|
||||
if( !ProfileManager.AllowedToPlayMultiplayer(index) ) noPrivileges = true;
|
||||
if( !Live_AllowedToPlayMultiplayer(index) ) noPrivileges = true;
|
||||
dwLocalUsersMask |= CGameNetworkManager::GetLocalPlayerMask(index);
|
||||
}
|
||||
}
|
||||
@@ -1024,7 +1025,7 @@ int CScene_LoadGameSettings::StartGame_SignInReturned(void *pParam,bool bContinu
|
||||
bool noUGC = false;
|
||||
BOOL pccAllowed = TRUE;
|
||||
BOOL pccFriendsAllowed = TRUE;
|
||||
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(), false, &pccAllowed,&pccFriendsAllowed);
|
||||
Live_AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(), false, &pccAllowed,&pccFriendsAllowed);
|
||||
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
|
||||
|
||||
if(isClientSide && (noPrivileges || noUGC) )
|
||||
@@ -1407,7 +1408,7 @@ void CScene_LoadGameSettings::LoadLevelGen(LevelGenerationOptions *levelGen)
|
||||
bool noUGC = false;
|
||||
BOOL pccAllowed = TRUE;
|
||||
BOOL pccFriendsAllowed = TRUE;
|
||||
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
|
||||
Live_AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
|
||||
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
|
||||
|
||||
if(isClientSide && noUGC )
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "stdafx.h"
|
||||
#include "..\LivePrivileges.h"
|
||||
#include "..\..\..\Minecraft.World\Random.h"
|
||||
#include "..\..\..\Minecraft.World\StringHelpers.h"
|
||||
#include "XUI_MultiGameCreate.h"
|
||||
@@ -67,7 +68,7 @@ HRESULT CScene_MultiGameCreate::OnInit( XUIMessageInit* pInitData, BOOL& bHandle
|
||||
m_iPad=params->iPad;
|
||||
delete params;
|
||||
|
||||
m_bMultiplayerAllowed = ProfileManager.IsSignedInLive( m_iPad ) && ProfileManager.AllowedToPlayMultiplayer(m_iPad);
|
||||
m_bMultiplayerAllowed = Live_MultiplayerAllowed( m_iPad );
|
||||
// 4J-PB - read the settings for the online flag. We'll only save this setting if the user changed it.
|
||||
bool bGameSetting_Online=(app.GetGameSettings(m_iPad,eGameSetting_Online)!=0);
|
||||
m_MoreOptionsParams.bOnlineSettingChangedBySystem=false;
|
||||
@@ -476,7 +477,7 @@ HRESULT CScene_MultiGameCreate::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPr
|
||||
bool noUGC = false;
|
||||
BOOL pccAllowed = TRUE;
|
||||
BOOL pccFriendsAllowed = TRUE;
|
||||
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
|
||||
Live_AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
|
||||
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
|
||||
|
||||
if(isClientSide && noUGC )
|
||||
@@ -581,7 +582,7 @@ int CScene_MultiGameCreate::WarningTrialTexturePackReturned(void *pParam,int iPa
|
||||
bool noUGC = false;
|
||||
BOOL pccAllowed = TRUE;
|
||||
BOOL pccFriendsAllowed = TRUE;
|
||||
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
|
||||
Live_AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
|
||||
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
|
||||
|
||||
if(isClientSide && noUGC )
|
||||
@@ -663,7 +664,7 @@ HRESULT CScene_MultiGameCreate::OnTimer( XUIMessageTimer *pTimer, BOOL& bHandled
|
||||
|
||||
case GAME_CREATE_ONLINE_TIMER_ID:
|
||||
{
|
||||
bool bMultiplayerAllowed = ProfileManager.IsSignedInLive( m_iPad ) && ProfileManager.AllowedToPlayMultiplayer(m_iPad);
|
||||
bool bMultiplayerAllowed = Live_MultiplayerAllowed( m_iPad );
|
||||
|
||||
if(bMultiplayerAllowed != m_bMultiplayerAllowed)
|
||||
{
|
||||
@@ -778,7 +779,7 @@ int CScene_MultiGameCreate::ConfirmCreateReturned(void *pParam,int iPad,C4JStora
|
||||
bool noUGC = false;
|
||||
BOOL pccAllowed = TRUE;
|
||||
BOOL pccFriendsAllowed = TRUE;
|
||||
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
|
||||
Live_AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
|
||||
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
|
||||
|
||||
if(isClientSide && noUGC )
|
||||
@@ -824,7 +825,7 @@ int CScene_MultiGameCreate::StartGame_SignInReturned(void *pParam,bool bContinue
|
||||
{
|
||||
if(ProfileManager.IsSignedIn(index) )
|
||||
{
|
||||
if( !ProfileManager.AllowedToPlayMultiplayer(index) ) noPrivileges = true;
|
||||
if( !Live_AllowedToPlayMultiplayer(index) ) noPrivileges = true;
|
||||
dwLocalUsersMask |= CGameNetworkManager::GetLocalPlayerMask(index);
|
||||
}
|
||||
}
|
||||
@@ -833,7 +834,7 @@ int CScene_MultiGameCreate::StartGame_SignInReturned(void *pParam,bool bContinue
|
||||
bool noUGC = false;
|
||||
BOOL pccAllowed = TRUE;
|
||||
BOOL pccFriendsAllowed = TRUE;
|
||||
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
|
||||
Live_AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
|
||||
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
|
||||
|
||||
if(isClientSide && (noPrivileges || noUGC) )
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "..\..\..\Minecraft.World\StringHelpers.h"
|
||||
#include "XUI_MultiGameInfo.h"
|
||||
#include "XUI_MultiGameJoinLoad.h"
|
||||
#include "..\LivePrivileges.h"
|
||||
#include "..\..\..\Minecraft.World\LevelSettings.h"
|
||||
#include "..\..\..\Minecraft.World\Difficulty.h"
|
||||
|
||||
@@ -37,7 +38,19 @@ HRESULT CScene_MultiGameInfo::OnInit( XUIMessageInit* pInitData, BOOL& bHandled
|
||||
// 4J-PB - don't delete this - it's part of the joinload structure
|
||||
//delete initData;
|
||||
|
||||
#ifndef _DISABLE_XBLIVE
|
||||
#ifdef _DISABLE_XBLIVE
|
||||
// No gamercards on a LAN session - the names come straight out of the broadcast
|
||||
for(unsigned int i = 0; i < MINECRAFT_NET_MAX_PLAYERS; ++i)
|
||||
{
|
||||
if( m_selectedSession->data.players[i] == 0 || m_selectedSession->data.szPlayers[i][0] == 0 )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
playersList.InsertItems(i,1);
|
||||
playersList.SetText(i, convStringToWstring( m_selectedSession->data.szPlayers[i] ).c_str() );
|
||||
}
|
||||
#else
|
||||
for(unsigned int i = 0; i < MINECRAFT_NET_MAX_PLAYERS; ++i)
|
||||
{
|
||||
if( m_selectedSession->data.players[i] != NULL )
|
||||
@@ -223,7 +236,11 @@ HRESULT CScene_MultiGameInfo::OnNotifySetFocus(HXUIOBJ hObjSource, XUINotifyFocu
|
||||
{
|
||||
if( playersList.TreeHasFocus() && playersList.GetItemCount() > 0 )
|
||||
{
|
||||
#ifdef _DISABLE_XBLIVE
|
||||
ui.SetTooltips( DEFAULT_XUI_MENU_USER, -1, IDS_TOOLTIPS_BACK );
|
||||
#else
|
||||
ui.SetTooltips( DEFAULT_XUI_MENU_USER, -1, IDS_TOOLTIPS_BACK, -1, IDS_TOOLTIPS_VIEW_GAMERCARD );
|
||||
#endif
|
||||
bHandled = TRUE;
|
||||
}
|
||||
return S_OK;
|
||||
@@ -274,7 +291,7 @@ void CScene_MultiGameInfo::JoinGame(CScene_MultiGameInfo* pClass)
|
||||
if(ProfileManager.IsSignedIn(index) )
|
||||
{
|
||||
++dwSignedInUsers;
|
||||
if( !ProfileManager.AllowedToPlayMultiplayer(index) ) noPrivileges = true;
|
||||
if( !Live_AllowedToPlayMultiplayer(index) ) noPrivileges = true;
|
||||
dwLocalUsersMask |= CGameNetworkManager::GetLocalPlayerMask(index);
|
||||
}
|
||||
}
|
||||
@@ -284,7 +301,7 @@ void CScene_MultiGameInfo::JoinGame(CScene_MultiGameInfo* pClass)
|
||||
if(ProfileManager.IsSignedIn(ProfileManager.GetPrimaryPad()) )
|
||||
{
|
||||
++dwSignedInUsers;
|
||||
if( !ProfileManager.AllowedToPlayMultiplayer(ProfileManager.GetPrimaryPad()) ) noPrivileges = true;
|
||||
if( !Live_AllowedToPlayMultiplayer(ProfileManager.GetPrimaryPad()) ) noPrivileges = true;
|
||||
dwLocalUsersMask |= CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad());
|
||||
}
|
||||
}
|
||||
@@ -293,7 +310,7 @@ void CScene_MultiGameInfo::JoinGame(CScene_MultiGameInfo* pClass)
|
||||
bool noUGC = false;
|
||||
BOOL pccAllowed = TRUE;
|
||||
BOOL pccFriendsAllowed = TRUE;
|
||||
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
|
||||
Live_AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
|
||||
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
|
||||
|
||||
if(noUGC)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "XUI_LoadSettings.h"
|
||||
#include "XUI_MultiGameInfo.h"
|
||||
#include "XUI_MultiGameJoinLoad.h"
|
||||
#include "..\LivePrivileges.h"
|
||||
#include "XUI_MultiGameCreate.h"
|
||||
#include "..\..\MinecraftServer.h"
|
||||
#include "..\..\Options.h"
|
||||
@@ -73,8 +74,8 @@ HRESULT CScene_MultiGameJoinLoad::OnInit( XUIMessageInit* pInitData, BOOL& bHand
|
||||
// }
|
||||
|
||||
m_initData= new JoinMenuInitData();
|
||||
m_bMultiplayerAllowed = ProfileManager.IsSignedInLive( m_iPad ) && ProfileManager.AllowedToPlayMultiplayer(m_iPad);
|
||||
|
||||
m_bMultiplayerAllowed = Live_MultiplayerAllowed( m_iPad );
|
||||
|
||||
XPARTY_USER_LIST partyList;
|
||||
|
||||
if((XPartyGetUserList( &partyList ) != XPARTY_E_NOT_IN_PARTY ) && (partyList.dwUserCount>1))
|
||||
@@ -768,8 +769,8 @@ HRESULT CScene_MultiGameJoinLoad::OnNavReturn(HXUIOBJ hSceneFrom,BOOL& rfHandled
|
||||
// start the texture pack timer again
|
||||
XuiSetTimer(m_hObj,CHECKFORAVAILABLETEXTUREPACKS_TIMER_ID,CHECKFORAVAILABLETEXTUREPACKS_TIMER_TIME);
|
||||
|
||||
m_bMultiplayerAllowed = ProfileManager.IsSignedInLive( m_iPad ) && ProfileManager.AllowedToPlayMultiplayer(m_iPad);
|
||||
|
||||
m_bMultiplayerAllowed = Live_MultiplayerAllowed( m_iPad );
|
||||
|
||||
// re-enable button presses
|
||||
m_bIgnoreInput=false;
|
||||
|
||||
@@ -1643,7 +1644,7 @@ HRESULT CScene_MultiGameJoinLoad::OnTimer( XUIMessageTimer *pTimer, BOOL& bHandl
|
||||
m_bInParty=false;
|
||||
}
|
||||
|
||||
bool bMultiplayerAllowed = ProfileManager.IsSignedInLive( m_iPad ) && ProfileManager.AllowedToPlayMultiplayer(m_iPad);
|
||||
bool bMultiplayerAllowed = Live_MultiplayerAllowed( m_iPad );
|
||||
if(bMultiplayerAllowed != m_bMultiplayerAllowed)
|
||||
{
|
||||
if( bMultiplayerAllowed )
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "stdafx.h"
|
||||
#include "..\LivePrivileges.h"
|
||||
#include "XUI_MultiGameCreate.h"
|
||||
#include "XUI_MultiGameLaunchMoreOptions.h"
|
||||
#include "..\..\TexturePackRepository.h"
|
||||
@@ -99,7 +100,7 @@ HRESULT CScene_MultiGameLaunchMoreOptions::OnInit( XUIMessageInit* pInitData, BO
|
||||
m_CheckboxInviteOnly.SetCheck(m_params->bInviteOnly);
|
||||
m_CheckboxAllowFoF.SetCheck(m_params->bAllowFriendsOfFriends);
|
||||
|
||||
m_bMultiplayerAllowed = ProfileManager.IsSignedInLive( m_params->iPad ) && ProfileManager.AllowedToPlayMultiplayer(m_params->iPad);
|
||||
m_bMultiplayerAllowed = Live_MultiplayerAllowed( m_params->iPad );
|
||||
if(m_params->bOnlineSettingChangedBySystem)
|
||||
{
|
||||
m_CheckboxOnline.SetCheck(FALSE);
|
||||
@@ -270,7 +271,7 @@ HRESULT CScene_MultiGameLaunchMoreOptions::OnTimer( XUIMessageTimer *pTimer, BOO
|
||||
// 4J-PB - TODO - Don't think we can do this - if a 2nd player signs in here with an offline profile, the signed in LIVE player gets re-logged in, and bMultiplayerAllowed is false briefly
|
||||
if( pTimer->nId == GAME_CREATE_ONLINE_TIMER_ID)
|
||||
{
|
||||
bool bMultiplayerAllowed = ProfileManager.IsSignedInLive( m_params->iPad ) && ProfileManager.AllowedToPlayMultiplayer(m_params->iPad);
|
||||
bool bMultiplayerAllowed = Live_MultiplayerAllowed( m_params->iPad );
|
||||
|
||||
if(bMultiplayerAllowed != m_bMultiplayerAllowed)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user