From 988e3042e00485aa7ed3725fe7bfde1da8cf8519 Mon Sep 17 00:00:00 2001 From: void_17 <61356189+void2012@users.noreply.github.com> Date: Sat, 7 Mar 2026 03:31:30 +0700 Subject: Remove all MSVC `__int64` (#742) --- .../Common/UI/UIScene_CreateWorldMenu.cpp | 74 +++++++++++----------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp') 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(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; // } -- cgit v1.2.3