mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-22 09:03:00 +00:00
refactor: remove IsFullVersion and all trial mode code
This commit is contained in:
parent
9e207250cb
commit
5c3668ec3c
|
|
@ -47,7 +47,6 @@ C_4JProfile::PROFILESETTINGS s_dashboardSettings[XUSER_MAX_COUNT] = {};
|
|||
char s_gamertags[XUSER_MAX_COUNT][16] = {};
|
||||
std::wstring s_displayNames[XUSER_MAX_COUNT];
|
||||
int s_lockedProfile = 0;
|
||||
bool s_profileIsFullVersion = true;
|
||||
int (*s_defaultOptionsCallback)(void*, C_4JProfile::PROFILESETTINGS*,
|
||||
const int iPad) = nullptr;
|
||||
void* s_defaultOptionsCallbackParam = nullptr;
|
||||
|
|
@ -159,8 +158,6 @@ std::wstring C_4JProfile::GetDisplayName(int iPad) {
|
|||
return s_displayNames[p];
|
||||
}
|
||||
|
||||
bool C_4JProfile::IsFullVersion() { return s_profileIsFullVersion; }
|
||||
|
||||
int C_4JProfile::SetDefaultOptionsCallback(
|
||||
int (*Func)(void*, PROFILESETTINGS*, const int iPad), void* lpParam) {
|
||||
s_defaultOptionsCallback = Func;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@ public:
|
|||
bool* pbContentRestricted, int* piAge);
|
||||
char* GetGamertag(int iPad);
|
||||
std::wstring GetDisplayName(int iPad);
|
||||
bool IsFullVersion();
|
||||
int SetDefaultOptionsCallback(int (*Func)(void*, PROFILESETTINGS*,
|
||||
const int iPad),
|
||||
void* lpParam);
|
||||
|
|
|
|||
|
|
@ -2243,23 +2243,9 @@ void CMinecraftApp::HandleXuiActions(void) {
|
|||
case eAppAction_SaveGame:
|
||||
SetAction(i, eAppAction_Idle);
|
||||
if (!GetChangingSessionType()) {
|
||||
// If this is the trial game, do an upsell
|
||||
if (ProfileManager.IsFullVersion()) {
|
||||
// flag the render to capture the screenshot for the
|
||||
// save
|
||||
SetAction(i, eAppAction_SaveGameCapturedThumbnail);
|
||||
} else {
|
||||
// ask the player if they would like to upgrade, or
|
||||
// they'll lose the level
|
||||
|
||||
unsigned int uiIDA[2];
|
||||
uiIDA[0] = IDS_CONFIRM_OK;
|
||||
uiIDA[1] = IDS_CONFIRM_CANCEL;
|
||||
ui.RequestErrorMessage(
|
||||
IDS_UNLOCK_TITLE, IDS_UNLOCK_TOSAVE_TEXT, uiIDA,
|
||||
2, i, &CMinecraftApp::UnlockFullSaveReturned,
|
||||
this);
|
||||
}
|
||||
// flag the render to capture the screenshot for the
|
||||
// save
|
||||
SetAction(i, eAppAction_SaveGameCapturedThumbnail);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
@ -2573,32 +2559,21 @@ void CMinecraftApp::HandleXuiActions(void) {
|
|||
// queued with LIVE
|
||||
// InputManager.CancelAllVerifyInProgress();
|
||||
|
||||
if (ProfileManager.IsFullVersion()) {
|
||||
// In a split screen, only the primary player actually
|
||||
// quits the game, others just remove their players
|
||||
if (i != ProfileManager.GetPrimaryPad()) {
|
||||
// Make sure we've not got this player selected as
|
||||
// current - this shouldn't be the case anyway
|
||||
pMinecraft->setLocalPlayerIdx(
|
||||
ProfileManager.GetPrimaryPad());
|
||||
pMinecraft->removeLocalPlayerIdx(i);
|
||||
// In a split screen, only the primary player actually
|
||||
// quits the game, others just remove their players
|
||||
if (i != ProfileManager.GetPrimaryPad()) {
|
||||
// Make sure we've not got this player selected as
|
||||
// current - this shouldn't be the case anyway
|
||||
pMinecraft->setLocalPlayerIdx(
|
||||
ProfileManager.GetPrimaryPad());
|
||||
pMinecraft->removeLocalPlayerIdx(i);
|
||||
|
||||
SetAction(i, eAppAction_Idle);
|
||||
return;
|
||||
}
|
||||
// flag to capture the save thumbnail
|
||||
SetAction(i, eAppAction_ExitWorldCapturedThumbnail,
|
||||
param);
|
||||
} else {
|
||||
// ask the player if they would like to upgrade, or
|
||||
// they'll lose the level
|
||||
unsigned int uiIDA[2];
|
||||
uiIDA[0] = IDS_CONFIRM_OK;
|
||||
uiIDA[1] = IDS_CONFIRM_CANCEL;
|
||||
ui.RequestErrorMessage(
|
||||
IDS_UNLOCK_TITLE, IDS_UNLOCK_TOSAVE_TEXT, uiIDA, 2,
|
||||
i, &CMinecraftApp::UnlockFullExitReturned, this);
|
||||
SetAction(i, eAppAction_Idle);
|
||||
return;
|
||||
}
|
||||
// flag to capture the save thumbnail
|
||||
SetAction(i, eAppAction_ExitWorldCapturedThumbnail,
|
||||
param);
|
||||
|
||||
// Change the presence info
|
||||
// Are we offline or online, and how many players are there
|
||||
|
|
@ -3081,8 +3056,7 @@ void CMinecraftApp::HandleXuiActions(void) {
|
|||
SetAction(i, eAppAction_Idle);
|
||||
// Check the player really wants to do this
|
||||
|
||||
if (ProfileManager.IsFullVersion() &&
|
||||
!StorageManager.GetSaveDisabled() &&
|
||||
if (!StorageManager.GetSaveDisabled() &&
|
||||
i == ProfileManager.GetPrimaryPad() &&
|
||||
g_NetworkManager.IsHost() && GetGameStarted()) {
|
||||
uiIDA[0] = IDS_CONFIRM_CANCEL;
|
||||
|
|
@ -3096,22 +3070,12 @@ void CMinecraftApp::HandleXuiActions(void) {
|
|||
ExitAndJoinFromInviteSaveDialogReturned,
|
||||
this);
|
||||
} else {
|
||||
if (!ProfileManager.IsFullVersion()) {
|
||||
// upsell
|
||||
uiIDA[0] = IDS_CONFIRM_OK;
|
||||
uiIDA[1] = IDS_CONFIRM_CANCEL;
|
||||
ui.RequestErrorMessage(
|
||||
IDS_UNLOCK_TITLE, IDS_UNLOCK_ACCEPT_INVITE,
|
||||
uiIDA, 2, i,
|
||||
&CMinecraftApp::UnlockFullInviteReturned, this);
|
||||
} else {
|
||||
uiIDA[0] = IDS_CONFIRM_CANCEL;
|
||||
uiIDA[1] = IDS_CONFIRM_OK;
|
||||
ui.RequestAlertMessage(
|
||||
IDS_EXIT_GAME, IDS_CONFIRM_LEAVE_VIA_INVITE,
|
||||
uiIDA, 2, i,
|
||||
&CMinecraftApp::ExitAndJoinFromInvite, this);
|
||||
}
|
||||
uiIDA[0] = IDS_CONFIRM_CANCEL;
|
||||
uiIDA[1] = IDS_CONFIRM_OK;
|
||||
ui.RequestAlertMessage(
|
||||
IDS_EXIT_GAME, IDS_CONFIRM_LEAVE_VIA_INVITE,
|
||||
uiIDA, 2, i,
|
||||
&CMinecraftApp::ExitAndJoinFromInvite, this);
|
||||
}
|
||||
} break;
|
||||
case eAppAction_ExitAndJoinFromInviteConfirmed: {
|
||||
|
|
@ -4960,12 +4924,11 @@ void CMinecraftApp::InitialiseTips() {
|
|||
|
||||
int CMinecraftApp::GetNextTip() {
|
||||
static bool bShowSkinDLCTip = true;
|
||||
// don't display the DLC tip in the trial game
|
||||
if (ProfileManager.IsFullVersion() && app.GetNewDLCAvailable() &&
|
||||
if (app.GetNewDLCAvailable() &&
|
||||
app.DisplayNewDLCTip()) {
|
||||
return IDS_TIPS_GAMETIP_NEWDLC;
|
||||
} else {
|
||||
if (bShowSkinDLCTip && ProfileManager.IsFullVersion()) {
|
||||
if (bShowSkinDLCTip) {
|
||||
bShowSkinDLCTip = false;
|
||||
if (app.DLCInstallProcessCompleted()) {
|
||||
if (app.m_dlcManager.getPackCount(DLCManager::e_DLCType_Skin) ==
|
||||
|
|
|
|||
|
|
@ -95,12 +95,6 @@ bool CGameNetworkManager::_RunNetworkGame(void* lpParameter) {
|
|||
|
||||
app.SetGameStarted(true);
|
||||
|
||||
// 4J-PB - if this is the trial game, start the trial timer
|
||||
if (!ProfileManager.IsFullVersion()) {
|
||||
ui.SetTrialTimerLimitSecs(
|
||||
/*DYNAMIC_CONFIG_DEFAULT_TRIAL_TIME*/ 2400);
|
||||
app.SetTrialTimerStart();
|
||||
}
|
||||
// app.CloseXuiScenes(ProfileManager.GetPrimaryPad());
|
||||
|
||||
return success;
|
||||
|
|
@ -1362,13 +1356,7 @@ void CGameNetworkManager::HandleInviteWhenInMenus(
|
|||
int userIndex, const INVITE_INFO* pInviteInfo) {
|
||||
// We are in the root menus somewhere
|
||||
|
||||
// if this is the trial game, then we need the user to unlock the full game
|
||||
if (!ProfileManager.IsFullVersion()) {
|
||||
// The marketplace will fail with the primary player set to -1
|
||||
ProfileManager.SetPrimaryPad(userIndex);
|
||||
|
||||
app.SetAction(userIndex, eAppAction_DashboardTrialJoinFromInvite);
|
||||
} else {
|
||||
{
|
||||
ProfileManager.SetPrimaryPad(userIndex);
|
||||
|
||||
// 4J Stu - If we accept an invite from the main menu before going to
|
||||
|
|
|
|||
|
|
@ -212,19 +212,17 @@ int IUIScene_PauseMenu::SaveWorldThreadProc(void* lpParameter) {
|
|||
|
||||
// wprintf(L"Loading world on thread\n");
|
||||
|
||||
if (ProfileManager.IsFullVersion()) {
|
||||
app.SetGameStarted(false);
|
||||
app.SetGameStarted(false);
|
||||
|
||||
while (app.GetXuiServerAction(ProfileManager.GetPrimaryPad()) !=
|
||||
eXuiServerAction_Idle &&
|
||||
!MinecraftServer::serverHalted()) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||
}
|
||||
|
||||
if (!MinecraftServer::serverHalted() && !app.GetChangingSessionType())
|
||||
app.SetGameStarted(true);
|
||||
while (app.GetXuiServerAction(ProfileManager.GetPrimaryPad()) !=
|
||||
eXuiServerAction_Idle &&
|
||||
!MinecraftServer::serverHalted()) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||
}
|
||||
|
||||
if (!MinecraftServer::serverHalted() && !app.GetChangingSessionType())
|
||||
app.SetGameStarted(true);
|
||||
|
||||
int32_t hr = S_OK;
|
||||
if (app.GetChangingSessionType()) {
|
||||
// 4J Stu - This causes the fullscreenprogress scene to ignore the
|
||||
|
|
|
|||
|
|
@ -216,9 +216,7 @@ void UIScene_LoadOrJoinMenu::updateTooltips() {
|
|||
iLB = IDS_TOOLTIPS_PARTY_GAMES;
|
||||
}
|
||||
|
||||
if (ProfileManager.IsFullVersion() == false) {
|
||||
iRB = -1;
|
||||
} else if (StorageManager.GetSaveDisabled()) {
|
||||
if (StorageManager.GetSaveDisabled()) {
|
||||
} else {
|
||||
#if defined(SONY_REMOTE_STORAGE_DOWNLOAD)
|
||||
// Is there a save from PS3 or PSVita available?
|
||||
|
|
@ -249,14 +247,7 @@ void UIScene_LoadOrJoinMenu::Initialise() {
|
|||
m_iDefaultButtonsC = 0;
|
||||
m_iMashUpButtonsC = 0;
|
||||
|
||||
// Check if we're in the trial version
|
||||
if (ProfileManager.IsFullVersion() == false) {
|
||||
AddDefaultButtons();
|
||||
|
||||
#if TO_BE_IMPLEMENTED
|
||||
m_pSavesList->SetCurSelVisible(0);
|
||||
#endif
|
||||
} else if (StorageManager.GetSaveDisabled()) {
|
||||
if (StorageManager.GetSaveDisabled()) {
|
||||
#if TO_BE_IMPLEMENTED
|
||||
if (StorageManager.GetSaveDeviceSelected(m_iPad))
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -34,15 +34,9 @@ UIScene_MainMenu::UIScene_MainMenu(int iPad, void* initData,
|
|||
eControl_Achievements);
|
||||
m_buttons[(int)eControl_HelpAndOptions].init(IDS_HELP_AND_OPTIONS,
|
||||
eControl_HelpAndOptions);
|
||||
if (ProfileManager.IsFullVersion()) {
|
||||
m_bTrialVersion = false;
|
||||
m_buttons[(int)eControl_UnlockOrDLC].init(IDS_DOWNLOADABLECONTENT,
|
||||
eControl_UnlockOrDLC);
|
||||
} else {
|
||||
m_bTrialVersion = true;
|
||||
m_buttons[(int)eControl_UnlockOrDLC].init(IDS_UNLOCK_FULL_GAME,
|
||||
eControl_UnlockOrDLC);
|
||||
}
|
||||
m_bTrialVersion = false;
|
||||
m_buttons[(int)eControl_UnlockOrDLC].init(IDS_DOWNLOADABLECONTENT,
|
||||
eControl_UnlockOrDLC);
|
||||
|
||||
m_buttons[(int)eControl_Exit].init(app.GetString(IDS_EXIT_GAME),
|
||||
eControl_Exit);
|
||||
|
|
@ -130,7 +124,7 @@ void UIScene_MainMenu::handleGainFocus(bool navBack) {
|
|||
m_bIgnorePress = false;
|
||||
updateTooltips();
|
||||
|
||||
if (navBack && ProfileManager.IsFullVersion()) {
|
||||
if (navBack) {
|
||||
// Replace the Unlock Full Game with Downloadable Content
|
||||
m_buttons[(int)eControl_UnlockOrDLC].setLabel(IDS_DOWNLOADABLECONTENT);
|
||||
}
|
||||
|
|
@ -243,18 +237,14 @@ void UIScene_MainMenu::handlePress(F64 controlId, F64 childId) {
|
|||
signInReturnedFunc =
|
||||
&UIScene_MainMenu::UnlockFullGame_SignInReturned;
|
||||
break;
|
||||
case eControl_Exit:
|
||||
if (ProfileManager.IsFullVersion()) {
|
||||
case eControl_Exit: {
|
||||
unsigned int uiIDA[2];
|
||||
uiIDA[0] = IDS_CONFIRM_CANCEL;
|
||||
uiIDA[1] = IDS_CONFIRM_OK;
|
||||
ui.RequestErrorMessage(
|
||||
IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME, uiIDA, 2,
|
||||
XUSER_INDEX_ANY, &UIScene_MainMenu::ExitGameReturned, this);
|
||||
} else {
|
||||
ui.NavigateToScene(primaryPad, eUIScene_TrialExitUpsell);
|
||||
}
|
||||
break;
|
||||
} break;
|
||||
|
||||
default:
|
||||
__debugbreak();
|
||||
|
|
@ -497,7 +487,7 @@ int UIScene_MainMenu::CreateLoad_SignInReturned(void* pParam, bool bContinue,
|
|||
Minecraft::GetInstance()->user->name = convStringToWstring(
|
||||
ProfileManager.GetGamertag(ProfileManager.GetPrimaryPad()));
|
||||
|
||||
if (ProfileManager.IsFullVersion()) {
|
||||
{
|
||||
bool bSignedInLive = ProfileManager.IsSignedInLive(iPad);
|
||||
|
||||
// Check if we're signed in to LIVE
|
||||
|
|
@ -579,18 +569,6 @@ int UIScene_MainMenu::CreateLoad_SignInReturned(void* pParam, bool bContinue,
|
|||
eUIScene_LoadOrJoinMenu);
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
// 4J-PB - if this is the trial game, we can't have any
|
||||
// networking Can't apply the player's settings here - they
|
||||
// haven't come back from the QuerySignInStatud call above yet.
|
||||
// Need to let them action in the main loop when they come in
|
||||
// ensure we've applied this player's settings
|
||||
// app.ApplyGameSettingsChanged(iPad);
|
||||
|
||||
{
|
||||
// go straight in to the trial level
|
||||
LoadTrial();
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
@ -758,7 +736,7 @@ void UIScene_MainMenu::RunPlayGame(int iPad) {
|
|||
// 4J-PB - Need to check for installed DLC
|
||||
if (!app.DLCInstallProcessCompleted()) app.StartInstallDLCProcess(iPad);
|
||||
|
||||
if (ProfileManager.IsFullVersion()) {
|
||||
{
|
||||
// are we offline?
|
||||
bool bSignedInLive = ProfileManager.IsSignedInLive(iPad);
|
||||
|
||||
|
|
@ -820,22 +798,6 @@ void UIScene_MainMenu::RunPlayGame(int iPad) {
|
|||
eUIScene_LoadOrJoinMenu);
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
// 4J-PB - if this is the trial game, we can't have any networking
|
||||
// go straight in to the trial level
|
||||
// change the minecraft player name
|
||||
Minecraft::GetInstance()->user->name = convStringToWstring(
|
||||
ProfileManager.GetGamertag(ProfileManager.GetPrimaryPad()));
|
||||
|
||||
// Can't apply the player's settings here - they haven't come back
|
||||
// from the QuerySignInStatud call above yet. Need to let them
|
||||
// action in the main loop when they come in ensure we've applied
|
||||
// this player's settings
|
||||
// app.ApplyGameSettingsChanged(iPad);
|
||||
|
||||
{
|
||||
LoadTrial();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -888,79 +850,52 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad) {
|
|||
unsigned int uiIDA[1];
|
||||
uiIDA[0] = IDS_OK;
|
||||
|
||||
// Check if this means downloadable content
|
||||
if (ProfileManager.IsFullVersion()) {
|
||||
// downloadable content
|
||||
if (ProfileManager.IsSignedInLive(iPad)) {
|
||||
if (ProfileManager.IsGuest(iPad)) {
|
||||
m_bIgnorePress = false;
|
||||
ui.RequestErrorMessage(IDS_PRO_GUESTPROFILE_TITLE,
|
||||
IDS_PRO_GUESTPROFILE_TEXT, uiIDA, 1);
|
||||
} else {
|
||||
// If the player was signed in before selecting play, we'll not
|
||||
// have read the profile yet, so query the sign-in status to get
|
||||
// this to happen
|
||||
ProfileManager.QuerySigninStatus();
|
||||
|
||||
{
|
||||
bool bContentRestricted = false;
|
||||
if (bContentRestricted) {
|
||||
m_bIgnorePress = false;
|
||||
#if !defined(_WINDOWS64)
|
||||
// we check this for other platforms
|
||||
// you can't see the store
|
||||
unsigned int uiIDA[1];
|
||||
uiIDA[0] = IDS_CONFIRM_OK;
|
||||
ui.RequestErrorMessage(
|
||||
IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION,
|
||||
uiIDA, 1, ProfileManager.GetPrimaryPad(), nullptr,
|
||||
this);
|
||||
#endif
|
||||
} else {
|
||||
ProfileManager.SetLockedProfile(iPad);
|
||||
proceedToScene(ProfileManager.GetPrimaryPad(),
|
||||
eUIScene_DLCMainMenu);
|
||||
}
|
||||
}
|
||||
|
||||
// read the DLC info from TMS
|
||||
/*app.ReadDLCFileFromTMS(iPad);*/
|
||||
|
||||
// We want to navigate to the DLC scene, but block input until
|
||||
// we get the DLC file in from TMS Don't navigate - we might
|
||||
// have an uplink disconnect
|
||||
// app.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_DLCMainMenu);
|
||||
}
|
||||
} else {
|
||||
unsigned int uiIDA[1];
|
||||
uiIDA[0] = IDS_OK;
|
||||
ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE,
|
||||
IDS_PRO_NOTONLINE_TEXT, uiIDA, 1);
|
||||
}
|
||||
} else {
|
||||
// guests can't buy the game
|
||||
// downloadable content
|
||||
if (ProfileManager.IsSignedInLive(iPad)) {
|
||||
if (ProfileManager.IsGuest(iPad)) {
|
||||
m_bIgnorePress = false;
|
||||
ui.RequestErrorMessage(IDS_UNLOCK_TITLE, IDS_UNLOCK_GUEST_TEXT,
|
||||
uiIDA, 1, iPad);
|
||||
} else if (!ProfileManager.IsSignedInLive(iPad)) {
|
||||
unsigned int uiIDA[1];
|
||||
uiIDA[0] = IDS_OK;
|
||||
ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE,
|
||||
IDS_PRO_NOTONLINE_TEXT, uiIDA, 1);
|
||||
|
||||
ui.RequestErrorMessage(IDS_PRO_GUESTPROFILE_TITLE,
|
||||
IDS_PRO_GUESTPROFILE_TEXT, uiIDA, 1);
|
||||
} else {
|
||||
// If the player was signed in before selecting play, we'll not have
|
||||
// read the profile yet, so query the sign-in status to get this to
|
||||
// happen
|
||||
// If the player was signed in before selecting play, we'll not
|
||||
// have read the profile yet, so query the sign-in status to get
|
||||
// this to happen
|
||||
ProfileManager.QuerySigninStatus();
|
||||
|
||||
// check that the commerce is in the right state to be able to
|
||||
// display the full version purchase - if the user is fast with the
|
||||
// trial version, it can still be retrieving the product list
|
||||
ProfileManager.DisplayFullVersionPurchase(
|
||||
false, iPad, /*eSen_UpsellID_Full_Version_Of_Game*/ 0);
|
||||
{
|
||||
bool bContentRestricted = false;
|
||||
if (bContentRestricted) {
|
||||
m_bIgnorePress = false;
|
||||
#if !defined(_WINDOWS64)
|
||||
// we check this for other platforms
|
||||
// you can't see the store
|
||||
unsigned int uiIDA[1];
|
||||
uiIDA[0] = IDS_CONFIRM_OK;
|
||||
ui.RequestErrorMessage(
|
||||
IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION,
|
||||
uiIDA, 1, ProfileManager.GetPrimaryPad(), nullptr,
|
||||
this);
|
||||
#endif
|
||||
} else {
|
||||
ProfileManager.SetLockedProfile(iPad);
|
||||
proceedToScene(ProfileManager.GetPrimaryPad(),
|
||||
eUIScene_DLCMainMenu);
|
||||
}
|
||||
}
|
||||
|
||||
// read the DLC info from TMS
|
||||
/*app.ReadDLCFileFromTMS(iPad);*/
|
||||
|
||||
// We want to navigate to the DLC scene, but block input until
|
||||
// we get the DLC file in from TMS Don't navigate - we might
|
||||
// have an uplink disconnect
|
||||
// app.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_DLCMainMenu);
|
||||
}
|
||||
} else {
|
||||
unsigned int uiIDA[1];
|
||||
uiIDA[0] = IDS_OK;
|
||||
ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE,
|
||||
IDS_PRO_NOTONLINE_TEXT, uiIDA, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,11 +57,6 @@ UIScene_HelpAndOptionsMenu::UIScene_HelpAndOptionsMenu(int iPad, void* initData,
|
|||
}
|
||||
}
|
||||
|
||||
if (!ProfileManager.IsFullVersion()) //|| ProfileManager.IsGuest(m_iPad))
|
||||
{
|
||||
removeControl(&m_buttons[BUTTON_HAO_CHANGESKIN], false);
|
||||
}
|
||||
|
||||
// 4J-TomK Moved horizontal resize check to the end to prevent horizontal
|
||||
// scaling for buttons that might get removed anyways (debug options for
|
||||
// example)
|
||||
|
|
@ -132,22 +127,6 @@ void UIScene_HelpAndOptionsMenu::handleReload() {
|
|||
}
|
||||
}
|
||||
|
||||
if (!ProfileManager.IsFullVersion()) //|| ProfileManager.IsGuest(m_iPad))
|
||||
{
|
||||
#if TO_BE_IMPLEMENTED
|
||||
m_Buttons[BUTTON_HAO_CHANGESKIN].SetEnable(false);
|
||||
m_Buttons[BUTTON_HAO_CHANGESKIN].EnableInput(false);
|
||||
// set the focus to the second button
|
||||
|
||||
XuiElementSetUserFocus(m_Buttons[BUTTON_HAO_HOWTOPLAY].m_hObj, m_iPad);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!ProfileManager.IsFullVersion()) //|| ProfileManager.IsGuest(m_iPad))
|
||||
{
|
||||
removeControl(&m_buttons[BUTTON_HAO_CHANGESKIN], false);
|
||||
}
|
||||
|
||||
doHorizontalResizeCheck();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -83,60 +83,16 @@ void UIScene_DeathMenu::handlePress(F64 controlId, F64 childId) {
|
|||
// 4J-PB - fix for #8333 - BLOCKER: If player decides to exit game,
|
||||
// then cancels the exit player becomes stuck at game over screen
|
||||
// m_bIgnoreInput = true;
|
||||
// Check if it's the trial version
|
||||
if (ProfileManager.IsFullVersion()) {
|
||||
// is it the primary player exiting?
|
||||
if (m_iPad == ProfileManager.GetPrimaryPad()) {
|
||||
unsigned int uiIDA[3];
|
||||
int playTime = -1;
|
||||
if (pMinecraft->localplayers[m_iPad] != nullptr) {
|
||||
playTime = (int)pMinecraft->localplayers[m_iPad]
|
||||
->getSessionTimer();
|
||||
}
|
||||
|
||||
if (StorageManager.GetSaveDisabled()) {
|
||||
uiIDA[0] = IDS_CONFIRM_CANCEL;
|
||||
uiIDA[1] = IDS_CONFIRM_OK;
|
||||
ui.RequestAlertMessage(
|
||||
IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME_PROGRESS_LOST,
|
||||
uiIDA, 2, m_iPad,
|
||||
&IUIScene_PauseMenu::ExitGameDialogReturned,
|
||||
(void*)GetCallbackUniqueId());
|
||||
} else {
|
||||
if (g_NetworkManager.IsHost()) {
|
||||
uiIDA[0] = IDS_CONFIRM_CANCEL;
|
||||
uiIDA[1] = IDS_EXIT_GAME_SAVE;
|
||||
uiIDA[2] = IDS_EXIT_GAME_NO_SAVE;
|
||||
|
||||
ui.RequestAlertMessage(
|
||||
IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME, uiIDA, 3,
|
||||
m_iPad,
|
||||
&IUIScene_PauseMenu::ExitGameSaveDialogReturned,
|
||||
(void*)GetCallbackUniqueId());
|
||||
} else {
|
||||
uiIDA[0] = IDS_CONFIRM_CANCEL;
|
||||
uiIDA[1] = IDS_CONFIRM_OK;
|
||||
|
||||
ui.RequestAlertMessage(
|
||||
IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME, uiIDA, 2,
|
||||
m_iPad,
|
||||
&IUIScene_PauseMenu::ExitGameDialogReturned,
|
||||
(void*)GetCallbackUniqueId());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// just exit the player
|
||||
app.SetAction(m_iPad, eAppAction_ExitPlayer);
|
||||
// is it the primary player exiting?
|
||||
if (m_iPad == ProfileManager.GetPrimaryPad()) {
|
||||
unsigned int uiIDA[3];
|
||||
int playTime = -1;
|
||||
if (pMinecraft->localplayers[m_iPad] != nullptr) {
|
||||
playTime = (int)pMinecraft->localplayers[m_iPad]
|
||||
->getSessionTimer();
|
||||
}
|
||||
} else {
|
||||
// is it the primary player exiting?
|
||||
if (m_iPad == ProfileManager.GetPrimaryPad()) {
|
||||
|
||||
// adjust the trial time played
|
||||
ui.ReduceTrialTimerValue();
|
||||
|
||||
// exit the level
|
||||
unsigned int uiIDA[2];
|
||||
if (StorageManager.GetSaveDisabled()) {
|
||||
uiIDA[0] = IDS_CONFIRM_CANCEL;
|
||||
uiIDA[1] = IDS_CONFIRM_OK;
|
||||
ui.RequestAlertMessage(
|
||||
|
|
@ -145,9 +101,30 @@ void UIScene_DeathMenu::handlePress(F64 controlId, F64 childId) {
|
|||
&IUIScene_PauseMenu::ExitGameDialogReturned,
|
||||
(void*)GetCallbackUniqueId());
|
||||
} else {
|
||||
// just exit the player
|
||||
app.SetAction(m_iPad, eAppAction_ExitPlayer);
|
||||
if (g_NetworkManager.IsHost()) {
|
||||
uiIDA[0] = IDS_CONFIRM_CANCEL;
|
||||
uiIDA[1] = IDS_EXIT_GAME_SAVE;
|
||||
uiIDA[2] = IDS_EXIT_GAME_NO_SAVE;
|
||||
|
||||
ui.RequestAlertMessage(
|
||||
IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME, uiIDA, 3,
|
||||
m_iPad,
|
||||
&IUIScene_PauseMenu::ExitGameSaveDialogReturned,
|
||||
(void*)GetCallbackUniqueId());
|
||||
} else {
|
||||
uiIDA[0] = IDS_CONFIRM_CANCEL;
|
||||
uiIDA[1] = IDS_CONFIRM_OK;
|
||||
|
||||
ui.RequestAlertMessage(
|
||||
IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME, uiIDA, 2,
|
||||
m_iPad,
|
||||
&IUIScene_PauseMenu::ExitGameDialogReturned,
|
||||
(void*)GetCallbackUniqueId());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// just exit the player
|
||||
app.SetAction(m_iPad, eAppAction_ExitPlayer);
|
||||
}
|
||||
} break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,9 +114,7 @@ void UIScene_InGameSaveManagementMenu::updateTooltips() {
|
|||
void UIScene_InGameSaveManagementMenu::Initialise() {
|
||||
m_iSaveListIndex = 0;
|
||||
|
||||
// Check if we're in the trial version
|
||||
if (ProfileManager.IsFullVersion() == false) {
|
||||
} else if (StorageManager.GetSaveDisabled()) {
|
||||
if (StorageManager.GetSaveDisabled()) {
|
||||
GetSaveInfo();
|
||||
} else {
|
||||
// 4J-PB - we need to check that there is enough space left to create a
|
||||
|
|
|
|||
|
|
@ -29,11 +29,6 @@ UIScene_PauseMenu::UIScene_PauseMenu(int iPad, void* initData,
|
|||
m_buttons[BUTTON_PAUSE_EXITGAME].init(app.GetString(IDS_EXIT_GAME),
|
||||
BUTTON_PAUSE_EXITGAME);
|
||||
|
||||
if (!ProfileManager.IsFullVersion()) {
|
||||
// hide the trial timer
|
||||
ui.ShowTrialTimer(false);
|
||||
}
|
||||
|
||||
updateControlsVisibility();
|
||||
|
||||
doHorizontalResizeCheck();
|
||||
|
|
@ -100,23 +95,6 @@ void UIScene_PauseMenu::updateTooltips() {
|
|||
int iRB = -1;
|
||||
int iX = -1;
|
||||
|
||||
// if (ProfileManager.IsFullVersion()) {
|
||||
// if (StorageManager.GetSaveDisabled()) {
|
||||
// iX = bIsisPrimaryHost ? IDS_TOOLTIPS_SELECTDEVICE : -1;
|
||||
// if (CSocialManager::Instance()->IsTitleAllowedToPostImages() &&
|
||||
// CSocialManager::Instance()->AreAllUsersAllowedToPostImages() &&
|
||||
// bUserisClientSide) {
|
||||
// iY = IDS_TOOLTIPS_SHARE;
|
||||
// }
|
||||
// } else {
|
||||
// iX = bIsisPrimaryHost ? IDS_TOOLTIPS_CHANGEDEVICE : -1;
|
||||
// if (CSocialManager::Instance()->IsTitleAllowedToPostImages() &&
|
||||
// CSocialManager::Instance()->AreAllUsersAllowedToPostImages() &&
|
||||
// bUserisClientSide) {
|
||||
// iY = IDS_TOOLTIPS_SHARE;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
ui.SetTooltips(m_iPad, IDS_TOOLTIPS_SELECT, IDS_TOOLTIPS_BACK, iX, iY, -1,
|
||||
-1, -1, iRB);
|
||||
}
|
||||
|
|
@ -203,9 +181,6 @@ void UIScene_PauseMenu::handleInput(int iPad, int key, bool repeat,
|
|||
|
||||
ui.PlayUISFX(eSFX_Back);
|
||||
navigateBack();
|
||||
if (!ProfileManager.IsFullVersion()) {
|
||||
ui.ShowTrialTimer(true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ACTION_MENU_OK:
|
||||
|
|
@ -327,83 +302,17 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId) {
|
|||
break;
|
||||
case BUTTON_PAUSE_EXITGAME: {
|
||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||
// Check if it's the trial version
|
||||
if (ProfileManager.IsFullVersion()) {
|
||||
unsigned int uiIDA[3];
|
||||
unsigned int uiIDA[3];
|
||||
|
||||
// is it the primary player exiting?
|
||||
if (m_iPad == ProfileManager.GetPrimaryPad()) {
|
||||
int playTime = -1;
|
||||
if (pMinecraft->localplayers[m_iPad] != nullptr) {
|
||||
playTime = (int)pMinecraft->localplayers[m_iPad]
|
||||
->getSessionTimer();
|
||||
}
|
||||
|
||||
if (StorageManager.GetSaveDisabled()) {
|
||||
uiIDA[0] = IDS_CONFIRM_CANCEL;
|
||||
uiIDA[1] = IDS_CONFIRM_OK;
|
||||
ui.RequestAlertMessage(
|
||||
IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME_PROGRESS_LOST,
|
||||
uiIDA, 2, m_iPad,
|
||||
&IUIScene_PauseMenu::ExitGameDialogReturned,
|
||||
(void*)GetCallbackUniqueId());
|
||||
} else {
|
||||
if (g_NetworkManager.IsHost()) {
|
||||
uiIDA[0] = IDS_CONFIRM_CANCEL;
|
||||
uiIDA[1] = IDS_EXIT_GAME_SAVE;
|
||||
uiIDA[2] = IDS_EXIT_GAME_NO_SAVE;
|
||||
|
||||
if (g_NetworkManager.GetPlayerCount() > 1) {
|
||||
ui.RequestAlertMessage(
|
||||
IDS_EXIT_GAME,
|
||||
IDS_CONFIRM_EXIT_GAME_CONFIRM_DISCONNECT_SAVE,
|
||||
uiIDA, 3, m_iPad,
|
||||
&UIScene_PauseMenu::
|
||||
ExitGameSaveDialogReturned,
|
||||
(void*)GetCallbackUniqueId());
|
||||
} else {
|
||||
ui.RequestAlertMessage(
|
||||
IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME, uiIDA,
|
||||
3, m_iPad,
|
||||
&UIScene_PauseMenu::
|
||||
ExitGameSaveDialogReturned,
|
||||
(void*)GetCallbackUniqueId());
|
||||
}
|
||||
} else {
|
||||
uiIDA[0] = IDS_CONFIRM_CANCEL;
|
||||
uiIDA[1] = IDS_CONFIRM_OK;
|
||||
|
||||
ui.RequestAlertMessage(
|
||||
IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME, uiIDA, 2,
|
||||
m_iPad,
|
||||
&IUIScene_PauseMenu::ExitGameDialogReturned,
|
||||
(void*)GetCallbackUniqueId());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
int playTime = -1;
|
||||
if (pMinecraft->localplayers[m_iPad] != nullptr) {
|
||||
playTime = (int)pMinecraft->localplayers[m_iPad]
|
||||
->getSessionTimer();
|
||||
}
|
||||
|
||||
// just exit the player
|
||||
app.SetAction(m_iPad, eAppAction_ExitPlayer);
|
||||
// is it the primary player exiting?
|
||||
if (m_iPad == ProfileManager.GetPrimaryPad()) {
|
||||
int playTime = -1;
|
||||
if (pMinecraft->localplayers[m_iPad] != nullptr) {
|
||||
playTime = (int)pMinecraft->localplayers[m_iPad]
|
||||
->getSessionTimer();
|
||||
}
|
||||
} else {
|
||||
// is it the primary player exiting?
|
||||
if (m_iPad == ProfileManager.GetPrimaryPad()) {
|
||||
int playTime = -1;
|
||||
if (pMinecraft->localplayers[m_iPad] != nullptr) {
|
||||
playTime = (int)pMinecraft->localplayers[m_iPad]
|
||||
->getSessionTimer();
|
||||
}
|
||||
|
||||
// adjust the trial time played
|
||||
ui.ReduceTrialTimerValue();
|
||||
|
||||
// exit the level
|
||||
unsigned int uiIDA[2];
|
||||
if (StorageManager.GetSaveDisabled()) {
|
||||
uiIDA[0] = IDS_CONFIRM_CANCEL;
|
||||
uiIDA[1] = IDS_CONFIRM_OK;
|
||||
ui.RequestAlertMessage(
|
||||
|
|
@ -411,40 +320,54 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId) {
|
|||
uiIDA, 2, m_iPad,
|
||||
&IUIScene_PauseMenu::ExitGameDialogReturned,
|
||||
(void*)GetCallbackUniqueId());
|
||||
|
||||
} else {
|
||||
int playTime = -1;
|
||||
if (pMinecraft->localplayers[m_iPad] != nullptr) {
|
||||
playTime = (int)pMinecraft->localplayers[m_iPad]
|
||||
->getSessionTimer();
|
||||
}
|
||||
if (g_NetworkManager.IsHost()) {
|
||||
uiIDA[0] = IDS_CONFIRM_CANCEL;
|
||||
uiIDA[1] = IDS_EXIT_GAME_SAVE;
|
||||
uiIDA[2] = IDS_EXIT_GAME_NO_SAVE;
|
||||
|
||||
// just exit the player
|
||||
app.SetAction(m_iPad, eAppAction_ExitPlayer);
|
||||
if (g_NetworkManager.GetPlayerCount() > 1) {
|
||||
ui.RequestAlertMessage(
|
||||
IDS_EXIT_GAME,
|
||||
IDS_CONFIRM_EXIT_GAME_CONFIRM_DISCONNECT_SAVE,
|
||||
uiIDA, 3, m_iPad,
|
||||
&UIScene_PauseMenu::
|
||||
ExitGameSaveDialogReturned,
|
||||
(void*)GetCallbackUniqueId());
|
||||
} else {
|
||||
ui.RequestAlertMessage(
|
||||
IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME, uiIDA,
|
||||
3, m_iPad,
|
||||
&UIScene_PauseMenu::
|
||||
ExitGameSaveDialogReturned,
|
||||
(void*)GetCallbackUniqueId());
|
||||
}
|
||||
} else {
|
||||
uiIDA[0] = IDS_CONFIRM_CANCEL;
|
||||
uiIDA[1] = IDS_CONFIRM_OK;
|
||||
|
||||
ui.RequestAlertMessage(
|
||||
IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME, uiIDA, 2,
|
||||
m_iPad,
|
||||
&IUIScene_PauseMenu::ExitGameDialogReturned,
|
||||
(void*)GetCallbackUniqueId());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
int playTime = -1;
|
||||
if (pMinecraft->localplayers[m_iPad] != nullptr) {
|
||||
playTime = (int)pMinecraft->localplayers[m_iPad]
|
||||
->getSessionTimer();
|
||||
}
|
||||
|
||||
// just exit the player
|
||||
app.SetAction(m_iPad, eAppAction_ExitPlayer);
|
||||
}
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_PauseMenu::PerformActionSaveGame() {
|
||||
// is the player trying to save in the trial version?
|
||||
if (!ProfileManager.IsFullVersion()) {
|
||||
// Unlock the full version?
|
||||
if (!ProfileManager.IsSignedInLive(m_iPad)) {
|
||||
} else {
|
||||
unsigned int uiIDA[2];
|
||||
uiIDA[0] = IDS_CONFIRM_OK;
|
||||
uiIDA[1] = IDS_CONFIRM_CANCEL;
|
||||
ui.RequestAlertMessage(IDS_UNLOCK_TITLE, IDS_UNLOCK_TOSAVE_TEXT,
|
||||
uiIDA, 2, m_iPad,
|
||||
&UIScene_PauseMenu::UnlockFullSaveReturned,
|
||||
(void*)GetCallbackUniqueId());
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// 4J-PB - Is the player trying to save but they are using a trial
|
||||
// texturepack ?
|
||||
if (!Minecraft::GetInstance()->skins->isUsingDefaultSkin()) {
|
||||
|
|
@ -527,17 +450,6 @@ void UIScene_PauseMenu::HandleDLCMountingComplete() {
|
|||
app.DebugPrintf(
|
||||
"UIScene_PauseMenu::HandleDLCMountingComplete - m_bIgnoreInput false "
|
||||
"\n");
|
||||
|
||||
// if(ProfileManager.IsFullVersion())
|
||||
// {
|
||||
// bool bIsisPrimaryHost=g_NetworkManager.IsHost() &&
|
||||
// (ProfileManager.GetPrimaryPad()==m_iPad);
|
||||
//
|
||||
// if(bIsisPrimaryHost)
|
||||
// {
|
||||
// m_buttons[BUTTON_PAUSE_SAVEGAME].setEnable(true);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
int UIScene_PauseMenu::UnlockFullSaveReturned(
|
||||
|
|
|
|||
|
|
@ -867,24 +867,10 @@ int main(int argc, const char* argv[]) {
|
|||
// Any threading type things to deal with from the xui side?
|
||||
app.HandleXuiActions();
|
||||
|
||||
// 4J-PB - Update the trial timer display if we are in the trial version
|
||||
if (!ProfileManager.IsFullVersion()) {
|
||||
// display the trial timer
|
||||
if (app.GetGameStarted()) {
|
||||
// 4J-PB - if the game is paused, add the elapsed time to the
|
||||
// trial timer count so it doesn't tick down
|
||||
if (app.IsAppPaused()) {
|
||||
app.UpdateTrialPausedTimer();
|
||||
}
|
||||
ui.UpdateTrialTimer(ProfileManager.GetPrimaryPad());
|
||||
}
|
||||
} else {
|
||||
// need to turn off the trial timer if it was on , and we've
|
||||
// unlocked the full version
|
||||
if (bTrialTimerDisplayed) {
|
||||
ui.ShowTrialTimer(false);
|
||||
bTrialTimerDisplayed = false;
|
||||
}
|
||||
// need to turn off the trial timer if it was on
|
||||
if (bTrialTimerDisplayed) {
|
||||
ui.ShowTrialTimer(false);
|
||||
bTrialTimerDisplayed = false;
|
||||
}
|
||||
|
||||
// Fix for #7318 - Title crashes after short soak in the leaderboards
|
||||
|
|
|
|||
|
|
@ -283,7 +283,6 @@ uint32_t XEnableGuestSignin(bool fEnable) { return 0; }
|
|||
/////////////////////////////////////////////// Profile library
|
||||
#if defined(_WINDOWS64)
|
||||
static void* profileData[4];
|
||||
static bool s_bProfileIsFullVersion;
|
||||
void C_4JProfile::Initialise(std::uint32_t dwTitleID, std::uint32_t dwOfferID,
|
||||
unsigned short usProfileVersion,
|
||||
unsigned int uiProfileValuesC,
|
||||
|
|
@ -427,7 +426,6 @@ int C_4JProfile::GetPrimaryPad() { return 0; }
|
|||
void C_4JProfile::SetPrimaryPad(int iPad) {}
|
||||
char* C_4JProfile::GetGamertag(int iPad) { return "PlayerName"; }
|
||||
std::wstring C_4JProfile::GetDisplayName(int iPad) { return L"PlayerName"; }
|
||||
bool C_4JProfile::IsFullVersion() { return s_bProfileIsFullVersion; }
|
||||
void C_4JProfile::SetSignInChangeCallback(void (*Func)(void*, bool,
|
||||
unsigned int),
|
||||
void* lpParam) {}
|
||||
|
|
@ -505,7 +503,6 @@ void C_4JProfile::SetUpsellCallback(void (*Func)(void* lpParam,
|
|||
int iUserData),
|
||||
void* lpParam) {}
|
||||
void C_4JProfile::SetDebugFullOverride(bool bVal) {
|
||||
s_bProfileIsFullVersion = bVal;
|
||||
}
|
||||
void C_4JProfile::ShowProfileCard(int iPad, PlayerUID targetUid) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -846,24 +846,10 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
|||
// Any threading type things to deal with from the xui side?
|
||||
app.HandleXuiActions();
|
||||
|
||||
// 4J-PB - Update the trial timer display if we are in the trial version
|
||||
if (!ProfileManager.IsFullVersion()) {
|
||||
// display the trial timer
|
||||
if (app.GetGameStarted()) {
|
||||
// 4J-PB - if the game is paused, add the elapsed time to the
|
||||
// trial timer count so it doesn't tick down
|
||||
if (app.IsAppPaused()) {
|
||||
app.UpdateTrialPausedTimer();
|
||||
}
|
||||
ui.UpdateTrialTimer(ProfileManager.GetPrimaryPad());
|
||||
}
|
||||
} else {
|
||||
// need to turn off the trial timer if it was on , and we've
|
||||
// unlocked the full version
|
||||
if (bTrialTimerDisplayed) {
|
||||
ui.ShowTrialTimer(false);
|
||||
bTrialTimerDisplayed = false;
|
||||
}
|
||||
// need to turn off the trial timer if it was on
|
||||
if (bTrialTimerDisplayed) {
|
||||
ui.ShowTrialTimer(false);
|
||||
bTrialTimerDisplayed = false;
|
||||
}
|
||||
|
||||
// Fix for #7318 - Title crashes after short soak in the leaderboards
|
||||
|
|
|
|||
|
|
@ -812,10 +812,6 @@ std::shared_ptr<MultiplayerLocalPlayer> Minecraft::createExtraLocalPlayer(
|
|||
if (app.GetTutorialMode()) {
|
||||
localgameModes[idx] =
|
||||
new FullTutorialMode(idx, this, clientConnection);
|
||||
}
|
||||
// check if we're in the trial version
|
||||
else if (ProfileManager.IsFullVersion() == false) {
|
||||
localgameModes[idx] = new TrialMode(idx, this, clientConnection);
|
||||
} else {
|
||||
localgameModes[idx] =
|
||||
new ConsoleGameMode(idx, this, clientConnection);
|
||||
|
|
@ -1003,9 +999,8 @@ void Minecraft::run_middle() {
|
|||
// stop();
|
||||
// }
|
||||
|
||||
// 4J-PB - AUTOSAVE TIMER - only in the full game and if the
|
||||
// player is the host
|
||||
if (level != nullptr && ProfileManager.IsFullVersion() &&
|
||||
// 4J-PB - AUTOSAVE TIMER - if the player is the host
|
||||
if (level != nullptr &&
|
||||
g_NetworkManager.IsHost()) {
|
||||
/*if(!bAutosaveTimerSet)
|
||||
{
|
||||
|
|
@ -4092,9 +4087,6 @@ void Minecraft::startAndConnectTo(const std::wstring& name,
|
|||
*/
|
||||
minecraft->serverDomain = L"www.minecraft.net";
|
||||
|
||||
// 4J Stu - We never want the player to be DemoUser, we always want them to
|
||||
// have their gamertag displayed
|
||||
// if (ProfileManager.IsFullVersion())
|
||||
{
|
||||
if (userName != L"" &&
|
||||
sid != L"") // 4J - username & side were compared with nullptr
|
||||
|
|
@ -4172,7 +4164,6 @@ void Minecraft::main() {
|
|||
// 4J Stu - This block generates XML for the game rules schema
|
||||
|
||||
// 4J-PB - Can't call this for the first 5 seconds of a game - MS rule
|
||||
// if (ProfileManager.IsFullVersion())
|
||||
{
|
||||
name =
|
||||
L"Player" + _toString<int64_t>(System::currentTimeMillis() % 1000);
|
||||
|
|
|
|||
|
|
@ -109,15 +109,7 @@ void SelectWorldScreen::buttonClicked(Button* button) {
|
|||
} else if (button->id == BUTTON_SELECT_ID) {
|
||||
worldSelected(selectedWorld);
|
||||
} else if (button->id == BUTTON_CREATE_ID) {
|
||||
if (ProfileManager.IsFullVersion()) {
|
||||
minecraft->setScreen(new CreateWorldScreen(this));
|
||||
} else {
|
||||
// create demo world
|
||||
minecraft->setScreen(nullptr);
|
||||
if (done) return;
|
||||
done = true;
|
||||
// 4J Stu - Not used, so commenting to stop the build failing
|
||||
}
|
||||
minecraft->setScreen(new CreateWorldScreen(this));
|
||||
} else if (button->id == BUTTON_RENAME_ID) {
|
||||
minecraft->setScreen(
|
||||
new RenameWorldScreen(this, getWorldId(selectedWorld)));
|
||||
|
|
|
|||
|
|
@ -191,11 +191,6 @@ void ClientConnection::handleLogin(std::shared_ptr<LoginPacket> packet) {
|
|||
if (app.GetTutorialMode()) {
|
||||
minecraft->gameMode = new FullTutorialMode(
|
||||
InputManager.GetPrimaryPad(), minecraft, this);
|
||||
}
|
||||
// check if we're in the trial version
|
||||
else if (ProfileManager.IsFullVersion() == false) {
|
||||
minecraft->gameMode =
|
||||
new TrialMode(InputManager.GetPrimaryPad(), minecraft, this);
|
||||
} else {
|
||||
minecraft->gameMode = new ConsoleGameMode(
|
||||
InputManager.GetPrimaryPad(), minecraft, this);
|
||||
|
|
|
|||
|
|
@ -837,8 +837,7 @@ void LocalPlayer::awardStat(Stat* stat, const std::vector<uint8_t>& param) {
|
|||
<< ach->getAchievementID();
|
||||
if (!(achBit & m_awardedThisSession)) {
|
||||
ProfileManager.Award(m_iPad, ach->getAchievementID());
|
||||
if (ProfileManager.IsFullVersion())
|
||||
m_awardedThisSession |= achBit;
|
||||
m_awardedThisSession |= achBit;
|
||||
}
|
||||
}
|
||||
minecraft->stats[m_iPad]->award(stat, level->difficulty, count);
|
||||
|
|
|
|||
|
|
@ -835,7 +835,7 @@ void MinecraftServer::Suspend() {
|
|||
float fSecsPerTick = 1.0f / (float)qwTicksPerSec.QuadPart;
|
||||
// Save the start time
|
||||
QueryPerformanceCounter(&qwTime);
|
||||
if (m_bLoaded && ProfileManager.IsFullVersion() &&
|
||||
if (m_bLoaded &&
|
||||
(!StorageManager.GetSaveDisabled())) {
|
||||
if (players != nullptr) {
|
||||
players->saveAll(nullptr);
|
||||
|
|
@ -887,7 +887,7 @@ void MinecraftServer::stopServer(bool didInit) {
|
|||
// if trial version or saving is disabled, then don't save anything.
|
||||
// Also don't save anything if we didn't actually get through the server
|
||||
// initialisation.
|
||||
if (m_saveOnExit && ProfileManager.IsFullVersion() &&
|
||||
if (m_saveOnExit &&
|
||||
(!StorageManager.GetSaveDisabled()) && didInit) {
|
||||
if (players != nullptr) {
|
||||
players->saveAll(Minecraft::GetInstance()->progressRenderer,
|
||||
|
|
|
|||
|
|
@ -110,14 +110,6 @@ void StatsCounter::clear() {
|
|||
}
|
||||
|
||||
void StatsCounter::parse(void* data) {
|
||||
// 4J-PB - If this is the trial game, let's just make sure all the stats are
|
||||
// empty 4J-PB - removing - someone can have the full game, and then remove
|
||||
// it and go back to the trial
|
||||
// if(!ProfileManager.IsFullVersion())
|
||||
// {
|
||||
// stats.clear();
|
||||
// return;
|
||||
// }
|
||||
// Check that we don't already have any stats
|
||||
assert(stats.size() == 0);
|
||||
|
||||
|
|
@ -177,11 +169,6 @@ void StatsCounter::parse(void* data) {
|
|||
}
|
||||
|
||||
void StatsCounter::save(int player, bool force) {
|
||||
// 4J-PB - If this is the trial game, don't save any stats
|
||||
if (!ProfileManager.IsFullVersion()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check we're going to have enough room to store all possible stats
|
||||
unsigned int uiTotalStatsSize =
|
||||
(Stats::all->size() * 4 * sizeof(unsigned short)) -
|
||||
|
|
@ -270,11 +257,6 @@ void StatsCounter::flushLeaderboards() {
|
|||
}
|
||||
|
||||
void StatsCounter::saveLeaderboards() {
|
||||
// 4J-PB - If this is the trial game, no writing leaderboards
|
||||
if (!ProfileManager.IsFullVersion()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (LeaderboardManager::Instance()->OpenSession()) {
|
||||
writeStats();
|
||||
LeaderboardManager::Instance()->CloseSession();
|
||||
|
|
@ -291,10 +273,6 @@ void StatsCounter::saveLeaderboards() {
|
|||
}
|
||||
|
||||
void StatsCounter::writeStats() {
|
||||
// 4J-PB - If this is the trial game, no writing
|
||||
if (!ProfileManager.IsFullVersion()) {
|
||||
return;
|
||||
}
|
||||
// unsigned int locale = XGetLocale();
|
||||
|
||||
int viewCount = 0;
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ public:
|
|||
virtual void SetPrimaryPad(int iPad) = 0;
|
||||
virtual char* GetGamertag(int iPad) = 0;
|
||||
virtual std::wstring GetDisplayName(int iPad) = 0;
|
||||
virtual bool IsFullVersion() = 0;
|
||||
virtual void SetSignInChangeCallback(
|
||||
void (*Func)(void*, bool, unsigned int), void* lpParam) = 0;
|
||||
virtual void SetNotificationsCallback(
|
||||
|
|
|
|||
Loading…
Reference in a new issue