mirror of
https://github.com/GabsPuNs/Project-Zenith-Main.git
synced 2026-05-29 22:24:34 +00:00
Some cleanup
Just a bit. i dont want to clean all the ifdef for consoles right now
This commit is contained in:
@@ -2411,13 +2411,6 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
// Guest don't have an offline XUID as they cannot play offline, so use their online one
|
||||
ProfileManager.GetXUID(m_userIndex,&onlineXUID,true);
|
||||
}
|
||||
#ifdef __PSVITA__
|
||||
if(CGameNetworkManager::usingAdhocMode() && onlineXUID.getOnlineID()[0] == 0)
|
||||
{
|
||||
// player doesn't have an online UID, set it from the player name
|
||||
onlineXUID.setForAdhoc();
|
||||
}
|
||||
#endif
|
||||
|
||||
// On PS3, all non-signed in players (even guests) can get a useful offlineXUID
|
||||
#if !(defined __PS3__ || defined _DURANGO )
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../../Minecraft.World/net.minecraft.world.entity.item.h"
|
||||
#include "../../Minecraft.World/net.minecraft.world.entity.item.h"
|
||||
#include "../../Minecraft.World/net.minecraft.world.entity.player.h"
|
||||
#include "../../Minecraft.World/net.minecraft.world.level.tile.entity.h"
|
||||
#include "../../Minecraft.World/net.minecraft.world.phys.h"
|
||||
@@ -65,12 +65,9 @@ const float CMinecraftApp::fSafeZoneY = 36.0f; // 5% of 720
|
||||
|
||||
int CMinecraftApp::s_iHTMLFontSizesA[eHTMLSize_COUNT] =
|
||||
{
|
||||
#ifdef _XBOX
|
||||
14,12,14,24
|
||||
#else
|
||||
//20,15,20,24
|
||||
//20,15,20,24 OLD?
|
||||
//14,12,14,24 XBOX
|
||||
20,13,20,26
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -193,11 +190,6 @@ CMinecraftApp::CMinecraftApp()
|
||||
|
||||
m_bResetNether=false;
|
||||
|
||||
#ifdef _XBOX
|
||||
// m_bTransferSavesToXboxOne=false;
|
||||
// m_uiTransferSlotC=5;
|
||||
#endif
|
||||
|
||||
#if (defined _CONTENT_PACAKGE) || (defined _XBOX)
|
||||
m_bUseDPadForDebug = false;
|
||||
#else
|
||||
@@ -217,10 +209,6 @@ CMinecraftApp::CMinecraftApp()
|
||||
}
|
||||
|
||||
LocaleAndLanguageInit();
|
||||
|
||||
#ifdef _XBOX_ONE
|
||||
m_hasReachedMainMenu = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -371,7 +359,6 @@ void CMinecraftApp::HandleButtonPresses()
|
||||
|
||||
void CMinecraftApp::HandleButtonPresses(int iPad)
|
||||
{
|
||||
|
||||
// // test an update of the profile data
|
||||
// void *pData=ProfileManager.GetGameDefinedProfileData(iPad);
|
||||
//
|
||||
@@ -3120,21 +3107,9 @@ void CMinecraftApp::HandleXuiActions(void)
|
||||
if((iPlayer!=i) && pMinecraft->localplayers[iPlayer])
|
||||
{
|
||||
if(g_NetworkManager.IsLocalGame())
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYEROFFLINE,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYER,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3145,21 +3120,9 @@ void CMinecraftApp::HandleXuiActions(void)
|
||||
if((iPlayer!=i) && pMinecraft->localplayers[iPlayer])
|
||||
{
|
||||
if(g_NetworkManager.IsLocalGame())
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE);
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1P);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYER_1P,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1P);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3218,21 +3181,9 @@ void CMinecraftApp::HandleXuiActions(void)
|
||||
if((iPlayer!=i) && pMinecraft->localplayers[iPlayer])
|
||||
{
|
||||
if(g_NetworkManager.IsLocalGame())
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYEROFFLINE,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYER,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3243,21 +3194,9 @@ void CMinecraftApp::HandleXuiActions(void)
|
||||
if((iPlayer!=i) && pMinecraft->localplayers[iPlayer])
|
||||
{
|
||||
if(g_NetworkManager.IsLocalGame())
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE);
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1P);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYER_1P,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1P);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3375,20 +3314,12 @@ void CMinecraftApp::HandleXuiActions(void)
|
||||
if(g_NetworkManager.IsLocalGame())
|
||||
{
|
||||
app.SetRichPresenceContext(j,CONTEXT_GAME_STATE_BLANK);
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(j,CONTEXT_PRESENCE_MULTIPLAYEROFFLINE,false);
|
||||
#endif
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
}
|
||||
else
|
||||
{
|
||||
app.SetRichPresenceContext(j,CONTEXT_GAME_STATE_BLANK);
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(j,CONTEXT_PRESENCE_MULTIPLAYER,false);
|
||||
#endif
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
}
|
||||
TelemetryManager->RecordLevelExit(j, eSen_LevelExitStatus_Exited);
|
||||
}
|
||||
@@ -3398,21 +3329,10 @@ void CMinecraftApp::HandleXuiActions(void)
|
||||
{
|
||||
app.SetRichPresenceContext(i,CONTEXT_GAME_STATE_BLANK);
|
||||
if(g_NetworkManager.IsLocalGame())
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(i,CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE);
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1P);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(i,CONTEXT_PRESENCE_MULTIPLAYER_1P,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1P);
|
||||
|
||||
TelemetryManager->RecordLevelExit(i, eSen_LevelExitStatus_Exited);
|
||||
}
|
||||
break;
|
||||
@@ -4924,14 +4844,7 @@ void CMinecraftApp::SignInChangeCallback(LPVOID pParam,bool bPrimaryPlayerChange
|
||||
// Some menus require the player to be signed in to live, so if this callback happens and the primary player is
|
||||
// no longer signed in then nav back
|
||||
else if ( pApp->GetLiveLinkRequired() && !ProfileManager.IsSignedInLive( ProfileManager.GetLockedProfile() ) )
|
||||
{
|
||||
#ifdef __PSVITA__
|
||||
if(!CGameNetworkManager::usingAdhocMode()) // if we're in adhoc mode, we can ignore this
|
||||
#endif
|
||||
{
|
||||
pApp->SetAction(iPrimaryPlayer,eAppAction_EthernetDisconnected);
|
||||
}
|
||||
}
|
||||
|
||||
#if ( defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__ )
|
||||
// 4J-JEV: Need to kick of loading of profile data for sub-sign in players.
|
||||
@@ -9710,31 +9623,6 @@ wstring CMinecraftApp::getFilePath(DWORD packId, wstring filename, bool bAddData
|
||||
return getRootPath(packId, false, true, mountPoint) + filename;
|
||||
}
|
||||
|
||||
#ifdef _XBOX
|
||||
// Texture packs that have their data in the TU data
|
||||
enum ETitleUpdateTexturePacks
|
||||
{
|
||||
eTUTP_MassEffect = 0x400,
|
||||
eTUTP_Skyrim = 0x401,
|
||||
eTUTP_Halo = 0x402,
|
||||
eTUTP_Festive = 0x405,
|
||||
|
||||
eTUTP_Plastic = 0x801,
|
||||
eTUTP_Candy = 0x802,
|
||||
eTUTP_Fantasy = 0x803,
|
||||
eTUTP_Halloween = 0x804,
|
||||
eTUTP_Natural = 0x805,
|
||||
eTUTP_City = 0x01000806, // 4J Stu - The released City pack had a sub-pack ID
|
||||
eTUTP_Cartoon = 0x807,
|
||||
eTUTP_Steampunk = 0x01000808, // 4J Stu - The released Steampunk pack had a sub-pack ID
|
||||
};
|
||||
|
||||
#ifdef _TU_BUILD
|
||||
wstring titleUpdateTexturePackRoot = L"UPDATE:\\res\\DLC\\";
|
||||
#else
|
||||
wstring titleUpdateTexturePackRoot = L"GAME:\\res\\TitleUpdate\\DLC\\";
|
||||
#endif
|
||||
#else
|
||||
enum ETitleUpdateTexturePacks
|
||||
{
|
||||
//eTUTP_MassEffect = 0x400,
|
||||
@@ -9752,72 +9640,12 @@ enum ETitleUpdateTexturePacks
|
||||
//eTUTP_Steampunk = 0x01000808, // 4J Stu - The released Steampunk pack had a sub-pack ID
|
||||
};
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
wstring titleUpdateTexturePackRoot = L"Assets/DLC/";
|
||||
#elif defined(__ORBIS__)
|
||||
wstring titleUpdateTexturePackRoot = L"/app0/orbis/CU/DLC/";
|
||||
#elif defined(__PSVITA__)
|
||||
wstring titleUpdateTexturePackRoot = L"PSVita/CU/DLC/";
|
||||
#elif defined(__PS3__)
|
||||
wstring titleUpdateTexturePackRoot = L"PS3/CU/DLC/";
|
||||
#else
|
||||
wstring titleUpdateTexturePackRoot = L"CU\\DLC\\";
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
wstring CMinecraftApp::getRootPath(DWORD packId, bool allowOverride, bool bAddDataFolder, wstring mountPoint)
|
||||
{
|
||||
wstring path = mountPoint;
|
||||
#ifdef _XBOX
|
||||
if(allowOverride)
|
||||
{
|
||||
switch(packId)
|
||||
{
|
||||
case eTUTP_MassEffect:
|
||||
path = titleUpdateTexturePackRoot + L"MassEffect";
|
||||
break;
|
||||
case eTUTP_Skyrim:
|
||||
path = titleUpdateTexturePackRoot + L"Skyrim";
|
||||
break;
|
||||
case eTUTP_Halo:
|
||||
path = titleUpdateTexturePackRoot + L"Halo";
|
||||
break;
|
||||
case eTUTP_Festive:
|
||||
path = titleUpdateTexturePackRoot + L"Festive";
|
||||
break;
|
||||
case eTUTP_Plastic:
|
||||
path = titleUpdateTexturePackRoot + L"Plastic";
|
||||
break;
|
||||
case eTUTP_Candy:
|
||||
path = titleUpdateTexturePackRoot + L"Candy";
|
||||
break;
|
||||
case eTUTP_Fantasy:
|
||||
path = titleUpdateTexturePackRoot + L"Fantasy";
|
||||
break;
|
||||
case eTUTP_Halloween:
|
||||
path = titleUpdateTexturePackRoot + L"Halloween";
|
||||
break;
|
||||
case eTUTP_Natural:
|
||||
path = titleUpdateTexturePackRoot + L"Natural";
|
||||
break;
|
||||
case eTUTP_City:
|
||||
path = titleUpdateTexturePackRoot + L"City";
|
||||
break;
|
||||
case eTUTP_Cartoon:
|
||||
path = titleUpdateTexturePackRoot + L"Cartoon";
|
||||
break;
|
||||
case eTUTP_Steampunk:
|
||||
path = titleUpdateTexturePackRoot + L"Steampunk";
|
||||
break;
|
||||
};
|
||||
File folder(path);
|
||||
if(!folder.exists())
|
||||
{
|
||||
path = mountPoint;
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
if(allowOverride)
|
||||
{
|
||||
switch(packId)
|
||||
@@ -9832,27 +9660,9 @@ wstring CMinecraftApp::getRootPath(DWORD packId, bool allowOverride, bool bAddDa
|
||||
path = mountPoint;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if(bAddDataFolder)
|
||||
{
|
||||
return path + L"\\Data\\";
|
||||
}
|
||||
else
|
||||
{
|
||||
return path + L"\\";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#ifdef _XBOX_ONE
|
||||
void CMinecraftApp::SetReachedMainMenu()
|
||||
{
|
||||
m_hasReachedMainMenu = true;
|
||||
}
|
||||
|
||||
bool CMinecraftApp::HasReachedMainMenu()
|
||||
{
|
||||
return m_hasReachedMainMenu;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -7,10 +7,6 @@ using namespace std;
|
||||
#include <xuiapp.h>
|
||||
#include ".\Tutorial\TutorialEnum.h"
|
||||
|
||||
#ifdef _XBOX
|
||||
#include ".\XUI\XUI_Helper.h"
|
||||
#include ".\XUI\XUI_HelpCredits.h"
|
||||
#endif
|
||||
#include "UI\UIStructs.h"
|
||||
|
||||
#include "..\..\Minecraft.World\DisconnectPacket.h"
|
||||
@@ -910,29 +906,6 @@ private:
|
||||
unordered_map<wstring, int>m_eMCLangA;
|
||||
unordered_map<wstring, int>m_xcLangA;
|
||||
wstring getRootPath(DWORD packId, bool allowOverride, bool bAddDataFolder, wstring mountPoint);
|
||||
public:
|
||||
|
||||
#ifdef _XBOX
|
||||
// bool m_bTransferSavesToXboxOne;
|
||||
// unsigned int m_uiTransferSlotC;
|
||||
|
||||
#elif defined (__PS3__)
|
||||
|
||||
#elif defined _DURANGO
|
||||
|
||||
#elif defined _WINDOWS64
|
||||
//CMinecraftAudio audio;
|
||||
#else // PS4
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _XBOX_ONE
|
||||
public:
|
||||
void SetReachedMainMenu();
|
||||
bool HasReachedMainMenu();
|
||||
private:
|
||||
bool m_hasReachedMainMenu;
|
||||
#endif
|
||||
};
|
||||
|
||||
//singleton
|
||||
|
||||
@@ -644,55 +644,14 @@ void GameRuleManager::processSchematicsLighting(LevelChunk *levelChunk)
|
||||
|
||||
void GameRuleManager::loadDefaultGameRules()
|
||||
{
|
||||
#ifdef _XBOX
|
||||
#ifdef _TU_BUILD
|
||||
wstring fileRoot = L"UPDATE:\\res\\GameRules\\Tutorial.pck";
|
||||
#else
|
||||
wstring fileRoot = L"GAME:\\res\\TitleUpdate\\GameRules\\Tutorial.pck";
|
||||
#endif
|
||||
File packedTutorialFile(fileRoot);
|
||||
if(loadGameRulesPack(&packedTutorialFile))
|
||||
{
|
||||
m_levelGenerators.getLevelGenerators()->at(0)->setWorldName(app.GetString(IDS_PLAY_TUTORIAL));
|
||||
//m_levelGenerators.getLevelGenerators()->at(0)->setDefaultSaveName(L"Tutorial");
|
||||
m_levelGenerators.getLevelGenerators()->at(0)->setDefaultSaveName(app.GetString(IDS_TUTORIALSAVENAME));
|
||||
}
|
||||
|
||||
#else // _XBOX
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
File packedTutorialFile(L"Assets/Tutorial/Tutorial.pck");
|
||||
#elif defined(__ORBIS__)
|
||||
File packedTutorialFile(L"/app0/orbis/Tutorial/Tutorial.pck");
|
||||
#elif defined(__PSVITA__)
|
||||
File packedTutorialFile(L"PSVita/Tutorial/Tutorial.pck");
|
||||
#elif defined(__PS3__)
|
||||
File packedTutorialFile(L"PS3/Tutorial/Tutorial.pck");
|
||||
#else
|
||||
File packedTutorialFile(L"Tutorial\\Tutorial.pck");
|
||||
#endif
|
||||
|
||||
if(loadGameRulesPack(&packedTutorialFile))
|
||||
{
|
||||
m_levelGenerators.getLevelGenerators()->at(0)->setWorldName(app.GetString(IDS_PLAY_TUTORIAL));
|
||||
//m_levelGenerators.getLevelGenerators()->at(0)->setDefaultSaveName(L"Tutorial");
|
||||
m_levelGenerators.getLevelGenerators()->at(0)->setDefaultSaveName(app.GetString(IDS_TUTORIALSAVENAME));
|
||||
}
|
||||
#if 0
|
||||
wstring fpTutorial = L"Tutorial.pck";
|
||||
if(app.getArchiveFileSize(fpTutorial) >= 0)
|
||||
{
|
||||
DLCPack *pack = new DLCPack(L"",0xffffffff);
|
||||
DWORD dwFilesProcessed = 0;
|
||||
if ( app.m_dlcManager.readDLCDataFile(dwFilesProcessed,fpTutorial,pack,true) )
|
||||
{
|
||||
app.m_dlcManager.addPack(pack);
|
||||
//m_levelGenerators.getLevelGenerators()->at(0)->setWorldName(app.GetString(IDS_PLAY_TUTORIAL));
|
||||
//m_levelGenerators.getLevelGenerators()->at(0)->setDefaultSaveName(app.GetString(IDS_TUTORIALSAVENAME));
|
||||
}
|
||||
else delete pack;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
bool GameRuleManager::loadGameRulesPack(File *path)
|
||||
|
||||
@@ -209,25 +209,8 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame
|
||||
// Load the tutorial save data here
|
||||
if(param->levelGen->requiresBaseSave() && !param->levelGen->getBaseSavePath().empty() )
|
||||
{
|
||||
#ifdef _XBOX
|
||||
#ifdef _TU_BUILD
|
||||
wstring fileRoot = L"UPDATE:\\res\\GameRules\\" + param->levelGen->getBaseSavePath();
|
||||
#else
|
||||
wstring fileRoot = L"GAME:\\res\\TitleUpdate\\GameRules\\" + param->levelGen->getBaseSavePath();
|
||||
#endif
|
||||
#else
|
||||
#ifdef _WINDOWS64
|
||||
wstring fileRoot = L"Assets/Tutorial/" + param->levelGen->getBaseSavePath();
|
||||
#elif defined(__ORBIS__)
|
||||
wstring fileRoot = L"/app0/orbis/Tutorial/" + param->levelGen->getBaseSavePath();
|
||||
#elif defined(__PSVITA__)
|
||||
wstring fileRoot = L"PSVita/Tutorial/" + param->levelGen->getBaseSavePath();
|
||||
#elif defined(__PS3__)
|
||||
wstring fileRoot = L"PS3/Tutorial/" + param->levelGen->getBaseSavePath();
|
||||
#else
|
||||
wstring fileRoot = L"Tutorial\\" + param->levelGen->getBaseSavePath();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
File grf(fileRoot);
|
||||
if (grf.exists())
|
||||
{
|
||||
@@ -441,40 +424,16 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame
|
||||
if (GetPlayerCount() > 1) // Are we offline or online, and how many players are there
|
||||
{
|
||||
if (IsLocalGame())
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(primaryPad,CONTEXT_PRESENCE_MULTIPLAYEROFFLINE,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(primaryPad,CONTEXT_PRESENCE_MULTIPLAYER,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(IsLocalGame())
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(primaryPad,CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE);
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1P);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(primaryPad,CONTEXT_PRESENCE_MULTIPLAYER_1P,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1P);
|
||||
}
|
||||
|
||||
|
||||
@@ -549,21 +508,9 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame
|
||||
{
|
||||
app.SetRichPresenceContext(idx,CONTEXT_GAME_STATE_BLANK);
|
||||
if (IsLocalGame())
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(idx,CONTEXT_PRESENCE_MULTIPLAYEROFFLINE,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(idx,CONTEXT_PRESENCE_MULTIPLAYER,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1650,40 +1597,16 @@ void CGameNetworkManager::PlayerJoining( INetworkPlayer *pNetworkPlayer )
|
||||
if (multiplayer)
|
||||
{
|
||||
if (localgame)
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPad, CONTEXT_PRESENCE_MULTIPLAYEROFFLINE, false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPad, CONTEXT_PRESENCE_MULTIPLAYER, false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (localgame)
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPad, CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE, false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE);
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1P);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPad, CONTEXT_PRESENCE_MULTIPLAYER_1P, false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1P);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1713,11 +1636,7 @@ void CGameNetworkManager::PlayerLeaving( INetworkPlayer *pNetworkPlayer )
|
||||
{
|
||||
if( pNetworkPlayer->IsLocal() )
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_IDLE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(pNetworkPlayer->GetUserIndex(),CONTEXT_PRESENCE_IDLE,false);
|
||||
#endif
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_IDLE);
|
||||
|
||||
TelemetryManager->RecordPlayerSessionExit(pNetworkPlayer->GetUserIndex(), app.GetDisconnectReason());
|
||||
}
|
||||
@@ -2179,22 +2098,4 @@ void CGameNetworkManager::FakeLocalPlayerJoined()
|
||||
{
|
||||
s_pPlatformNetworkManager->FakeLocalPlayerJoined();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __PSVITA__
|
||||
bool CGameNetworkManager::usingAdhocMode()
|
||||
{
|
||||
return ((CPlatformNetworkManagerSony*)s_pPlatformNetworkManager)->usingAdhocMode();
|
||||
}
|
||||
|
||||
void CGameNetworkManager::setAdhocMode(bool bAdhoc)
|
||||
{
|
||||
((CPlatformNetworkManagerSony*)s_pPlatformNetworkManager)->setAdhocMode(bAdhoc);
|
||||
}
|
||||
|
||||
void CGameNetworkManager::startAdhocMatching()
|
||||
{
|
||||
((CPlatformNetworkManagerSony*)s_pPlatformNetworkManager)->startAdhocMatching();
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -150,11 +150,6 @@ public:
|
||||
void ServerStoppedDestroy(); // Destroy signal
|
||||
bool ServerStoppedValid(); // Is non-nullptr
|
||||
|
||||
#ifdef __PSVITA__
|
||||
static bool usingAdhocMode();
|
||||
static void setAdhocMode(bool bAdhoc);
|
||||
static void startAdhocMatching();
|
||||
#endif
|
||||
// Debug output
|
||||
|
||||
wstring GatherStats();
|
||||
|
||||
@@ -296,56 +296,8 @@ void UIScene_CreateWorldMenu::tick()
|
||||
|
||||
m_bShowTexturePackDescription = false;
|
||||
}
|
||||
|
||||
#ifdef __ORBIS__
|
||||
// check the status of the PSPlus common dialog
|
||||
switch (sceNpCommerceDialogUpdateStatus())
|
||||
{
|
||||
case SCE_COMMON_DIALOG_STATUS_FINISHED:
|
||||
{
|
||||
SceNpCommerceDialogResult Result;
|
||||
sceNpCommerceDialogGetResult(&Result);
|
||||
sceNpCommerceDialogTerminate();
|
||||
|
||||
if(Result.authorized)
|
||||
{
|
||||
ProfileManager.PsPlusUpdate(ProfileManager.GetPrimaryPad(), &Result);
|
||||
// they just became a PSPlus member
|
||||
checkStateAndStartGame();
|
||||
}
|
||||
else
|
||||
{
|
||||
// continue offline?
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_PRO_NOTONLINE_DECLINE;
|
||||
|
||||
// Give the player a warning about the texture pack missing
|
||||
ui.RequestAlertMessage(IDS_PLAY_OFFLINE,IDS_NO_PLAYSTATIONPLUS, uiIDA, 1, ProfileManager.GetPrimaryPad(),&UIScene_CreateWorldMenu::ContinueOffline,dynamic_cast<UIScene_CreateWorldMenu*>(this));
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __ORBIS__
|
||||
int UIScene_CreateWorldMenu::ContinueOffline(void *pParam,int iPad,C4JStorage::EMessageResult result)
|
||||
{
|
||||
UIScene_CreateWorldMenu* pClass = (UIScene_CreateWorldMenu*)pParam;
|
||||
|
||||
// results switched for this dialog
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
{
|
||||
pClass->m_MoreOptionsParams.bOnlineGame=false;
|
||||
pClass->checkStateAndStartGame();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
void UIScene_CreateWorldMenu::getDirectEditInputs(vector<UIControl_TextInput*> &inputs)
|
||||
{
|
||||
@@ -725,54 +677,11 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
|
||||
// If this is an online game but not all players are signed in to Live, stop!
|
||||
if (isOnlineGame && !isSignedInLive)
|
||||
{
|
||||
#ifdef __ORBIS__
|
||||
assert(iPadNotSignedInLive != -1);
|
||||
|
||||
// Check if PSN is unavailable because of age restriction
|
||||
int npAvailability = ProfileManager.getNPAvailability(iPadNotSignedInLive);
|
||||
if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION)
|
||||
{
|
||||
m_bIgnoreInput = false;
|
||||
// 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive if the npAvailability isn't SCE_OK
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_OK;
|
||||
ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPadNotSignedInLive);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bIgnoreInput = true;
|
||||
UINT uiIDA[2];
|
||||
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
|
||||
uiIDA[1] = IDS_CANCEL;
|
||||
ui.RequestAlertMessage( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, iPadNotSignedInLive, &UIScene_CreateWorldMenu::MustSignInReturnedPSN, this);
|
||||
}
|
||||
return;
|
||||
/* 4J-PB - Add this after release
|
||||
#elif defined __PSVITA__
|
||||
m_bIgnoreInput=false;
|
||||
// Determine why they're not "signed in live"
|
||||
if (ProfileManager.IsSignedInPSN(ProfileManager.GetPrimaryPad()))
|
||||
{
|
||||
// Signed in to PSN but not connected (no internet access)
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0] = IDS_CONFIRM_OK;
|
||||
ui.RequestErrorMessage(IDS_PRO_CURRENTLY_NOT_ONLINE_TITLE, IDS_PRO_PSNOFFLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad());
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not signed in to PSN
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0] = IDS_CONFIRM_OK;
|
||||
ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad());
|
||||
return;
|
||||
}*/
|
||||
#else
|
||||
m_bIgnoreInput=false;
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
ui.RequestAlertMessage( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad());
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __ORBIS__
|
||||
@@ -1007,13 +916,6 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD
|
||||
#endif
|
||||
|
||||
bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame;
|
||||
#ifdef __PSVITA__
|
||||
if(CGameNetworkManager::usingAdhocMode())
|
||||
{
|
||||
if(SQRNetworkManager_AdHoc_Vita::GetAdhocStatus())// && pClass->m_MoreOptionsParams.bOnlineGame)
|
||||
isClientSide = true;
|
||||
}
|
||||
#endif // __PSVITA__
|
||||
|
||||
bool isPrivate = pClass->m_MoreOptionsParams.bInviteOnly?true:false;
|
||||
|
||||
@@ -1218,35 +1120,11 @@ int UIScene_CreateWorldMenu::StartGame_SignInReturned(void *pParam,bool bContinu
|
||||
// If this is an online game but not all players are signed in to Live, stop!
|
||||
if (isOnlineGame && !isSignedInLive)
|
||||
{
|
||||
#ifdef __ORBIS__
|
||||
assert(iPadNotSignedInLive != -1);
|
||||
|
||||
// Check if PSN is unavailable because of age restriction
|
||||
int npAvailability = ProfileManager.getNPAvailability(iPadNotSignedInLive);
|
||||
if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION)
|
||||
{
|
||||
pClass->m_bIgnoreInput = false;
|
||||
// 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive if the npAvailability isn't SCE_OK
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_OK;
|
||||
ui.RequestAlertMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPadNotSignedInLive);
|
||||
}
|
||||
else
|
||||
{
|
||||
pClass->m_bIgnoreInput=true;
|
||||
UINT uiIDA[2];
|
||||
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
|
||||
uiIDA[1] = IDS_CANCEL;
|
||||
ui.RequestAlertMessage( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, iPadNotSignedInLive, &UIScene_CreateWorldMenu::MustSignInReturnedPSN, pClass);
|
||||
}
|
||||
return 0;
|
||||
#else
|
||||
pClass->m_bIgnoreInput=false;
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
ui.RequestAlertMessage( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad());
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Check if user-created content is allowed, as we cannot play multiplayer if it's not
|
||||
@@ -1362,52 +1240,6 @@ int UIScene_CreateWorldMenu::ConfirmCreateReturned(void *pParam,int iPad,C4JStor
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef __ORBIS__
|
||||
int UIScene_CreateWorldMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result)
|
||||
{
|
||||
UIScene_CreateWorldMenu* pClass = (UIScene_CreateWorldMenu *)pParam;
|
||||
pClass->m_bIgnoreInput = false;
|
||||
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
{
|
||||
SQRNetworkManager_Orbis::AttemptPSNSignIn(&UIScene_CreateWorldMenu::StartGame_SignInReturned, pClass, false, iPad);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// int UIScene_CreateWorldMenu::PSPlusReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
|
||||
// {
|
||||
// int32_t iResult;
|
||||
// UIScene_CreateWorldMenu *pClass = (UIScene_CreateWorldMenu *)pParam;
|
||||
//
|
||||
// // continue offline, or upsell PS Plus?
|
||||
// if(result==C4JStorage::EMessage_ResultDecline)
|
||||
// {
|
||||
// // upsell psplus
|
||||
// int32_t iResult=sceNpCommerceDialogInitialize();
|
||||
//
|
||||
// SceNpCommerceDialogParam param;
|
||||
// sceNpCommerceDialogParamInitialize(¶m);
|
||||
// param.mode=SCE_NP_COMMERCE_DIALOG_MODE_PLUS;
|
||||
// param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
|
||||
// param.userId = ProfileManager.getUserID(pClass->m_iPad);
|
||||
//
|
||||
// iResult=sceNpCommerceDialogOpen(¶m);
|
||||
// }
|
||||
// else if(result==C4JStorage::EMessage_ResultAccept)
|
||||
// {
|
||||
// // continue offline
|
||||
// pClass->m_MoreOptionsParams.bOnlineGame=false;
|
||||
// pClass->checkStateAndStartGame();
|
||||
// }
|
||||
//
|
||||
// pClass->m_bIgnoreInput=false;
|
||||
// return 0;
|
||||
// }
|
||||
#endif
|
||||
|
||||
|
||||
void UIScene_CreateWorldMenu::handleTouchBoxRebuild()
|
||||
{
|
||||
m_bRebuildTouchBoxes = true;
|
||||
|
||||
@@ -99,12 +99,6 @@ protected:
|
||||
static void CreateGame(UIScene_CreateWorldMenu* pClass, DWORD dwLocalUsersMask);
|
||||
static int ConfirmCreateReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int StartGame_SignInReturned(void *pParam,bool bContinue, int iPad);
|
||||
static int MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
|
||||
#ifdef __ORBIS__
|
||||
//static int PSPlusReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int ContinueOffline(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
#endif
|
||||
|
||||
virtual void checkStateAndStartGame();
|
||||
};
|
||||
@@ -88,9 +88,6 @@ void UIScene_InGameInfoMenu::updateTooltips()
|
||||
}
|
||||
|
||||
if(g_NetworkManager.IsLocalGame()) keyX = -1;
|
||||
#ifdef __PSVITA__
|
||||
if(CGameNetworkManager::usingAdhocMode()) keyX = -1;
|
||||
#endif
|
||||
|
||||
INetworkPlayer *selectedPlayer = g_NetworkManager.GetPlayerBySmallId(m_players[m_playerList.getCurrentSelection()]->m_smallId);
|
||||
|
||||
@@ -250,33 +247,6 @@ void UIScene_InGameInfoMenu::handleInput(int iPad, int key, bool repeat, bool pr
|
||||
}
|
||||
break;
|
||||
case ACTION_MENU_Y:
|
||||
#if defined(__PS3__) || defined(__ORBIS__)
|
||||
if(pressed && iPad == ProfileManager.GetPrimaryPad())
|
||||
{
|
||||
#ifdef __PS3__
|
||||
// are we offline?
|
||||
if(!ProfileManager.IsSignedInLive(iPad))
|
||||
{
|
||||
// get them to sign in to online
|
||||
UINT uiIDA[2];
|
||||
uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT;
|
||||
uiIDA[1]=IDS_PRO_NOTONLINE_DECLINE;
|
||||
ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, ProfileManager.GetPrimaryPad(),&UIScene_InGameInfoMenu::MustSignInReturnedPSN,this);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
#ifdef __ORBIS__
|
||||
SQRNetworkManager_Orbis::RecvInviteGUI();
|
||||
#else // __PS3__
|
||||
int ret = sceNpBasicRecvMessageCustom(SCE_NP_BASIC_MESSAGE_MAIN_TYPE_INVITE, SCE_NP_BASIC_RECV_MESSAGE_OPTIONS_INCLUDE_BOOTABLE, SYS_MEMORY_CONTAINER_ID_INVALID);
|
||||
app.DebugPrintf("sceNpBasicRecvMessageCustom return %d ( %08x )\n", ret, ret);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
|
||||
if(pressed && m_playerList.hasFocus() && (m_playerList.getItemCount() > 0) && (m_playerList.getCurrentSelection() < m_players.size()) )
|
||||
{
|
||||
INetworkPlayer *player = g_NetworkManager.GetPlayerBySmallId(m_players[m_playerList.getCurrentSelection()]->m_smallId);
|
||||
@@ -284,30 +254,13 @@ void UIScene_InGameInfoMenu::handleInput(int iPad, int key, bool repeat, bool pr
|
||||
{
|
||||
PlayerUID uid = player->GetUID();
|
||||
if( uid != INVALID_XUID )
|
||||
{
|
||||
#ifdef __PSVITA__
|
||||
PSVITA_STUBBED;
|
||||
#else
|
||||
ProfileManager.ShowProfileCard(iPad,uid);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
break;
|
||||
case ACTION_MENU_X:
|
||||
|
||||
if(pressed && !repeat && !g_NetworkManager.IsLocalGame() )
|
||||
{
|
||||
#ifdef __PSVITA__
|
||||
if(CGameNetworkManager::usingAdhocMode() == false)
|
||||
g_NetworkManager.SendInviteGUI(iPad);
|
||||
#else
|
||||
g_NetworkManager.SendInviteGUI(iPad);
|
||||
#endif
|
||||
}
|
||||
|
||||
break;
|
||||
case ACTION_MENU_OK:
|
||||
#ifdef __ORBIS__
|
||||
@@ -494,42 +447,4 @@ UIScene_InGameInfoMenu::PlayerInfo *UIScene_InGameInfoMenu::BuildPlayerInfo(INet
|
||||
info->m_name = playerName;
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
#if defined __PS3__ || defined __PSVITA__
|
||||
int UIScene_InGameInfoMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result)
|
||||
{
|
||||
UIScene_InGameInfoMenu* pClass = (UIScene_InGameInfoMenu*)pParam;
|
||||
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
{
|
||||
#ifdef __PS3__
|
||||
SQRNetworkManager_PS3::AttemptPSNSignIn(&UIScene_InGameInfoMenu::ViewInvites_SignInReturned, pClass);
|
||||
#else // __PSVITA__
|
||||
SQRNetworkManager_Vita::AttemptPSNSignIn(&UIScene_InGameInfoMenu::ViewInvites_SignInReturned, pClass);
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int UIScene_InGameInfoMenu::ViewInvites_SignInReturned(void *pParam,bool bContinue, int iPad)
|
||||
{
|
||||
if(bContinue==true)
|
||||
{
|
||||
// Check if we're signed in to LIVE
|
||||
if(ProfileManager.IsSignedInLive(iPad))
|
||||
{
|
||||
#ifdef __ORBIS__
|
||||
SQRNetworkManager_Orbis::RecvInviteGUI();
|
||||
#elif defined(__PS3__)
|
||||
int ret = sceNpBasicRecvMessageCustom(SCE_NP_BASIC_MESSAGE_MAIN_TYPE_INVITE, SCE_NP_BASIC_RECV_MESSAGE_OPTIONS_INCLUDE_BOOTABLE, SYS_MEMORY_CONTAINER_ID_INVALID);
|
||||
app.DebugPrintf("sceNpBasicRecvMessageCustom return %d ( %08x )\n", ret, ret);
|
||||
#else // __PSVITA__
|
||||
SQRNetworkManager_Vita::RecvInviteGUI();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -66,9 +66,4 @@ public:
|
||||
|
||||
private:
|
||||
PlayerInfo *BuildPlayerInfo(INetworkPlayer *player);
|
||||
|
||||
#if defined(__PS3__) || defined (__PSVITA__) || defined(__ORBIS__)
|
||||
static int MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int ViewInvites_SignInReturned(void *pParam,bool bContinue, int iPad);
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -75,14 +75,6 @@ UIScene_InGameSaveManagementMenu::UIScene_InGameSaveManagementMenu(int iPad, voi
|
||||
Initialise();
|
||||
}
|
||||
|
||||
#ifdef __PSVITA__
|
||||
if(CGameNetworkManager::usingAdhocMode() && SQRNetworkManager_AdHoc_Vita::GetAdhocStatus())
|
||||
{
|
||||
g_NetworkManager.startAdhocMatching(); // create the client matching context and clear out the friends list
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// If we're not ignoring input, then we aren't still waiting for the DLC to mount, and can now check for corrupt dlc. Otherwise this will happen when the dlc has finished mounting.
|
||||
if( !m_bIgnoreInput)
|
||||
{
|
||||
|
||||
@@ -494,11 +494,6 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
|
||||
dwLocalUsersMask |= CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad());
|
||||
|
||||
isSignedInLive = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad());
|
||||
#ifdef __PSVITA__
|
||||
if(CGameNetworkManager::usingAdhocMode() && SQRNetworkManager_AdHoc_Vita::GetAdhocStatus())
|
||||
isSignedInLive = true;
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -542,15 +537,6 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
|
||||
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __PSVITA__
|
||||
if( CGameNetworkManager::usingAdhocMode() )
|
||||
{
|
||||
noPrivileges = false;
|
||||
noUGC = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(noUGC)
|
||||
{
|
||||
pClass->setVisible( true );
|
||||
|
||||
@@ -581,57 +581,9 @@ void UIScene_LoadMenu::tick()
|
||||
ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_QuadrantSignin,&info);
|
||||
}
|
||||
|
||||
#ifdef __ORBIS__
|
||||
// check the status of the PSPlus common dialog
|
||||
switch (sceNpCommerceDialogUpdateStatus())
|
||||
{
|
||||
case SCE_COMMON_DIALOG_STATUS_FINISHED:
|
||||
{
|
||||
SceNpCommerceDialogResult Result;
|
||||
sceNpCommerceDialogGetResult(&Result);
|
||||
sceNpCommerceDialogTerminate();
|
||||
|
||||
if(Result.authorized)
|
||||
{
|
||||
ProfileManager.PsPlusUpdate(ProfileManager.GetPrimaryPad(), &Result);
|
||||
// they just became a PSPlus member
|
||||
LoadDataComplete(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
// continue offline?
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_PRO_NOTONLINE_DECLINE;
|
||||
|
||||
// Give the player a warning about the texture pack missing
|
||||
ui.RequestAlertMessage(IDS_PLAY_OFFLINE,IDS_NO_PLAYSTATIONPLUS, uiIDA, 1, ProfileManager.GetPrimaryPad(),&UIScene_LoadMenu::ContinueOffline,this);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
UIScene::tick();
|
||||
}
|
||||
|
||||
#ifdef __ORBIS__
|
||||
int UIScene_LoadMenu::ContinueOffline(void *pParam,int iPad,C4JStorage::EMessageResult result)
|
||||
{
|
||||
UIScene_LoadMenu* pClass = (UIScene_LoadMenu*)pParam;
|
||||
|
||||
// results switched for this dialog
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
{
|
||||
pClass->m_MoreOptionsParams.bOnlineGame=false;
|
||||
pClass->LoadDataComplete(pClass);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void UIScene_LoadMenu::handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled)
|
||||
{
|
||||
if(m_bIgnoreInput) return;
|
||||
@@ -1193,34 +1145,11 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam)
|
||||
// If this is an online game but not all players are signed in to Live, stop!
|
||||
if (isOnlineGame && !isSignedInLive)
|
||||
{
|
||||
#ifdef __ORBIS__
|
||||
assert(iPadNotSignedInLive != -1);
|
||||
// Check if PSN is unavailable because of age restriction
|
||||
int npAvailability = ProfileManager.getNPAvailability(iPadNotSignedInLive);
|
||||
if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION)
|
||||
{
|
||||
pClass->m_bIgnoreInput = false;
|
||||
// 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive if the npAvailability isn't SCE_OK
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_OK;
|
||||
ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPadNotSignedInLive);
|
||||
}
|
||||
else
|
||||
{
|
||||
pClass->m_bIgnoreInput=true;
|
||||
UINT uiIDA[2];
|
||||
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
|
||||
uiIDA[1] = IDS_CANCEL;
|
||||
ui.RequestAlertMessage( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, iPadNotSignedInLive, &UIScene_LoadMenu::MustSignInReturnedPSN, pClass);
|
||||
}
|
||||
return 0;
|
||||
#else
|
||||
pClass->m_bIgnoreInput=false;
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
ui.RequestAlertMessage( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad());
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Check if user-created content is allowed, as we cannot play multiplayer if it's not
|
||||
@@ -1229,29 +1158,7 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam)
|
||||
BOOL pccFriendsAllowed = TRUE;
|
||||
bool bContentRestricted = false;
|
||||
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
|
||||
#if defined(__PS3__) || defined(__PSVITA__)
|
||||
if(isOnlineGame)
|
||||
{
|
||||
ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,nullptr,&bContentRestricted,nullptr);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __ORBIS__
|
||||
bool bPlayStationPlus=true;
|
||||
int iPadWithNoPlaystationPlus=0;
|
||||
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
|
||||
{
|
||||
if(ProfileManager.IsSignedIn(i) && ((i == iPrimaryPad) || isLocalMultiplayerAvailable))
|
||||
{
|
||||
if(!ProfileManager.HasPlayStationPlus(i))
|
||||
{
|
||||
bPlayStationPlus=false;
|
||||
iPadWithNoPlaystationPlus=i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
noUGC = !pccAllowed && !pccFriendsAllowed;
|
||||
|
||||
if(!isOnlineGame || !isLocalMultiplayerAvailable)
|
||||
@@ -1271,54 +1178,8 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam)
|
||||
ui.RequestContentRestrictedMessageBox();
|
||||
pClass->m_bIgnoreInput=false;
|
||||
}
|
||||
#ifdef __ORBIS__
|
||||
else if(isOnlineGame && (bPlayStationPlus==false))
|
||||
{
|
||||
pClass->setVisible( true );
|
||||
pClass->m_bIgnoreInput=false;
|
||||
|
||||
if(ProfileManager.RequestingPlaystationPlus(iPadWithNoPlaystationPlus))
|
||||
{
|
||||
// MGH - added this so we don't try and upsell when we don't know if the player has PS Plus yet (if it can't connect to the PS Plus server).
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_OK;
|
||||
ui.RequestAlertMessage(IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, ProfileManager.GetPrimaryPad(), nullptr, nullptr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 4J-PB - we're not allowed to show the text Playstation Plus - have to call the upsell all the time!
|
||||
// upsell psplus
|
||||
int32_t iResult=sceNpCommerceDialogInitialize();
|
||||
|
||||
SceNpCommerceDialogParam param;
|
||||
sceNpCommerceDialogParamInitialize(¶m);
|
||||
param.mode=SCE_NP_COMMERCE_DIALOG_MODE_PLUS;
|
||||
param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
|
||||
param.userId = ProfileManager.getUserID(iPadWithNoPlaystationPlus);
|
||||
|
||||
iResult=sceNpCommerceDialogOpen(¶m);
|
||||
|
||||
// UINT uiIDA[2];
|
||||
// uiIDA[0]=IDS_PLAY_OFFLINE;
|
||||
// uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP;
|
||||
// ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_LoadMenu::PSPlusReturned,pClass, app.GetStringTable(),nullptr,0,false);
|
||||
}
|
||||
|
||||
#endif
|
||||
else
|
||||
{
|
||||
|
||||
#if defined(__ORBIS__) || defined(__PSVITA__)
|
||||
if(isOnlineGame)
|
||||
{
|
||||
bool chatRestricted = false;
|
||||
ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,&chatRestricted,nullptr,nullptr);
|
||||
if(chatRestricted)
|
||||
{
|
||||
ProfileManager.DisplaySystemMessage( SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION, ProfileManager.GetPrimaryPad() );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
DWORD dwLocalUsersMask = CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad());
|
||||
|
||||
// No guest problems so we don't need to force a sign-in of players here
|
||||
@@ -1488,13 +1349,6 @@ void UIScene_LoadMenu::StartGameFromSave(UIScene_LoadMenu* pClass, DWORD dwLocal
|
||||
}
|
||||
|
||||
bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame;
|
||||
#ifdef __PSVITA__
|
||||
if(CGameNetworkManager::usingAdhocMode())
|
||||
{
|
||||
if(SQRNetworkManager_AdHoc_Vita::GetAdhocStatus())// && pClass->m_MoreOptionsParams.bOnlineGame)
|
||||
isClientSide = true;
|
||||
}
|
||||
#endif // __PSVITA__
|
||||
|
||||
bool isPrivate = (app.GetGameSettings(pClass->m_iPad,eGameSetting_InviteOnly)>0)?true:false;
|
||||
|
||||
@@ -1630,35 +1484,11 @@ int UIScene_LoadMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int
|
||||
// If this is an online game but not all players are signed in to Live, stop!
|
||||
if (isOnlineGame && !isSignedInLive)
|
||||
{
|
||||
#ifdef __ORBIS__
|
||||
assert(iPadNotSignedInLive != -1);
|
||||
|
||||
// Check if PSN is unavailable because of age restriction
|
||||
int npAvailability = ProfileManager.getNPAvailability(iPadNotSignedInLive);
|
||||
if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION)
|
||||
{
|
||||
pClass->m_bIgnoreInput = false;
|
||||
// 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive if the npAvailability isn't SCE_OK
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_OK;
|
||||
ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPadNotSignedInLive);
|
||||
}
|
||||
else
|
||||
{
|
||||
pClass->m_bIgnoreInput=true;
|
||||
UINT uiIDA[2];
|
||||
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
|
||||
uiIDA[1] = IDS_CANCEL;
|
||||
ui.RequestAlertMessage( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, iPadNotSignedInLive, &UIScene_LoadMenu::MustSignInReturnedPSN, pClass);
|
||||
}
|
||||
return 0;
|
||||
#else
|
||||
pClass->m_bIgnoreInput=false;
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
ui.RequestAlertMessage( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad());
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Check if user-created content is allowed, as we cannot play multiplayer if it's not
|
||||
@@ -1727,50 +1557,4 @@ void UIScene_LoadMenu::handleGainFocus(bool navBack)
|
||||
{
|
||||
m_checkboxOnline.setChecked(m_MoreOptionsParams.bOnlineGame == TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __ORBIS__
|
||||
int UIScene_LoadMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result)
|
||||
{
|
||||
UIScene_LoadMenu* pClass = (UIScene_LoadMenu *)pParam;
|
||||
pClass->m_bIgnoreInput = false;
|
||||
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
{
|
||||
SQRNetworkManager_Orbis::AttemptPSNSignIn(&UIScene_LoadMenu::StartGame_SignInReturned, pClass, false, iPad);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// int UIScene_LoadMenu::PSPlusReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
|
||||
// {
|
||||
// int32_t iResult;
|
||||
// UIScene_LoadMenu *pClass = (UIScene_LoadMenu *)pParam;
|
||||
//
|
||||
// // continue offline, or upsell PS Plus?
|
||||
// if(result==C4JStorage::EMessage_ResultDecline)
|
||||
// {
|
||||
// // upsell psplus
|
||||
// iResult=sceNpCommerceDialogInitialize();
|
||||
//
|
||||
// SceNpCommerceDialogParam param;
|
||||
// sceNpCommerceDialogParamInitialize(¶m);
|
||||
// param.mode=SCE_NP_COMMERCE_DIALOG_MODE_PLUS;
|
||||
// param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
|
||||
// param.userId = ProfileManager.getUserID(pClass->m_iPad);
|
||||
//
|
||||
//
|
||||
// iResult=sceNpCommerceDialogOpen(¶m);
|
||||
// }
|
||||
// else if(result==C4JStorage::EMessage_ResultAccept)
|
||||
// {
|
||||
// // continue offline
|
||||
// pClass->m_MoreOptionsParams.bOnlineGame=false;
|
||||
// pClass->LoadDataComplete(pClass);
|
||||
// }
|
||||
//
|
||||
// pClass->m_bIgnoreInput=false;
|
||||
// return 0;
|
||||
// }
|
||||
#endif
|
||||
}
|
||||
@@ -117,11 +117,6 @@ private:
|
||||
static int CheckResetNetherReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int DeleteSaveDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int DeleteSaveDataReturned(void *pParam,bool bSuccess);
|
||||
static int MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
#ifdef __ORBIS__
|
||||
//static int PSPlusReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int ContinueOffline(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
#endif
|
||||
|
||||
public:
|
||||
static int StartGame_SignInReturned(LPVOID pParam, bool, int);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -187,15 +187,6 @@ private:
|
||||
static int AddServerKeyboardCallback(LPVOID lpParam, bool bRes);
|
||||
#endif
|
||||
|
||||
#if defined(__PS3__) || defined(__PSVITA__) || defined(__ORBIS__)
|
||||
static int MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int PSN_SignInReturned(void *pParam,bool bContinue, int iPad);
|
||||
static void remoteStorageGetSaveCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int error_code);
|
||||
#endif
|
||||
|
||||
#ifdef __ORBIS__
|
||||
//static int PSPlusReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
#endif
|
||||
#ifdef _XBOX_ONE
|
||||
typedef struct _SaveTransferStateContainer
|
||||
{
|
||||
|
||||
@@ -160,13 +160,7 @@ void UIScene_MainMenu::handleGainFocus(bool navBack)
|
||||
{
|
||||
// For returning to menus after exiting a game.
|
||||
if (ProfileManager.IsSignedIn(iPad) )
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPad, CONTEXT_PRESENCE_MENUS, false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
}
|
||||
}
|
||||
ProfileManager.SetLockedProfile(-1);
|
||||
@@ -538,108 +532,13 @@ int UIScene_MainMenu::MustSignInReturned(void *pParam, int iPad, C4JStorage::EMe
|
||||
{
|
||||
// if the user is valid, we should set the presence
|
||||
if(ProfileManager.IsSignedIn(i))
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(i, CONTEXT_PRESENCE_MENUS, false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(__PS3__) || defined(__PSVITA__) || defined(__ORBIS__)
|
||||
int UIScene_MainMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result)
|
||||
{
|
||||
UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam;
|
||||
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
{
|
||||
#ifdef __PS3__
|
||||
// we need to specify local game here to display local and LIVE profiles in the list
|
||||
switch(pClass->m_eAction)
|
||||
{
|
||||
case eAction_RunLeaderboardsPSN:
|
||||
SQRNetworkManager_PS3::AttemptPSNSignIn(&UIScene_MainMenu::Leaderboards_SignInReturned, pClass);
|
||||
break;
|
||||
case eAction_RunGamePSN:
|
||||
SQRNetworkManager_PS3::AttemptPSNSignIn(&UIScene_MainMenu::CreateLoad_SignInReturned, pClass);
|
||||
break;
|
||||
case eAction_RunUnlockOrDLCPSN:
|
||||
SQRNetworkManager_PS3::AttemptPSNSignIn(&UIScene_MainMenu::UnlockFullGame_SignInReturned, pClass);
|
||||
break;
|
||||
}
|
||||
#elif defined __PSVITA__
|
||||
switch(pClass->m_eAction)
|
||||
{
|
||||
case eAction_RunLeaderboardsPSN:
|
||||
//CD - Must force Ad-Hoc off if they want leaderboard PSN sign-in
|
||||
//Save settings change
|
||||
app.SetGameSettings(0, eGameSetting_PSVita_NetworkModeAdhoc, 0);
|
||||
//Force off
|
||||
CGameNetworkManager::setAdhocMode(false);
|
||||
//Now Sign-in
|
||||
SQRNetworkManager_Vita::AttemptPSNSignIn(&UIScene_MainMenu::Leaderboards_SignInReturned, pClass);
|
||||
break;
|
||||
case eAction_RunGamePSN:
|
||||
if(CGameNetworkManager::usingAdhocMode())
|
||||
{
|
||||
SQRNetworkManager_AdHoc_Vita::AttemptAdhocSignIn(&UIScene_MainMenu::CreateLoad_SignInReturned, pClass);
|
||||
}
|
||||
else
|
||||
{
|
||||
SQRNetworkManager_Vita::AttemptPSNSignIn(&UIScene_MainMenu::CreateLoad_SignInReturned, pClass);
|
||||
|
||||
}
|
||||
break;
|
||||
case eAction_RunUnlockOrDLCPSN:
|
||||
//CD - Must force Ad-Hoc off if they want commerce PSN sign-in
|
||||
//Save settings change
|
||||
app.SetGameSettings(0, eGameSetting_PSVita_NetworkModeAdhoc, 0);
|
||||
//Force off
|
||||
CGameNetworkManager::setAdhocMode(false);
|
||||
//Now Sign-in
|
||||
SQRNetworkManager_Vita::AttemptPSNSignIn(&UIScene_MainMenu::UnlockFullGame_SignInReturned, pClass);
|
||||
break;
|
||||
}
|
||||
#else
|
||||
switch(pClass->m_eAction)
|
||||
{
|
||||
case eAction_RunLeaderboardsPSN:
|
||||
SQRNetworkManager_Orbis::AttemptPSNSignIn(&UIScene_MainMenu::Leaderboards_SignInReturned, pClass, true, iPad);
|
||||
break;
|
||||
case eAction_RunGamePSN:
|
||||
SQRNetworkManager_Orbis::AttemptPSNSignIn(&UIScene_MainMenu::CreateLoad_SignInReturned, pClass, true, iPad);
|
||||
break;
|
||||
case eAction_RunUnlockOrDLCPSN:
|
||||
SQRNetworkManager_Orbis::AttemptPSNSignIn(&UIScene_MainMenu::UnlockFullGame_SignInReturned, pClass, true, iPad);
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
if( pClass->m_eAction == eAction_RunGamePSN )
|
||||
{
|
||||
if( result == C4JStorage::EMessage_Cancelled)
|
||||
CreateLoad_SignInReturned(pClass, false, 0);
|
||||
else
|
||||
CreateLoad_SignInReturned(pClass, true, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
pClass->m_bIgnorePress=false;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _XBOX_ONE
|
||||
int UIScene_MainMenu::HelpAndOptions_SignInReturned(void *pParam,bool bContinue,int iPad, int iController)
|
||||
#else
|
||||
@@ -651,11 +550,8 @@ int UIScene_MainMenu::HelpAndOptions_SignInReturned(void *pParam,bool bContinue,
|
||||
if(bContinue)
|
||||
{
|
||||
// 4J-JEV: Don't we only need to update rich-presence if the sign-in status changes.
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPad, CONTEXT_PRESENCE_MENUS, false);
|
||||
#endif
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
|
||||
#if TO_BE_IMPLEMENTED
|
||||
if(app.GetTMSDLCInfoRead())
|
||||
#endif
|
||||
@@ -695,13 +591,7 @@ int UIScene_MainMenu::HelpAndOptions_SignInReturned(void *pParam,bool bContinue,
|
||||
{
|
||||
// if the user is valid, we should set the presence
|
||||
if(ProfileManager.IsSignedIn(i))
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(i,CONTEXT_PRESENCE_MENUS,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -729,12 +619,7 @@ int UIScene_MainMenu::CreateLoad_SignInReturned(void *pParam, bool bContinue, in
|
||||
if(bContinue)
|
||||
{
|
||||
// 4J-JEV: We only need to update rich-presence if the sign-in status changes.
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPad, CONTEXT_PRESENCE_MENUS, false);
|
||||
#endif
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
|
||||
UINT uiIDA[1] = { IDS_OK };
|
||||
|
||||
@@ -754,21 +639,6 @@ int UIScene_MainMenu::CreateLoad_SignInReturned(void *pParam, bool bContinue, in
|
||||
if(ProfileManager.IsFullVersion())
|
||||
{
|
||||
bool bSignedInLive = ProfileManager.IsSignedInLive(iPad);
|
||||
#ifdef __PSVITA__
|
||||
if(CGameNetworkManager::usingAdhocMode())
|
||||
{
|
||||
if(SQRNetworkManager_AdHoc_Vita::GetAdhocStatus())
|
||||
{
|
||||
bSignedInLive = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// adhoc mode, but we didn't make the connection, turn off adhoc mode, and just go with whatever the regular online status is
|
||||
CGameNetworkManager::setAdhocMode(false);
|
||||
bSignedInLive = ProfileManager.IsSignedInLive(iPad);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Check if we're signed in to LIVE
|
||||
if(bSignedInLive)
|
||||
@@ -916,13 +786,7 @@ int UIScene_MainMenu::CreateLoad_SignInReturned(void *pParam, bool bContinue, in
|
||||
{
|
||||
// if the user is valid, we should set the presence
|
||||
if(ProfileManager.IsSignedIn(i))
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(i, CONTEXT_PRESENCE_MENUS, false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -940,11 +804,7 @@ int UIScene_MainMenu::Leaderboards_SignInReturned(void *pParam,bool bContinue,in
|
||||
if(bContinue)
|
||||
{
|
||||
// 4J-JEV: We only need to update rich-presence if the sign-in status changes.
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPad, CONTEXT_PRESENCE_MENUS, false);
|
||||
#endif
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
|
||||
UINT uiIDA[1] = { IDS_OK };
|
||||
|
||||
@@ -994,13 +854,7 @@ int UIScene_MainMenu::Leaderboards_SignInReturned(void *pParam,bool bContinue,in
|
||||
{
|
||||
// if the user is valid, we should set the presence
|
||||
if(ProfileManager.IsSignedIn(i))
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(i, CONTEXT_PRESENCE_MENUS, false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1019,11 +873,7 @@ int UIScene_MainMenu::Achievements_SignInReturned(void *pParam,bool bContinue,in
|
||||
{
|
||||
pClass->m_bIgnorePress=false;
|
||||
// 4J-JEV: We only need to update rich-presence if the sign-in status changes.
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPad, CONTEXT_PRESENCE_MENUS, false);
|
||||
#endif
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
|
||||
XShowAchievementsUI( ProfileManager.GetPrimaryPad() );
|
||||
}
|
||||
@@ -1036,13 +886,7 @@ int UIScene_MainMenu::Achievements_SignInReturned(void *pParam,bool bContinue,in
|
||||
{
|
||||
// if the user is valid, we should set the presence
|
||||
if(ProfileManager.IsSignedIn(i))
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(i, CONTEXT_PRESENCE_MENUS, false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1060,11 +904,7 @@ int UIScene_MainMenu::UnlockFullGame_SignInReturned(void *pParam,bool bContinue,
|
||||
if (bContinue)
|
||||
{
|
||||
// 4J-JEV: We only need to update rich-presence if the sign-in status changes.
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPad, CONTEXT_PRESENCE_MENUS, false);
|
||||
#endif
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
|
||||
pClass->RunUnlockOrDLC(iPad);
|
||||
}
|
||||
@@ -1077,13 +917,7 @@ int UIScene_MainMenu::UnlockFullGame_SignInReturned(void *pParam,bool bContinue,
|
||||
{
|
||||
// if the user is valid, we should set the presence
|
||||
if(ProfileManager.IsSignedIn(i))
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(i, CONTEXT_PRESENCE_MENUS, false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1110,9 +944,7 @@ int UIScene_MainMenu::XboxHelp_SignInReturned(void *pParam, bool bContinue, int
|
||||
{
|
||||
// if the user is valid, we should set the presence
|
||||
if(ProfileManager.IsSignedIn(i))
|
||||
{
|
||||
ProfileManager.SetCurrentGameActivity(i,CONTEXT_PRESENCE_MENUS,false);
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MENUS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1582,55 +1414,7 @@ void UIScene_MainMenu::RunLeaderboards(int iPad)
|
||||
}
|
||||
else if(!ProfileManager.IsSignedInLive(iPad))
|
||||
{
|
||||
#if defined __PS3__ || defined __PSVITA__
|
||||
m_eAction=eAction_RunLeaderboardsPSN;
|
||||
// get them to sign in to online
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT;
|
||||
ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(),&UIScene_MainMenu::MustSignInReturnedPSN,this);
|
||||
|
||||
/* 4J-PB - Add this after release
|
||||
#elif defined __PSVITA__
|
||||
m_eAction=eAction_RunLeaderboardsPSN;
|
||||
// Determine why they're not "signed in live"
|
||||
if (ProfileManager.IsSignedInPSN(iPad))
|
||||
{
|
||||
// Signed in to PSN but not connected (no internet access)
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
|
||||
ui.RequestMessageBox(IDS_PRO_CURRENTLY_NOT_ONLINE_TITLE, IDS_PRO_PSNOFFLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(), &UIScene_MainMenu::MustSignInReturnedPSN, this, app.GetStringTable());
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not signed in to PSN
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
|
||||
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(), &UIScene_MainMenu::MustSignInReturnedPSN, this, app.GetStringTable());
|
||||
return;
|
||||
}*/
|
||||
#elif defined __ORBIS__
|
||||
m_eAction=eAction_RunLeaderboardsPSN;
|
||||
// Determine why they're not "signed in live"
|
||||
if (ProfileManager.isSignedInPSN(iPad))
|
||||
{
|
||||
// Signed in to PSN but not connected (no internet access)
|
||||
assert(!ProfileManager.isConnectedToPSN(iPad));
|
||||
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0] = IDS_OK;
|
||||
ui.RequestErrorMessage( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, iPad);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not signed in to PSN
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
|
||||
ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(), &UIScene_MainMenu::MustSignInReturnedPSN, this);
|
||||
return;
|
||||
}
|
||||
#else
|
||||
ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1675,58 +1459,6 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad)
|
||||
// Check if this means downloadable content
|
||||
if(ProfileManager.IsFullVersion())
|
||||
{
|
||||
#ifdef __ORBIS__
|
||||
// 4J-PB - Check if there is a patch for the game
|
||||
m_errorCode = ProfileManager.getNPAvailability(ProfileManager.GetPrimaryPad());
|
||||
|
||||
bool bPatchAvailable;
|
||||
switch(m_errorCode)
|
||||
{
|
||||
case SCE_NP_ERROR_LATEST_PATCH_PKG_EXIST:
|
||||
case SCE_NP_ERROR_LATEST_PATCH_PKG_DOWNLOADED:
|
||||
bPatchAvailable=true;
|
||||
break;
|
||||
default:
|
||||
bPatchAvailable=false;
|
||||
break;
|
||||
}
|
||||
|
||||
if(bPatchAvailable)
|
||||
{
|
||||
m_bIgnorePress=false;
|
||||
|
||||
int32_t ret=sceErrorDialogInitialize();
|
||||
m_bErrorDialogRunning=true;
|
||||
if ( ret==SCE_OK )
|
||||
{
|
||||
SceErrorDialogParam param;
|
||||
sceErrorDialogParamInitialize( ¶m );
|
||||
// 4J-PB - We want to display the option to get the patch now
|
||||
param.errorCode = SCE_NP_ERROR_LATEST_PATCH_PKG_DOWNLOADED;//pClass->m_errorCode;
|
||||
ret = sceUserServiceGetInitialUser( ¶m.userId );
|
||||
if ( ret == SCE_OK )
|
||||
{
|
||||
ret=sceErrorDialogOpen( ¶m );
|
||||
}
|
||||
}
|
||||
|
||||
// UINT uiIDA[1];
|
||||
// uiIDA[0]=IDS_OK;
|
||||
// ui.RequestMessageBox(IDS_PATCH_AVAILABLE_TITLE, IDS_PATCH_AVAILABLE_TEXT, uiIDA, 1, XUSER_INDEX_ANY,nullptr,this);
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if PSN is unavailable because of age restriction
|
||||
if (m_errorCode == SCE_NP_ERROR_AGE_RESTRICTION)
|
||||
{
|
||||
m_bIgnorePress=false;
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0] = IDS_OK;
|
||||
ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(), nullptr, this);
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
// downloadable content
|
||||
if(ProfileManager.IsSignedInLive(iPad))
|
||||
{
|
||||
@@ -1800,39 +1532,9 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad)
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(__PS3__) || defined(__PSVITA__)
|
||||
m_eAction=eAction_RunUnlockOrDLCPSN;
|
||||
// get them to sign in to online
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT;
|
||||
//uiIDA[1]=IDS_PRO_NOTONLINE_DECLINE;
|
||||
ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(),&UIScene_MainMenu::MustSignInReturnedPSN,this);
|
||||
#elif defined __ORBIS__
|
||||
m_eAction=eAction_RunUnlockOrDLCPSN;
|
||||
// Determine why they're not "signed in live"
|
||||
if (ProfileManager.isSignedInPSN(iPad))
|
||||
{
|
||||
m_bIgnorePress=false;
|
||||
// Signed in to PSN but not connected (no internet access)
|
||||
assert(!ProfileManager.isConnectedToPSN(iPad));
|
||||
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0] = IDS_OK;
|
||||
ui.RequestErrorMessage( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, iPad);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not signed in to PSN
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
|
||||
ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(), &UIScene_MainMenu::MustSignInReturnedPSN, this);
|
||||
return;
|
||||
}
|
||||
#else
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_OK;
|
||||
ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1845,39 +1547,9 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad)
|
||||
}
|
||||
else if(!ProfileManager.IsSignedInLive(iPad))
|
||||
{
|
||||
#if defined(__PS3__) || defined(__PSVITA__)
|
||||
m_eAction=eAction_RunUnlockOrDLCPSN;
|
||||
// get them to sign in to online
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
|
||||
ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(),&UIScene_MainMenu::MustSignInReturnedPSN,this);
|
||||
#elif defined __ORBIS__
|
||||
m_eAction=eAction_RunUnlockOrDLCPSN;
|
||||
// Determine why they're not "signed in live"
|
||||
if (ProfileManager.isSignedInPSN(iPad))
|
||||
{
|
||||
m_bIgnorePress=false;
|
||||
// Signed in to PSN but not connected (no internet access)
|
||||
assert(!ProfileManager.isConnectedToPSN(iPad));
|
||||
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0] = IDS_OK;
|
||||
ui.RequestErrorMessage( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, iPad);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not signed in to PSN
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
|
||||
ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(), &UIScene_MainMenu::MustSignInReturnedPSN, this);
|
||||
return;
|
||||
}
|
||||
#else
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_OK;
|
||||
ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1);
|
||||
#endif
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2173,25 +1845,4 @@ void UIScene_MainMenu::LoadTrial(void)
|
||||
void UIScene_MainMenu::handleUnlockFullVersion()
|
||||
{
|
||||
m_buttons[static_cast<int>(eControl_UnlockOrDLC)].setLabel(IDS_DOWNLOADABLECONTENT,true);
|
||||
}
|
||||
|
||||
|
||||
#ifdef __PSVITA__
|
||||
int UIScene_MainMenu::SelectNetworkModeReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
|
||||
{
|
||||
UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam;
|
||||
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
{
|
||||
app.DebugPrintf("Setting network mode to PSN\n");
|
||||
app.SetGameSettings(0, eGameSetting_PSVita_NetworkModeAdhoc, 0);
|
||||
}
|
||||
else if(result==C4JStorage::EMessage_ResultDecline)
|
||||
{
|
||||
app.DebugPrintf("Setting network mode to Adhoc\n");
|
||||
app.SetGameSettings(0, eGameSetting_PSVita_NetworkModeAdhoc, 1);
|
||||
}
|
||||
pClass->updateTooltips();
|
||||
return 0;
|
||||
}
|
||||
#endif //__PSVITA__
|
||||
}
|
||||
@@ -12,11 +12,7 @@ private:
|
||||
eControl_Achievements,
|
||||
eControl_HelpAndOptions,
|
||||
eControl_UnlockOrDLC,
|
||||
#ifndef _DURANGO
|
||||
eControl_Exit,
|
||||
#else
|
||||
eControl_XboxHelp,
|
||||
#endif
|
||||
eControl_Count,
|
||||
};
|
||||
|
||||
@@ -37,11 +33,8 @@ private:
|
||||
UI_MAP_ELEMENT( m_buttons[(int)eControl_Achievements], "Button3")
|
||||
UI_MAP_ELEMENT( m_buttons[(int)eControl_HelpAndOptions], "Button4")
|
||||
UI_MAP_ELEMENT( m_buttons[(int)eControl_UnlockOrDLC], "Button5")
|
||||
#ifndef _DURANGO
|
||||
UI_MAP_ELEMENT( m_buttons[(int)eControl_Exit], "Button6")
|
||||
#else
|
||||
UI_MAP_ELEMENT( m_buttons[(int)eControl_XboxHelp], "Button6")
|
||||
#endif
|
||||
|
||||
UI_MAP_ELEMENT( m_controlTimer, "Timer")
|
||||
UI_END_MAP_ELEMENTS_AND_NAMES()
|
||||
|
||||
@@ -49,13 +42,6 @@ private:
|
||||
bool m_bIgnorePress;
|
||||
bool m_bTrialVersion;
|
||||
bool m_bLoadTrialOnNetworkManagerReady;
|
||||
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
bool m_bLaunchFullVersionPurchase;
|
||||
#endif
|
||||
|
||||
#ifdef _XBOX_ONE
|
||||
bool m_bWaitingForDLCInfo;
|
||||
#endif
|
||||
|
||||
float m_fScreenWidth,m_fScreenHeight;
|
||||
float m_fRawWidth,m_fRawHeight;
|
||||
@@ -80,14 +66,6 @@ private:
|
||||
eAction_RunAchievements,
|
||||
eAction_RunHelpAndOptions,
|
||||
eAction_RunUnlockOrDLC,
|
||||
#if defined(__PS3__)|| defined(__PSVITA__) || defined(__ORBIS__)
|
||||
eAction_RunLeaderboardsPSN,
|
||||
eAction_RunGamePSN,
|
||||
eAction_RunUnlockOrDLCPSN,
|
||||
#elif defined _DURANGO
|
||||
eAction_RunXboxHelp,
|
||||
#endif
|
||||
|
||||
};
|
||||
eActions m_eAction;
|
||||
|
||||
@@ -147,49 +125,12 @@ private:
|
||||
|
||||
static void LoadTrial();
|
||||
|
||||
#ifdef _XBOX_ONE
|
||||
static int ChooseUser_SignInReturned(void *pParam,bool bContinue, int iPad, int iController);
|
||||
static int CreateLoad_SignInReturned(void *pParam,bool bContinue, int iPad, int iController);
|
||||
static int HelpAndOptions_SignInReturned(void *pParam,bool bContinue,int iPad, int iController);
|
||||
static int Achievements_SignInReturned(void *pParam,bool bContinue,int iPad, int iController);
|
||||
static int MustSignInReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
|
||||
static int Leaderboards_SignInReturned(void* pParam, bool bContinue, int iPad, int iController);
|
||||
static int UnlockFullGame_SignInReturned(void *pParam,bool bContinue,int iPad, int iController);
|
||||
static int ExitGameReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
|
||||
|
||||
static int XboxHelp_SignInReturned(void *pParam, bool bContinue, int iPad, int iController);
|
||||
#else
|
||||
|
||||
static int CreateLoad_SignInReturned(void *pParam,bool bContinue, int iPad);
|
||||
static int HelpAndOptions_SignInReturned(void *pParam,bool bContinue,int iPad);
|
||||
static int Achievements_SignInReturned(void *pParam,bool bContinue,int iPad);
|
||||
static int MustSignInReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
|
||||
#if defined(__PS3__) || defined(__PSVITA__) || defined(__ORBIS__)
|
||||
static int MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
#endif
|
||||
static int Leaderboards_SignInReturned(void* pParam, bool bContinue, int iPad);
|
||||
static int UnlockFullGame_SignInReturned(void *pParam,bool bContinue,int iPad);
|
||||
static int ExitGameReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
|
||||
#ifdef __ORBIS__
|
||||
static void RefreshChatAndContentRestrictionsReturned_PlayGame(void *pParam);
|
||||
static void RefreshChatAndContentRestrictionsReturned_Leaderboards(void *pParam);
|
||||
|
||||
static int PlayOfflineReturned(void *pParam, int iPad, C4JStorage::EMessageResult result);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __PSVITA__
|
||||
static int SelectNetworkModeReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
#endif
|
||||
|
||||
#ifdef __ORBIS__
|
||||
//EPatchCheck m_ePatchCheckState;
|
||||
bool m_bRunGameChosen;
|
||||
int32_t m_errorCode;
|
||||
bool m_bErrorDialogRunning;
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -281,13 +281,6 @@ void UIScene_PauseMenu::updateControlsVisibility()
|
||||
removeControl( &m_buttons[BUTTON_PAUSE_ACHIEVEMENTS], false );
|
||||
#endif
|
||||
}
|
||||
#ifdef __PSVITA__
|
||||
// MGH added - remove leaderboards in adhoc
|
||||
if(CGameNetworkManager::usingAdhocMode())
|
||||
{
|
||||
removeControl( &m_buttons[BUTTON_PAUSE_LEADERBOARDS], false );
|
||||
}
|
||||
#endif
|
||||
|
||||
if( !g_NetworkManager.IsHost() )
|
||||
{
|
||||
@@ -347,10 +340,6 @@ void UIScene_PauseMenu::handleInput(int iPad, int key, bool repeat, bool pressed
|
||||
case ACTION_MENU_CANCEL:
|
||||
if(pressed)
|
||||
{
|
||||
#ifdef _DURANGO
|
||||
//DurangoStatsDebugger::PrintStats(iPad);
|
||||
#endif
|
||||
|
||||
if( iPad == ProfileManager.GetPrimaryPad() && g_NetworkManager.IsLocalGame() )
|
||||
{
|
||||
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_PauseServer,(void *)FALSE);
|
||||
@@ -376,102 +365,6 @@ void UIScene_PauseMenu::handleInput(int iPad, int key, bool repeat, bool pressed
|
||||
}
|
||||
break;
|
||||
|
||||
#if TO_BE_IMPLEMENTED
|
||||
case VK_PAD_X:
|
||||
// Change device
|
||||
if(bIsisPrimaryHost)
|
||||
{
|
||||
// we need a function to deal with the return from this - if it changes, we need to update the pause menu and tooltips
|
||||
// Fix for #12531 - TCR 001: BAS Game Stability: When a player selects to change a storage
|
||||
// device, and repeatedly backs out of the SD screen, disconnects from LIVE, and then selects a SD, the title crashes.
|
||||
m_bIgnoreInput=true;
|
||||
|
||||
StorageManager.SetSaveDevice(&UIScene_PauseMenu::DeviceSelectReturned,this,true);
|
||||
}
|
||||
rfHandled = TRUE;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case ACTION_MENU_Y:
|
||||
{
|
||||
|
||||
#if defined(__PS3__) || defined(__ORBIS__)
|
||||
if(pressed && iPad == ProfileManager.GetPrimaryPad())
|
||||
{
|
||||
#ifdef __ORBIS__
|
||||
// If a patch is available, can't view invites
|
||||
if (CheckForPatch()) break;
|
||||
#endif
|
||||
|
||||
// Are we offline?
|
||||
if(!ProfileManager.IsSignedInLive(iPad))
|
||||
{
|
||||
m_eAction=eAction_ViewInvitesPSN;
|
||||
#ifdef __ORBIS__
|
||||
int npAvailability = ProfileManager.getNPAvailability(iPad);
|
||||
if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION)
|
||||
{
|
||||
// 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive is the npAvailability isn't SCE_OK
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_OK;
|
||||
ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad);
|
||||
}
|
||||
else
|
||||
// Determine why they're not "signed in live"
|
||||
if (ProfileManager.isSignedInPSN(iPad))
|
||||
{
|
||||
// Signed in to PSN but not connected (no internet access)
|
||||
assert(!ProfileManager.isConnectedToPSN(iPad));
|
||||
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0] = IDS_OK;
|
||||
ui.RequestErrorMessage( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, iPad);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not signed in to PSN
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
|
||||
ui.RequestAlertMessage( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, iPad, &UIScene_PauseMenu::MustSignInReturnedPSN, (LPVOID)GetCallbackUniqueId() );
|
||||
}
|
||||
#else // __PS3__
|
||||
// get them to sign in to online
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT;
|
||||
ui.RequestAlertMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, iPad, &UIScene_PauseMenu::MustSignInReturnedPSN, (LPVOID)GetCallbackUniqueId() );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef __ORBIS__
|
||||
SQRNetworkManager_Orbis::RecvInviteGUI();
|
||||
#else // __PS3__
|
||||
int ret = sceNpBasicRecvMessageCustom(SCE_NP_BASIC_MESSAGE_MAIN_TYPE_INVITE, SCE_NP_BASIC_RECV_MESSAGE_OPTIONS_INCLUDE_BOOTABLE, SYS_MEMORY_CONTAINER_ID_INVALID);
|
||||
app.DebugPrintf("sceNpBasicRecvMessageCustom return %d ( %08x )\n", ret, ret);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#else
|
||||
#if TO_BE_IMPLEMENTED
|
||||
if(bUserisClientSide)
|
||||
{
|
||||
// 4J Stu - Added check in 1.8.2 bug fix (TU6) to stop repeat key presses
|
||||
bool bCanScreenshot = true;
|
||||
for(int j=0; j < XUSER_MAX_COUNT;++j)
|
||||
{
|
||||
if(app.GetXuiAction(j) == eAppAction_SocialPostScreenshot)
|
||||
{
|
||||
bCanScreenshot = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(bCanScreenshot) app.SetAction(pInputData->UserIndex,eAppAction_SocialPost);
|
||||
}
|
||||
rfHandled = TRUE;
|
||||
#endif
|
||||
#endif // __PS3__
|
||||
}
|
||||
break;
|
||||
#ifdef _XBOX_ONE
|
||||
case ACTION_MENU_RIGHT_SCROLL:
|
||||
if( bDisplayBanTip )
|
||||
@@ -516,114 +409,18 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
|
||||
}
|
||||
else if(!ProfileManager.IsSignedInLive(m_iPad))
|
||||
{
|
||||
#ifdef __ORBIS__
|
||||
// If a patch is available, can't show leaderboard
|
||||
if (CheckForPatch()) break;
|
||||
|
||||
// Check for content restricted user
|
||||
// Update error code
|
||||
int errorCode = ProfileManager.getNPAvailability(m_iPad);
|
||||
|
||||
// Check if PSN is unavailable because of age restriction
|
||||
if (errorCode == SCE_NP_ERROR_AGE_RESTRICTION)
|
||||
{
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0] = IDS_CONFIRM_OK;
|
||||
ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, m_iPad);
|
||||
|
||||
break;;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined __PS3__ || __PSVITA__
|
||||
// get them to sign in to online
|
||||
m_eAction=eAction_ViewLeaderboardsPSN;
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT;
|
||||
ui.RequestAlertMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, ProfileManager.GetPrimaryPad(),&UIScene_PauseMenu::MustSignInReturnedPSN,(LPVOID)GetCallbackUniqueId() );
|
||||
#elif defined(__ORBIS__)
|
||||
m_eAction=eAction_ViewLeaderboardsPSN;
|
||||
int npAvailability = ProfileManager.getNPAvailability(m_iPad);
|
||||
if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION)
|
||||
{
|
||||
// 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive is the npAvailability isn't SCE_OK
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_OK;
|
||||
ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, m_iPad);
|
||||
}
|
||||
else
|
||||
// Determine why they're not "signed in live"
|
||||
if (ProfileManager.isSignedInPSN(m_iPad))
|
||||
{
|
||||
// Signed in to PSN but not connected (no internet access)
|
||||
|
||||
// Id
|
||||
assert(!ProfileManager.isConnectedToPSN(m_iPad));
|
||||
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0] = IDS_OK;
|
||||
ui.RequestErrorMessage( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, m_iPad);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not signed in to PSN
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
|
||||
ui.RequestAlertMessage( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, m_iPad, &UIScene_PauseMenu::MustSignInReturnedPSN, (LPVOID)GetCallbackUniqueId() );
|
||||
}
|
||||
#else
|
||||
UINT uiIDA[1] = { IDS_OK };
|
||||
ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, m_iPad);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
bool bContentRestricted=false;
|
||||
#if defined(__PS3__) || defined(__PSVITA__)
|
||||
ProfileManager.GetChatAndContentRestrictions(m_iPad,true,nullptr,&bContentRestricted,nullptr);
|
||||
#endif
|
||||
if(bContentRestricted)
|
||||
{
|
||||
#if !(defined(_XBOX) || defined(_WINDOWS64) || defined(_XBOX_ONE)) // 4J Stu - Temp to get the win build running, but so we check this for other platforms
|
||||
// you can't see leaderboards
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
ui.RequestAlertMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, m_iPad);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if(!bContentRestricted)
|
||||
ui.NavigateToScene(m_iPad, eUIScene_LeaderboardsMenu);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
#ifdef _DURANGO
|
||||
case BUTTON_PAUSE_XBOXHELP:
|
||||
{
|
||||
// 4J: Launch the crummy xbox help application.
|
||||
WXS::User^ user = ProfileManager.GetUser(m_iPad);
|
||||
Windows::Xbox::ApplicationModel::Help::Show(user);
|
||||
}
|
||||
break;
|
||||
#elif TO_BE_IMPLEMENTED
|
||||
case BUTTON_PAUSE_ACHIEVEMENTS:
|
||||
|
||||
// guests can't look at achievements
|
||||
if(ProfileManager.IsGuest(pNotifyPressData->UserIndex))
|
||||
{
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_OK;
|
||||
ui.RequestAlertMessage(IDS_PRO_GUESTPROFILE_TITLE, IDS_PRO_GUESTPROFILE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad());
|
||||
}
|
||||
else
|
||||
{
|
||||
XShowAchievementsUI( pNotifyPressData->UserIndex );
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
case BUTTON_PAUSE_HELPANDOPTIONS:
|
||||
ui.NavigateToScene(m_iPad,eUIScene_HelpAndOptionsMenu);
|
||||
break;
|
||||
@@ -933,456 +730,7 @@ int UIScene_PauseMenu::BanGameDialogReturned(void *pParam,int iPad,C4JStorage::E
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__PS3__) || defined (__PSVITA__) || defined(__ORBIS__)
|
||||
int UIScene_PauseMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result)
|
||||
{
|
||||
UIScene_PauseMenu* pClass = (UIScene_PauseMenu*)ui.GetSceneFromCallbackId((size_t)pParam);
|
||||
if(result==C4JStorage::EMessage_ResultAccept && pClass)
|
||||
{
|
||||
#ifdef __PS3__
|
||||
switch(pClass->m_eAction)
|
||||
{
|
||||
case eAction_ViewLeaderboardsPSN:
|
||||
SQRNetworkManager_PS3::AttemptPSNSignIn(&UIScene_PauseMenu::ViewLeaderboards_SignInReturned, pParam);
|
||||
break;
|
||||
case eAction_ViewInvitesPSN:
|
||||
SQRNetworkManager_PS3::AttemptPSNSignIn(&UIScene_PauseMenu::ViewInvites_SignInReturned, pParam);
|
||||
break;
|
||||
case eAction_SaveGamePSN:
|
||||
SQRNetworkManager_PS3::AttemptPSNSignIn(&UIScene_PauseMenu::SaveGame_SignInReturned, pParam);
|
||||
break;
|
||||
case eAction_BuyTexturePackPSN:
|
||||
SQRNetworkManager_PS3::AttemptPSNSignIn(&UIScene_PauseMenu::BuyTexturePack_SignInReturned, pParam);
|
||||
break;
|
||||
}
|
||||
#elif defined __PSVITA__
|
||||
switch(pClass->m_eAction)
|
||||
{
|
||||
case eAction_ViewLeaderboardsPSN:
|
||||
//CD - Must force Ad-Hoc off if they want leaderboard PSN sign-in
|
||||
//Save settings change
|
||||
app.SetGameSettings(0, eGameSetting_PSVita_NetworkModeAdhoc, 0);
|
||||
//Force off
|
||||
CGameNetworkManager::setAdhocMode(false);
|
||||
//Now Sign-in
|
||||
SQRNetworkManager_Vita::AttemptPSNSignIn(&UIScene_PauseMenu::ViewLeaderboards_SignInReturned, pParam);
|
||||
break;
|
||||
case eAction_ViewInvitesPSN:
|
||||
SQRNetworkManager_Vita::AttemptPSNSignIn(&UIScene_PauseMenu::ViewInvites_SignInReturned, pParam);
|
||||
break;
|
||||
case eAction_SaveGamePSN:
|
||||
pClass->SetIgnoreInput(true);
|
||||
SQRNetworkManager_Vita::AttemptPSNSignIn(&UIScene_PauseMenu::SaveGame_SignInReturned, pParam, true);
|
||||
break;
|
||||
case eAction_BuyTexturePackPSN:
|
||||
SQRNetworkManager_Vita::AttemptPSNSignIn(&UIScene_PauseMenu::BuyTexturePack_SignInReturned, pParam);
|
||||
break;
|
||||
}
|
||||
#else
|
||||
switch(pClass->m_eAction)
|
||||
{
|
||||
case eAction_ViewLeaderboardsPSN:
|
||||
SQRNetworkManager_Orbis::AttemptPSNSignIn(&UIScene_PauseMenu::ViewLeaderboards_SignInReturned, pClass, false, iPad);
|
||||
break;
|
||||
case eAction_ViewInvitesPSN:
|
||||
SQRNetworkManager_Orbis::AttemptPSNSignIn(&UIScene_PauseMenu::ViewInvites_SignInReturned, pClass, false, iPad);
|
||||
break;
|
||||
case eAction_SaveGamePSN:
|
||||
SQRNetworkManager_Orbis::AttemptPSNSignIn(&UIScene_PauseMenu::SaveGame_SignInReturned, pClass, false, iPad);
|
||||
break;
|
||||
case eAction_BuyTexturePackPSN:
|
||||
SQRNetworkManager_Orbis::AttemptPSNSignIn(&UIScene_PauseMenu::BuyTexturePack_SignInReturned, pClass, false, iPad);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int UIScene_PauseMenu::ViewLeaderboards_SignInReturned(void *pParam,bool bContinue, int iPad)
|
||||
{
|
||||
UIScene_PauseMenu* pClass = (UIScene_PauseMenu*)ui.GetSceneFromCallbackId((size_t)pParam);
|
||||
if(!pClass) return 0;
|
||||
|
||||
if(bContinue==true)
|
||||
{
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
|
||||
// guests can't look at leaderboards
|
||||
if(ProfileManager.IsGuest(pClass->m_iPad))
|
||||
{
|
||||
ui.RequestAlertMessage(IDS_PRO_GUESTPROFILE_TITLE, IDS_PRO_GUESTPROFILE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad());
|
||||
}
|
||||
else if(ProfileManager.IsSignedInLive(iPad))
|
||||
{
|
||||
#ifndef __ORBIS__
|
||||
bool bContentRestricted=false;
|
||||
ProfileManager.GetChatAndContentRestrictions(pClass->m_iPad,true,nullptr,&bContentRestricted,nullptr);
|
||||
if(bContentRestricted)
|
||||
{
|
||||
// you can't see leaderboards
|
||||
ui.RequestAlertMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad());
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
ui.NavigateToScene(pClass->m_iPad, eUIScene_LeaderboardsMenu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int UIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
|
||||
{
|
||||
UIScene_PauseMenu* pClass = (UIScene_PauseMenu*)ui.GetSceneFromCallbackId((size_t)pParam);
|
||||
|
||||
#ifdef __ORBIS__
|
||||
// If a patch is available, can't proceed
|
||||
if (!pClass || pClass->CheckForPatch()) return 0;
|
||||
#endif
|
||||
|
||||
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
{
|
||||
if(!ProfileManager.IsSignedInLive(iPad))
|
||||
{
|
||||
if(pClass) pClass->m_eAction=eAction_SaveGamePSN;
|
||||
#ifdef __ORBIS__// Check if PSN is unavailable because of age restriction
|
||||
int npAvailability = ProfileManager.getNPAvailability(iPad);
|
||||
if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION)
|
||||
{
|
||||
// 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive is the npAvailability isn't SCE_OK
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_OK;
|
||||
ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad);
|
||||
}
|
||||
else
|
||||
// Determine why they're not "signed in live"
|
||||
if (ProfileManager.isSignedInPSN(iPad))
|
||||
{
|
||||
// Signed in to PSN but not connected (no internet access)
|
||||
assert(!ProfileManager.isConnectedToPSN(iPad));
|
||||
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0] = IDS_OK;
|
||||
ui.RequestErrorMessage( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, iPad);
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
|
||||
ui.RequestAlertMessage( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, iPad, &UIScene_PauseMenu::MustSignInReturnedPSN, pParam);
|
||||
}
|
||||
#else // __PS3__
|
||||
// You're not signed in to PSN!
|
||||
UINT uiIDA[2];
|
||||
uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT;
|
||||
uiIDA[1]=IDS_PRO_NOTONLINE_DECLINE;
|
||||
ui.RequestAlertMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 2, iPad,&UIScene_PauseMenu::MustSignInReturnedPSN,pParam);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef __ORBIS__
|
||||
// 4J-PB - need to check this user can access the store
|
||||
bool bContentRestricted=false;
|
||||
ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),true,nullptr,&bContentRestricted,nullptr);
|
||||
if(bContentRestricted)
|
||||
{
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
ui.RequestAlertMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
// need to get info on the pack to see if the user has already downloaded it
|
||||
TexturePack *tPack = Minecraft::GetInstance()->skins->getSelected();
|
||||
DLCTexturePack *pDLCTexPack=(DLCTexturePack *)tPack;
|
||||
|
||||
// retrieve the store name for the skin pack
|
||||
DLCPack *pDLCPack=pDLCTexPack->getDLCInfoParentPack();//tPack->getDLCPack();
|
||||
const char *pchPackName=wstringtofilename(pDLCPack->getName());
|
||||
app.DebugPrintf("Texture Pack - %s\n",pchPackName);
|
||||
SONYDLC *pSONYDLCInfo=app.GetSONYDLCInfo((char *)pchPackName);
|
||||
|
||||
if(pSONYDLCInfo!=nullptr)
|
||||
{
|
||||
char chName[42];
|
||||
char chKeyName[20];
|
||||
char chSkuID[SCE_NP_COMMERCE2_SKU_ID_LEN];
|
||||
|
||||
memset(chSkuID,0,SCE_NP_COMMERCE2_SKU_ID_LEN);
|
||||
// find the info on the skin pack
|
||||
// we have to retrieve the skuid from the store info, it can't be hardcoded since Sony may change it.
|
||||
// So we assume the first sku for the product is the one we want
|
||||
|
||||
// MGH - keyname in the DLC file is 16 chars long, but there's no space for a nullptr terminating char
|
||||
memset(chKeyName, 0, sizeof(chKeyName));
|
||||
strncpy(chKeyName, pSONYDLCInfo->chDLCKeyname, 16);
|
||||
|
||||
#ifdef __ORBIS__
|
||||
strcpy(chName, chKeyName);
|
||||
#else
|
||||
sprintf(chName,"%s-%s",app.GetCommerceCategory(),chKeyName);
|
||||
#endif
|
||||
app.GetDLCSkuIDFromProductList(chName,chSkuID);
|
||||
|
||||
// 4J-PB - need to check for an empty store
|
||||
#if defined __ORBIS__ || defined __PSVITA__ || defined __PS3__
|
||||
if(app.CheckForEmptyStore(iPad)==false)
|
||||
#endif
|
||||
{
|
||||
if(app.DLCAlreadyPurchased(chSkuID))
|
||||
{
|
||||
app.DownloadAlreadyPurchased(chSkuID);
|
||||
}
|
||||
else
|
||||
{
|
||||
app.Checkout(chSkuID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif //
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int UIScene_PauseMenu::BuyTexturePack_SignInReturned(void *pParam,bool bContinue, int iPad)
|
||||
{
|
||||
if(bContinue==true)
|
||||
{
|
||||
// Check if we're signed in to LIVE
|
||||
if(ProfileManager.IsSignedInLive(iPad))
|
||||
{
|
||||
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
|
||||
#ifndef __ORBIS__
|
||||
// 4J-PB - need to check this user can access the store
|
||||
bool bContentRestricted=false;
|
||||
ProfileManager.GetChatAndContentRestrictions(iPad,true,nullptr,&bContentRestricted,nullptr);
|
||||
if(bContentRestricted)
|
||||
{
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
ui.RequestAlertMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
// need to get info on the pack to see if the user has already downloaded it
|
||||
TexturePack *tPack = Minecraft::GetInstance()->skins->getSelected();
|
||||
DLCTexturePack *pDLCTexPack=(DLCTexturePack *)tPack;
|
||||
|
||||
// retrieve the store name for the skin pack
|
||||
DLCPack *pDLCPack=pDLCTexPack->getDLCInfoParentPack();//tPack->getDLCPack();
|
||||
const char *pchPackName=wstringtofilename(pDLCPack->getName());
|
||||
app.DebugPrintf("Texture Pack - %s\n",pchPackName);
|
||||
SONYDLC *pSONYDLCInfo=app.GetSONYDLCInfo((char *)pchPackName);
|
||||
|
||||
if(pSONYDLCInfo!=nullptr)
|
||||
{
|
||||
char chName[42];
|
||||
char chKeyName[20];
|
||||
char chSkuID[SCE_NP_COMMERCE2_SKU_ID_LEN];
|
||||
|
||||
memset(chSkuID,0,SCE_NP_COMMERCE2_SKU_ID_LEN);
|
||||
// find the info on the skin pack
|
||||
// we have to retrieve the skuid from the store info, it can't be hardcoded since Sony may change it.
|
||||
// So we assume the first sku for the product is the one we want
|
||||
|
||||
// MGH - keyname in the DLC file is 16 chars long, but there's no space for a nullptr terminating char
|
||||
memset(chKeyName, 0, sizeof(chKeyName));
|
||||
strncpy(chKeyName, pSONYDLCInfo->chDLCKeyname, 16);
|
||||
|
||||
#ifdef __ORBIS__
|
||||
strcpy(chName, chKeyName);
|
||||
#else
|
||||
sprintf(chName,"%s-%s",app.GetCommerceCategory(),chKeyName);
|
||||
#endif
|
||||
app.GetDLCSkuIDFromProductList(chName,chSkuID);
|
||||
|
||||
// 4J-PB - need to check for an empty store
|
||||
#if defined __ORBIS__ || defined __PSVITA__ || defined __PS3__
|
||||
if(app.CheckForEmptyStore(iPad)==false)
|
||||
#endif
|
||||
{
|
||||
if(app.DLCAlreadyPurchased(chSkuID))
|
||||
{
|
||||
app.DownloadAlreadyPurchased(chSkuID);
|
||||
}
|
||||
else
|
||||
{
|
||||
app.Checkout(chSkuID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
// TO BE IMPEMENTED FOR ORBIS
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int UIScene_PauseMenu::ViewInvites_SignInReturned(void *pParam,bool bContinue, int iPad)
|
||||
{
|
||||
if(bContinue==true)
|
||||
{
|
||||
// Check if we're signed in to LIVE
|
||||
if(ProfileManager.IsSignedInLive(iPad))
|
||||
{
|
||||
#ifdef __ORBIS__
|
||||
SQRNetworkManager_Orbis::RecvInviteGUI();
|
||||
#elif defined __PS3__
|
||||
int ret = sceNpBasicRecvMessageCustom(SCE_NP_BASIC_MESSAGE_MAIN_TYPE_INVITE, SCE_NP_BASIC_RECV_MESSAGE_OPTIONS_INCLUDE_BOOTABLE, SYS_MEMORY_CONTAINER_ID_INVALID);
|
||||
app.DebugPrintf("sceNpBasicRecvMessageCustom return %d ( %08x )\n", ret, ret);
|
||||
#else // __PSVITA__
|
||||
PSVITA_STUBBED;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int UIScene_PauseMenu::ExitGameSaveDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
|
||||
{
|
||||
// Exit with or without saving
|
||||
// Decline means save in this dialog
|
||||
if(result==C4JStorage::EMessage_ResultDecline || result==C4JStorage::EMessage_ResultThirdOption)
|
||||
{
|
||||
if( result==C4JStorage::EMessage_ResultDecline ) // Save
|
||||
{
|
||||
// 4J-PB - Is the player trying to save but they are using a trial texturepack ?
|
||||
if(!Minecraft::GetInstance()->skins->isUsingDefaultSkin())
|
||||
{
|
||||
TexturePack *tPack = Minecraft::GetInstance()->skins->getSelected();
|
||||
DLCTexturePack *pDLCTexPack=(DLCTexturePack *)tPack;
|
||||
|
||||
DLCPack *pDLCPack=pDLCTexPack->getDLCInfoParentPack();//tPack->getDLCPack();
|
||||
if(!pDLCPack->hasPurchasedFile( DLCManager::e_DLCType_Texture, L"" ))
|
||||
{
|
||||
#ifdef _XBOX
|
||||
// upsell
|
||||
ULONGLONG ullOfferID_Full;
|
||||
// get the dlc texture pack
|
||||
DLCTexturePack *pDLCTexPack=(DLCTexturePack *)tPack;
|
||||
|
||||
app.GetDLCFullOfferIDForPackID(pDLCTexPack->getDLCParentPackId(),&ullOfferID_Full);
|
||||
|
||||
// tell sentient about the upsell of the full version of the skin pack
|
||||
TelemetryManager->RecordUpsellPresented(iPad, eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF);
|
||||
#endif
|
||||
|
||||
UINT uiIDA[2];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
uiIDA[1]=IDS_CONFIRM_CANCEL;
|
||||
|
||||
// Give the player a warning about the trial version of the texture pack
|
||||
ui.RequestAlertMessage(IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, IDS_WARNING_DLC_TRIALTEXTUREPACK_TEXT, uiIDA, 2, ProfileManager.GetPrimaryPad() ,&UIScene_PauseMenu::WarningTrialTexturePackReturned, pParam);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
|
||||
// does the save exist?
|
||||
bool bSaveExists;
|
||||
StorageManager.DoesSaveExist(&bSaveExists);
|
||||
// 4J-PB - we check if the save exists inside the libs
|
||||
// we need to ask if they are sure they want to overwrite the existing game
|
||||
if(bSaveExists)
|
||||
{
|
||||
UINT uiIDA[2];
|
||||
uiIDA[0]=IDS_CONFIRM_CANCEL;
|
||||
uiIDA[1]=IDS_CONFIRM_OK;
|
||||
ui.RequestAlertMessage(IDS_TITLE_SAVE_GAME, IDS_CONFIRM_SAVE_GAME, uiIDA, 2, ProfileManager.GetPrimaryPad(),&IUIScene_PauseMenu::ExitGameAndSaveReturned, pParam);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__)
|
||||
StorageManager.SetSaveDisabled(false);
|
||||
#endif
|
||||
MinecraftServer::getInstance()->setSaveOnExit( true );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// been a few requests for a confirm on exit without saving
|
||||
UINT uiIDA[2];
|
||||
uiIDA[0]=IDS_CONFIRM_CANCEL;
|
||||
uiIDA[1]=IDS_CONFIRM_OK;
|
||||
ui.RequestAlertMessage(IDS_TITLE_DECLINE_SAVE_GAME, IDS_CONFIRM_DECLINE_SAVE_GAME, uiIDA, 2, ProfileManager.GetPrimaryPad(),&IUIScene_PauseMenu::ExitGameDeclineSaveReturned, pParam);
|
||||
return 0;
|
||||
}
|
||||
|
||||
app.SetAction(iPad,eAppAction_ExitWorld);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void UIScene_PauseMenu::SetIgnoreInput(bool ignoreInput)
|
||||
{
|
||||
m_bIgnoreInput = ignoreInput;
|
||||
}
|
||||
|
||||
#ifdef _XBOX_ONE
|
||||
void UIScene_PauseMenu::HandleDLCLicenseChange()
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __ORBIS__
|
||||
bool UIScene_PauseMenu::CheckForPatch()
|
||||
{
|
||||
int npAvailability = ProfileManager.getNPAvailability(ProfileManager.GetPrimaryPad());
|
||||
|
||||
bool bPatchAvailable;
|
||||
switch(npAvailability)
|
||||
{
|
||||
case SCE_NP_ERROR_LATEST_PATCH_PKG_EXIST:
|
||||
case SCE_NP_ERROR_LATEST_PATCH_PKG_DOWNLOADED:
|
||||
bPatchAvailable=true;
|
||||
break;
|
||||
default:
|
||||
bPatchAvailable=false;
|
||||
break;
|
||||
}
|
||||
|
||||
if(bPatchAvailable)
|
||||
{
|
||||
int32_t ret = sceErrorDialogInitialize();
|
||||
if ( ret==SCE_OK )
|
||||
{
|
||||
m_bErrorDialogRunning = true;
|
||||
|
||||
SceErrorDialogParam param;
|
||||
sceErrorDialogParamInitialize( ¶m );
|
||||
// 4J-PB - We want to display the option to get the patch now
|
||||
param.errorCode = SCE_NP_ERROR_LATEST_PATCH_PKG_DOWNLOADED;//pClass->m_errorCode;
|
||||
ret = sceUserServiceGetInitialUser( ¶m.userId );
|
||||
if ( ret == SCE_OK )
|
||||
{
|
||||
ret = sceErrorDialogOpen( ¶m );
|
||||
}
|
||||
else
|
||||
{
|
||||
sceErrorDialogTerminate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return bPatchAvailable;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -91,15 +91,6 @@ protected:
|
||||
private:
|
||||
void PerformActionSaveGame();
|
||||
|
||||
#if defined(__PS3__) || defined(__PSVITA__) || defined(__ORBIS__)
|
||||
static int MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int ViewLeaderboards_SignInReturned(void *pParam,bool bContinue, int iPad);
|
||||
static int ViewInvites_SignInReturned(void *pParam,bool bContinue, int iPad);
|
||||
static int BuyTexturePack_SignInReturned(void *pParam,bool bContinue, int iPad);
|
||||
static int WarningTrialTexturePackReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int ExitGameSaveDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
#endif
|
||||
|
||||
protected:
|
||||
#ifdef _XBOX_ONE
|
||||
static int BanGameDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
|
||||
@@ -487,15 +487,6 @@ void UIScene_SkinSelectMenu::InputActionOK(unsigned int iPad)
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_OK;
|
||||
|
||||
#ifdef __ORBIS__
|
||||
// Check if PSN is unavailable because of age restriction
|
||||
int npAvailability = ProfileManager.getNPAvailability(iPad);
|
||||
if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION)
|
||||
{
|
||||
ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
// We need to upsell the full version
|
||||
if(ProfileManager.IsGuest(iPad))
|
||||
{
|
||||
@@ -1499,33 +1490,6 @@ void UIScene_SkinSelectMenu::HandleDLCMountingComplete()
|
||||
|
||||
void UIScene_SkinSelectMenu::showNotOnlineDialog(int iPad)
|
||||
{
|
||||
// need to be signed in to live. get them to sign in to online
|
||||
#if defined(__PS3__)
|
||||
SQRNetworkManager_PS3::AttemptPSNSignIn(nullptr, this);
|
||||
|
||||
#elif defined(__PSVITA__)
|
||||
if(CGameNetworkManager::usingAdhocMode() && SQRNetworkManager_AdHoc_Vita::GetAdhocStatus())
|
||||
{
|
||||
// we're in adhoc mode, we really need to ask before disconnecting
|
||||
UINT uiIDA[2];
|
||||
uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT;
|
||||
uiIDA[1]=IDS_CANCEL;
|
||||
ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, ProfileManager.GetPrimaryPad(),&UIScene_SkinSelectMenu::MustSignInReturned,nullptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
SQRNetworkManager_Vita::AttemptPSNSignIn(nullptr, this);
|
||||
}
|
||||
|
||||
#elif defined(__ORBIS__)
|
||||
SQRNetworkManager_Orbis::AttemptPSNSignIn(nullptr, this, false, iPad);
|
||||
|
||||
#elif defined(_DURANGO)
|
||||
|
||||
UINT uiIDA[1] = { IDS_CONFIRM_OK };
|
||||
ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad );
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
int UIScene_SkinSelectMenu::UnlockSkinReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
|
||||
|
||||
@@ -510,11 +510,8 @@ void LocalPlayer::aiStep()
|
||||
// Check if the player is idle and the rich presence needs updated
|
||||
if( !m_bIsIdle && InputManager.GetIdleSeconds( m_iPad ) > PLAYER_IDLE_TIME )
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_IDLE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(m_iPad,CONTEXT_PRESENCE_IDLE,false);
|
||||
#endif
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_IDLE);
|
||||
|
||||
m_bIsIdle = true;
|
||||
}
|
||||
else if ( m_bIsIdle && InputManager.GetIdleSeconds( m_iPad ) < PLAYER_IDLE_TIME )
|
||||
@@ -524,40 +521,16 @@ void LocalPlayer::aiStep()
|
||||
{
|
||||
// only do it for this player here - each player will run this code
|
||||
if(g_NetworkManager.IsLocalGame())
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(m_iPad,CONTEXT_PRESENCE_MULTIPLAYEROFFLINE,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(m_iPad,CONTEXT_PRESENCE_MULTIPLAYER,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(g_NetworkManager.IsLocalGame())
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(m_iPad,CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE);
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1P);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(m_iPad,CONTEXT_PRESENCE_MULTIPLAYER_1P,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1P);
|
||||
}
|
||||
updateRichPresence();
|
||||
m_bIsIdle = false;
|
||||
|
||||
@@ -1746,27 +1746,6 @@ void Minecraft::run_middle()
|
||||
#ifndef _XBOX
|
||||
ui.HidePressStart();
|
||||
#endif
|
||||
|
||||
#ifdef __ORBIS__
|
||||
int npAvailability = ProfileManager.getNPAvailability(i);
|
||||
|
||||
// Check if PSN is unavailable because of age restriction
|
||||
if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION)
|
||||
{
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0] = IDS_OK;
|
||||
ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, i);
|
||||
}
|
||||
else if (ProfileManager.IsSignedIn(i) && !ProfileManager.IsSignedInLive(i))
|
||||
{
|
||||
// You're not signed in to PSN!
|
||||
UINT uiIDA[2];
|
||||
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
|
||||
uiIDA[1] = IDS_CANCEL;
|
||||
ui.RequestAlertMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, i,&Minecraft::MustSignInReturnedPSN, this);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
@@ -4380,13 +4359,6 @@ void Minecraft::setLevel(MultiPlayerLevel *level, int message /*=-1*/, shared_pt
|
||||
PlayerUID playerXUIDOnline = INVALID_XUID;
|
||||
ProfileManager.GetXUID(iPrimaryPlayer,&playerXUIDOffline,false);
|
||||
ProfileManager.GetXUID(iPrimaryPlayer,&playerXUIDOnline,true);
|
||||
#ifdef __PSVITA__
|
||||
if(CGameNetworkManager::usingAdhocMode() && playerXUIDOnline.getOnlineID()[0] == 0)
|
||||
{
|
||||
// player doesn't have an online UID, set it from the player name
|
||||
playerXUIDOnline.setForAdhoc();
|
||||
}
|
||||
#endif
|
||||
#ifdef _WINDOWS64
|
||||
// On Windows, the implementation has been changed to use a per-client pseudo XUID based on `uid.dat`.
|
||||
// To maintain player data compatibility with existing worlds, the world host (the first player) will use the previous embedded pseudo XUID.
|
||||
@@ -5262,19 +5234,4 @@ ColourTable *Minecraft::getColourTable()
|
||||
}
|
||||
|
||||
return colours;
|
||||
}
|
||||
|
||||
#if defined __ORBIS__
|
||||
int Minecraft::MustSignInReturnedPSN(void *pParam, int iPad, C4JStorage::EMessageResult result)
|
||||
{
|
||||
Minecraft* pMinecraft = (Minecraft *)pParam;
|
||||
|
||||
if(result == C4JStorage::EMessage_ResultAccept)
|
||||
{
|
||||
SQRNetworkManager_Orbis::AttemptPSNSignIn(&Minecraft::InGame_SignInReturned, pMinecraft, false, iPad);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
@@ -344,8 +344,4 @@ public:
|
||||
|
||||
unsigned int getCurrentTexturePackId();
|
||||
ColourTable *getColourTable();
|
||||
|
||||
#if defined __ORBIS__
|
||||
static int MustSignInReturnedPSN(void *pParam, int iPad, C4JStorage::EMessageResult result);
|
||||
#endif
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user