mirror of
https://github.com/GabsPuNs/Project-Zenith-Main.git
synced 2026-05-30 06:35:24 +00:00
Some cleanup
Just a bit. i dont want to clean all the ifdef for consoles right now
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user