Get rid of MSVC's __int64
Use either int64_t, uint64_t or long long and unsigned long long, defined as per C++11 standard
This commit is contained in:
@@ -47,7 +47,7 @@ void UIComponent_Panorama::tick()
|
||||
EnterCriticalSection(&pMinecraft->m_setLevelCS);
|
||||
if(pMinecraft->level!=NULL)
|
||||
{
|
||||
__int64 i64TimeOfDay =0;
|
||||
int64_t i64TimeOfDay =0;
|
||||
// are we in the Nether? - Leave the time as 0 if we are, so we show daylight
|
||||
if(pMinecraft->level->dimension->id==0)
|
||||
{
|
||||
@@ -104,7 +104,7 @@ void UIComponent_Panorama::render(S32 width, S32 height, C4JRender::eViewportTyp
|
||||
IggyPlayerSetDisplaySize( getMovie(), m_movieWidth, m_movieHeight );
|
||||
|
||||
IggyPlayerDrawTilesStart ( getMovie() );
|
||||
|
||||
|
||||
m_renderWidth = tileWidth;
|
||||
m_renderHeight = tileHeight;
|
||||
IggyPlayerDrawTile ( getMovie() ,
|
||||
@@ -112,7 +112,7 @@ void UIComponent_Panorama::render(S32 width, S32 height, C4JRender::eViewportTyp
|
||||
tileYStart ,
|
||||
tileXStart + tileWidth ,
|
||||
tileYStart + tileHeight ,
|
||||
0 );
|
||||
0 );
|
||||
IggyPlayerDrawTilesEnd ( getMovie() );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -24,7 +24,7 @@ bool UIControl_SpaceIndicatorBar::setupControl(UIScene *scene, IggyValuePath *pa
|
||||
return success;
|
||||
}
|
||||
|
||||
void UIControl_SpaceIndicatorBar::init(const wstring &label, int id, __int64 min, __int64 max)
|
||||
void UIControl_SpaceIndicatorBar::init(const wstring &label, int id, int64_t min, int64_t max)
|
||||
{
|
||||
m_label = label;
|
||||
m_id = id;
|
||||
@@ -61,11 +61,11 @@ void UIControl_SpaceIndicatorBar::reset()
|
||||
setSaveGameOffset(0.0f);
|
||||
}
|
||||
|
||||
void UIControl_SpaceIndicatorBar::addSave(__int64 size)
|
||||
void UIControl_SpaceIndicatorBar::addSave(int64_t size)
|
||||
{
|
||||
float startPercent = (float)((m_currentTotal-m_min))/(m_max-m_min);
|
||||
|
||||
m_sizeAndOffsets.push_back( pair<__int64, float>(size, startPercent) );
|
||||
m_sizeAndOffsets.push_back( pair<int64_t, float>(size, startPercent) );
|
||||
|
||||
m_currentTotal += size;
|
||||
setTotalSize(m_currentTotal);
|
||||
@@ -75,7 +75,7 @@ void UIControl_SpaceIndicatorBar::selectSave(int index)
|
||||
{
|
||||
if(index >= 0 && index < m_sizeAndOffsets.size())
|
||||
{
|
||||
pair<__int64,float> values = m_sizeAndOffsets[index];
|
||||
pair<int64_t,float> values = m_sizeAndOffsets[index];
|
||||
setSaveSize(values.first);
|
||||
setSaveGameOffset(values.second);
|
||||
}
|
||||
@@ -86,7 +86,7 @@ void UIControl_SpaceIndicatorBar::selectSave(int index)
|
||||
}
|
||||
}
|
||||
|
||||
void UIControl_SpaceIndicatorBar::setSaveSize(__int64 size)
|
||||
void UIControl_SpaceIndicatorBar::setSaveSize(int64_t size)
|
||||
{
|
||||
m_currentSave = size;
|
||||
|
||||
@@ -99,7 +99,7 @@ void UIControl_SpaceIndicatorBar::setSaveSize(__int64 size)
|
||||
IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath() , m_setSaveSizeFunc , 1 , value );
|
||||
}
|
||||
|
||||
void UIControl_SpaceIndicatorBar::setTotalSize(__int64 size)
|
||||
void UIControl_SpaceIndicatorBar::setTotalSize(int64_t size)
|
||||
{
|
||||
float percent = (float)((m_currentTotal-m_min))/(m_max-m_min);
|
||||
|
||||
|
||||
@@ -6,28 +6,28 @@ class UIControl_SpaceIndicatorBar : public UIControl_Base
|
||||
{
|
||||
private:
|
||||
IggyName m_setSaveSizeFunc, m_setTotalSizeFunc, m_setSaveGameOffsetFunc;
|
||||
__int64 m_min;
|
||||
__int64 m_max;
|
||||
__int64 m_currentSave, m_currentTotal;
|
||||
int64_t m_min;
|
||||
int64_t m_max;
|
||||
int64_t m_currentSave, m_currentTotal;
|
||||
float m_currentOffset;
|
||||
|
||||
vector<pair<__int64,float> > m_sizeAndOffsets;
|
||||
vector<pair<int64_t,float> > m_sizeAndOffsets;
|
||||
|
||||
public:
|
||||
UIControl_SpaceIndicatorBar();
|
||||
|
||||
virtual bool setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName);
|
||||
|
||||
void init(const wstring &label, int id, __int64 min, __int64 max);
|
||||
void init(const wstring &label, int id, int64_t min, int64_t max);
|
||||
virtual void ReInit();
|
||||
void reset();
|
||||
|
||||
void addSave(__int64 size);
|
||||
void addSave(int64_t size);
|
||||
void selectSave(int index);
|
||||
|
||||
|
||||
private:
|
||||
void setSaveSize(__int64 size);
|
||||
void setTotalSize(__int64 totalSize);
|
||||
void setSaveSize(int64_t size);
|
||||
void setTotalSize(int64_t totalSize);
|
||||
void setSaveGameOffset(float offset);
|
||||
};
|
||||
@@ -124,7 +124,7 @@ extern "C" void *__real_malloc(size_t t);
|
||||
extern "C" void __real_free(void *t);
|
||||
#endif
|
||||
|
||||
__int64 UIController::iggyAllocCount = 0;
|
||||
int64_t UIController::iggyAllocCount = 0;
|
||||
static unordered_map<void *,size_t> allocations;
|
||||
static void * RADLINK AllocateFunction ( void * alloc_callback_user_data , size_t size_requested , size_t * size_returned )
|
||||
{
|
||||
@@ -272,7 +272,7 @@ void UIController::postInit()
|
||||
IggySetTextureSubstitutionCallbacks ( &UIController::TextureSubstitutionCreateCallback , &UIController::TextureSubstitutionDestroyCallback, this );
|
||||
|
||||
SetupFont();
|
||||
//
|
||||
//
|
||||
loadSkins();
|
||||
|
||||
for(unsigned int i = 0; i < eUIGroup_COUNT; ++i)
|
||||
@@ -402,7 +402,7 @@ void UIController::tick()
|
||||
EnderDragonRenderer::bossInstance = nullptr;
|
||||
|
||||
// Clear out the cached movie file data
|
||||
__int64 currentTime = System::currentTimeMillis();
|
||||
int64_t currentTime = System::currentTimeMillis();
|
||||
for(AUTO_VAR(it, m_cachedMovieData.begin()); it != m_cachedMovieData.end();)
|
||||
{
|
||||
if(it->second.m_expiry < currentTime)
|
||||
@@ -522,7 +522,7 @@ IggyLibrary UIController::loadSkin(const wstring &skinPath, const wstring &skinN
|
||||
IggyMemoryUseInfo memoryInfo;
|
||||
rrbool res;
|
||||
int iteration = 0;
|
||||
__int64 totalStatic = 0;
|
||||
int64_t totalStatic = 0;
|
||||
while(res = IggyDebugGetMemoryUseInfo ( NULL ,
|
||||
lib ,
|
||||
"" ,
|
||||
@@ -632,7 +632,7 @@ void UIController::CleanUpSkinReload()
|
||||
{
|
||||
if(!Minecraft::GetInstance()->skins->getSelected()->hasAudio())
|
||||
{
|
||||
#ifdef _DURANGO
|
||||
#ifdef _DURANGO
|
||||
DWORD result = StorageManager.UnmountInstalledDLC(L"TPACK");
|
||||
#else
|
||||
DWORD result = StorageManager.UnmountInstalledDLC("TPACK");
|
||||
@@ -653,7 +653,7 @@ void UIController::CleanUpSkinReload()
|
||||
byteArray UIController::getMovieData(const wstring &filename)
|
||||
{
|
||||
// Cache everything we load in the current tick
|
||||
__int64 targetTime = System::currentTimeMillis() + (1000LL * 60);
|
||||
int64_t targetTime = System::currentTimeMillis() + (1000LL * 60);
|
||||
AUTO_VAR(it,m_cachedMovieData.find(filename));
|
||||
if(it == m_cachedMovieData.end() )
|
||||
{
|
||||
@@ -699,7 +699,7 @@ void UIController::handleInput()
|
||||
{
|
||||
#ifdef _DURANGO
|
||||
// 4J-JEV: Added exception for primary play who migh've uttered speech commands.
|
||||
if(iPad != ProfileManager.GetPrimaryPad()
|
||||
if(iPad != ProfileManager.GetPrimaryPad()
|
||||
&& (!InputManager.IsPadConnected(iPad) || !InputManager.IsPadLocked(iPad)) ) continue;
|
||||
#endif
|
||||
for(unsigned int key = 0; key <= ACTION_MAX_MENU; ++key)
|
||||
@@ -775,7 +775,7 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key)
|
||||
{
|
||||
// no active touch? clear active and highlighted touch UI elements
|
||||
m_ActiveUIElement = NULL;
|
||||
m_HighlightedUIElement = NULL;
|
||||
m_HighlightedUIElement = NULL;
|
||||
|
||||
// fullscreen first
|
||||
UIScene *pScene=m_groups[(int)eUIGroup_Fullscreen]->getCurrentScene();
|
||||
@@ -825,7 +825,7 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(m_bTouchscreenPressed && pTouchData->reportNum==1)
|
||||
{
|
||||
// fullscreen first
|
||||
@@ -1006,8 +1006,8 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key)
|
||||
//!(app.GetGameSettingsDebugMask(ProfileManager.GetPrimaryPad())&(1L<<eDebugSetting_ToggleFont)) &&
|
||||
key == ACTION_MENU_STICK_PRESS)
|
||||
{
|
||||
__int64 totalStatic = 0;
|
||||
__int64 totalDynamic = 0;
|
||||
int64_t totalStatic = 0;
|
||||
int64_t totalDynamic = 0;
|
||||
app.DebugPrintf(app.USER_SR, "********************************\n");
|
||||
app.DebugPrintf(app.USER_SR, "BEGIN TOTAL SWF MEMORY USAGE\n\n");
|
||||
for(unsigned int i = 0; i < eUIGroup_COUNT; ++i)
|
||||
@@ -1016,8 +1016,8 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key)
|
||||
}
|
||||
for(unsigned int i = 0; i < eLibrary_Count; ++i)
|
||||
{
|
||||
__int64 libraryStatic = 0;
|
||||
__int64 libraryDynamic = 0;
|
||||
int64_t libraryStatic = 0;
|
||||
int64_t libraryDynamic = 0;
|
||||
|
||||
if(m_iggyLibraries[i] != IGGY_INVALID_LIBRARY)
|
||||
{
|
||||
@@ -1045,8 +1045,8 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key)
|
||||
app.DebugPrintf(app.USER_SR, "Total static: %d , Total dynamic: %d\n", totalStatic, totalDynamic);
|
||||
app.DebugPrintf(app.USER_SR, "\n\nEND TOTAL SWF MEMORY USAGE\n");
|
||||
app.DebugPrintf(app.USER_SR, "********************************\n\n");
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
@@ -1243,7 +1243,7 @@ void UIController::setupCustomDrawGameState()
|
||||
glLoadIdentity();
|
||||
glOrtho(0, m_fScreenWidth, m_fScreenHeight, 0, 1000, 3000);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glEnable(GL_ALPHA_TEST);
|
||||
glEnable(GL_ALPHA_TEST);
|
||||
glAlphaFunc(GL_GREATER, 0.1f);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glDepthFunc(GL_LEQUAL);
|
||||
@@ -1343,10 +1343,10 @@ void RADLINK UIController::CustomDrawCallback(void *user_callback_data, Iggy *pl
|
||||
//Description
|
||||
//Callback to create a user-defined texture to replace SWF-defined textures.
|
||||
//Parameters
|
||||
//width - Input value: optional number of pixels wide specified from AS3, or -1 if not defined. Output value: the number of pixels wide to pretend to Iggy that the bitmap is. SWF and AS3 scales bitmaps based on their pixel dimensions, so you can use this to substitute a texture that is higher or lower resolution that ActionScript thinks it is.
|
||||
//height - Input value: optional number of pixels high specified from AS3, or -1 if not defined. Output value: the number of pixels high to pretend to Iggy that the bitmap is. SWF and AS3 scales bitmaps based on their pixel dimensions, so you can use this to substitute a texture that is higher or lower resolution that ActionScript thinks it is.
|
||||
//destroy_callback_data - Optional additional output value you can set; the value will be passed along to the corresponding Iggy_TextureSubstitutionDestroyCallback (e.g. you can store the pointer to your own internal structure here).
|
||||
//return - A platform-independent wrapped texture handle provided by GDraw, or NULL (NULL with throw an ActionScript 3 ArgumentError that the Flash developer can catch) Use by calling IggySetTextureSubstitutionCallbacks.
|
||||
//width - Input value: optional number of pixels wide specified from AS3, or -1 if not defined. Output value: the number of pixels wide to pretend to Iggy that the bitmap is. SWF and AS3 scales bitmaps based on their pixel dimensions, so you can use this to substitute a texture that is higher or lower resolution that ActionScript thinks it is.
|
||||
//height - Input value: optional number of pixels high specified from AS3, or -1 if not defined. Output value: the number of pixels high to pretend to Iggy that the bitmap is. SWF and AS3 scales bitmaps based on their pixel dimensions, so you can use this to substitute a texture that is higher or lower resolution that ActionScript thinks it is.
|
||||
//destroy_callback_data - Optional additional output value you can set; the value will be passed along to the corresponding Iggy_TextureSubstitutionDestroyCallback (e.g. you can store the pointer to your own internal structure here).
|
||||
//return - A platform-independent wrapped texture handle provided by GDraw, or NULL (NULL with throw an ActionScript 3 ArgumentError that the Flash developer can catch) Use by calling IggySetTextureSubstitutionCallbacks.
|
||||
//
|
||||
//Discussion
|
||||
//
|
||||
@@ -1551,7 +1551,7 @@ bool UIController::NavigateBack(int iPad, bool forceUsePad, EUIScene eScene, EUI
|
||||
void UIController::NavigateToHomeMenu()
|
||||
{
|
||||
ui.CloseAllPlayersScenes();
|
||||
|
||||
|
||||
// Alert the app the we no longer want to be informed of ethernet connections
|
||||
app.SetLiveLinkRequired( false );
|
||||
|
||||
@@ -1714,7 +1714,7 @@ void UIController::CloseUIScenes(int iPad, bool forceIPad)
|
||||
|
||||
m_groups[(int)group]->closeAllScenes();
|
||||
m_groups[(int)group]->getTooltips()->SetTooltips(-1);
|
||||
|
||||
|
||||
// This should cause the popup to dissappear
|
||||
TutorialPopupInfo popupInfo;
|
||||
if(m_groups[(int)group]->getTutorialPopup()) m_groups[(int)group]->getTutorialPopup()->SetTutorialDescription(&popupInfo);
|
||||
@@ -1865,7 +1865,7 @@ void UIController::SetMenuDisplayed(int iPad,bool bVal)
|
||||
|
||||
#ifdef _DURANGO
|
||||
// 4J-JEV: When in-game, allow player to toggle the 'Pause' and 'IngameInfo' menus via Kinnect.
|
||||
if (Minecraft::GetInstance()->running)
|
||||
if (Minecraft::GetInstance()->running)
|
||||
InputManager.SetEnabledGtcButtons(_360_GTC_MENU | _360_GTC_PAUSE | _360_GTC_VIEW);
|
||||
#endif
|
||||
}
|
||||
@@ -2280,7 +2280,7 @@ void UIController::SetTrialTimerLimitSecs(unsigned int uiSeconds)
|
||||
|
||||
void UIController::UpdateTrialTimer(unsigned int iPad)
|
||||
{
|
||||
WCHAR wcTime[20];
|
||||
WCHAR wcTime[20];
|
||||
|
||||
DWORD dwTimeTicks=(DWORD)app.getTrialTimer();
|
||||
|
||||
@@ -2342,7 +2342,7 @@ void UIController::ShowAutosaveCountdownTimer(bool show)
|
||||
void UIController::UpdateAutosaveCountdownTimer(unsigned int uiSeconds)
|
||||
{
|
||||
#if !(defined(_XBOX_ONE) || defined(__ORBIS__))
|
||||
WCHAR wcAutosaveCountdown[100];
|
||||
WCHAR wcAutosaveCountdown[100];
|
||||
swprintf( wcAutosaveCountdown, 100, app.GetString(IDS_AUTOSAVE_COUNTDOWN),uiSeconds);
|
||||
if(m_groups[(int)eUIGroup_Fullscreen]->getPressStartToPlay()) m_groups[(int)eUIGroup_Fullscreen]->getPressStartToPlay()->setTrialTimer(wcAutosaveCountdown);
|
||||
#endif
|
||||
@@ -2507,7 +2507,7 @@ C4JStorage::EMessageResult UIController::RequestUGCMessageBox(UINT title/* = -1
|
||||
#ifdef __ORBIS__
|
||||
// Show the vague UGC system message in addition to our message
|
||||
ProfileManager.DisplaySystemMessage( SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_UGC_RESTRICTION, iPad );
|
||||
return C4JStorage::EMessage_ResultAccept;
|
||||
return C4JStorage::EMessage_ResultAccept;
|
||||
#elif defined(__PSVITA__)
|
||||
ProfileManager.ShowSystemMessage( SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION, iPad );
|
||||
UINT uiIDA[1];
|
||||
@@ -2544,7 +2544,7 @@ C4JStorage::EMessageResult UIController::RequestContentRestrictedMessageBox(UINT
|
||||
#ifdef __ORBIS__
|
||||
// Show the vague UGC system message in addition to our message
|
||||
ProfileManager.DisplaySystemMessage( SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_UGC_RESTRICTION, iPad );
|
||||
return C4JStorage::EMessage_ResultAccept;
|
||||
return C4JStorage::EMessage_ResultAccept;
|
||||
#elif defined(__PSVITA__)
|
||||
ProfileManager.ShowSystemMessage( SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_AGE_RESTRICTION, iPad );
|
||||
return C4JStorage::EMessage_ResultAccept;
|
||||
@@ -2584,7 +2584,7 @@ void UIController::setFontCachingCalculationBuffer(int length)
|
||||
}
|
||||
}
|
||||
|
||||
// Returns the first scene of given type if it exists, NULL otherwise
|
||||
// Returns the first scene of given type if it exists, NULL otherwise
|
||||
UIScene *UIController::FindScene(EUIScene sceneType)
|
||||
{
|
||||
UIScene *pScene = NULL;
|
||||
@@ -2723,7 +2723,7 @@ void UIController::TouchBoxesClear(UIScene *pUIScene)
|
||||
for (AUTO_VAR(it, m_TouchBoxes[eUIGroup][eUILayer][eUIscene].begin()); it != itEnd; it++)
|
||||
{
|
||||
UIELEMENT *element=(UIELEMENT *)*it;
|
||||
delete element;
|
||||
delete element;
|
||||
}
|
||||
m_TouchBoxes[eUIGroup][eUILayer][eUIscene].clear();
|
||||
}
|
||||
@@ -2759,7 +2759,7 @@ bool UIController::TouchBoxHit(UIScene *pUIScene,S32 x, S32 y)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//app.DebugPrintf("MISS at x = %i y = %i\n", (int)x, (int)y);
|
||||
|
||||
@@ -15,7 +15,7 @@ class UIControl;
|
||||
class UIController : public IUIController
|
||||
{
|
||||
public:
|
||||
static __int64 iggyAllocCount;
|
||||
static int64_t iggyAllocCount;
|
||||
|
||||
// MGH - added to prevent crash loading Iggy movies while the skins were being reloaded
|
||||
static CRITICAL_SECTION ms_reloadSkinCS;
|
||||
@@ -29,7 +29,7 @@ private:
|
||||
CRITICAL_SECTION m_navigationLock;
|
||||
|
||||
static const int UI_REPEAT_KEY_DELAY_MS = 300; // How long from press until the first repeat
|
||||
static const int UI_REPEAT_KEY_REPEAT_RATE_MS = 100; // How long in between repeats
|
||||
static const int UI_REPEAT_KEY_REPEAT_RATE_MS = 100; // How long in between repeats
|
||||
DWORD m_actionRepeatTimer[XUSER_MAX_COUNT][ACTION_MAX_MENU+1];
|
||||
|
||||
float m_fScreenWidth;
|
||||
@@ -45,7 +45,7 @@ private:
|
||||
// 4J-PB - ui element type for PSVita touch control
|
||||
#ifdef __PSVITA__
|
||||
|
||||
typedef struct
|
||||
typedef struct
|
||||
{
|
||||
UIControl *pControl;
|
||||
S32 x1,y1,x2,y2;
|
||||
@@ -110,7 +110,7 @@ private:
|
||||
|
||||
C4JRender::eViewportType m_currentRenderViewport;
|
||||
bool m_bCustomRenderPosition;
|
||||
|
||||
|
||||
static DWORD m_dwTrialTimerLimitSecs;
|
||||
|
||||
unordered_map<wstring, byteArray> m_substitutionTextures;
|
||||
@@ -118,7 +118,7 @@ private:
|
||||
typedef struct _CachedMovieData
|
||||
{
|
||||
byteArray m_ba;
|
||||
__int64 m_expiry;
|
||||
int64_t m_expiry;
|
||||
} CachedMovieData;
|
||||
unordered_map<wstring, CachedMovieData> m_cachedMovieData;
|
||||
|
||||
@@ -179,7 +179,7 @@ protected:
|
||||
void postInit();
|
||||
|
||||
|
||||
public:
|
||||
public:
|
||||
CRITICAL_SECTION m_Allocatorlock;
|
||||
void SetupFont();
|
||||
public:
|
||||
@@ -208,7 +208,7 @@ private:
|
||||
void tickInput();
|
||||
void handleInput();
|
||||
void handleKeyPress(unsigned int iPad, unsigned int key);
|
||||
|
||||
|
||||
protected:
|
||||
static rrbool RADLINK ExternalFunctionCallback( void * user_callback_data , Iggy * player , IggyExternalFunctionCallUTF16 * call );
|
||||
|
||||
@@ -278,7 +278,7 @@ private:
|
||||
public:
|
||||
void CloseAllPlayersScenes();
|
||||
void CloseUIScenes(int iPad, bool forceIPad = false);
|
||||
|
||||
|
||||
virtual bool IsPauseMenuDisplayed(int iPad);
|
||||
virtual bool IsContainerMenuDisplayed(int iPad);
|
||||
virtual bool IsIgnorePlayerJoinMenuDisplayed(int iPad);
|
||||
|
||||
@@ -81,7 +81,7 @@ void UIGroup::tick()
|
||||
}
|
||||
|
||||
// Handle deferred update focus
|
||||
if (m_updateFocusStateCountdown > 0)
|
||||
if (m_updateFocusStateCountdown > 0)
|
||||
{
|
||||
m_updateFocusStateCountdown--;
|
||||
if (m_updateFocusStateCountdown == 0)_UpdateFocusState();
|
||||
@@ -233,7 +233,7 @@ void UIGroup::handleInput(int iPad, int key, bool repeat, bool pressed, bool rel
|
||||
}
|
||||
}
|
||||
|
||||
// FOCUS
|
||||
// FOCUS
|
||||
|
||||
// Check that a layer may recieve focus, specifically that there is no infocus layer above
|
||||
bool UIGroup::RequestFocus(UILayer* layerPtr)
|
||||
@@ -379,16 +379,16 @@ unsigned int UIGroup::GetLayerIndex(UILayer* layerPtr)
|
||||
// can't get here...
|
||||
return 0;
|
||||
}
|
||||
|
||||
void UIGroup::PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic)
|
||||
|
||||
void UIGroup::PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic)
|
||||
{
|
||||
__int64 groupStatic = 0;
|
||||
__int64 groupDynamic = 0;
|
||||
int64_t groupStatic = 0;
|
||||
int64_t groupDynamic = 0;
|
||||
app.DebugPrintf(app.USER_SR, "-- BEGIN GROUP %d\n",m_group);
|
||||
for(unsigned int i = 0; i < eUILayer_COUNT; ++i)
|
||||
{
|
||||
app.DebugPrintf(app.USER_SR, " \\- BEGIN LAYER %d\n",i);
|
||||
m_layers[i]->PrintTotalMemoryUsage(groupStatic, groupDynamic);
|
||||
m_layers[i]->PrintTotalMemoryUsage(groupStatic, groupDynamic);
|
||||
app.DebugPrintf(app.USER_SR, " \\- END LAYER %d\n",i);
|
||||
}
|
||||
app.DebugPrintf(app.USER_SR, "-- Group static: %d, Group dynamic: %d\n", groupStatic, groupDynamic);
|
||||
@@ -402,7 +402,7 @@ int UIGroup::getCommandBufferList()
|
||||
return m_commandBufferList;
|
||||
}
|
||||
|
||||
// Returns the first scene of given type if it exists, NULL otherwise
|
||||
// Returns the first scene of given type if it exists, NULL otherwise
|
||||
UIScene *UIGroup::FindScene(EUIScene sceneType)
|
||||
{
|
||||
UIScene *pScene = NULL;
|
||||
|
||||
@@ -19,10 +19,10 @@ private:
|
||||
UIScene_HUD *m_hud;
|
||||
|
||||
C4JRender::eViewportType m_viewportType;
|
||||
|
||||
|
||||
EUIGroup m_group;
|
||||
int m_iPad;
|
||||
|
||||
|
||||
bool m_bMenuDisplayed;
|
||||
bool m_bPauseMenuDisplayed;
|
||||
bool m_bContainerMenuDisplayed;
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
|
||||
void SetViewportType(C4JRender::eViewportType type);
|
||||
C4JRender::eViewportType GetViewportType();
|
||||
|
||||
|
||||
virtual void HandleDLCMountingComplete();
|
||||
virtual void HandleDLCInstalled();
|
||||
#ifdef _XBOX_ONE
|
||||
@@ -99,15 +99,15 @@ public:
|
||||
bool IsFullscreenGroup();
|
||||
|
||||
void handleUnlockFullVersion();
|
||||
|
||||
void PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic);
|
||||
|
||||
void PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic);
|
||||
|
||||
unsigned int GetLayerIndex(UILayer* layerPtr);
|
||||
|
||||
int getCommandBufferList();
|
||||
UIScene *FindScene(EUIScene sceneType);
|
||||
|
||||
private:
|
||||
private:
|
||||
void _UpdateFocusState();
|
||||
void updateStackStates();
|
||||
};
|
||||
|
||||
@@ -38,7 +38,7 @@ void UILayer::tick()
|
||||
m_scenesToDelete.push_back(scene);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
while (!m_scenesToDestroy.empty())
|
||||
{
|
||||
UIScene *scene = m_scenesToDestroy.back();
|
||||
@@ -46,13 +46,13 @@ void UILayer::tick()
|
||||
scene->destroyMovie();
|
||||
}
|
||||
m_scenesToDestroy.clear();
|
||||
|
||||
|
||||
for(AUTO_VAR(it,m_components.begin()); it != m_components.end(); ++it)
|
||||
{
|
||||
(*it)->tick();
|
||||
}
|
||||
// Note: reverse iterator, the last element is the top of the stack
|
||||
int sceneIndex = m_sceneStack.size() - 1;
|
||||
int sceneIndex = m_sceneStack.size() - 1;
|
||||
//for(AUTO_VAR(it,m_sceneStack.rbegin()); it != m_sceneStack.rend(); ++it)
|
||||
while( sceneIndex >= 0 && sceneIndex < m_sceneStack.size() )
|
||||
{
|
||||
@@ -422,9 +422,9 @@ bool UILayer::NavigateToScene(int iPad, EUIScene scene, void *initData)
|
||||
}
|
||||
|
||||
m_sceneStack.push_back(newScene);
|
||||
|
||||
|
||||
updateFocusState();
|
||||
|
||||
|
||||
newScene->tick();
|
||||
|
||||
return true;
|
||||
@@ -706,12 +706,12 @@ bool UILayer::updateFocusState(bool allowedFocus /* = false */)
|
||||
|
||||
// 4J-PB - this should just be true
|
||||
m_bMenuDisplayed=true;
|
||||
|
||||
|
||||
EUIScene sceneType = scene->getSceneType();
|
||||
switch(sceneType)
|
||||
{
|
||||
case eUIScene_PauseMenu:
|
||||
m_bPauseMenuDisplayed = true;
|
||||
m_bPauseMenuDisplayed = true;
|
||||
break;
|
||||
case eUIScene_Crafting2x2Menu:
|
||||
case eUIScene_Crafting3x3Menu:
|
||||
@@ -727,7 +727,7 @@ bool UILayer::updateFocusState(bool allowedFocus /* = false */)
|
||||
|
||||
// Intentional fall-through
|
||||
case eUIScene_DeathMenu:
|
||||
case eUIScene_FullscreenProgress:
|
||||
case eUIScene_FullscreenProgress:
|
||||
case eUIScene_SignEntryMenu:
|
||||
case eUIScene_EndPoem:
|
||||
m_bIgnoreAutosaveMenuDisplayed = true;
|
||||
@@ -736,7 +736,7 @@ bool UILayer::updateFocusState(bool allowedFocus /* = false */)
|
||||
|
||||
switch(sceneType)
|
||||
{
|
||||
case eUIScene_FullscreenProgress:
|
||||
case eUIScene_FullscreenProgress:
|
||||
case eUIScene_EndPoem:
|
||||
case eUIScene_Credits:
|
||||
case eUIScene_LeaderboardsMenu:
|
||||
@@ -775,8 +775,8 @@ void UILayer::handleInput(int iPad, int key, bool repeat, bool pressed, bool rel
|
||||
UIScene *scene = *it;
|
||||
if(scene->hasFocus(iPad) && scene->canHandleInput())
|
||||
{
|
||||
// 4J-PB - ignore repeats of action ABXY buttons
|
||||
// fix for PS3 213 - [MAIN MENU] Holding down buttons will continue to activate every prompt.
|
||||
// 4J-PB - ignore repeats of action ABXY buttons
|
||||
// fix for PS3 213 - [MAIN MENU] Holding down buttons will continue to activate every prompt.
|
||||
// 4J Stu - Changed this slightly to add the allowRepeat function so we can allow repeats in the crafting menu
|
||||
if(repeat && !scene->allowRepeat(key) )
|
||||
{
|
||||
@@ -784,8 +784,8 @@ void UILayer::handleInput(int iPad, int key, bool repeat, bool pressed, bool rel
|
||||
}
|
||||
scene->handleInput(iPad, key, repeat, pressed, released, handled);
|
||||
}
|
||||
|
||||
// Fix for PS3 #444 - [IN GAME] If the user keeps pressing CROSS while on the 'Save Game' screen the title will crash.
|
||||
|
||||
// Fix for PS3 #444 - [IN GAME] If the user keeps pressing CROSS while on the 'Save Game' screen the title will crash.
|
||||
handled = handled || scene->hidesLowerScenes();
|
||||
if(handled ) break;
|
||||
}
|
||||
@@ -842,10 +842,10 @@ void UILayer::handleUnlockFullVersion()
|
||||
}
|
||||
}
|
||||
|
||||
void UILayer::PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic)
|
||||
void UILayer::PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic)
|
||||
{
|
||||
__int64 layerStatic = 0;
|
||||
__int64 layerDynamic = 0;
|
||||
int64_t layerStatic = 0;
|
||||
int64_t layerDynamic = 0;
|
||||
for(AUTO_VAR(it,m_components.begin()); it != m_components.end(); ++it)
|
||||
{
|
||||
(*it)->PrintTotalMemoryUsage(layerStatic, layerDynamic);
|
||||
@@ -859,7 +859,7 @@ void UILayer::PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic)
|
||||
totalDynamic += layerDynamic;
|
||||
}
|
||||
|
||||
// Returns the first scene of given type if it exists, NULL otherwise
|
||||
// Returns the first scene of given type if it exists, NULL otherwise
|
||||
UIScene *UILayer::FindScene(EUIScene sceneType)
|
||||
{
|
||||
for (int i = 0; i < m_sceneStack.size(); i++)
|
||||
|
||||
@@ -66,12 +66,12 @@ public:
|
||||
|
||||
// INPUT
|
||||
void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled);
|
||||
#ifdef __PSVITA__
|
||||
#ifdef __PSVITA__
|
||||
// Current active scene
|
||||
UIScene *getCurrentScene();
|
||||
#endif
|
||||
// FOCUS
|
||||
|
||||
|
||||
bool updateFocusState(bool allowedFocus = false);
|
||||
|
||||
public:
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
#endif
|
||||
void handleUnlockFullVersion();
|
||||
UIScene *FindScene(EUIScene sceneType);
|
||||
|
||||
void PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic);
|
||||
|
||||
void PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic);
|
||||
|
||||
};
|
||||
|
||||
@@ -13,7 +13,7 @@ UIScene::UIScene(int iPad, UILayer *parentLayer)
|
||||
m_iPad = iPad;
|
||||
swf = NULL;
|
||||
m_pItemRenderer = NULL;
|
||||
|
||||
|
||||
bHasFocus = false;
|
||||
m_hasTickedOnce = false;
|
||||
m_bFocussedOnce = false;
|
||||
@@ -27,7 +27,7 @@ UIScene::UIScene(int iPad, UILayer *parentLayer)
|
||||
m_bUpdateOpacity = false;
|
||||
|
||||
m_backScene = NULL;
|
||||
|
||||
|
||||
m_cacheSlotRenders = false;
|
||||
m_needsCacheRendered = true;
|
||||
m_expectedCachedSlotCount = 0;
|
||||
@@ -94,7 +94,7 @@ void UIScene::reloadMovie(bool force)
|
||||
}
|
||||
|
||||
handleReload();
|
||||
|
||||
|
||||
IggyDataValue result;
|
||||
IggyDataValue value[1];
|
||||
|
||||
@@ -328,11 +328,11 @@ void UIScene::loadMovie()
|
||||
}
|
||||
|
||||
byteArray baFile = ui.getMovieData(moviePath.c_str());
|
||||
__int64 beforeLoad = ui.iggyAllocCount;
|
||||
int64_t beforeLoad = ui.iggyAllocCount;
|
||||
swf = IggyPlayerCreateFromMemory ( baFile.data , baFile.length, NULL);
|
||||
__int64 afterLoad = ui.iggyAllocCount;
|
||||
IggyPlayerInitializeAndTickRS ( swf );
|
||||
__int64 afterTick = ui.iggyAllocCount;
|
||||
int64_t afterLoad = ui.iggyAllocCount;
|
||||
IggyPlayerInitializeAndTickRS ( swf );
|
||||
int64_t afterTick = ui.iggyAllocCount;
|
||||
|
||||
if(!swf)
|
||||
{
|
||||
@@ -343,7 +343,7 @@ void UIScene::loadMovie()
|
||||
app.FatalLoadError();
|
||||
}
|
||||
app.DebugPrintf( app.USER_SR, "Loaded iggy movie %ls\n", moviePath.c_str() );
|
||||
IggyProperties *properties = IggyPlayerProperties ( swf );
|
||||
IggyProperties *properties = IggyPlayerProperties ( swf );
|
||||
m_movieHeight = properties->movie_height_in_pixels;
|
||||
m_movieWidth = properties->movie_width_in_pixels;
|
||||
|
||||
@@ -351,7 +351,7 @@ void UIScene::loadMovie()
|
||||
m_renderHeight = m_movieHeight;
|
||||
|
||||
S32 width, height;
|
||||
m_parentLayer->getRenderDimensions(width, height);
|
||||
m_parentLayer->getRenderDimensions(width, height);
|
||||
IggyPlayerSetDisplaySize( swf, width, height );
|
||||
|
||||
IggyPlayerSetUserdata(swf,this);
|
||||
@@ -361,8 +361,8 @@ void UIScene::loadMovie()
|
||||
IggyMemoryUseInfo memoryInfo;
|
||||
rrbool res;
|
||||
int iteration = 0;
|
||||
__int64 totalStatic = 0;
|
||||
__int64 totalDynamic = 0;
|
||||
int64_t totalStatic = 0;
|
||||
int64_t totalDynamic = 0;
|
||||
while(res = IggyDebugGetMemoryUseInfo ( swf ,
|
||||
NULL ,
|
||||
0 ,
|
||||
@@ -372,7 +372,7 @@ void UIScene::loadMovie()
|
||||
{
|
||||
totalStatic += memoryInfo.static_allocation_bytes;
|
||||
totalDynamic += memoryInfo.dynamic_allocation_bytes;
|
||||
app.DebugPrintf(app.USER_SR, "%ls - %.*s static: %d ( %d ) dynamic: %d ( %d )\n", moviePath.c_str(), memoryInfo.subcategory_stringlen, memoryInfo.subcategory,
|
||||
app.DebugPrintf(app.USER_SR, "%ls - %.*s static: %d ( %d ) dynamic: %d ( %d )\n", moviePath.c_str(), memoryInfo.subcategory_stringlen, memoryInfo.subcategory,
|
||||
memoryInfo.static_allocation_bytes, memoryInfo.static_allocation_count, memoryInfo.dynamic_allocation_bytes, memoryInfo.dynamic_allocation_count);
|
||||
++iteration;
|
||||
//if(memoryInfo.static_allocation_bytes > 0) getDebugMemoryUseRecursive(moviePath, memoryInfo);
|
||||
@@ -398,22 +398,22 @@ void UIScene::getDebugMemoryUseRecursive(const wstring &moviePath, IggyMemoryUse
|
||||
internalIteration ,
|
||||
&internalMemoryInfo ))
|
||||
{
|
||||
app.DebugPrintf(app.USER_SR, "%ls - %.*s static: %d ( %d ) dynamic: %d ( %d )\n", moviePath.c_str(), internalMemoryInfo.subcategory_stringlen, internalMemoryInfo.subcategory,
|
||||
app.DebugPrintf(app.USER_SR, "%ls - %.*s static: %d ( %d ) dynamic: %d ( %d )\n", moviePath.c_str(), internalMemoryInfo.subcategory_stringlen, internalMemoryInfo.subcategory,
|
||||
internalMemoryInfo.static_allocation_bytes, internalMemoryInfo.static_allocation_count, internalMemoryInfo.dynamic_allocation_bytes, internalMemoryInfo.dynamic_allocation_count);
|
||||
++internalIteration;
|
||||
if(internalMemoryInfo.subcategory_stringlen > memoryInfo.subcategory_stringlen) getDebugMemoryUseRecursive(moviePath, internalMemoryInfo);
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene::PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic)
|
||||
void UIScene::PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic)
|
||||
{
|
||||
if(!swf) return;
|
||||
|
||||
IggyMemoryUseInfo memoryInfo;
|
||||
rrbool res;
|
||||
int iteration = 0;
|
||||
__int64 sceneStatic = 0;
|
||||
__int64 sceneDynamic = 0;
|
||||
int64_t sceneStatic = 0;
|
||||
int64_t sceneDynamic = 0;
|
||||
while(res = IggyDebugGetMemoryUseInfo ( swf ,
|
||||
NULL ,
|
||||
"" ,
|
||||
@@ -483,7 +483,7 @@ void UIScene::tickTimers()
|
||||
{
|
||||
it = m_timers.erase(it);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
if(currentTime > it->second.targetTime)
|
||||
{
|
||||
@@ -634,7 +634,7 @@ void UIScene::customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iP
|
||||
if(useCommandBuffers) RenderManager.CBuffStart(list, true);
|
||||
#endif
|
||||
PIXBeginNamedEvent(0,"Draw uncached");
|
||||
ui.setupCustomDrawMatrices(this, customDrawRegion);
|
||||
ui.setupCustomDrawMatrices(this, customDrawRegion);
|
||||
_customDrawSlotControl(customDrawRegion, iPad, item, fAlpha, isFoil, bDecorations, useCommandBuffers);
|
||||
delete customDrawRegion;
|
||||
PIXEndNamedEvent();
|
||||
@@ -644,7 +644,7 @@ void UIScene::customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iP
|
||||
for(AUTO_VAR(it, m_cachedSlotDraw.begin()); it != m_cachedSlotDraw.end(); ++it)
|
||||
{
|
||||
CachedSlotDrawData *drawData = *it;
|
||||
ui.setupCustomDrawMatrices(this, drawData->customDrawRegion);
|
||||
ui.setupCustomDrawMatrices(this, drawData->customDrawRegion);
|
||||
_customDrawSlotControl(drawData->customDrawRegion, iPad, drawData->item, drawData->fAlpha, drawData->isFoil, drawData->bDecorations, useCommandBuffers);
|
||||
delete drawData->customDrawRegion;
|
||||
delete drawData;
|
||||
@@ -698,7 +698,7 @@ void UIScene::customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iP
|
||||
// Finish GDraw and anything else that needs to be finalised
|
||||
ui.endCustomDraw(region);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene::_customDrawSlotControl(CustomDrawData *region, int iPad, shared_ptr<ItemInstance> item, float fAlpha, bool isFoil, bool bDecorations, bool usingCommandBuffer)
|
||||
@@ -716,7 +716,7 @@ void UIScene::_customDrawSlotControl(CustomDrawData *region, int iPad, shared_pt
|
||||
// we might want separate x & y scales here
|
||||
|
||||
float scaleX = bwidth / 16.0f;
|
||||
float scaleY = bheight / 16.0f;
|
||||
float scaleY = bheight / 16.0f;
|
||||
|
||||
glEnable(GL_RESCALE_NORMAL);
|
||||
glPushMatrix();
|
||||
@@ -751,8 +751,8 @@ void UIScene::_customDrawSlotControl(CustomDrawData *region, int iPad, shared_pt
|
||||
if(bDecorations)
|
||||
{
|
||||
if((scaleX!=1.0f) ||(scaleY!=1.0f))
|
||||
{
|
||||
glPushMatrix();
|
||||
{
|
||||
glPushMatrix();
|
||||
glScalef(scaleX, scaleY, 1.0f);
|
||||
int iX= (int)(0.5f+((float)x)/scaleX);
|
||||
int iY= (int)(0.5f+((float)y)/scaleY);
|
||||
@@ -975,8 +975,8 @@ int UIScene::convertGameActionToIggyKeycode(int action)
|
||||
|
||||
bool UIScene::allowRepeat(int key)
|
||||
{
|
||||
// 4J-PB - ignore repeats of action ABXY buttons
|
||||
// fix for PS3 213 - [MAIN MENU] Holding down buttons will continue to activate every prompt.
|
||||
// 4J-PB - ignore repeats of action ABXY buttons
|
||||
// fix for PS3 213 - [MAIN MENU] Holding down buttons will continue to activate every prompt.
|
||||
switch(key)
|
||||
{
|
||||
case ACTION_MENU_OK:
|
||||
|
||||
@@ -40,7 +40,7 @@ class UILayer;
|
||||
class UIScene
|
||||
{
|
||||
friend class UILayer;
|
||||
public:
|
||||
public:
|
||||
IggyValuePath *m_rootPath;
|
||||
|
||||
private:
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
|
||||
protected:
|
||||
ESceneResolution m_loadedResolution;
|
||||
|
||||
|
||||
bool m_bIsReloading;
|
||||
bool m_bFocussedOnce;
|
||||
|
||||
@@ -96,7 +96,7 @@ protected:
|
||||
|
||||
public:
|
||||
virtual Iggy *getMovie() { return swf; }
|
||||
|
||||
|
||||
void destroyMovie();
|
||||
virtual void reloadMovie(bool force = false);
|
||||
virtual bool needsReloaded();
|
||||
@@ -127,7 +127,7 @@ private:
|
||||
void getDebugMemoryUseRecursive(const wstring &moviePath, IggyMemoryUseInfo &memoryInfo);
|
||||
|
||||
public:
|
||||
void PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic);
|
||||
void PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic);
|
||||
|
||||
public:
|
||||
UIScene(int iPad, UILayer *parentLayer);
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
|
||||
IggyName registerFastName(const wstring &name);
|
||||
#ifdef __PSVITA__
|
||||
void SetFocusToElement(int iID);
|
||||
void SetFocusToElement(int iID);
|
||||
void UpdateSceneControls();
|
||||
#endif
|
||||
protected:
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
|
||||
void gainFocus();
|
||||
void loseFocus();
|
||||
|
||||
|
||||
virtual void updateTooltips();
|
||||
virtual void updateComponents() {}
|
||||
virtual void handleGainFocus(bool navBack);
|
||||
@@ -188,7 +188,7 @@ public:
|
||||
protected:
|
||||
//void customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iPad, int iID, int iCount, int iAuxVal, float fAlpha, bool isFoil, bool bDecorations);
|
||||
void customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iPad, shared_ptr<ItemInstance> item, float fAlpha, bool isFoil, bool bDecorations);
|
||||
|
||||
|
||||
bool m_cacheSlotRenders;
|
||||
bool m_needsCacheRendered;
|
||||
int m_expectedCachedSlotCount;
|
||||
@@ -260,7 +260,7 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
#ifdef _DURANGO
|
||||
#ifdef _DURANGO
|
||||
virtual long long getDefaultGtcButtons() { return _360_GTC_BACK; }
|
||||
#endif
|
||||
|
||||
|
||||
@@ -61,11 +61,11 @@ UIScene_CreateWorldMenu::UIScene_CreateWorldMenu(int iPad, void *initData, UILay
|
||||
m_labelTexturePackDescription.init(L"");
|
||||
|
||||
WCHAR TempString[256];
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %ls", app.GetString( IDS_SLIDER_DIFFICULTY ),app.GetString(m_iDifficultyTitleSettingA[app.GetGameSettings(m_iPad,eGameSetting_Difficulty)]));
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %ls", app.GetString( IDS_SLIDER_DIFFICULTY ),app.GetString(m_iDifficultyTitleSettingA[app.GetGameSettings(m_iPad,eGameSetting_Difficulty)]));
|
||||
m_sliderDifficulty.init(TempString,eControl_Difficulty,0,3,app.GetGameSettings(m_iPad,eGameSetting_Difficulty));
|
||||
|
||||
m_MoreOptionsParams.bGenerateOptions=TRUE;
|
||||
m_MoreOptionsParams.bStructures=TRUE;
|
||||
m_MoreOptionsParams.bStructures=TRUE;
|
||||
m_MoreOptionsParams.bFlatWorld=FALSE;
|
||||
m_MoreOptionsParams.bBonusChest=FALSE;
|
||||
m_MoreOptionsParams.bPVP = TRUE;
|
||||
@@ -85,7 +85,7 @@ UIScene_CreateWorldMenu::UIScene_CreateWorldMenu(int iPad, void *initData, UILay
|
||||
m_MoreOptionsParams.bOnlineSettingChangedBySystem=false;
|
||||
|
||||
// 4J-PB - Removing this so that we can attempt to create an online game on PS3 when we are a restricted child account
|
||||
// It'll fail when we choose create, but this matches the behaviour of load game, and lets the player know why they can't play online,
|
||||
// It'll fail when we choose create, but this matches the behaviour of load game, and lets the player know why they can't play online,
|
||||
// instead of just greying out the online setting in the More Options
|
||||
// #ifdef __PS3__
|
||||
// if(ProfileManager.IsSignedInLive( m_iPad ))
|
||||
@@ -118,9 +118,9 @@ UIScene_CreateWorldMenu::UIScene_CreateWorldMenu(int iPad, void *initData, UILay
|
||||
{
|
||||
// The profile settings say Online, but either the player is offline, or they are not allowed to play online
|
||||
m_MoreOptionsParams.bOnlineSettingChangedBySystem=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if defined _XBOX_ONE || defined __ORBIS__ || defined _WINDOWS64
|
||||
if(getSceneResolution() == eSceneResolution_1080)
|
||||
{
|
||||
@@ -339,7 +339,7 @@ int UIScene_CreateWorldMenu::ContinueOffline(void *pParam,int iPad,C4JStorage::E
|
||||
UIScene_CreateWorldMenu* pClass = (UIScene_CreateWorldMenu*)pParam;
|
||||
|
||||
// results switched for this dialog
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
{
|
||||
pClass->m_MoreOptionsParams.bOnlineGame=false;
|
||||
pClass->checkStateAndStartGame();
|
||||
@@ -374,7 +374,7 @@ void UIScene_CreateWorldMenu::handleInput(int iPad, int key, bool repeat, bool p
|
||||
if ( pressed && controlHasFocus(m_checkboxOnline.getId()) && !m_checkboxOnline.IsEnabled() )
|
||||
{
|
||||
UINT uiIDA[1] = { IDS_CONFIRM_OK };
|
||||
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable());
|
||||
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable());
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -385,7 +385,7 @@ void UIScene_CreateWorldMenu::handleInput(int iPad, int key, bool repeat, bool p
|
||||
case ACTION_MENU_OTHER_STICK_UP:
|
||||
case ACTION_MENU_OTHER_STICK_DOWN:
|
||||
sendInputToMovie(key, repeat, pressed, released);
|
||||
|
||||
|
||||
#if defined _XBOX_ONE || defined __ORBIS__ || defined _WINDOWS64
|
||||
if(getSceneResolution() == eSceneResolution_1080)
|
||||
{
|
||||
@@ -557,7 +557,7 @@ void UIScene_CreateWorldMenu::StartSharedLaunchFlow()
|
||||
if(m_MoreOptionsParams.dwTexturePack!=0)
|
||||
{
|
||||
// texture pack hasn't been set yet, so check what it will be
|
||||
TexturePack *pTexturePack = pMinecraft->skins->getTexturePackById(m_MoreOptionsParams.dwTexturePack);
|
||||
TexturePack *pTexturePack = pMinecraft->skins->getTexturePackById(m_MoreOptionsParams.dwTexturePack);
|
||||
DLCTexturePack *pDLCTexPack=(DLCTexturePack *)pTexturePack;
|
||||
m_pDLCPack=pDLCTexPack->getDLCInfoParentPack();
|
||||
|
||||
@@ -609,7 +609,7 @@ void UIScene_CreateWorldMenu::StartSharedLaunchFlow()
|
||||
UINT uiIDA[2];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
uiIDA[1]=IDS_CONFIRM_CANCEL;
|
||||
ui.RequestMessageBox(IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, IDS_USING_TRIAL_TEXUREPACK_WARNING, uiIDA, 2, m_iPad,&TrialTexturePackWarningReturned,this,app.GetStringTable(),NULL,0,false);
|
||||
ui.RequestMessageBox(IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, IDS_USING_TRIAL_TEXUREPACK_WARNING, uiIDA, 2, m_iPad,&TrialTexturePackWarningReturned,this,app.GetStringTable(),NULL,0,false);
|
||||
#endif
|
||||
|
||||
#if defined _XBOX_ONE || defined __ORBIS__
|
||||
@@ -636,7 +636,7 @@ void UIScene_CreateWorldMenu::handleSliderMove(F64 sliderId, F64 currentValue)
|
||||
m_sliderDifficulty.handleSliderMove(value);
|
||||
|
||||
app.SetGameSettings(m_iPad,eGameSetting_Difficulty,value);
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %ls", app.GetString( IDS_SLIDER_DIFFICULTY ),app.GetString(m_iDifficultyTitleSettingA[value]));
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %ls", app.GetString( IDS_SLIDER_DIFFICULTY ),app.GetString(m_iDifficultyTitleSettingA[value]));
|
||||
m_sliderDifficulty.setLabel(TempString);
|
||||
break;
|
||||
}
|
||||
@@ -683,7 +683,7 @@ void UIScene_CreateWorldMenu::handleTimerComplete(int id)
|
||||
m_MoreOptionsParams.bInviteOnly = FALSE;
|
||||
m_MoreOptionsParams.bAllowFriendsOfFriends = FALSE;
|
||||
}
|
||||
|
||||
|
||||
#if defined _XBOX_ONE || defined __ORBIS__ || defined _WINDOWS64
|
||||
if(getSceneResolution() == eSceneResolution_1080)
|
||||
{
|
||||
@@ -721,7 +721,7 @@ void UIScene_CreateWorldMenu::handleTimerComplete(int id)
|
||||
PBYTE pbImageData=NULL;
|
||||
|
||||
app.GetFileFromTPD(eTPDFileType_Icon,pbData,dwBytes,&pbImageData,&dwImageBytes );
|
||||
ListInfo.fEnabled = TRUE;
|
||||
ListInfo.fEnabled = TRUE;
|
||||
ListInfo.iData = m_iConfigA[i];
|
||||
HRESULT hr=XuiCreateTextureBrushFromMemory(pbImageData,dwImageBytes,&ListInfo.hXuiBrush);
|
||||
app.DebugPrintf("Adding texturepack %d from TPD\n",m_iConfigA[i]);
|
||||
@@ -803,7 +803,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
|
||||
bool isOnlineGame = m_MoreOptionsParams.bOnlineGame;
|
||||
int iPadNotSignedInLive = -1;
|
||||
bool isLocalMultiplayerAvailable = app.IsLocalMultiplayerAvailable();
|
||||
|
||||
|
||||
for(unsigned int i = 0; i < XUSER_MAX_COUNT; i++)
|
||||
{
|
||||
if (ProfileManager.IsSignedIn(i) && (i == primaryPad || isLocalMultiplayerAvailable))
|
||||
@@ -855,7 +855,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
|
||||
ui.RequestMessageBox(IDS_PRO_CURRENTLY_NOT_ONLINE_TITLE, IDS_PRO_PSNOFFLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(), NULL,NULL, app.GetStringTable());
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
// Not signed in to PSN
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0] = IDS_CONFIRM_OK;
|
||||
@@ -901,7 +901,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
|
||||
SceNpCommerceDialogParam param;
|
||||
sceNpCommerceDialogParamInitialize(¶m);
|
||||
param.mode=SCE_NP_COMMERCE_DIALOG_MODE_PLUS;
|
||||
param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
|
||||
param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
|
||||
param.userId = ProfileManager.getUserID(iPadWithNoPlaystationPlus);
|
||||
|
||||
iResult=sceNpCommerceDialogOpen(¶m);
|
||||
@@ -916,7 +916,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
|
||||
#endif
|
||||
|
||||
if(m_bGameModeSurvival != true || m_MoreOptionsParams.bHostPrivileges == TRUE)
|
||||
{
|
||||
{
|
||||
UINT uiIDA[2];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
uiIDA[1]=IDS_CONFIRM_CANCEL;
|
||||
@@ -980,7 +980,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
|
||||
SceNpCommerceDialogParam param;
|
||||
sceNpCommerceDialogParamInitialize(¶m);
|
||||
param.mode=SCE_NP_COMMERCE_DIALOG_MODE_PLUS;
|
||||
param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
|
||||
param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
|
||||
param.userId = ProfileManager.getUserID(iPadWithNoPlaystationPlus);
|
||||
|
||||
iResult=sceNpCommerceDialogOpen(¶m);
|
||||
@@ -1033,8 +1033,8 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
|
||||
SceNpCommerceDialogParam param;
|
||||
sceNpCommerceDialogParamInitialize(¶m);
|
||||
param.mode=SCE_NP_COMMERCE_DIALOG_MODE_PLUS;
|
||||
param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
|
||||
param.userId = ProfileManager.getUserID(iPadWithNoPlaystationPlus);
|
||||
param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
|
||||
param.userId = ProfileManager.getUserID(iPadWithNoPlaystationPlus);
|
||||
|
||||
iResult=sceNpCommerceDialogOpen(¶m);
|
||||
|
||||
@@ -1107,13 +1107,13 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD
|
||||
|
||||
// start the game
|
||||
bool isFlat = (pClass->m_MoreOptionsParams.bFlatWorld==TRUE);
|
||||
__int64 seedValue = 0;
|
||||
int64_t seedValue = 0;
|
||||
|
||||
NetworkGameInitData *param = new NetworkGameInitData();
|
||||
|
||||
if (wSeed.length() != 0)
|
||||
{
|
||||
__int64 value = 0;
|
||||
int64_t value = 0;
|
||||
unsigned int len = (unsigned int)wSeed.length();
|
||||
|
||||
//Check if the input string contains a numerical value
|
||||
@@ -1132,7 +1132,7 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD
|
||||
|
||||
//If the input string is a numerical value, convert it to a number
|
||||
if( isNumber )
|
||||
value = _fromString<__int64>(wSeed);
|
||||
value = _fromString<int64_t>(wSeed);
|
||||
|
||||
//If the value is not 0 use it, otherwise use the algorithm from the java String.hashCode() function to hash it
|
||||
if( value != 0 )
|
||||
@@ -1336,7 +1336,7 @@ int UIScene_CreateWorldMenu::StartGame_SignInReturned(void *pParam,bool bContinu
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
pClass->m_bIgnoreInput = false;
|
||||
}
|
||||
return 0;
|
||||
@@ -1347,7 +1347,7 @@ int UIScene_CreateWorldMenu::ConfirmCreateReturned(void *pParam,int iPad,C4JStor
|
||||
{
|
||||
UIScene_CreateWorldMenu* pClass = (UIScene_CreateWorldMenu*)pParam;
|
||||
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
{
|
||||
bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame;
|
||||
|
||||
@@ -1392,7 +1392,7 @@ int UIScene_CreateWorldMenu::ConfirmCreateReturned(void *pParam,int iPad,C4JStor
|
||||
ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable(),NULL,0,false);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
#if defined( __ORBIS__) || defined(__PSVITA__)
|
||||
bool isOnlineGame = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame;
|
||||
if(isOnlineGame)
|
||||
@@ -1422,7 +1422,7 @@ int UIScene_CreateWorldMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStor
|
||||
UIScene_CreateWorldMenu* pClass = (UIScene_CreateWorldMenu *)pParam;
|
||||
pClass->m_bIgnoreInput = false;
|
||||
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
{
|
||||
SQRNetworkManager_Orbis::AttemptPSNSignIn(&UIScene_CreateWorldMenu::StartGame_SignInReturned, pClass, false, iPad);
|
||||
}
|
||||
@@ -1434,28 +1434,28 @@ int UIScene_CreateWorldMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStor
|
||||
// {
|
||||
// int32_t iResult;
|
||||
// UIScene_CreateWorldMenu *pClass = (UIScene_CreateWorldMenu *)pParam;
|
||||
//
|
||||
//
|
||||
// // continue offline, or upsell PS Plus?
|
||||
// if(result==C4JStorage::EMessage_ResultDecline)
|
||||
// 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.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
|
||||
// param.userId = ProfileManager.getUserID(pClass->m_iPad);
|
||||
//
|
||||
//
|
||||
// iResult=sceNpCommerceDialogOpen(¶m);
|
||||
// }
|
||||
// else if(result==C4JStorage::EMessage_ResultAccept)
|
||||
// else if(result==C4JStorage::EMessage_ResultAccept)
|
||||
// {
|
||||
// // continue offline
|
||||
// pClass->m_MoreOptionsParams.bOnlineGame=false;
|
||||
// pClass->checkStateAndStartGame();
|
||||
// }
|
||||
//
|
||||
//
|
||||
// pClass->m_bIgnoreInput=false;
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
@@ -16,13 +16,13 @@ private:
|
||||
};
|
||||
|
||||
static int m_iDifficultyTitleSettingA[4];
|
||||
|
||||
|
||||
UIControl m_controlMainPanel;
|
||||
UIControl_Label m_labelGameName, m_labelSeed, m_labelCreatedMode;
|
||||
UIControl_Button m_buttonGamemode, m_buttonMoreOptions, m_buttonLoadWorld;
|
||||
UIControl_Slider m_sliderDifficulty;
|
||||
UIControl_BitmapIcon m_bitmapIcon;
|
||||
|
||||
|
||||
#if defined _XBOX_ONE || defined __ORBIS__ || defined _WINDOWS64
|
||||
UIControl_CheckBox m_checkboxOnline;
|
||||
#endif
|
||||
@@ -35,7 +35,7 @@ private:
|
||||
UI_MAP_ELEMENT( m_labelSeed, "Seed")
|
||||
UI_MAP_ELEMENT( m_texturePackList, "TexturePackSelector")
|
||||
UI_MAP_ELEMENT( m_buttonGamemode, "GameModeToggle")
|
||||
|
||||
|
||||
#if defined _XBOX_ONE || defined __ORBIS__ || defined _WINDOWS64
|
||||
UI_MAP_ELEMENT( m_checkboxOnline, "CheckboxOnline")
|
||||
#endif
|
||||
@@ -48,7 +48,7 @@ private:
|
||||
|
||||
LevelGenerationOptions *m_levelGen;
|
||||
DLCPack * m_pDLCPack;
|
||||
|
||||
|
||||
int m_iSaveGameInfoIndex;
|
||||
int m_CurrentDifficulty;
|
||||
bool m_bGameModeSurvival;
|
||||
@@ -61,7 +61,7 @@ private:
|
||||
bool m_bRequestQuadrantSignin;
|
||||
bool m_bIsCorrupt;
|
||||
bool m_bThumbnailGetFailed;
|
||||
__int64 m_seed;
|
||||
int64_t m_seed;
|
||||
|
||||
#ifdef __PS3__
|
||||
std::vector<SonyCommerce::ProductInfo>*m_pvProductInfo;
|
||||
@@ -75,7 +75,7 @@ private:
|
||||
bool m_bRebuildTouchBoxes;
|
||||
public:
|
||||
UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLayer);
|
||||
|
||||
|
||||
virtual void updateTooltips();
|
||||
virtual void updateComponents();
|
||||
|
||||
@@ -110,7 +110,7 @@ private:
|
||||
#ifdef _DURANGO
|
||||
static void checkPrivilegeCallback(LPVOID lpParam, bool hasPrivilege, int iPad);
|
||||
#endif
|
||||
|
||||
|
||||
static int ConfirmLoadReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static void StartGameFromSave(UIScene_LoadMenu* pClass, DWORD dwLocalUsersMask);
|
||||
static int LoadSaveDataReturned(void *pParam,bool bIsCorrupt, bool bIsOwner);
|
||||
|
||||
@@ -207,7 +207,7 @@ UIScene_LoadOrJoinMenu::UIScene_LoadOrJoinMenu(int iPad, void *initData, UILayer
|
||||
bool bTexturePackAlreadyListed;
|
||||
bool bNeedToGetTPD=false;
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
int texturePacksCount = pMinecraft->skins->getTexturePackCount();
|
||||
int texturePacksCount = pMinecraft->skins->getTexturePackCount();
|
||||
|
||||
for(unsigned int i = 0; i < app.GetDLCInfoTexturesOffersCount(); ++i)
|
||||
{
|
||||
@@ -311,7 +311,7 @@ void UIScene_LoadOrJoinMenu::updateTooltips()
|
||||
// update the tooltips
|
||||
// if the saves list has focus, then we should show the Delete Save tooltip
|
||||
// if the games list has focus, then we should the the View Gamercard tooltip
|
||||
int iRB=-1;
|
||||
int iRB=-1;
|
||||
int iY = -1;
|
||||
int iLB = -1;
|
||||
int iX=-1;
|
||||
@@ -322,7 +322,7 @@ void UIScene_LoadOrJoinMenu::updateTooltips()
|
||||
else if (DoesSavesListHaveFocus())
|
||||
{
|
||||
if((m_iDefaultButtonsC > 0) && (m_iSaveListIndex >= m_iDefaultButtonsC))
|
||||
{
|
||||
{
|
||||
if(StorageManager.GetSaveDisabled())
|
||||
{
|
||||
iRB=IDS_TOOLTIPS_DELETESAVE;
|
||||
@@ -378,7 +378,7 @@ void UIScene_LoadOrJoinMenu::updateTooltips()
|
||||
// Is there a save from PS3 or PSVita available?
|
||||
// Sony asked that this be displayed at all times so users are aware of the functionality. We'll display some text when there's no save available
|
||||
//if(app.getRemoteStorage()->saveIsAvailable())
|
||||
{
|
||||
{
|
||||
bool bSignedInLive = ProfileManager.IsSignedInLive(m_iPad);
|
||||
if(bSignedInLive)
|
||||
{
|
||||
@@ -393,7 +393,7 @@ void UIScene_LoadOrJoinMenu::updateTooltips()
|
||||
ui.SetTooltips( DEFAULT_XUI_MENU_USER, IDS_TOOLTIPS_SELECT, IDS_TOOLTIPS_BACK, iX, iY,-1,-1,iLB,iRB);
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
void UIScene_LoadOrJoinMenu::Initialise()
|
||||
{
|
||||
m_iSaveListIndex = 0;
|
||||
@@ -481,7 +481,7 @@ void UIScene_LoadOrJoinMenu::handleGainFocus(bool navBack)
|
||||
{
|
||||
app.SetLiveLinkRequired( true );
|
||||
|
||||
m_bMultiplayerAllowed = ProfileManager.IsSignedInLive( m_iPad ) && ProfileManager.AllowedToPlayMultiplayer(m_iPad);
|
||||
m_bMultiplayerAllowed = ProfileManager.IsSignedInLive( m_iPad ) && ProfileManager.AllowedToPlayMultiplayer(m_iPad);
|
||||
|
||||
// re-enable button presses
|
||||
m_bIgnoreInput=false;
|
||||
@@ -825,7 +825,7 @@ void UIScene_LoadOrJoinMenu::GetSaveInfo()
|
||||
m_pSaveDetails=StorageManager.ReturnSavesInfo();
|
||||
if(m_pSaveDetails==NULL)
|
||||
{
|
||||
C4JStorage::ESaveGameState eSGIStatus= StorageManager.GetSavesInfo(m_iPad,NULL,this,"save");
|
||||
C4JStorage::ESaveGameState eSGIStatus= StorageManager.GetSavesInfo(m_iPad,NULL,this,"save");
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -874,7 +874,7 @@ void UIScene_LoadOrJoinMenu::GetSaveInfo()
|
||||
m_pSaveDetails=StorageManager.ReturnSavesInfo();
|
||||
if(m_pSaveDetails==NULL)
|
||||
{
|
||||
C4JStorage::ESaveGameState eSGIStatus= StorageManager.GetSavesInfo(m_iPad,NULL,this,"save");
|
||||
C4JStorage::ESaveGameState eSGIStatus= StorageManager.GetSavesInfo(m_iPad,NULL,this,"save");
|
||||
}
|
||||
|
||||
#if TO_BE_IMPLEMENTED
|
||||
@@ -918,7 +918,7 @@ void UIScene_LoadOrJoinMenu::AddDefaultButtons()
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
m_generators.push_back(levelGen);
|
||||
m_buttonListSaves.addItem(levelGen->getWorldName());
|
||||
|
||||
@@ -969,7 +969,7 @@ void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, bool pr
|
||||
case ACTION_MENU_X:
|
||||
#if TO_BE_IMPLEMENTED
|
||||
// Change device
|
||||
// Fix for #12531 - TCR 001: BAS Game Stability: When a player selects to change a storage
|
||||
// Fix for #12531 - TCR 001: BAS Game Stability: When a player selects to change a storage
|
||||
// device, and repeatedly backs out of the SD screen, disconnects from LIVE, and then selects a SD, the title crashes.
|
||||
m_bIgnoreInput=true;
|
||||
StorageManager.SetSaveDevice(&CScene_MultiGameJoinLoad::DeviceSelectReturned,this,true);
|
||||
@@ -987,7 +987,7 @@ void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, bool pr
|
||||
{
|
||||
bool bSignedInLive = ProfileManager.IsSignedInLive(iPad);
|
||||
if(bSignedInLive)
|
||||
{
|
||||
{
|
||||
LaunchSaveTransfer();
|
||||
}
|
||||
}
|
||||
@@ -1171,7 +1171,7 @@ int UIScene_LoadOrJoinMenu::KeyboardCompleteWorldNameCallback(LPVOID lpParam,boo
|
||||
UIScene_LoadOrJoinMenu *pClass=(UIScene_LoadOrJoinMenu *)lpParam;
|
||||
pClass->m_bIgnoreInput=false;
|
||||
if (bRes)
|
||||
{
|
||||
{
|
||||
uint16_t ui16Text[128];
|
||||
ZeroMemory(ui16Text, 128 * sizeof(uint16_t) );
|
||||
InputManager.GetText(ui16Text);
|
||||
@@ -1184,13 +1184,13 @@ int UIScene_LoadOrJoinMenu::KeyboardCompleteWorldNameCallback(LPVOID lpParam,boo
|
||||
StorageManager.RenameSaveData(pClass->m_iSaveListIndex - pClass->m_iDefaultButtonsC, ui16Text,&UIScene_LoadOrJoinMenu::RenameSaveDataReturned,pClass);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
pClass->m_bIgnoreInput=false;
|
||||
pClass->updateTooltips();
|
||||
}
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
pClass->m_bIgnoreInput=false;
|
||||
pClass->updateTooltips();
|
||||
@@ -1204,13 +1204,13 @@ void UIScene_LoadOrJoinMenu::handleInitFocus(F64 controlId, F64 childId)
|
||||
app.DebugPrintf(app.USER_SR, "UIScene_LoadOrJoinMenu::handleInitFocus - %d , %d\n", (int)controlId, (int)childId);
|
||||
}
|
||||
|
||||
void UIScene_LoadOrJoinMenu::handleFocusChange(F64 controlId, F64 childId)
|
||||
void UIScene_LoadOrJoinMenu::handleFocusChange(F64 controlId, F64 childId)
|
||||
{
|
||||
app.DebugPrintf(app.USER_SR, "UIScene_LoadOrJoinMenu::handleFocusChange - %d , %d\n", (int)controlId, (int)childId);
|
||||
|
||||
|
||||
switch((int)controlId)
|
||||
{
|
||||
case eControl_GamesList:
|
||||
case eControl_GamesList:
|
||||
m_iGameListIndex = childId;
|
||||
m_buttonListGames.updateChildFocus( (int) childId );
|
||||
break;
|
||||
@@ -1246,7 +1246,7 @@ void UIScene_LoadOrJoinMenu::handlePress(F64 controlId, F64 childId)
|
||||
ui.PlayUISFX(eSFX_Press);
|
||||
|
||||
if((int)childId == JOIN_LOAD_CREATE_BUTTON_INDEX)
|
||||
{
|
||||
{
|
||||
app.SetTutorialMode( false );
|
||||
|
||||
m_controlJoinTimer.setVisible( false );
|
||||
@@ -1298,7 +1298,7 @@ void UIScene_LoadOrJoinMenu::handlePress(F64 controlId, F64 childId)
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
{
|
||||
app.SetTutorialMode( false );
|
||||
|
||||
if(app.DebugSettingsOn() && app.GetLoadSavesFromFolderEnabled())
|
||||
@@ -1340,7 +1340,7 @@ void UIScene_LoadOrJoinMenu::handlePress(F64 controlId, F64 childId)
|
||||
case eControl_GamesList:
|
||||
{
|
||||
m_bIgnoreInput=true;
|
||||
|
||||
|
||||
m_eAction = eAction_JoinGame;
|
||||
|
||||
//CD - Added for audio
|
||||
@@ -1375,7 +1375,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
|
||||
|
||||
bool bPlayStationPlus=true;
|
||||
int iPadWithNoPlaystationPlus=0;
|
||||
bool isSignedInLive = true;
|
||||
bool isSignedInLive = true;
|
||||
int iPadNotSignedInLive = -1;
|
||||
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
|
||||
{
|
||||
@@ -1458,7 +1458,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
|
||||
SceNpCommerceDialogParam param;
|
||||
sceNpCommerceDialogParamInitialize(¶m);
|
||||
param.mode=SCE_NP_COMMERCE_DIALOG_MODE_PLUS;
|
||||
param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
|
||||
param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
|
||||
param.userId = ProfileManager.getUserID(iPadWithNoPlaystationPlus);
|
||||
|
||||
iResult=sceNpCommerceDialogOpen(¶m);
|
||||
@@ -1532,7 +1532,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
|
||||
}
|
||||
|
||||
void UIScene_LoadOrJoinMenu::LoadLevelGen(LevelGenerationOptions *levelGen)
|
||||
{
|
||||
{
|
||||
// Load data from disc
|
||||
//File saveFile( L"Tutorial\\Tutorial" );
|
||||
//LoadSaveFromDisk(&saveFile);
|
||||
@@ -1630,7 +1630,7 @@ void UIScene_LoadOrJoinMenu::UpdateGamesList()
|
||||
|
||||
// if the saves list has focus, then we should show the Delete Save tooltip
|
||||
// if the games list has focus, then we should show the View Gamercard tooltip
|
||||
int iRB=-1;
|
||||
int iRB=-1;
|
||||
int iY = -1;
|
||||
int iX=-1;
|
||||
|
||||
@@ -1854,7 +1854,7 @@ void UIScene_LoadOrJoinMenu::handleTimerComplete(int id)
|
||||
|
||||
if(iImageDataBytes!=0)
|
||||
{
|
||||
// set the image
|
||||
// set the image
|
||||
registerSubstitutionTexture(textureName,pbImageData,iImageDataBytes,true);
|
||||
m_iConfigA[i]=-1;
|
||||
}
|
||||
@@ -1867,7 +1867,7 @@ void UIScene_LoadOrJoinMenu::handleTimerComplete(int id)
|
||||
bool bAllDone=true;
|
||||
for(int i=0;i<m_iTexturePacksNotInstalled;i++)
|
||||
{
|
||||
if(m_iConfigA[i]!=-1)
|
||||
if(m_iConfigA[i]!=-1)
|
||||
{
|
||||
bAllDone = false;
|
||||
}
|
||||
@@ -1882,13 +1882,13 @@ void UIScene_LoadOrJoinMenu::handleTimerComplete(int id)
|
||||
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void UIScene_LoadOrJoinMenu::LoadSaveFromDisk(File *saveFile, ESavePlatform savePlatform /*= SAVE_FILE_PLATFORM_LOCAL*/)
|
||||
{
|
||||
{
|
||||
// we'll only be coming in here when the tutorial is loaded now
|
||||
|
||||
StorageManager.ResetSaveData();
|
||||
@@ -1896,7 +1896,7 @@ void UIScene_LoadOrJoinMenu::LoadSaveFromDisk(File *saveFile, ESavePlatform save
|
||||
// Make our next save default to the name of the level
|
||||
StorageManager.SetSaveTitle(saveFile->getName().c_str());
|
||||
|
||||
__int64 fileSize = saveFile->length();
|
||||
int64_t fileSize = saveFile->length();
|
||||
FileInputStream fis(*saveFile);
|
||||
byteArray ba(fileSize);
|
||||
fis.read(ba);
|
||||
@@ -1946,7 +1946,7 @@ void UIScene_LoadOrJoinMenu::LoadSaveFromDisk(File *saveFile, ESavePlatform save
|
||||
|
||||
#ifdef SONY_REMOTE_STORAGE_DOWNLOAD
|
||||
void UIScene_LoadOrJoinMenu::LoadSaveFromCloud()
|
||||
{
|
||||
{
|
||||
|
||||
wchar_t wFileName[128];
|
||||
mbstowcs(wFileName, app.getRemoteStorage()->getLocalFilename(), strlen(app.getRemoteStorage()->getLocalFilename())+1); // plus null
|
||||
@@ -1960,7 +1960,7 @@ void UIScene_LoadOrJoinMenu::LoadSaveFromCloud()
|
||||
mbstowcs(wSaveName, app.getRemoteStorage()->getSaveNameUTF8(), strlen(app.getRemoteStorage()->getSaveNameUTF8())+1); // plus null
|
||||
StorageManager.SetSaveTitle(wSaveName);
|
||||
|
||||
__int64 fileSize = cloudFile.length();
|
||||
int64_t fileSize = cloudFile.length();
|
||||
FileInputStream fis(cloudFile);
|
||||
byteArray ba(fileSize);
|
||||
fis.read(ba);
|
||||
@@ -2019,7 +2019,7 @@ int UIScene_LoadOrJoinMenu::DeleteSaveDialogReturned(void *pParam,int iPad,C4JSt
|
||||
// Check that we have a valid save selected (can get a bad index if the save list has been refreshed)
|
||||
bool validSelection= pClass->m_iDefaultButtonsC != 0 && pClass->m_iSaveListIndex >= pClass->m_iDefaultButtonsC;
|
||||
|
||||
if(result==C4JStorage::EMessage_ResultDecline && validSelection)
|
||||
if(result==C4JStorage::EMessage_ResultDecline && validSelection)
|
||||
{
|
||||
if(app.DebugSettingsOn() && app.GetLoadSavesFromFolderEnabled())
|
||||
{
|
||||
@@ -2049,7 +2049,7 @@ int UIScene_LoadOrJoinMenu::DeleteSaveDataReturned(LPVOID lpParam,bool bRes)
|
||||
if(bRes)
|
||||
{
|
||||
// wipe the list and repopulate it
|
||||
pClass->m_iState=e_SavesRepopulateAfterDelete;
|
||||
pClass->m_iState=e_SavesRepopulateAfterDelete;
|
||||
}
|
||||
else pClass->m_bIgnoreInput=false;
|
||||
|
||||
@@ -2169,7 +2169,7 @@ int UIScene_LoadOrJoinMenu::TexturePackDialogReturned(void *pParam,int iPad,C4JS
|
||||
UIScene_LoadOrJoinMenu *pClass = (UIScene_LoadOrJoinMenu *)pParam;
|
||||
|
||||
// Exit with or without saving
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
{
|
||||
// we need to enable background downloading for the DLC
|
||||
XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE_ALWAYS_ALLOW);
|
||||
@@ -2194,9 +2194,9 @@ int UIScene_LoadOrJoinMenu::TexturePackDialogReturned(void *pParam,int iPad,C4JS
|
||||
#endif
|
||||
|
||||
|
||||
#if defined _XBOX_ONE
|
||||
#if defined _XBOX_ONE
|
||||
if(ProfileManager.IsSignedIn(iPad))
|
||||
{
|
||||
{
|
||||
if (ProfileManager.IsSignedInLive(iPad))
|
||||
{
|
||||
wstring ProductId;
|
||||
@@ -2205,13 +2205,13 @@ int UIScene_LoadOrJoinMenu::TexturePackDialogReturned(void *pParam,int iPad,C4JS
|
||||
StorageManager.InstallOffer(1,(WCHAR *)ProductId.c_str(),NULL,NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
// 4J-JEV: Fix for XB1: #165863 - XR-074: Compliance: With no active network connection user is unable to convert from Trial to Full texture pack and is not messaged why.
|
||||
UINT uiIDA[1] = { IDS_CONFIRM_OK };
|
||||
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable());
|
||||
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
}
|
||||
pClass->m_bIgnoreInput=false;
|
||||
@@ -2223,7 +2223,7 @@ int UIScene_LoadOrJoinMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStora
|
||||
{
|
||||
UIScene_LoadOrJoinMenu* pClass = (UIScene_LoadOrJoinMenu*)pParam;
|
||||
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
{
|
||||
#if defined(__PS3__)
|
||||
SQRNetworkManager_PS3::AttemptPSNSignIn(&UIScene_LoadOrJoinMenu::PSN_SignInReturned, pClass);
|
||||
@@ -2442,7 +2442,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParameter
|
||||
DWORD dwDataSizeSaveImage=0;
|
||||
|
||||
StorageManager.GetDefaultSaveImage(&pbDataSaveImage, &dwDataSizeSaveImage); // Get the default save thumbnail (as set by SetDefaultImages) for use on saving games t
|
||||
StorageManager.GetDefaultSaveThumbnail(&pbThumbnailData,&dwThumbnailDataSize); // Get the default save image (as set by SetDefaultImages) for use on saving games that
|
||||
StorageManager.GetDefaultSaveThumbnail(&pbThumbnailData,&dwThumbnailDataSize); // Get the default save image (as set by SetDefaultImages) for use on saving games that
|
||||
|
||||
BYTE bTextMetadata[88];
|
||||
ZeroMemory(bTextMetadata,88);
|
||||
@@ -2470,7 +2470,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParameter
|
||||
{
|
||||
// we can't cancel here, we need the saves info so we can delete the file
|
||||
if(pClass->m_saveTransferDownloadCancelled)
|
||||
{
|
||||
{
|
||||
WCHAR wcTemp[256];
|
||||
swprintf(wcTemp,256, app.GetString(IDS_CANCEL)); // MGH - should change this string to "cancelling download"
|
||||
m_wstrStageText=wcTemp;
|
||||
@@ -2485,7 +2485,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParameter
|
||||
break;
|
||||
case eSaveTransfer_GettingSavesInfo:
|
||||
if(pClass->m_saveTransferDownloadCancelled)
|
||||
{
|
||||
{
|
||||
WCHAR wcTemp[256];
|
||||
swprintf(wcTemp,256, app.GetString(IDS_CANCEL)); // MGH - should change this string to "cancelling download"
|
||||
m_wstrStageText=wcTemp;
|
||||
@@ -2602,7 +2602,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParameter
|
||||
DWORD dwDataSizeSaveImage=0;
|
||||
|
||||
StorageManager.GetDefaultSaveImage(&pbDataSaveImage, &dwDataSizeSaveImage); // Get the default save thumbnail (as set by SetDefaultImages) for use on saving games t
|
||||
StorageManager.GetDefaultSaveThumbnail(&pbThumbnailData,&dwThumbnailDataSize); // Get the default save image (as set by SetDefaultImages) for use on saving games that
|
||||
StorageManager.GetDefaultSaveThumbnail(&pbThumbnailData,&dwThumbnailDataSize); // Get the default save image (as set by SetDefaultImages) for use on saving games that
|
||||
|
||||
BYTE bTextMetadata[88];
|
||||
ZeroMemory(bTextMetadata,88);
|
||||
@@ -2613,12 +2613,12 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParameter
|
||||
}
|
||||
|
||||
|
||||
#ifdef SPLIT_SAVES
|
||||
#ifdef SPLIT_SAVES
|
||||
ConsoleSaveFileOriginal oldFormatSave( wSaveName, ba.data, ba.length, false, app.getRemoteStorage()->getSavePlatform() );
|
||||
pSave = new ConsoleSaveFileSplit( &oldFormatSave, false, pMinecraft->progressRenderer );
|
||||
|
||||
pMinecraft->progressRenderer->progressStage(IDS_SAVETRANSFER_STAGE_SAVING);
|
||||
pSave->Flush(false,false);
|
||||
pSave->Flush(false,false);
|
||||
pClass->m_eSaveTransferState = eSaveTransfer_Saving;
|
||||
#else
|
||||
pSave = new ConsoleSaveFileOriginal( wSaveName, ba.data, ba.length, false, app.getRemoteStorage()->getSavePlatform() );
|
||||
@@ -2654,7 +2654,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParameter
|
||||
|
||||
delete pSave;
|
||||
|
||||
|
||||
|
||||
pMinecraft->progressRenderer->progressStage(IDS_PROGRESS_SAVING_TO_DISC);
|
||||
pClass->m_eSaveTransferState = eSaveTransfer_Succeeded;
|
||||
}
|
||||
@@ -2668,7 +2668,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParameter
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
app.getRemoteStorage()->waitForStorageManagerIdle(); // wait for everything to complete before we hand control back to the player
|
||||
ui.RequestMessageBox( IDS_TOOLTIPS_SAVETRANSFER_DOWNLOAD, IDS_SAVE_TRANSFER_DOWNLOADCOMPLETE, uiIDA,1,ProfileManager.GetPrimaryPad(),CrossSaveFinishedCallback,pClass, app.GetStringTable());
|
||||
ui.RequestMessageBox( IDS_TOOLTIPS_SAVETRANSFER_DOWNLOAD, IDS_SAVE_TRANSFER_DOWNLOADCOMPLETE, uiIDA,1,ProfileManager.GetPrimaryPad(),CrossSaveFinishedCallback,pClass, app.GetStringTable());
|
||||
pClass->m_eSaveTransferState = eSaveTransfer_Finished;
|
||||
}
|
||||
break;
|
||||
@@ -2683,7 +2683,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParameter
|
||||
if(bSaveFileCreated)
|
||||
{
|
||||
if(pClass->m_saveTransferDownloadCancelled)
|
||||
{
|
||||
{
|
||||
WCHAR wcTemp[256];
|
||||
swprintf(wcTemp,256, app.GetString(IDS_CANCEL)); // MGH - should change this string to "cancelling download"
|
||||
m_wstrStageText=wcTemp;
|
||||
@@ -2743,7 +2743,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParameter
|
||||
{
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
ui.RequestMessageBox( IDS_TOOLTIPS_SAVETRANSFER_DOWNLOAD, IDS_SAVE_TRANSFER_DOWNLOADFAILED, uiIDA,1,ProfileManager.GetPrimaryPad(),CrossSaveFinishedCallback,pClass, app.GetStringTable());
|
||||
ui.RequestMessageBox( IDS_TOOLTIPS_SAVETRANSFER_DOWNLOAD, IDS_SAVE_TRANSFER_DOWNLOADFAILED, uiIDA,1,ProfileManager.GetPrimaryPad(),CrossSaveFinishedCallback,pClass, app.GetStringTable());
|
||||
pClass->m_eSaveTransferState = eSaveTransfer_Finished;
|
||||
}
|
||||
if(bSaveFileCreated) // save file has been created, then deleted.
|
||||
@@ -2887,7 +2887,7 @@ int UIScene_LoadOrJoinMenu::UploadSonyCrossSaveThreadProc( LPVOID lpParameter )
|
||||
{
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
ui.RequestMessageBox( IDS_TOOLTIPS_SAVETRANSFER_UPLOAD, IDS_SAVE_TRANSFER_UPLOADCOMPLETE, uiIDA,1,ProfileManager.GetPrimaryPad(),CrossSaveUploadFinishedCallback,pClass, app.GetStringTable());
|
||||
ui.RequestMessageBox( IDS_TOOLTIPS_SAVETRANSFER_UPLOAD, IDS_SAVE_TRANSFER_UPLOADCOMPLETE, uiIDA,1,ProfileManager.GetPrimaryPad(),CrossSaveUploadFinishedCallback,pClass, app.GetStringTable());
|
||||
pClass->m_eSaveUploadState = esaveUpload_Finished;
|
||||
}
|
||||
break;
|
||||
@@ -2904,7 +2904,7 @@ int UIScene_LoadOrJoinMenu::UploadSonyCrossSaveThreadProc( LPVOID lpParameter )
|
||||
{
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
ui.RequestMessageBox( IDS_TOOLTIPS_SAVETRANSFER_UPLOAD, IDS_SAVE_TRANSFER_UPLOADFAILED, uiIDA,1,ProfileManager.GetPrimaryPad(),CrossSaveUploadFinishedCallback,pClass, app.GetStringTable());
|
||||
ui.RequestMessageBox( IDS_TOOLTIPS_SAVETRANSFER_UPLOAD, IDS_SAVE_TRANSFER_UPLOADFAILED, uiIDA,1,ProfileManager.GetPrimaryPad(),CrossSaveUploadFinishedCallback,pClass, app.GetStringTable());
|
||||
pClass->m_eSaveUploadState = esaveUpload_Finished;
|
||||
}
|
||||
}
|
||||
@@ -2953,7 +2953,7 @@ int UIScene_LoadOrJoinMenu::SaveTransferDialogReturned(void *pParam,int iPad,C4J
|
||||
{
|
||||
UIScene_LoadOrJoinMenu* pClass = (UIScene_LoadOrJoinMenu*)pParam;
|
||||
// results switched for this dialog
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
{
|
||||
// upload the save
|
||||
pClass->LaunchSaveUpload();
|
||||
@@ -3062,13 +3062,13 @@ int UIScene_LoadOrJoinMenu::DownloadXbox360SaveThreadProc( LPVOID lpParameter )
|
||||
ByteArrayInputStream bais(UIScene_LoadOrJoinMenu::s_transferData);
|
||||
DataInputStream dis(&bais);
|
||||
|
||||
wstring saveTitle = dis.readUTF();
|
||||
wstring saveTitle = dis.readUTF();
|
||||
StorageManager.SetSaveTitle(saveTitle.c_str());
|
||||
|
||||
wstring saveUniqueName = dis.readUTF();
|
||||
|
||||
// 4J Stu - Don't set this any more. We added it so that we could share the ban list data for this save
|
||||
// However if the player downloads the same save multiple times, it will overwrite the previous version
|
||||
// However if the player downloads the same save multiple times, it will overwrite the previous version
|
||||
// with that filname, and they could have made changes to it.
|
||||
//StorageManager.SetSaveUniqueFilename((wchar_t *)saveUniqueName.c_str());
|
||||
|
||||
@@ -3091,13 +3091,13 @@ int UIScene_LoadOrJoinMenu::DownloadXbox360SaveThreadProc( LPVOID lpParameter )
|
||||
case eSaveTransferFile_SaveData:
|
||||
{
|
||||
#ifdef SPLIT_SAVES
|
||||
if(!pStateContainer->m_bSaveTransferCancelled)
|
||||
if(!pStateContainer->m_bSaveTransferCancelled)
|
||||
{
|
||||
ConsoleSaveFileOriginal oldFormatSave( L"Temp name", UIScene_LoadOrJoinMenu::s_transferData.data, UIScene_LoadOrJoinMenu::s_transferData.length, false, SAVE_FILE_PLATFORM_X360 );
|
||||
pSave = new ConsoleSaveFileSplit( &oldFormatSave, false, pMinecraft->progressRenderer );
|
||||
|
||||
pMinecraft->progressRenderer->progressStage(IDS_SAVETRANSFER_STAGE_SAVING);
|
||||
if(!pStateContainer->m_bSaveTransferCancelled) pSave->Flush(false,false);
|
||||
if(!pStateContainer->m_bSaveTransferCancelled) pSave->Flush(false,false);
|
||||
}
|
||||
pStateContainer->m_eSaveTransferState=C4JStorage::eSaveTransfer_Saving;
|
||||
|
||||
@@ -3118,7 +3118,7 @@ int UIScene_LoadOrJoinMenu::DownloadXbox360SaveThreadProc( LPVOID lpParameter )
|
||||
pSave->ConvertToLocalPlatform();
|
||||
|
||||
pMinecraft->progressRenderer->progressStage(IDS_SAVETRANSFER_STAGE_SAVING);
|
||||
if(!pStateContainer->m_bSaveTransferCancelled) pSave->Flush(false,false);
|
||||
if(!pStateContainer->m_bSaveTransferCancelled) pSave->Flush(false,false);
|
||||
|
||||
pStateContainer->m_iProgress+=1;
|
||||
if(pStateContainer->m_iProgress==101)
|
||||
@@ -3134,8 +3134,8 @@ int UIScene_LoadOrJoinMenu::DownloadXbox360SaveThreadProc( LPVOID lpParameter )
|
||||
// On Durango/Orbis, we need to wait for all the asynchronous saving processes to complete before destroying the levels, as that will ultimately delete
|
||||
// the directory level storage & therefore the ConsoleSaveSplit instance, which needs to be around until all the sub files have completed saving.
|
||||
#if defined(_DURANGO) || defined(__ORBIS__)
|
||||
pMinecraft->progressRenderer->progressStage(IDS_PROGRESS_SAVING_TO_DISC);
|
||||
|
||||
pMinecraft->progressRenderer->progressStage(IDS_PROGRESS_SAVING_TO_DISC);
|
||||
|
||||
while(StorageManager.GetSaveState() != C4JStorage::ESaveGame_Idle )
|
||||
{
|
||||
Sleep(10);
|
||||
@@ -3150,9 +3150,9 @@ int UIScene_LoadOrJoinMenu::DownloadXbox360SaveThreadProc( LPVOID lpParameter )
|
||||
#ifdef _XBOX_ONE
|
||||
pMinecraft->progressRenderer->progressStage(IDS_SAVE_TRANSFER_DOWNLOAD_AND_CONVERT_COMPLETE);
|
||||
#endif
|
||||
|
||||
|
||||
pStateContainer->m_eSaveTransferState=C4JStorage::eSaveTransfer_Idle;
|
||||
|
||||
|
||||
// wipe the list and repopulate it
|
||||
if(!pStateContainer->m_bSaveTransferCancelled) pStateContainer->m_pClass->m_iState=e_SavesRepopulateAfterTransferDownload;
|
||||
|
||||
@@ -3192,7 +3192,7 @@ int UIScene_LoadOrJoinMenu::DownloadXbox360SaveThreadProc( LPVOID lpParameter )
|
||||
}
|
||||
|
||||
void UIScene_LoadOrJoinMenu::RequestFileSize( SaveTransferStateContainer *pClass, wchar_t *filename )
|
||||
{
|
||||
{
|
||||
Minecraft *pMinecraft=Minecraft::GetInstance();
|
||||
|
||||
// get the save file size
|
||||
@@ -3298,7 +3298,7 @@ int UIScene_LoadOrJoinMenu::SaveTransferUpdateProgress(LPVOID lpParam,unsigned l
|
||||
|
||||
if(pClass->m_bSaveTransferCancelled) // was cancelled
|
||||
{
|
||||
pMinecraft->progressRenderer->progressStage(IDS_SAVE_TRANSFER_DOWNLOAD_CANCELLING);
|
||||
pMinecraft->progressRenderer->progressStage(IDS_SAVE_TRANSFER_DOWNLOAD_CANCELLING);
|
||||
swprintf(wcTemp,app.GetString(IDS_SAVE_TRANSFER_DOWNLOAD_CANCELLING));
|
||||
m_wstrStageText=wcTemp;
|
||||
pMinecraft->progressRenderer->progressStage( m_wstrStageText );
|
||||
@@ -3373,7 +3373,7 @@ int UIScene_LoadOrJoinMenu::CopySaveDialogReturned(void *pParam,int iPad,C4JStor
|
||||
{
|
||||
UIScene_LoadOrJoinMenu* pClass = (UIScene_LoadOrJoinMenu*)pParam;
|
||||
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
{
|
||||
|
||||
LoadingInputParams *loadingParams = new LoadingInputParams();
|
||||
@@ -3418,7 +3418,7 @@ int UIScene_LoadOrJoinMenu::CopySaveThreadProc( LPVOID lpParameter )
|
||||
ui.LeaveCallbackIdCriticalSection();
|
||||
// Copy save data takes two callbacks - one for completion, and one for progress. The progress callback also lets us cancel the operation, if we return false.
|
||||
StorageManager.CopySaveData(&pClass->m_pSaveDetails->SaveInfoA[pClass->m_iSaveListIndex - pClass->m_iDefaultButtonsC],UIScene_LoadOrJoinMenu::CopySaveDataReturned,UIScene_LoadOrJoinMenu::CopySaveDataProgress,lpParameter);
|
||||
|
||||
|
||||
bool bContinue = true;
|
||||
do
|
||||
{
|
||||
@@ -3455,7 +3455,7 @@ int UIScene_LoadOrJoinMenu::CopySaveDataReturned(LPVOID lpParam, bool success, C
|
||||
{
|
||||
pClass->m_bCopying = false;
|
||||
// wipe the list and repopulate it
|
||||
pClass->m_iState=e_SavesRepopulateAfterDelete;
|
||||
pClass->m_iState=e_SavesRepopulateAfterDelete;
|
||||
ui.LeaveCallbackIdCriticalSection();
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user