forked from cafeberry/cafeberry
Merge remote-tracking branch 'origin/main' into networking
This commit is contained in:
@@ -9,9 +9,9 @@ class IUIController
|
||||
public:
|
||||
virtual void tick() = 0;
|
||||
virtual void render() = 0;
|
||||
virtual void StartReloadSkinThread() = 0;
|
||||
virtual bool IsReloadingSkin() = 0;
|
||||
virtual void CleanUpSkinReload() = 0;
|
||||
virtual void StartReloadSkinsThread() = 0;
|
||||
virtual bool IsReloadingSkins() = 0;
|
||||
virtual void CleanUpSkinsReload() = 0;
|
||||
virtual bool NavigateToScene(int iPad, EUIScene scene, void *initData = NULL, EUILayer layer = eUILayer_Scene, EUIGroup group = eUIGroup_PAD) = 0;
|
||||
virtual bool NavigateBack(int iPad, bool forceUsePad = false, EUIScene eScene = eUIScene_COUNT, EUILayer eLayer = eUILayer_COUNT) = 0;
|
||||
virtual void CloseUIScenes(int iPad, bool forceIPad = false) = 0;
|
||||
|
||||
@@ -23,7 +23,7 @@ UIComponent_PressStartToPlay::UIComponent_PressStartToPlay(int iPad, void *initD
|
||||
// 4J-JEV: This object is persistent, so this string needs to be able to handle language changes.
|
||||
#ifdef __ORBIS__
|
||||
m_labelPressStart.init( (UIString) [] { return replaceAll(app.GetString(IDS_PRESS_X_TO_JOIN), L"{*CONTROLLER_VK_A*}", app.GetVKReplacement(VK_PAD_A) ); });
|
||||
#elif defined _XBOX_ONE
|
||||
#elif defined _XBOX_ONE || defined _WINDOWS64
|
||||
m_labelPressStart.init( (UIString) [] { return replaceAll(app.GetString(IDS_PRESS_START_TO_JOIN), L"{*CONTROLLER_VK_START*}", app.GetVKReplacement(VK_PAD_START) ); });
|
||||
#else
|
||||
m_labelPressStart.init(IDS_PRESS_START_TO_JOIN);
|
||||
@@ -82,7 +82,7 @@ void UIComponent_PressStartToPlay::handleTimerComplete(int id)
|
||||
void UIComponent_PressStartToPlay::showPressStart(int iPad, bool show)
|
||||
{
|
||||
m_showingPressStart[iPad] = show;
|
||||
if(!ui.IsExpectingOrReloadingSkin() && hasMovie())
|
||||
if(!ui.IsExpectingOrReloadingSkins() && hasMovie())
|
||||
{
|
||||
m_controlPressStartPanel.setVisible(show);
|
||||
|
||||
@@ -103,7 +103,7 @@ void UIComponent_PressStartToPlay::showPressStart(int iPad, bool show)
|
||||
void UIComponent_PressStartToPlay::setTrialTimer(const wstring &label)
|
||||
{
|
||||
m_trialTimer = label;
|
||||
if(!ui.IsExpectingOrReloadingSkin() && hasMovie())
|
||||
if(!ui.IsExpectingOrReloadingSkins() && hasMovie())
|
||||
{
|
||||
m_labelTrialTimer.setLabel(label);
|
||||
}
|
||||
@@ -112,7 +112,7 @@ void UIComponent_PressStartToPlay::setTrialTimer(const wstring &label)
|
||||
void UIComponent_PressStartToPlay::showTrialTimer(bool show)
|
||||
{
|
||||
m_showingTrialTimer = show;
|
||||
if(!ui.IsExpectingOrReloadingSkin() && hasMovie())
|
||||
if(!ui.IsExpectingOrReloadingSkins() && hasMovie())
|
||||
{
|
||||
m_labelTrialTimer.setVisible(show);
|
||||
}
|
||||
@@ -121,7 +121,7 @@ void UIComponent_PressStartToPlay::showTrialTimer(bool show)
|
||||
void UIComponent_PressStartToPlay::setAutosaveTimer(const wstring &label)
|
||||
{
|
||||
m_autosaveTimer = label;
|
||||
if(!ui.IsExpectingOrReloadingSkin() && hasMovie())
|
||||
if(!ui.IsExpectingOrReloadingSkins() && hasMovie())
|
||||
{
|
||||
m_labelTrialTimer.setLabel(label);
|
||||
}
|
||||
@@ -130,7 +130,7 @@ void UIComponent_PressStartToPlay::setAutosaveTimer(const wstring &label)
|
||||
void UIComponent_PressStartToPlay::showAutosaveTimer(bool show)
|
||||
{
|
||||
m_showingAutosaveTimer = show;
|
||||
if(!ui.IsExpectingOrReloadingSkin() && hasMovie())
|
||||
if(!ui.IsExpectingOrReloadingSkins() && hasMovie())
|
||||
{
|
||||
m_labelTrialTimer.setVisible(show);
|
||||
}
|
||||
@@ -139,7 +139,7 @@ void UIComponent_PressStartToPlay::showAutosaveTimer(bool show)
|
||||
void UIComponent_PressStartToPlay::showSaveIcon(bool show)
|
||||
{
|
||||
m_showingSaveIcon = show;
|
||||
if(!ui.IsExpectingOrReloadingSkin() && hasMovie())
|
||||
if(!ui.IsExpectingOrReloadingSkins() && hasMovie())
|
||||
{
|
||||
m_controlSaveIcon.setVisible(show);
|
||||
}
|
||||
@@ -151,12 +151,19 @@ void UIComponent_PressStartToPlay::showSaveIcon(bool show)
|
||||
|
||||
void UIComponent_PressStartToPlay::showPlayerDisplayName(bool show)
|
||||
{
|
||||
#ifdef _XBOX_ONE
|
||||
if(show)
|
||||
#if defined _XBOX_ONE || _WINDOWS64
|
||||
if(RenderManager.IsHiDef())
|
||||
{
|
||||
m_playerDisplayName.setLabel(ProfileManager.GetDisplayName(ProfileManager.GetPrimaryPad()));
|
||||
if(show)
|
||||
{
|
||||
m_playerDisplayName.setLabel(ProfileManager.GetDisplayName(ProfileManager.GetPrimaryPad()));
|
||||
}
|
||||
m_playerDisplayName.setVisible(show);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_playerDisplayName.setVisible(false);
|
||||
}
|
||||
m_playerDisplayName.setVisible(show);
|
||||
#else
|
||||
m_playerDisplayName.setVisible(false);
|
||||
#endif
|
||||
|
||||
@@ -181,7 +181,7 @@ void UIComponent_Tooltips::tick()
|
||||
bool layoutChanges = false;
|
||||
for (int i = 0; i < eToolTipNumButtons; i++)
|
||||
{
|
||||
if ( !ui.IsReloadingSkin() && m_tooltipValues[i].show && m_tooltipValues[i].label.needsUpdating() )
|
||||
if ( !ui.IsReloadingSkins() && m_tooltipValues[i].show && m_tooltipValues[i].label.needsUpdating() )
|
||||
{
|
||||
layoutChanges = true;
|
||||
_SetTooltip(i, m_tooltipValues[i].label, m_tooltipValues[i].show, true);
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
#include "UIFontData.h"
|
||||
#ifdef __PSVITA__
|
||||
#include <message_dialog.h>
|
||||
#elif _WINDOWS64
|
||||
#include "Windows64\Windows64_Minecraft.h"
|
||||
#endif
|
||||
|
||||
// 4J Stu - Enable this to override the Iggy Allocator
|
||||
@@ -47,8 +49,12 @@
|
||||
|
||||
#endif
|
||||
|
||||
CRITICAL_SECTION UIController::ms_reloadSkinCS;
|
||||
bool UIController::ms_bReloadSkinCSInitialised = false;
|
||||
#ifdef _WINDOWS64
|
||||
EControllerType m_LastControllerType;
|
||||
#endif
|
||||
|
||||
CRITICAL_SECTION UIController::ms_reloadSkinsCS;
|
||||
bool UIController::ms_bReloadSkinsCSInitialised = false;
|
||||
|
||||
DWORD UIController::m_dwTrialTimerLimitSecs=DYNAMIC_CONFIG_DEFAULT_TRIAL_TIME;
|
||||
|
||||
@@ -162,7 +168,7 @@ static void RADLINK DeallocateFunction ( void * alloc_callback_user_data , void
|
||||
UIController::UIController()
|
||||
{
|
||||
m_uiDebugConsole = NULL;
|
||||
m_reloadSkinThread = NULL;
|
||||
m_reloadSkinsThread = NULL;
|
||||
|
||||
m_navigateToHomeOnReload = false;
|
||||
|
||||
@@ -179,7 +185,7 @@ UIController::UIController()
|
||||
#endif
|
||||
|
||||
// 4J Stu - This is a bit of a hack until we change the Minecraft initialisation to store the proper screen size for other platforms
|
||||
#if defined _WINDOWS64 || defined _DURANGO || defined __ORBIS__
|
||||
#if defined _DURANGO || defined __ORBIS__
|
||||
m_fScreenWidth = 1920.0f;
|
||||
m_fScreenHeight = 1080.0f;
|
||||
m_bScreenWidthSetup = true;
|
||||
@@ -227,11 +233,11 @@ UIController::UIController()
|
||||
m_bTouchscreenPressed=false;
|
||||
#endif
|
||||
|
||||
if(!ms_bReloadSkinCSInitialised)
|
||||
if(!ms_bReloadSkinsCSInitialised)
|
||||
{
|
||||
// MGH - added to prevent crash loading Iggy movies while the skins were being reloaded
|
||||
InitializeCriticalSection(&ms_reloadSkinCS);
|
||||
ms_bReloadSkinCSInitialised = true;
|
||||
InitializeCriticalSection(&ms_reloadSkinsCS);
|
||||
ms_bReloadSkinsCSInitialised = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -255,6 +261,10 @@ void UIController::preInit(S32 width, S32 height)
|
||||
m_fScreenHeight = height;
|
||||
m_bScreenWidthSetup = true;
|
||||
|
||||
#ifdef _DEBUG
|
||||
app.DebugPrintf("[UIController] Width: %d, Height: %d\n", static_cast<int>(m_fScreenWidth), static_cast<int>(m_fScreenHeight));
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_IGGY_ALLOCATOR
|
||||
IggyAllocator allocator;
|
||||
allocator.user_callback_data = this;
|
||||
@@ -316,7 +326,7 @@ UIController::EFont UIController::getFontForLanguage(int language)
|
||||
switch(language)
|
||||
{
|
||||
case XC_LANGUAGE_JAPANESE: return eFont_Japanese;
|
||||
#ifdef _DURANGO
|
||||
#if defined(_DURANGO) || defined(_WINDOWS64)
|
||||
case XC_LANGUAGE_SCHINESE: return eFont_SimpChinese;
|
||||
#endif
|
||||
case XC_LANGUAGE_TCHINESE: return eFont_TradChinese;
|
||||
@@ -329,14 +339,13 @@ UITTFFont *UIController::createFont(EFont fontLanguage)
|
||||
{
|
||||
switch(fontLanguage)
|
||||
{
|
||||
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
#if !(defined _DURANGO || _WINDOWS64)
|
||||
case eFont_Japanese: return new UITTFFont("Mojangles_TTF_jaJP", "Common/Media/font/JPN/DF-DotDotGothic16.ttf", 0x203B); // JPN
|
||||
// case eFont_SimpChinese: Simplified Chinese is unsupported.
|
||||
case eFont_TradChinese: return new UITTFFont("Mojangles_TTF_cnTD", "Common/Media/font/CHT/DFTT_R5.TTC", 0x203B); // CHT
|
||||
case eFont_Korean: return new UITTFFont("Mojangles_TTF_koKR", "Common/Media/font/KOR/candadite2.ttf", 0x203B); // KOR
|
||||
#else
|
||||
case eFont_Japanese: return new UITTFFont("Mojangles_TTF_jaJP", "Common/Media/font/JPN/DFGMaruGothic-Md.ttf", 0x2022); // JPN
|
||||
#ifdef _DURANGO
|
||||
#if (defined _DURANGO || _WINDOWS64)
|
||||
case eFont_SimpChinese: return new UITTFFont("Mojangled_TTF_cnCN", "Common/Media/font/CHS/MSYH.ttf", 0x2022); // CHS
|
||||
#endif
|
||||
case eFont_TradChinese: return new UITTFFont("Mojangles_TTF_cnTD", "Common/Media/font/CHT/DFHeiMedium-B5.ttf", 0x2022); // CHT
|
||||
@@ -436,9 +445,9 @@ void UIController::tick()
|
||||
{
|
||||
SetupFont(); // If necessary, change font.
|
||||
|
||||
if ( (m_navigateToHomeOnReload || m_bCleanupOnReload) && !ui.IsReloadingSkin() )
|
||||
if ( (m_navigateToHomeOnReload || m_bCleanupOnReload) && !ui.IsReloadingSkins() )
|
||||
{
|
||||
ui.CleanUpSkinReload();
|
||||
ui.CleanUpSkinsReload();
|
||||
|
||||
if (m_navigateToHomeOnReload || !g_NetworkManager.IsInSession())
|
||||
{
|
||||
@@ -489,10 +498,102 @@ void UIController::tick()
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
GetControllerType();
|
||||
#endif
|
||||
}
|
||||
|
||||
//str1k3r - PS3 & PS4 icons are broken in some spots, therefore they wont be included yet
|
||||
#ifdef _WINDOWS64
|
||||
//str1k3r - this is what actually does all the autoswitching
|
||||
void UIController::GetControllerType()
|
||||
{
|
||||
EControllerType ControllerType = InputManager.GetControllerType(0);
|
||||
wstring controlTooltipsPath = L"";
|
||||
|
||||
if(ControllerType != m_LastControllerType)
|
||||
{
|
||||
m_LastControllerType = ControllerType;
|
||||
|
||||
switch(ControllerType)
|
||||
{
|
||||
case EControllerType_Xbox360:
|
||||
controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\XboxHDControls.swf" : L"ControlTooltips\\XboxControls.swf";
|
||||
break;
|
||||
case EControllerType_Default:
|
||||
case EControllerType_XboxOne:
|
||||
controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\DurangoHDControls.swf" : L"ControlTooltips\\DurangoControls.swf";
|
||||
break;
|
||||
/*
|
||||
case EControllerType_PS3:
|
||||
controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\PS3HDControls.swf" : L"ControlTooltips\\PS3Controls.swf";
|
||||
break;
|
||||
case EControllerType_PS4:
|
||||
controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\OrbisHDControls.swf" : L"ControlTooltips\\OrbisControls.swf";
|
||||
break;
|
||||
case EControllerType_PS5:
|
||||
controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\PS5HDControls.swf" : L"ControlTooltips\\PS5Controls.swf";
|
||||
break;
|
||||
case EControllerType_Switch:
|
||||
controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\SwitchHDControls.swf" : L"ControlTooltips\\SwitchControls.swf";
|
||||
break;
|
||||
*/
|
||||
default:
|
||||
controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\Windows64HDControls.swf" : L"ControlTooltips\\Windows64Controls.swf";
|
||||
break;
|
||||
}
|
||||
|
||||
ReloadSkin(eLibrary_ControlTooltips, controlTooltipsPath, (ui.getScreenWidth() >= 1920) ? L"skinControlTooltipsHD.swf" : L"skinControlTooltips.swf");
|
||||
|
||||
for(unsigned int i = 0; i < eUIGroup_COUNT; ++i)
|
||||
{
|
||||
if(m_groups[i]->getTooltips())
|
||||
m_groups[i]->getTooltips()->destroyMovie();
|
||||
if(m_groups[i]->getPressStartToPlay())
|
||||
m_groups[i]->getPressStartToPlay()->destroyMovie();
|
||||
|
||||
if(m_groups[i]->getTooltips())
|
||||
m_groups[i]->getTooltips()->reloadMovie(true);
|
||||
if(m_groups[i]->getPressStartToPlay())
|
||||
m_groups[i]->getPressStartToPlay()->reloadMovie(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
wstring UIController::GetTooltipSkinPath()
|
||||
{
|
||||
EControllerType ControllerType = InputManager.GetControllerType(0);
|
||||
|
||||
switch(ControllerType)
|
||||
{
|
||||
case EControllerType_Xbox360:
|
||||
return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\XboxHDControls.swf" : L"ControlTooltips\\XboxControls.swf";
|
||||
case EControllerType_Default:
|
||||
case EControllerType_XboxOne:
|
||||
return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\DurangoHDControls.swf" : L"ControlTooltips\\DurangoControls.swf";
|
||||
/*
|
||||
case EControllerType_PS3:
|
||||
return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\PS3HDControls.swf" : L"ControlTooltips\\PS3Controls.swf";
|
||||
case EControllerType_PS4:
|
||||
return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\OrbisHDControls.swf" : L"ControlTooltips\\OrbisControls.swf";
|
||||
case EControllerType_PS5:
|
||||
return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\PS5HDControls.swf" : L"ControlTooltips\\PS5Controls.swf";
|
||||
case EControllerType_Switch:
|
||||
return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\SwitchHDControls.swf" : L"ControlTooltips\\SwitchControls.swf";
|
||||
*/
|
||||
default:
|
||||
return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\Windows64HDControls.swf" : L"ControlTooltips\\Windows64Controls.swf";
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void UIController::loadSkins()
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
wstring tooltipsSkinPath = L"";
|
||||
#endif
|
||||
wstring platformSkinPath = L"";
|
||||
|
||||
#ifdef __PS3__
|
||||
@@ -500,38 +601,45 @@ void UIController::loadSkins()
|
||||
#elif defined __PSVITA__
|
||||
platformSkinPath = L"skinVita.swf";
|
||||
#elif defined _WINDOWS64
|
||||
if(m_fScreenHeight==1080.0f)
|
||||
if(m_fScreenWidth >= 1920.0f)
|
||||
{
|
||||
tooltipsSkinPath = GetTooltipSkinPath();
|
||||
platformSkinPath = L"skinHDWin.swf";
|
||||
}
|
||||
else if (m_fScreenWidth >= 960.0f && m_fScreenWidth < 1280.0f) //str1k3r - we need to check this to make sure we dont load the vita skin on 720p
|
||||
{
|
||||
tooltipsSkinPath = GetTooltipSkinPath();
|
||||
platformSkinPath = L"skinWinVita.swf";
|
||||
}
|
||||
else
|
||||
{
|
||||
tooltipsSkinPath = GetTooltipSkinPath();
|
||||
platformSkinPath = L"skinWin.swf";
|
||||
}
|
||||
#elif defined _DURANGO
|
||||
if(m_fScreenHeight==1080.0f)
|
||||
{
|
||||
//if(m_fScreenHeight==1080.0f)
|
||||
//{
|
||||
platformSkinPath = L"skinHDDurango.swf";
|
||||
}
|
||||
else
|
||||
{
|
||||
platformSkinPath = L"skinDurango.swf";
|
||||
}
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// platformSkinPath = L"skinDurango.swf";
|
||||
//}
|
||||
#elif defined __ORBIS__
|
||||
if(m_fScreenHeight==1080.0f)
|
||||
{
|
||||
//if(m_fScreenHeight==1080.0f)
|
||||
//{
|
||||
platformSkinPath = L"skinHDOrbis.swf";
|
||||
}
|
||||
else
|
||||
{
|
||||
platformSkinPath = L"skinOrbis.swf";
|
||||
}
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// platformSkinPath = L"skinOrbis.swf";
|
||||
//}
|
||||
|
||||
#endif
|
||||
|
||||
// str1k3r - Fixes 720p/480p Crashes on Windows64, also allows this to be used on 1080p consoles instead of just Windows64
|
||||
// This also cleans up some 4J code and turns 3 if statements into 1.
|
||||
if (m_fScreenHeight >= 1080.0f)
|
||||
if (m_fScreenWidth >= 1920.0f)
|
||||
{
|
||||
m_iggyLibraries[eLibrary_Platform] = loadSkin(platformSkinPath, L"platformskinHD.swf");
|
||||
m_iggyLibraries[eLibrary_GraphicsDefault] = loadSkin(L"skinHDGraphics.swf", L"skinHDGraphics.swf");
|
||||
@@ -539,6 +647,9 @@ void UIController::loadSkins()
|
||||
m_iggyLibraries[eLibrary_GraphicsInGame] = loadSkin(L"skinHDGraphicsInGame.swf", L"skinHDGraphicsInGame.swf");
|
||||
m_iggyLibraries[eLibrary_GraphicsTooltips] = loadSkin(L"skinHDGraphicsTooltips.swf", L"skinHDGraphicsTooltips.swf");
|
||||
m_iggyLibraries[eLibrary_GraphicsLabels] = loadSkin(L"skinHDGraphicsLabels.swf", L"skinHDGraphicsLabels.swf");
|
||||
#ifdef _WINDOWS64
|
||||
m_iggyLibraries[eLibrary_ControlTooltips] = loadSkin(tooltipsSkinPath, L"skinControlTooltipsHD.swf");
|
||||
#endif
|
||||
m_iggyLibraries[eLibrary_Labels] = loadSkin(L"skinHDLabels.swf", L"skinHDLabels.swf");
|
||||
m_iggyLibraries[eLibrary_InGame] = loadSkin(L"skinHDInGame.swf", L"skinHDInGame.swf");
|
||||
m_iggyLibraries[eLibrary_HUD] = loadSkin(L"skinHDHud.swf", L"skinHDHud.swf");
|
||||
@@ -553,6 +664,9 @@ void UIController::loadSkins()
|
||||
m_iggyLibraries[eLibrary_GraphicsInGame] = loadSkin(L"skinGraphicsInGame.swf", L"skinGraphicsInGame.swf");
|
||||
m_iggyLibraries[eLibrary_GraphicsTooltips] = loadSkin(L"skinGraphicsTooltips.swf", L"skinGraphicsTooltips.swf");
|
||||
m_iggyLibraries[eLibrary_GraphicsLabels] = loadSkin(L"skinGraphicsLabels.swf", L"skinGraphicsLabels.swf");
|
||||
#ifdef _WINDOWS64
|
||||
m_iggyLibraries[eLibrary_ControlTooltips] = loadSkin(tooltipsSkinPath, L"skinControlTooltips.swf");
|
||||
#endif
|
||||
m_iggyLibraries[eLibrary_Labels] = loadSkin(L"skinLabels.swf", L"skinLabels.swf");
|
||||
m_iggyLibraries[eLibrary_InGame] = loadSkin(L"skinInGame.swf", L"skinInGame.swf");
|
||||
m_iggyLibraries[eLibrary_HUD] = loadSkin(L"skinHud.swf", L"skinHud.swf");
|
||||
@@ -594,7 +708,20 @@ IggyLibrary UIController::loadSkin(const wstring &skinPath, const wstring &skinN
|
||||
return lib;
|
||||
}
|
||||
|
||||
void UIController::ReloadSkin()
|
||||
//str1k3r - reloads a single skin
|
||||
void UIController::ReloadSkin(ELibraries lib, const wstring &skinPath, const wstring &skinName)
|
||||
{
|
||||
if(m_iggyLibraries[lib] != IGGY_INVALID_LIBRARY)
|
||||
{
|
||||
IggyLibraryDestroy(m_iggyLibraries[lib]);
|
||||
m_iggyLibraries[lib] = IGGY_INVALID_LIBRARY;
|
||||
}
|
||||
|
||||
m_iggyLibraries[lib] = loadSkin(skinPath, skinName);
|
||||
}
|
||||
|
||||
//str1k3r - reloads every skin
|
||||
void UIController::ReloadSkins()
|
||||
{
|
||||
// Destroy all scene swf
|
||||
for(unsigned int i = 0; i < eUIGroup_COUNT; ++i)
|
||||
@@ -611,17 +738,19 @@ void UIController::ReloadSkin()
|
||||
m_iggyLibraries[i] = IGGY_INVALID_LIBRARY;
|
||||
}
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
// 4J Stu - Don't load on a thread on windows. I haven't investigated this in detail, so a quick fix
|
||||
reloadSkinThreadProc(this);
|
||||
#else
|
||||
|
||||
m_reloadSkinThread = new C4JThread(reloadSkinThreadProc, (void*)this, "Reload skin thread");
|
||||
m_reloadSkinThread->SetProcessor(CPU_CORE_UI_SCENE);
|
||||
m_reloadSkinsThread = new C4JThread(reloadSkinsThreadProc, (void*)this, "Reload skin thread");
|
||||
m_reloadSkinsThread->SetProcessor(CPU_CORE_UI_SCENE);
|
||||
|
||||
// Navigate to the timer scene so that we can display something while the loading is happening
|
||||
// str1k3r - Exclude this from windows64 as its not needed
|
||||
#ifndef _WINDOWS64
|
||||
ui.NavigateToScene(0,eUIScene_Timer,(void *)1,eUILayer_Tooltips,eUIGroup_Fullscreen);
|
||||
//m_reloadSkinThread->Run();
|
||||
#endif
|
||||
|
||||
// str1k3r - Fixes 4J's issue with the screen staying on the timer scene if on another thread on windows64
|
||||
#ifdef _WINDOWS64
|
||||
m_reloadSkinsThread->Run();
|
||||
#endif
|
||||
|
||||
//// Load new skin
|
||||
//loadSkins();
|
||||
@@ -634,17 +763,16 @@ void UIController::ReloadSkin()
|
||||
|
||||
//// Always reload the fullscreen group
|
||||
//m_groups[eUIGroup_Fullscreen]->ReloadAll();
|
||||
#endif
|
||||
}
|
||||
|
||||
void UIController::StartReloadSkinThread()
|
||||
void UIController::StartReloadSkinsThread()
|
||||
{
|
||||
if(m_reloadSkinThread) m_reloadSkinThread->Run();
|
||||
if(m_reloadSkinsThread) m_reloadSkinsThread->Run();
|
||||
}
|
||||
|
||||
int UIController::reloadSkinThreadProc(void* lpParam)
|
||||
int UIController::reloadSkinsThreadProc(void* lpParam)
|
||||
{
|
||||
EnterCriticalSection(&ms_reloadSkinCS); // MGH - added to prevent crash loading Iggy movies while the skins were being reloaded
|
||||
EnterCriticalSection(&ms_reloadSkinsCS); // MGH - added to prevent crash loading Iggy movies while the skins were being reloaded
|
||||
UIController *controller = (UIController *)lpParam;
|
||||
// Load new skin
|
||||
controller->loadSkins();
|
||||
@@ -662,31 +790,31 @@ int UIController::reloadSkinThreadProc(void* lpParam)
|
||||
#ifndef _WINDOW64
|
||||
controller->NavigateBack(0, false, eUIScene_COUNT, eUILayer_Tooltips);
|
||||
#endif
|
||||
LeaveCriticalSection(&ms_reloadSkinCS);
|
||||
LeaveCriticalSection(&ms_reloadSkinsCS);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool UIController::IsReloadingSkin()
|
||||
bool UIController::IsReloadingSkins()
|
||||
{
|
||||
return m_reloadSkinThread && (!m_reloadSkinThread->hasStarted() || m_reloadSkinThread->isRunning());
|
||||
return m_reloadSkinsThread && (!m_reloadSkinsThread->hasStarted() || m_reloadSkinsThread->isRunning());
|
||||
}
|
||||
|
||||
bool UIController::IsExpectingOrReloadingSkin()
|
||||
bool UIController::IsExpectingOrReloadingSkins()
|
||||
{
|
||||
return Minecraft::GetInstance()->skins->getSelected()->isLoadingData() || Minecraft::GetInstance()->skins->needsUIUpdate() || IsReloadingSkin() || PendingFontChange();
|
||||
return Minecraft::GetInstance()->skins->getSelected()->isLoadingData() || Minecraft::GetInstance()->skins->needsUIUpdate() || IsReloadingSkins() || PendingFontChange();
|
||||
}
|
||||
|
||||
void UIController::CleanUpSkinReload()
|
||||
void UIController::CleanUpSkinsReload()
|
||||
{
|
||||
delete m_reloadSkinThread;
|
||||
m_reloadSkinThread = NULL;
|
||||
delete m_reloadSkinsThread;
|
||||
m_reloadSkinsThread = NULL;
|
||||
|
||||
if(!Minecraft::GetInstance()->skins->isUsingDefaultSkin())
|
||||
{
|
||||
if(!Minecraft::GetInstance()->skins->getSelected()->hasAudio())
|
||||
{
|
||||
#ifdef _DURANGO
|
||||
#if (defined _DURANGO || _WINDOWS64)
|
||||
DWORD result = StorageManager.UnmountInstalledDLC(L"TPACK");
|
||||
#else
|
||||
DWORD result = StorageManager.UnmountInstalledDLC("TPACK");
|
||||
@@ -1401,6 +1529,17 @@ GDrawTexture * RADLINK UIController::TextureSubstitutionCreateCallback ( void *
|
||||
#if (defined __ORBIS__ || defined _DURANGO )
|
||||
*width = 96;
|
||||
*height = 96;
|
||||
#elif _WINDOWS64
|
||||
if(ui.getScreenWidth() >= 1920)
|
||||
{
|
||||
*width = 96;
|
||||
*height = 96;
|
||||
}
|
||||
else
|
||||
{
|
||||
*width = 64;
|
||||
*height = 64;
|
||||
}
|
||||
#else
|
||||
*width = 64;
|
||||
*height = 64;
|
||||
@@ -1633,7 +1772,7 @@ void UIController::NavigateToHomeMenu()
|
||||
// {
|
||||
// pDLCTexPack->m_pSoundBank->Destroy();
|
||||
// }
|
||||
#ifdef _XBOX_ONE
|
||||
#if (defined _XBOX_ONE || _WINDOWS64)
|
||||
DWORD result = StorageManager.UnmountInstalledDLC(L"TPACK");
|
||||
#else
|
||||
DWORD result = StorageManager.UnmountInstalledDLC("TPACK");
|
||||
@@ -2524,7 +2663,7 @@ C4JStorage::EMessageResult UIController::RequestMessageBox(UINT uiTitle, UINT ui
|
||||
EUILayer layer = bIsError?eUILayer_Error:eUILayer_Alert;
|
||||
|
||||
bool completed = false;
|
||||
if(ui.IsReloadingSkin())
|
||||
if(ui.IsReloadingSkins())
|
||||
{
|
||||
// Queue this message box
|
||||
QueuedMessageBoxData *queuedData = new QueuedMessageBoxData();
|
||||
|
||||
@@ -18,8 +18,8 @@ public:
|
||||
static __int64 iggyAllocCount;
|
||||
|
||||
// MGH - added to prevent crash loading Iggy movies while the skins were being reloaded
|
||||
static CRITICAL_SECTION ms_reloadSkinCS;
|
||||
static bool ms_bReloadSkinCSInitialised;
|
||||
static CRITICAL_SECTION ms_reloadSkinsCS;
|
||||
static bool ms_bReloadSkinsCSInitialised;
|
||||
|
||||
protected:
|
||||
UIComponent_DebugUIConsole *m_uiDebugConsole;
|
||||
@@ -91,6 +91,9 @@ private:
|
||||
eLibrary_GraphicsInGame,
|
||||
eLibrary_GraphicsTooltips,
|
||||
eLibrary_GraphicsLabels,
|
||||
#ifdef _WINDOWS64
|
||||
eLibrary_ControlTooltips,
|
||||
#endif
|
||||
eLibrary_Labels,
|
||||
eLibrary_InGame,
|
||||
eLibrary_HUD,
|
||||
@@ -143,7 +146,7 @@ private:
|
||||
unsigned int m_winUserIndex;
|
||||
//bool m_bSysUIShowing;
|
||||
bool m_bSystemUIShowing;
|
||||
C4JThread *m_reloadSkinThread;
|
||||
C4JThread *m_reloadSkinsThread;
|
||||
bool m_navigateToHomeOnReload;
|
||||
int m_accumulatedTicks;
|
||||
__uint64 m_lastUiSfx; // Tracks time (ms) of last UI sound effect
|
||||
@@ -201,18 +204,21 @@ public:
|
||||
virtual void tick();
|
||||
|
||||
private:
|
||||
void GetControllerType();
|
||||
wstring GetTooltipSkinPath();
|
||||
void loadSkins();
|
||||
IggyLibrary loadSkin(const wstring &skinPath, const wstring &skinName);
|
||||
|
||||
public:
|
||||
void ReloadSkin();
|
||||
virtual void StartReloadSkinThread();
|
||||
virtual bool IsReloadingSkin();
|
||||
virtual bool IsExpectingOrReloadingSkin();
|
||||
virtual void CleanUpSkinReload();
|
||||
void ReloadSkin(ELibraries lib, const wstring &skinPath, const wstring &skinName);
|
||||
void ReloadSkins();
|
||||
virtual void StartReloadSkinsThread();
|
||||
virtual bool IsReloadingSkins();
|
||||
virtual bool IsExpectingOrReloadingSkins();
|
||||
virtual void CleanUpSkinsReload();
|
||||
|
||||
private:
|
||||
static int reloadSkinThreadProc(void* lpParam);
|
||||
static int reloadSkinsThreadProc(void* lpParam);
|
||||
|
||||
public:
|
||||
byteArray getMovieData(const wstring &filename);
|
||||
|
||||
@@ -66,7 +66,7 @@ void UILayer::tick()
|
||||
|
||||
void UILayer::render(S32 width, S32 height, C4JRender::eViewportType viewport)
|
||||
{
|
||||
if(!ui.IsExpectingOrReloadingSkin())
|
||||
if(!ui.IsExpectingOrReloadingSkins())
|
||||
{
|
||||
for(AUTO_VAR(it,m_components.begin()); it != m_components.end(); ++it)
|
||||
{
|
||||
@@ -92,7 +92,7 @@ void UILayer::render(S32 width, S32 height, C4JRender::eViewportType viewport)
|
||||
if(lowestRenderable < 0) lowestRenderable = 0;
|
||||
for(;lowestRenderable < m_sceneStack.size(); ++lowestRenderable)
|
||||
{
|
||||
if(m_sceneStack[lowestRenderable]->isVisible() && (!ui.IsExpectingOrReloadingSkin() || m_sceneStack[lowestRenderable]->getSceneType()==eUIScene_Timer))
|
||||
if(m_sceneStack[lowestRenderable]->isVisible() && (!ui.IsExpectingOrReloadingSkins() || m_sceneStack[lowestRenderable]->getSceneType()==eUIScene_Timer))
|
||||
{
|
||||
PIXBeginNamedEvent(0, "Rendering scene %d", m_sceneStack[lowestRenderable]->getSceneType() );
|
||||
m_sceneStack[lowestRenderable]->render(width, height,viewport);
|
||||
|
||||
@@ -267,7 +267,7 @@ bool UIScene::mapElementsAndNames()
|
||||
extern CRITICAL_SECTION s_loadSkinCS;
|
||||
void UIScene::loadMovie()
|
||||
{
|
||||
EnterCriticalSection(&UIController::ms_reloadSkinCS); // MGH - added to prevent crash loading Iggy movies while the skins were being reloaded
|
||||
EnterCriticalSection(&UIController::ms_reloadSkinsCS); // MGH - added to prevent crash loading Iggy movies while the skins were being reloaded
|
||||
wstring moviePath = getMoviePath();
|
||||
|
||||
#ifdef __PS3__
|
||||
@@ -285,25 +285,25 @@ void UIScene::loadMovie()
|
||||
moviePath.append(L"Vita.swf");
|
||||
m_loadedResolution = eSceneResolution_Vita;
|
||||
#elif defined _WINDOWS64
|
||||
if(ui.getScreenHeight() == 720)
|
||||
if(ui.getScreenWidth() >= 1920)
|
||||
{
|
||||
moviePath.append(L"1080.swf");
|
||||
m_loadedResolution = eSceneResolution_1080;
|
||||
}
|
||||
else if(ui.getScreenWidth() >= 1280)
|
||||
{
|
||||
moviePath.append(L"720.swf");
|
||||
m_loadedResolution = eSceneResolution_720;
|
||||
}
|
||||
else if(ui.getScreenHeight() == 480)
|
||||
{
|
||||
moviePath.append(L"480.swf");
|
||||
m_loadedResolution = eSceneResolution_480;
|
||||
}
|
||||
else if(ui.getScreenHeight() < 720)
|
||||
else if(ui.getScreenWidth() >= 960)
|
||||
{
|
||||
moviePath.append(L"Vita.swf");
|
||||
m_loadedResolution = eSceneResolution_Vita;
|
||||
m_loadedResolution = eSceneResolution_544;
|
||||
}
|
||||
else
|
||||
{
|
||||
moviePath.append(L"1080.swf");
|
||||
m_loadedResolution = eSceneResolution_1080;
|
||||
moviePath.append(L"480.swf");
|
||||
m_loadedResolution = eSceneResolution_480;
|
||||
}
|
||||
#else
|
||||
moviePath.append(L"1080.swf");
|
||||
@@ -320,11 +320,36 @@ void UIScene::loadMovie()
|
||||
|
||||
if(!app.hasArchiveFile(moviePath))
|
||||
{
|
||||
//str1k3r - if were on Windows64 we have more fallbacks dont just report a FatalLoadError, try those other swfs before reporting a FatalLoadError
|
||||
#ifndef _WINDOWS64
|
||||
app.DebugPrintf("ERROR: Could not find any iggy movie for %ls!\n", moviePath.c_str());
|
||||
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
__debugbreak();
|
||||
#endif
|
||||
app.FatalLoadError();
|
||||
#else
|
||||
app.DebugPrintf("WARNING: Could not find iggy movie %ls, falling back on 480\n", moviePath.c_str());
|
||||
|
||||
moviePath = getMoviePath();
|
||||
moviePath.append(L"480.swf");
|
||||
m_loadedResolution = eSceneResolution_480;
|
||||
|
||||
//str1k3r - while 480 & Vita share basically all the same skins its just a extra fallback :D
|
||||
if(!app.hasArchiveFile(moviePath))
|
||||
{
|
||||
app.DebugPrintf("WARNING: Could not find iggy movie %ls, falling back on Vita\n", moviePath.c_str());
|
||||
|
||||
moviePath = getMoviePath();
|
||||
moviePath.append(L"Vita.swf");
|
||||
m_loadedResolution = eSceneResolution_544;
|
||||
|
||||
if(!app.hasArchiveFile(moviePath))
|
||||
{
|
||||
app.FatalLoadError();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,7 +408,7 @@ void UIScene::loadMovie()
|
||||
app.DebugPrintf(app.USER_SR, "%ls - Total: %d, Expected: %d, Diff: %d\n", moviePath.c_str(), totalStatic + totalDynamic, afterTick - beforeLoad, (afterTick - beforeLoad) - (totalStatic + totalDynamic));
|
||||
|
||||
#endif
|
||||
LeaveCriticalSection(&UIController::ms_reloadSkinCS);
|
||||
LeaveCriticalSection(&UIController::ms_reloadSkinsCS);
|
||||
|
||||
}
|
||||
|
||||
@@ -886,7 +911,7 @@ void UIScene::handleGainFocus(bool navBack)
|
||||
|
||||
void UIScene::updateTooltips()
|
||||
{
|
||||
if(!ui.IsReloadingSkin())
|
||||
if(!ui.IsReloadingSkins())
|
||||
ui.SetTooltips(m_iPad, -1);
|
||||
}
|
||||
|
||||
|
||||
@@ -74,8 +74,13 @@ public:
|
||||
{
|
||||
eSceneResolution_1080,
|
||||
eSceneResolution_720,
|
||||
eSceneResolution_480,
|
||||
//str1k3r - the Vita name on other platforms didnt seem right to me so renamed it to 544 on non Vita platforms
|
||||
#ifdef __PSVITA__
|
||||
eSceneResolution_Vita,
|
||||
#else
|
||||
eSceneResolution_544,
|
||||
#endif
|
||||
eSceneResolution_480,
|
||||
};
|
||||
|
||||
protected:
|
||||
|
||||
@@ -53,10 +53,8 @@ UIScene_DLCMainMenu::UIScene_DLCMainMenu(int iPad, void *initData, UILayer *pare
|
||||
|
||||
TelemetryManager->RecordMenuShown(iPad, eUIScene_DLCMainMenu, 0);
|
||||
|
||||
#ifdef __ORBIS__
|
||||
sceNpCommerceShowPsStoreIcon(SCE_NP_COMMERCE_PS_STORE_ICON_RIGHT);
|
||||
#elif defined __PSVITA__
|
||||
sceNpCommerce2ShowPsStoreIcon(SCE_NP_COMMERCE2_ICON_DISP_RIGHT);
|
||||
#if defined __ORBIS__ || defined __PSVITA__
|
||||
app.GetCommerce()->ShowPsStoreIcon();
|
||||
#endif
|
||||
|
||||
#if ( defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ )
|
||||
@@ -98,9 +96,7 @@ void UIScene_DLCMainMenu::handleInput(int iPad, int key, bool repeat, bool press
|
||||
case ACTION_MENU_CANCEL:
|
||||
if(pressed)
|
||||
{
|
||||
#ifdef __ORBIS__
|
||||
sceNpCommerceHidePsStoreIcon();
|
||||
#elif defined(__PSVITA__) && !defined(DISABLE_PSN)
|
||||
#if defined __PSVITA__ || defined __ORBIS__
|
||||
app.GetCommerce()->HidePsStoreIcon();
|
||||
#endif
|
||||
navigateBack();
|
||||
@@ -172,9 +168,7 @@ int UIScene_DLCMainMenu::ExitDLCMainMenu(void *pParam,int iPad,C4JStorage::EMess
|
||||
{
|
||||
UIScene_DLCMainMenu* pClass = (UIScene_DLCMainMenu*)pParam;
|
||||
|
||||
#ifdef __ORBIS__
|
||||
sceNpCommerceHidePsStoreIcon();
|
||||
#elif defined(__PSVITA__) && !defined(DISABLE_PSN)
|
||||
#if defined __PSVITA__ || defined __ORBIS__
|
||||
app.GetCommerce()->HidePsStoreIcon();
|
||||
#endif
|
||||
pClass->navigateBack();
|
||||
|
||||
@@ -105,10 +105,8 @@ int UIScene_DLCOffersMenu::ExitDLCOffersMenu(void *pParam,int iPad,C4JStorage::E
|
||||
{
|
||||
UIScene_DLCOffersMenu* pClass = (UIScene_DLCOffersMenu*)pParam;
|
||||
|
||||
#ifdef __ORBIS__
|
||||
sceNpCommerceHidePsStoreIcon();
|
||||
#elif defined(__PSVITA__) && !defined(DISABLE_PSN)
|
||||
app.GetCommerce()->HidePsStoreIcon();
|
||||
#if defined __PSVITA__ || defined __ORBIS__
|
||||
app.GetCommerce()->HidePsStoreIcon();
|
||||
#endif
|
||||
ui.NavigateToHomeMenu();//iPad,eUIScene_MainMenu);
|
||||
|
||||
@@ -193,13 +191,13 @@ void UIScene_DLCOffersMenu::handleInput(int iPad, int key, bool repeat, bool pre
|
||||
switch(iTextC)
|
||||
{
|
||||
case 0:
|
||||
m_labelHTMLSellText.init("Voici un fantastique mini-pack de 24 apparences pour personnaliser votre personnage Minecraft et vous mettre dans l'ambiance des fêtes de fin d'année.<br><br>1-4 joueurs<br>2-8 joueurs en réseau<br><br> Cet article fait l’objet d’une licence ou d’une sous-licence de Sony Computer Entertainment America, et est soumis aux conditions générales du service du réseau, au contrat d’utilisateur, aux restrictions d’utilisation de cet article et aux autres conditions applicables, disponibles sur le site www.us.playstation.com/support/useragreements. Si vous ne souhaitez pas accepter ces conditions, ne téléchargez pas ce produit. Cet article peut être utilisé avec un maximum de deux systèmes PlayStation®3 activés associés à ce compte Sony Entertainment Network. <br><br>'Minecraft' est une marque commerciale de Notch Development AB.");
|
||||
m_labelHTMLSellText.init("Voici un fantastique mini-pack de 24 apparences pour personnaliser votre personnage Minecraft et vous mettre dans l'ambiance des f�tes de fin d'ann�e.<br><br>1-4 joueurs<br>2-8 joueurs en r�seau<br><br> Cet article fait l�objet d�une licence ou d�une sous-licence de Sony Computer Entertainment America, et est soumis aux conditions g�n�rales du service du r�seau, au contrat d�utilisateur, aux restrictions d�utilisation de cet article et aux autres conditions applicables, disponibles sur le site www.us.playstation.com/support/useragreements. Si vous ne souhaitez pas accepter ces conditions, ne t�l�chargez pas ce produit. Cet article peut �tre utilis� avec un maximum de deux syst�mes PlayStation�3 activ�s associ�s � ce compte Sony Entertainment Network.�<br><br>'Minecraft' est une marque commerciale de Notch Development AB.");
|
||||
break;
|
||||
case 1:
|
||||
m_labelHTMLSellText.init("Un fabuloso minipack de 24 aspectos para personalizar tu personaje de Minecraft y ponerte a tono con las fiestas.<br><br>1-4 jugadores<br>2-8 jugadores en red<br><br> Sony Computer Entertainment America le concede la licencia o sublicencia de este artículo, que está sujeto a los términos de servicio y al acuerdo de usuario de la red. Las restricciones de uso de este artículo, así como otros términos aplicables, se encuentran en www.us.playstation.com/support/useragreements. Si no desea aceptar todos estos términos, no descargue este artículo. Este artículo puede usarse en hasta dos sistemas PlayStation®3 activados asociados con esta cuenta de Sony Entertainment Network. <br><br>'Minecraft' es una marca comercial de Notch Development AB.");
|
||||
m_labelHTMLSellText.init("Un fabuloso minipack de 24 aspectos para personalizar tu personaje de Minecraft y ponerte a tono con las fiestas.<br><br>1-4 jugadores<br>2-8 jugadores en red<br><br> Sony Computer Entertainment America le concede la licencia o sublicencia de este art�culo, que est� sujeto a los t�rminos de servicio y al acuerdo de usuario de la red. Las restricciones de uso de este art�culo, as� como otros t�rminos aplicables, se encuentran en www.us.playstation.com/support/useragreements. Si no desea aceptar todos estos t�rminos, no descargue este art�culo. Este art�culo puede usarse en hasta dos sistemas PlayStation�3 activados asociados con esta cuenta de Sony Entertainment Network.�<br><br>'Minecraft' es una marca comercial de Notch Development AB.");
|
||||
break;
|
||||
case 2:
|
||||
m_labelHTMLSellText.init("Este é um incrível pacote com 24 capas para personalizar seu personagem no Minecraft e entrar no clima de final de ano.<br><br>1-4 Jogadores<br>Jogadores em rede 2-8<br><br> Este item está sendo licenciado ou sublicenciado para você pela Sony Computer Entertainment America e está sujeito aos Termos de Serviço da Rede e Acordo do Usuário, as restrições de uso deste item e outros termos aplicáveis estão localizados em www.us.playstation.com/support/useragreements. Caso não queira aceitar todos esses termos, não baixe este item. Este item pode ser usado com até 2 sistemas PlayStation®3 ativados associados a esta Conta de Rede Sony Entertainment. <br><br>'Minecraft' é uma marca registrada da Notch Development AB");
|
||||
m_labelHTMLSellText.init("Este � um incr�vel pacote com 24 capas para personalizar seu personagem no Minecraft e entrar no clima de final de ano.<br><br>1-4 Jogadores<br>Jogadores em rede 2-8<br><br> Este item est� sendo licenciado ou sublicenciado para voc� pela Sony Computer Entertainment America e est� sujeito aos Termos de Servi�o da Rede e Acordo do Usu�rio, as restri��es de uso deste item e outros termos aplic�veis est�o localizados em www.us.playstation.com/support/useragreements. Caso n�o queira aceitar todos esses termos, n�o baixe este item. Este item pode ser usado com at� 2 sistemas PlayStation�3 ativados associados a esta Conta de Rede Sony Entertainment.�<br><br>'Minecraft' � uma marca registrada da Notch Development AB");
|
||||
break;
|
||||
}
|
||||
iTextC++;
|
||||
|
||||
@@ -71,7 +71,7 @@ UIScene_FullscreenProgress::UIScene_FullscreenProgress(int iPad, void *initData,
|
||||
ui.TouchBoxRebuild(this);
|
||||
#endif
|
||||
|
||||
#ifdef _XBOX_ONE
|
||||
#if defined _XBOX_ONE || _WINDOWS64
|
||||
ui.ShowPlayerDisplayname(false);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -383,12 +383,17 @@ void UIScene_JoinMenu::StartSharedLaunchFlow()
|
||||
}
|
||||
else
|
||||
{
|
||||
//str1k3r - just skip this on Windows64
|
||||
#ifdef _WINDOWS64
|
||||
JoinGame(this);
|
||||
#else
|
||||
//ProfileManager.RequestSignInUI(false, false, false, true, false,&UIScene_JoinMenu::StartGame_SignInReturned, this,ProfileManager.GetPrimaryPad());
|
||||
SignInInfo info;
|
||||
info.Func = &UIScene_JoinMenu::StartGame_SignInReturned;
|
||||
info.lpParam = (LPVOID)GetCallbackUniqueId();
|
||||
info.requireOnline = true;
|
||||
ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_QuadrantSignin,&info);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLaye
|
||||
else
|
||||
{
|
||||
|
||||
#if defined(__PS3__) || defined(__ORBIS__)|| defined(_DURANGO) || defined (__PSVITA__)
|
||||
#if defined(__PS3__) || defined(__ORBIS__)|| defined(_DURANGO) || defined (__PSVITA__) || defined(_WINDOWS64)
|
||||
// convert to utf16
|
||||
uint16_t u16Message[MAX_SAVEFILENAME_LENGTH];
|
||||
size_t srclen,dstlen;
|
||||
@@ -209,7 +209,7 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLaye
|
||||
#elif defined(_DURANGO)
|
||||
// Already utf16 on durango
|
||||
memcpy(u16Message,params->saveDetails->UTF16SaveFilename, MAX_SAVEFILENAME_LENGTH);
|
||||
#else // __ORBIS__
|
||||
#elif defined(__ORBIS__) // __ORBIS__
|
||||
{
|
||||
SceCesUcsContext Context;
|
||||
sceCesUcsContextInit( &Context );
|
||||
@@ -218,6 +218,7 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLaye
|
||||
}
|
||||
#endif
|
||||
m_thumbnailName = (wchar_t *)u16Message;
|
||||
#ifndef _WINDOWS64
|
||||
if(params->saveDetails->pbThumbnailData)
|
||||
{
|
||||
m_pbThumbnailData = params->saveDetails->pbThumbnailData;
|
||||
@@ -225,6 +226,7 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLaye
|
||||
m_bSaveThumbnailReady = true;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
app.DebugPrintf("Requesting the save thumbnail\n");
|
||||
// set the save to load
|
||||
@@ -1444,6 +1446,7 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam)
|
||||
// ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_LoadMenu::PSPlusReturned,pClass, app.GetStringTable(),NULL,0,false);
|
||||
}
|
||||
#endif
|
||||
#ifndef _WINDOWS64
|
||||
else
|
||||
{
|
||||
#if defined(_WINDOWS64) || defined(DISABLE_PSN) || defined(_DISABLE_XBLIVE)
|
||||
@@ -1453,6 +1456,7 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam)
|
||||
pClass->m_bRequestQuadrantSignin = true;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -114,8 +114,9 @@ UIScene_LoadOrJoinMenu::UIScene_LoadOrJoinMenu(int iPad, void *initData, UILayer
|
||||
m_controlJoinTimer.setVisible( true );
|
||||
|
||||
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__)
|
||||
m_spaceIndicatorSaves.init(L"",eControl_SpaceIndicator,0, (4LL *1024LL * 1024LL * 1024LL) );
|
||||
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__) || defined(_WINDOWS64)
|
||||
m_spaceIndicatorSaves.init(L"",eControl_SpaceIndicator,0, (4LL *1024LL * 1024LL * 1024LL) );
|
||||
#endif
|
||||
m_bUpdateSaveSize = false;
|
||||
|
||||
@@ -578,7 +579,7 @@ void UIScene_LoadOrJoinMenu::tick()
|
||||
if(m_eSaveTransferState == eSaveTransfer_Idle)
|
||||
m_bSaveTransferRunning = false;
|
||||
#endif
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__)
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__) || defined(_WINDOWS64)
|
||||
if(m_bUpdateSaveSize)
|
||||
{
|
||||
if((m_iDefaultButtonsC > 0) && (m_iSaveListIndex >= m_iDefaultButtonsC))
|
||||
@@ -599,7 +600,7 @@ void UIScene_LoadOrJoinMenu::tick()
|
||||
if(m_pSaveDetails!=NULL)
|
||||
{
|
||||
//CD - Fix - Adding define for ORBIS/XBOXONE
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__)
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__) || defined(_WINDOWS64)
|
||||
m_spaceIndicatorSaves.reset();
|
||||
#endif
|
||||
|
||||
@@ -627,6 +628,26 @@ void UIScene_LoadOrJoinMenu::tick()
|
||||
m_spaceIndicatorSaves.addSave(m_pSaveDetails->SaveInfoA[i].totalSize);
|
||||
#elif defined(__ORBIS__)
|
||||
m_spaceIndicatorSaves.addSave(m_pSaveDetails->SaveInfoA[i].blocksUsed * (32 * 1024) );
|
||||
#elif defined(_WINDOWS64)
|
||||
ZeroMemory(m_saveDetails[i].UTF8SaveFilename, MAX_SAVEFILENAME_LENGTH);
|
||||
memcpy(m_saveDetails[i].UTF8SaveFilename, m_pSaveDetails->SaveInfoA[i].UTF8SaveFilename, MAX_SAVEFILENAME_LENGTH - 1);
|
||||
wstring folderPath = wstring(L"Windows64\\GameHDD\\") + app.UTF8ToWide(m_saveDetails[i].UTF8SaveFilename) + L"\\*";
|
||||
|
||||
DWORD fileSize = 0;
|
||||
WIN32_FIND_DATAW findData;
|
||||
HANDLE hFile = FindFirstFileW(folderPath.c_str(), &findData);
|
||||
|
||||
if (hFile != INVALID_HANDLE_VALUE) {
|
||||
do {
|
||||
if (!(findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
|
||||
{
|
||||
fileSize = findData.nFileSizeLow;
|
||||
break;
|
||||
}
|
||||
} while (FindNextFileW(hFile, &findData));
|
||||
FindClose(hFile);
|
||||
}
|
||||
m_spaceIndicatorSaves.addSave(fileSize);
|
||||
#endif
|
||||
#ifdef _DURANGO
|
||||
m_buttonListSaves.addItem(m_pSaveDetails->SaveInfoA[i].UTF16SaveTitle, L"");
|
||||
@@ -1655,7 +1676,7 @@ void UIScene_LoadOrJoinMenu::UpdateGamesList()
|
||||
if (m_bIgnoreInput) return;
|
||||
|
||||
// If a texture pack is loading, or will be loading, then ignore this ( we are going to be destroyed anyway)
|
||||
if( Minecraft::GetInstance()->skins->getSelected()->isLoadingData() || (Minecraft::GetInstance()->skins->needsUIUpdate() || ui.IsReloadingSkin()) ) return;
|
||||
if( Minecraft::GetInstance()->skins->getSelected()->isLoadingData() || (Minecraft::GetInstance()->skins->needsUIUpdate() || ui.IsReloadingSkins()) ) return;
|
||||
|
||||
// if we're retrieving save info, don't show the list yet as we will be ignoring press events
|
||||
if(!m_bSavesDisplayed)
|
||||
|
||||
@@ -20,7 +20,7 @@ private:
|
||||
{
|
||||
eControl_SavesList,
|
||||
eControl_GamesList,
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__)
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__) || defined(_WINDOWS64)
|
||||
eControl_SpaceIndicator,
|
||||
#endif
|
||||
};
|
||||
@@ -52,7 +52,7 @@ protected:
|
||||
UIControl_SaveList m_buttonListGames;
|
||||
UIControl_Label m_labelSavesListTitle, m_labelJoinListTitle, m_labelNoGames;
|
||||
UIControl m_controlSavesTimer, m_controlJoinTimer;
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__)
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__) || defined(_WINDOWS64)
|
||||
UIControl_SpaceIndicatorBar m_spaceIndicatorSaves;
|
||||
#endif
|
||||
|
||||
@@ -68,7 +68,7 @@ private:
|
||||
UI_MAP_ELEMENT( m_controlSavesTimer, "SavesTimer")
|
||||
UI_MAP_ELEMENT( m_controlJoinTimer, "JoinTimer")
|
||||
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__)
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__) || defined(_WINDOWS64)
|
||||
UI_MAP_ELEMENT( m_spaceIndicatorSaves, "SaveSizeBar")
|
||||
#endif
|
||||
UI_END_MAP_ELEMENTS_AND_NAMES()
|
||||
|
||||
@@ -369,7 +369,7 @@ void UIScene_MainMenu::handlePress(F64 controlId, F64 childId)
|
||||
m_eAction=eAction_RunUnlockOrDLC;
|
||||
signInReturnedFunc = &UIScene_MainMenu::UnlockFullGame_SignInReturned;
|
||||
break;
|
||||
#if defined _XBOX
|
||||
#if defined(_XBOX) || defined(_WINDOWS64)
|
||||
case eControl_Exit:
|
||||
if( ProfileManager.IsFullVersion() )
|
||||
{
|
||||
@@ -380,9 +380,6 @@ void UIScene_MainMenu::handlePress(F64 controlId, F64 childId)
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef _XBOX_ONE
|
||||
ui.ShowPlayerDisplayname(true);
|
||||
#endif
|
||||
ui.NavigateToScene(primaryPad,eUIScene_TrialExitUpsell);
|
||||
}
|
||||
break;
|
||||
@@ -670,7 +667,7 @@ int UIScene_MainMenu::HelpAndOptions_SignInReturned(void *pParam,bool bContinue,
|
||||
#endif
|
||||
{
|
||||
ProfileManager.SetLockedProfile(ProfileManager.GetPrimaryPad());
|
||||
#ifdef _XBOX_ONE
|
||||
#if defined _XBOX_ONE || _WINDOWS64
|
||||
ui.ShowPlayerDisplayname(true);
|
||||
#endif
|
||||
proceedToScene(iPad, eUIScene_HelpAndOptionsMenu);
|
||||
@@ -794,9 +791,7 @@ int UIScene_MainMenu::CreateLoad_SignInReturned(void *pParam, bool bContinue, in
|
||||
// ensure we've applied this player's settings
|
||||
app.ApplyGameSettingsChanged(iPad);
|
||||
|
||||
#ifdef _XBOX_ONE
|
||||
ui.ShowPlayerDisplayname(true);
|
||||
#endif
|
||||
proceedToScene(ProfileManager.GetPrimaryPad(), eUIScene_LoadOrJoinMenu);
|
||||
}
|
||||
else
|
||||
@@ -857,7 +852,7 @@ int UIScene_MainMenu::CreateLoad_SignInReturned(void *pParam, bool bContinue, in
|
||||
// ensure we've applied this player's settings
|
||||
app.ApplyGameSettingsChanged(iPad);
|
||||
|
||||
#ifdef _XBOX_ONE
|
||||
#if defined _XBOX_ONE || _WINDOWS64
|
||||
ui.ShowPlayerDisplayname(true);
|
||||
#endif
|
||||
proceedToScene(ProfileManager.GetPrimaryPad(), eUIScene_LoadOrJoinMenu);
|
||||
@@ -871,7 +866,7 @@ int UIScene_MainMenu::CreateLoad_SignInReturned(void *pParam, bool bContinue, in
|
||||
ProfileManager.DisplayOfflineProfile(&CScene_Main::CreateLoad_OfflineProfileReturned,pClass, ProfileManager.GetPrimaryPad() );
|
||||
#else
|
||||
app.DebugPrintf("Offline Profile returned not implemented\n");
|
||||
#ifdef _XBOX_ONE
|
||||
#if defined _XBOX_ONE || _WINDOWS64
|
||||
ui.ShowPlayerDisplayname(true);
|
||||
#endif
|
||||
proceedToScene(ProfileManager.GetPrimaryPad(), eUIScene_LoadOrJoinMenu);
|
||||
@@ -970,7 +965,7 @@ int UIScene_MainMenu::Leaderboards_SignInReturned(void *pParam,bool bContinue,in
|
||||
else
|
||||
{
|
||||
ProfileManager.SetLockedProfile(ProfileManager.GetPrimaryPad());
|
||||
#ifdef _XBOX_ONE
|
||||
#if defined _XBOX_ONE || _WINDOWS64
|
||||
ui.ShowPlayerDisplayname(true);
|
||||
#endif
|
||||
proceedToScene(ProfileManager.GetPrimaryPad(), eUIScene_LeaderboardsMenu);
|
||||
@@ -1437,7 +1432,7 @@ void UIScene_MainMenu::RunPlayGame(int iPad)
|
||||
}
|
||||
#else
|
||||
ProfileManager.SetLockedProfile(iPad);
|
||||
#ifdef _XBOX_ONE
|
||||
#if defined _XBOX_ONE || _WINDOWS64
|
||||
ui.ShowPlayerDisplayname(true);
|
||||
#endif
|
||||
proceedToScene(ProfileManager.GetPrimaryPad(), eUIScene_LoadOrJoinMenu);
|
||||
@@ -1509,7 +1504,7 @@ void UIScene_MainMenu::RunPlayGame(int iPad)
|
||||
// ensure we've applied this player's settings
|
||||
app.ApplyGameSettingsChanged(iPad);
|
||||
|
||||
#ifdef _XBOX_ONE
|
||||
#if defined _XBOX_ONE || _WINDOWS64
|
||||
ui.ShowPlayerDisplayname(true);
|
||||
#endif
|
||||
proceedToScene(ProfileManager.GetPrimaryPad(), eUIScene_LoadOrJoinMenu);
|
||||
@@ -1638,7 +1633,7 @@ void UIScene_MainMenu::RunLeaderboards(int iPad)
|
||||
// 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();
|
||||
|
||||
#ifdef _XBOX_ONE
|
||||
#if defined _XBOX_ONE || _WINDOWS64
|
||||
ui.ShowPlayerDisplayname(true);
|
||||
#endif
|
||||
proceedToScene(iPad, eUIScene_LeaderboardsMenu);
|
||||
@@ -1740,7 +1735,7 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad)
|
||||
else
|
||||
{
|
||||
ProfileManager.SetLockedProfile(iPad);
|
||||
#ifdef _XBOX_ONE
|
||||
#if defined _XBOX_ONE || _WINDOWS64
|
||||
ui.ShowPlayerDisplayname(true);
|
||||
#endif
|
||||
proceedToScene(ProfileManager.GetPrimaryPad(), eUIScene_DLCMainMenu);
|
||||
@@ -2063,7 +2058,7 @@ void UIScene_MainMenu::RunHelpAndOptions(int iPad)
|
||||
#endif
|
||||
{
|
||||
ProfileManager.SetLockedProfile(iPad);
|
||||
#ifdef _XBOX_ONE
|
||||
#if defined _XBOX_ONE || _WINDOWS64
|
||||
ui.ShowPlayerDisplayname(true);
|
||||
#endif
|
||||
proceedToScene(iPad, eUIScene_HelpAndOptionsMenu);
|
||||
@@ -2142,7 +2137,7 @@ void UIScene_MainMenu::LoadTrial(void)
|
||||
|
||||
ui.ShowTrialTimer(true);
|
||||
|
||||
#ifdef _XBOX_ONE
|
||||
#if defined _XBOX_ONE || _WINDOWS64
|
||||
ui.ShowPlayerDisplayname(true);
|
||||
#endif
|
||||
ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_FullscreenProgress, loadingParams);
|
||||
|
||||
Reference in New Issue
Block a user