diff options
Diffstat (limited to 'Minecraft.Client/Common/UI')
| -rw-r--r-- | Minecraft.Client/Common/UI/UIComponent_Panorama.cpp | 6 | ||||
| -rw-r--r-- | Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.cpp | 12 | ||||
| -rw-r--r-- | Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.h | 16 | ||||
| -rw-r--r-- | Minecraft.Client/Common/UI/UIController.cpp | 18 | ||||
| -rw-r--r-- | Minecraft.Client/Common/UI/UIController.h | 20 | ||||
| -rw-r--r-- | Minecraft.Client/Common/UI/UIGroup.cpp | 16 | ||||
| -rw-r--r-- | Minecraft.Client/Common/UI/UIGroup.h | 12 | ||||
| -rw-r--r-- | Minecraft.Client/Common/UI/UILayer.cpp | 6 | ||||
| -rw-r--r-- | Minecraft.Client/Common/UI/UILayer.h | 8 | ||||
| -rw-r--r-- | Minecraft.Client/Common/UI/UIScene.cpp | 16 | ||||
| -rw-r--r-- | Minecraft.Client/Common/UI/UIScene.h | 14 | ||||
| -rw-r--r-- | Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp | 74 | ||||
| -rw-r--r-- | Minecraft.Client/Common/UI/UIScene_LoadMenu.h | 10 | ||||
| -rw-r--r-- | Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp | 6 |
14 files changed, 117 insertions, 117 deletions
diff --git a/Minecraft.Client/Common/UI/UIComponent_Panorama.cpp b/Minecraft.Client/Common/UI/UIComponent_Panorama.cpp index cb6443a1..a52ebd72 100644 --- a/Minecraft.Client/Common/UI/UIComponent_Panorama.cpp +++ b/Minecraft.Client/Common/UI/UIComponent_Panorama.cpp @@ -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 diff --git a/Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.cpp b/Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.cpp index 74683a62..653b0592 100644 --- a/Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.cpp +++ b/Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.cpp @@ -24,7 +24,7 @@ bool UIControl_SpaceIndicatorBar::setupControl(UIScene *scene, IggyValuePath *pa return success; } -void UIControl_SpaceIndicatorBar::init(UIString label, int id, __int64 min, __int64 max) +void UIControl_SpaceIndicatorBar::init(UIString 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); diff --git a/Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.h b/Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.h index 8eed3944..52eb3f6d 100644 --- a/Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.h +++ b/Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.h @@ -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(UIString label, int id, __int64 min, __int64 max); + void init(UIString 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); };
\ No newline at end of file diff --git a/Minecraft.Client/Common/UI/UIController.cpp b/Minecraft.Client/Common/UI/UIController.cpp index 12370bb0..840ed389 100644 --- a/Minecraft.Client/Common/UI/UIController.cpp +++ b/Minecraft.Client/Common/UI/UIController.cpp @@ -144,7 +144,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 ) { @@ -502,7 +502,7 @@ void UIController::tick() } // Clear out the cached movie file data - __int64 currentTime = System::currentTimeMillis(); + int64_t currentTime = System::currentTimeMillis(); for (auto it = m_cachedMovieData.begin(); it != m_cachedMovieData.end();) { if(it->second.m_expiry < currentTime) @@ -622,7 +622,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 , "" , @@ -753,7 +753,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 it = m_cachedMovieData.find(filename); if(it == m_cachedMovieData.end() ) { @@ -1441,8 +1441,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) @@ -1451,8 +1451,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) { @@ -2481,7 +2481,7 @@ void UIController::OverrideSFX(int iPad, int iAction,bool bVal) void UIController::PlayUISFX(ESoundEffect eSound) { - __uint64 time = System::currentTimeMillis(); + uint64_t time = System::currentTimeMillis(); // Don't play multiple SFX on the same tick // (prevents horrible sounds when programmatically setting multiple checkboxes) diff --git a/Minecraft.Client/Common/UI/UIController.h b/Minecraft.Client/Common/UI/UIController.h index d362c4c1..5b897b13 100644 --- a/Minecraft.Client/Common/UI/UIController.h +++ b/Minecraft.Client/Common/UI/UIController.h @@ -16,7 +16,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; @@ -30,7 +30,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; @@ -50,7 +50,7 @@ private: eFont_Korean, }; - + // 4J-JEV: It's important that currentFont == targetFont, unless updateCurrentLanguage is going to be called. EFont m_eCurrentFont, m_eTargetFont; @@ -76,7 +76,7 @@ private: // 4J-PB - ui element type for PSVita touch control #ifdef __PSVITA__ - typedef struct + typedef struct { UIControl *pControl; S32 x1,y1,x2,y2; @@ -141,7 +141,7 @@ private: C4JRender::eViewportType m_currentRenderViewport; bool m_bCustomRenderPosition; - + static DWORD m_dwTrialTimerLimitSecs; unordered_map<wstring, byteArray> m_substitutionTextures; @@ -149,7 +149,7 @@ private: typedef struct _CachedMovieData { byteArray m_ba; - __int64 m_expiry; + int64_t m_expiry; } CachedMovieData; unordered_map<wstring, CachedMovieData> m_cachedMovieData; @@ -173,7 +173,7 @@ private: C4JThread *m_reloadSkinThread; bool m_navigateToHomeOnReload; int m_accumulatedTicks; - __uint64 m_lastUiSfx; // Tracks time (ms) of last UI sound effect + uint64_t m_lastUiSfx; // Tracks time (ms) of last UI sound effect D3D11_RECT m_customRenderingClearRect; @@ -217,7 +217,7 @@ protected: void postInit(); -public: +public: CRITICAL_SECTION m_Allocatorlock; void SetupFont(); bool PendingFontChange(); @@ -249,7 +249,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 ); @@ -319,7 +319,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); diff --git a/Minecraft.Client/Common/UI/UIGroup.cpp b/Minecraft.Client/Common/UI/UIGroup.cpp index e8bb9fe6..79d3c38f 100644 --- a/Minecraft.Client/Common/UI/UIGroup.cpp +++ b/Minecraft.Client/Common/UI/UIGroup.cpp @@ -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) @@ -389,16 +389,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); @@ -412,7 +412,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; diff --git a/Minecraft.Client/Common/UI/UIGroup.h b/Minecraft.Client/Common/UI/UIGroup.h index 28369f27..403a32ae 100644 --- a/Minecraft.Client/Common/UI/UIGroup.h +++ b/Minecraft.Client/Common/UI/UIGroup.h @@ -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; @@ -88,7 +88,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(); }; diff --git a/Minecraft.Client/Common/UI/UILayer.cpp b/Minecraft.Client/Common/UI/UILayer.cpp index b3cf72a0..2063778b 100644 --- a/Minecraft.Client/Common/UI/UILayer.cpp +++ b/Minecraft.Client/Common/UI/UILayer.cpp @@ -877,10 +877,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& it : m_components) { it->PrintTotalMemoryUsage(layerStatic, layerDynamic); diff --git a/Minecraft.Client/Common/UI/UILayer.h b/Minecraft.Client/Common/UI/UILayer.h index 47c776ab..ec6a1f8a 100644 --- a/Minecraft.Client/Common/UI/UILayer.h +++ b/Minecraft.Client/Common/UI/UILayer.h @@ -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: @@ -87,7 +87,7 @@ public: void handleUnlockFullVersion(); UIScene *FindScene(EUIScene sceneType); - - void PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic); + + void PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic); }; diff --git a/Minecraft.Client/Common/UI/UIScene.cpp b/Minecraft.Client/Common/UI/UIScene.cpp index 061f9832..3f204414 100644 --- a/Minecraft.Client/Common/UI/UIScene.cpp +++ b/Minecraft.Client/Common/UI/UIScene.cpp @@ -329,11 +329,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; + int64_t afterLoad = ui.iggyAllocCount; IggyPlayerInitializeAndTickRS ( swf ); - __int64 afterTick = ui.iggyAllocCount; + int64_t afterTick = ui.iggyAllocCount; if(!swf) { @@ -362,8 +362,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 , @@ -406,15 +406,15 @@ void UIScene::getDebugMemoryUseRecursive(const wstring &moviePath, IggyMemoryUse } } -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 , "" , diff --git a/Minecraft.Client/Common/UI/UIScene.h b/Minecraft.Client/Common/UI/UIScene.h index 8fb4983b..e45ecdd1 100644 --- a/Minecraft.Client/Common/UI/UIScene.h +++ b/Minecraft.Client/Common/UI/UIScene.h @@ -45,7 +45,7 @@ class UILayer; class UIScene { friend class UILayer; -public: +public: IggyValuePath *m_rootPath; private: @@ -85,7 +85,7 @@ public: protected: ESceneResolution m_loadedResolution; - + bool m_bIsReloading; bool m_bFocussedOnce; @@ -101,7 +101,7 @@ protected: public: virtual Iggy *getMovie() { return swf; } - + void destroyMovie(); virtual void reloadMovie(bool force = false); virtual bool needsReloaded(); @@ -134,7 +134,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); @@ -169,7 +169,7 @@ public: void gainFocus(); void loseFocus(); - + virtual void updateTooltips(); virtual void updateComponents() {} virtual void handleGainFocus(bool navBack); @@ -213,7 +213,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; @@ -289,7 +289,7 @@ public: protected: -#ifdef _DURANGO +#ifdef _DURANGO virtual long long getDefaultGtcButtons() { return _360_GTC_BACK; } #endif diff --git a/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp b/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp index a9cd9853..a77bbc39 100644 --- a/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp @@ -58,11 +58,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; @@ -91,7 +91,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 )) @@ -124,9 +124,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; - } + } } - + // Set up online game checkbox bool bOnlineGame = m_MoreOptionsParams.bOnlineGame; m_checkboxOnline.SetEnable(true); @@ -342,7 +342,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(); @@ -393,7 +393,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.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad); + ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad); } #endif @@ -404,7 +404,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); - + bool bOnlineGame = m_checkboxOnline.IsChecked(); if (m_MoreOptionsParams.bOnlineGame != bOnlineGame) { @@ -573,7 +573,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(); @@ -625,7 +625,7 @@ void UIScene_CreateWorldMenu::StartSharedLaunchFlow() UINT uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; - ui.RequestAlertMessage(IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, IDS_USING_TRIAL_TEXUREPACK_WARNING, uiIDA, 2, m_iPad,&TrialTexturePackWarningReturned,this); + ui.RequestAlertMessage(IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, IDS_USING_TRIAL_TEXUREPACK_WARNING, uiIDA, 2, m_iPad,&TrialTexturePackWarningReturned,this); #endif #if defined _XBOX_ONE || defined __ORBIS__ @@ -652,7 +652,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; } @@ -699,7 +699,7 @@ void UIScene_CreateWorldMenu::handleTimerComplete(int id) m_MoreOptionsParams.bInviteOnly = FALSE; m_MoreOptionsParams.bAllowFriendsOfFriends = FALSE; } - + m_checkboxOnline.SetEnable(bMultiplayerAllowed); m_checkboxOnline.setChecked(m_MoreOptionsParams.bOnlineGame); @@ -733,7 +733,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]); @@ -791,7 +791,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)) @@ -843,7 +843,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame() ui.RequestErrorMessage(IDS_PRO_CURRENTLY_NOT_ONLINE_TITLE, IDS_PRO_PSNOFFLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad()); } else - { + { // Not signed in to PSN UINT uiIDA[1]; uiIDA[0] = IDS_CONFIRM_OK; @@ -899,7 +899,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); @@ -914,7 +914,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame() #endif if(m_bGameModeCreative == true || m_MoreOptionsParams.bHostPrivileges == TRUE) - { + { UINT uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; @@ -987,7 +987,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); @@ -1050,8 +1050,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); @@ -1124,14 +1124,14 @@ 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(); param->levelName = wWorldName; 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 @@ -1150,7 +1150,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 ) @@ -1194,7 +1194,7 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD app.SetGameHostOption(eGameHostOption_HostCanFly,pClass->m_MoreOptionsParams.bHostPrivileges); app.SetGameHostOption(eGameHostOption_HostCanChangeHunger,pClass->m_MoreOptionsParams.bHostPrivileges); app.SetGameHostOption(eGameHostOption_HostCanBeInvisible,pClass->m_MoreOptionsParams.bHostPrivileges ); - + app.SetGameHostOption(eGameHostOption_MobGriefing, pClass->m_MoreOptionsParams.bMobGriefing); app.SetGameHostOption(eGameHostOption_KeepInventory, pClass->m_MoreOptionsParams.bKeepInventory); app.SetGameHostOption(eGameHostOption_DoMobSpawning, pClass->m_MoreOptionsParams.bDoMobSpawning); @@ -1202,8 +1202,8 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD app.SetGameHostOption(eGameHostOption_DoTileDrops, pClass->m_MoreOptionsParams.bDoTileDrops); app.SetGameHostOption(eGameHostOption_NaturalRegeneration, pClass->m_MoreOptionsParams.bNaturalRegeneration); app.SetGameHostOption(eGameHostOption_DoDaylightCycle, pClass->m_MoreOptionsParams.bDoDaylightCycle); - - app.SetGameHostOption(eGameHostOption_WasntSaveOwner, false); + + app.SetGameHostOption(eGameHostOption_WasntSaveOwner, false); #ifdef _LARGE_WORLDS app.SetGameHostOption(eGameHostOption_WorldSize, pClass->m_MoreOptionsParams.worldSize+1 ); // 0 is GAME_HOST_OPTION_WORLDSIZE_UNKNOWN pClass->m_MoreOptionsParams.currentWorldSize = (EGameHostOptionWorldSize)(pClass->m_MoreOptionsParams.worldSize+1); @@ -1366,7 +1366,7 @@ int UIScene_CreateWorldMenu::StartGame_SignInReturned(void *pParam,bool bContinu } } else - { + { pClass->m_bIgnoreInput = false; } return 0; @@ -1377,7 +1377,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; @@ -1422,7 +1422,7 @@ int UIScene_CreateWorldMenu::ConfirmCreateReturned(void *pParam,int iPad,C4JStor ui.RequestAlertMessage( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA,1,ProfileManager.GetPrimaryPad()); } else - { + { #if defined( __ORBIS__) || defined(__PSVITA__) bool isOnlineGame = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame; if(isOnlineGame) @@ -1452,7 +1452,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); } @@ -1464,28 +1464,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; // } diff --git a/Minecraft.Client/Common/UI/UIScene_LoadMenu.h b/Minecraft.Client/Common/UI/UIScene_LoadMenu.h index 085cb67f..53d66d55 100644 --- a/Minecraft.Client/Common/UI/UIScene_LoadMenu.h +++ b/Minecraft.Client/Common/UI/UIScene_LoadMenu.h @@ -16,7 +16,7 @@ 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; @@ -43,7 +43,7 @@ private: LevelGenerationOptions *m_levelGen; DLCPack * m_pDLCPack; - + int m_iSaveGameInfoIndex; int m_CurrentDifficulty; bool m_bGameModeCreative; @@ -58,7 +58,7 @@ private: bool m_bRequestQuadrantSignin; bool m_bIsCorrupt; bool m_bThumbnailGetFailed; - __int64 m_seed; + int64_t m_seed; wstring m_levelName; #ifdef __PS3__ @@ -73,7 +73,7 @@ private: bool m_bRebuildTouchBoxes; public: UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLayer); - + virtual void updateTooltips(); virtual void updateComponents(); @@ -107,7 +107,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); diff --git a/Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp index f8f9dcae..a2ab17a8 100644 --- a/Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp @@ -2171,7 +2171,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); @@ -2235,7 +2235,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); @@ -3579,7 +3579,7 @@ int UIScene_LoadOrJoinMenu::DownloadXbox360SaveThreadProc( LPVOID lpParameter ) bool bHostOptionsRead = false; unsigned int uiHostOptions = 0; DWORD dwTexturePack; - __int64 seedVal; + int64_t seedVal; char szSeed[50]; ZeroMemory(szSeed,50); |
