diff --git a/Minecraft.Client/AbstractTexturePack.cpp b/Minecraft.Client/AbstractTexturePack.cpp index 03144117..a3c67727 100644 --- a/Minecraft.Client/AbstractTexturePack.cpp +++ b/Minecraft.Client/AbstractTexturePack.cpp @@ -43,7 +43,7 @@ void AbstractTexturePack::loadIcon() WCHAR szResourceLocator[ LOCATOR_SIZE ]; const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(nullptr); - swprintf_s(szResourceLocator, LOCATOR_SIZE ,L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/Graphics/TexturePackIcon.png"); + swprintf(szResourceLocator, LOCATOR_SIZE ,L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/Graphics/TexturePackIcon.png"); UINT size = 0; HRESULT hr = XuiResourceLoadAllNoLoc(szResourceLocator, &m_iconData, &size); @@ -59,7 +59,7 @@ void AbstractTexturePack::loadComparison() WCHAR szResourceLocator[ LOCATOR_SIZE ]; const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(nullptr); - swprintf_s(szResourceLocator, LOCATOR_SIZE ,L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/Graphics/DefaultPack_Comparison.png"); + swprintf(szResourceLocator, LOCATOR_SIZE ,L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/Graphics/DefaultPack_Comparison.png"); UINT size = 0; HRESULT hr = XuiResourceLoadAllNoLoc(szResourceLocator, &m_comparisonData, &size); @@ -238,7 +238,7 @@ void AbstractTexturePack::loadDefaultUI() const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string WCHAR szResourceLocator[ LOCATOR_SIZE ]; - swprintf_s(szResourceLocator, LOCATOR_SIZE,L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/skin_Minecraft.xur"); + swprintf(szResourceLocator, LOCATOR_SIZE,L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/skin_Minecraft.xur"); XuiFreeVisuals(L""); app.LoadSkin(szResourceLocator,nullptr);//L"TexturePack"); @@ -381,7 +381,7 @@ wstring AbstractTexturePack::getXuiRootPath() const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string WCHAR szResourceLocator[ LOCATOR_SIZE ]; - swprintf_s(szResourceLocator, LOCATOR_SIZE,L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/"); + swprintf(szResourceLocator, LOCATOR_SIZE,L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/"); return szResourceLocator; } diff --git a/Minecraft.Client/Common/Audio/SoundEngine.cpp b/Minecraft.Client/Common/Audio/SoundEngine.cpp index 0ecb3a93..413e1b63 100644 --- a/Minecraft.Client/Common/Audio/SoundEngine.cpp +++ b/Minecraft.Client/Common/Audio/SoundEngine.cpp @@ -1078,15 +1078,15 @@ void SoundEngine::playMusicUpdate() // 4J-PB - Need to check if we are a patched BD build if(app.GetBootedFromDiscPatch()) { - sprintf_s(m_szStreamName,"%s/%s",app.GetBDUsrDirPath(m_szMusicPath), m_szMusicPath ); + sprintf(m_szStreamName,"%s/%s",app.GetBDUsrDirPath(m_szMusicPath), m_szMusicPath ); app.DebugPrintf("SoundEngine::playMusicUpdate - (booted from disc patch) music path - %s",m_szStreamName); } else { - sprintf_s(m_szStreamName,"%s/%s",getUsrDirPath(), m_szMusicPath ); + sprintf(m_szStreamName,"%s/%s",getUsrDirPath(), m_szMusicPath ); } #else - sprintf_s(m_szStreamName,"%s/%s",getUsrDirPath(), m_szMusicPath ); + sprintf(m_szStreamName,"%s/%s",getUsrDirPath(), m_szMusicPath ); #endif #else @@ -1157,10 +1157,10 @@ void SoundEngine::playMusicUpdate() strcat_s((char *)m_szStreamName,".wav"); // check if this is in the patch data - sprintf_s(m_szStreamName,"%s/%s",app.GetBDUsrDirPath(m_szStreamName), m_szMusicPath ); - strcat_s((char *)m_szStreamName,"music/"); - strcat_s((char *)m_szStreamName,m_szStreamFileA[m_musicID]); - strcat_s((char *)m_szStreamName,".wav"); + sprintf(m_szStreamName,"%s/%s",app.GetBDUsrDirPath(m_szStreamName), m_szMusicPath ); + strcat((char *)m_szStreamName,"music/"); + strcat((char *)m_szStreamName,m_szStreamFileA[m_musicID]); + strcat((char *)m_szStreamName,".wav"); SetIsPlayingStreamingGameMusic(true); SetIsPlayingStreamingCDMusic(false); diff --git a/Minecraft.Client/Common/Consoles_App.cpp b/Minecraft.Client/Common/Consoles_App.cpp index 86ed2c31..dcd74d7a 100644 --- a/Minecraft.Client/Common/Consoles_App.cpp +++ b/Minecraft.Client/Common/Consoles_App.cpp @@ -1711,7 +1711,7 @@ DWORD CMinecraftApp::GetPlayerSkinId(int iPad) if( GET_IS_DLC_SKIN_FROM_BITMASK(dwSkin) ) { // 4J Stu - DLC skins are numbered using decimal rather than hex to make it easier to number manually - swprintf_s(chars, 256, L"dlcskin%08d.png", GET_DLC_SKIN_ID_FROM_BITMASK(dwSkin)); + swprintf(chars, 256, L"dlcskin%08d.png", GET_DLC_SKIN_ID_FROM_BITMASK(dwSkin)); Pack=app.m_dlcManager.getPackContainingSkin(chars); @@ -1824,7 +1824,7 @@ void CMinecraftApp::ValidateFavoriteSkins(int iPad) for(unsigned int i=0;iGetOnlineName()); + swprintf(wchFormat, 40, L"%ls\n\n%%ls",player->GetOnlineName()); C4JStorage::EMessageResult result = ui.RequestErrorMessage( IDS_BANNED_LEVEL_TITLE, IDS_PLAYER_BANNED_LEVEL, uiIDA,2,i,&CMinecraftApp::BannedLevelDialogReturned,this, wchFormat); if(result != C4JStorage::EMessage_Busy) SetAction(i,eAppAction_Idle); @@ -6241,9 +6241,9 @@ int CMinecraftApp::WarningTrialTexturePackReturned(void *pParam,int iPad,C4JStor // we have to retrieve the skuid from the store info, it can't be hardcoded since Sony may change it. // So we assume the first sku for the product is the one we want #ifdef __ORBIS__ - sprintf_s(chName,"%s",pSONYDLCInfo->chDLCKeyname); + sprintf(chName,"%s",pSONYDLCInfo->chDLCKeyname); #else - sprintf_s(chName,"%s-%s",app.GetCommerceCategory(),pSONYDLCInfo->chDLCKeyname); + sprintf(chName,"%s-%s",app.GetCommerceCategory(),pSONYDLCInfo->chDLCKeyname); #endif app.GetDLCSkuIDFromProductList(chName,chSkuID); // 4J-PB - need to check for an empty store @@ -6606,49 +6606,49 @@ wstring CMinecraftApp::FormatHTMLString(int iPad, const wstring &desc, int shado wchar_t replacements[64]; // We will also insert line breaks here as couldn't figure out how to get them to come through from strings.resx ! text = replaceAll(text, L"{*B*}", L"
" ); - swprintf_s(replacements,64,L"", GetHTMLColour(eHTMLColor_T1)); + swprintf(replacements,64,L"", GetHTMLColour(eHTMLColor_T1)); text = replaceAll(text, L"{*T1*}", replacements ); - swprintf_s(replacements,64,L"", GetHTMLColour(eHTMLColor_T2)); + swprintf(replacements,64,L"", GetHTMLColour(eHTMLColor_T2)); text = replaceAll(text, L"{*T2*}", replacements ); - swprintf_s(replacements,64,L"", GetHTMLColour(eHTMLColor_T3)); + swprintf(replacements,64,L"", GetHTMLColour(eHTMLColor_T3)); text = replaceAll(text, L"{*T3*}", replacements ); // for How To Play - swprintf_s(replacements,64,L"", GetHTMLColour(eHTMLColor_Black)); + swprintf(replacements,64,L"", GetHTMLColour(eHTMLColor_Black)); text = replaceAll(text, L"{*ETB*}", replacements ); - swprintf_s(replacements,64,L"", GetHTMLColour(eHTMLColor_White)); + swprintf(replacements,64,L"", GetHTMLColour(eHTMLColor_White)); text = replaceAll(text, L"{*ETW*}", replacements ); text = replaceAll(text, L"{*EF*}", L"" ); - swprintf_s(replacements,64,L"", GetHTMLColour(eHTMLColor_0), shadowColour); + swprintf(replacements,64,L"", GetHTMLColour(eHTMLColor_0), shadowColour); text = replaceAll(text, L"{*C0*}", replacements ); - swprintf_s(replacements,64,L"", GetHTMLColour(eHTMLColor_1), shadowColour); + swprintf(replacements,64,L"", GetHTMLColour(eHTMLColor_1), shadowColour); text = replaceAll(text, L"{*C1*}", replacements ); - swprintf_s(replacements,64,L"", GetHTMLColour(eHTMLColor_2), shadowColour); + swprintf(replacements,64,L"", GetHTMLColour(eHTMLColor_2), shadowColour); text = replaceAll(text, L"{*C2*}", replacements ); - swprintf_s(replacements,64,L"", GetHTMLColour(eHTMLColor_3), shadowColour); + swprintf(replacements,64,L"", GetHTMLColour(eHTMLColor_3), shadowColour); text = replaceAll(text, L"{*C3*}", replacements ); - swprintf_s(replacements,64,L"", GetHTMLColour(eHTMLColor_4), shadowColour); + swprintf(replacements,64,L"", GetHTMLColour(eHTMLColor_4), shadowColour); text = replaceAll(text, L"{*C4*}", replacements ); - swprintf_s(replacements,64,L"", GetHTMLColour(eHTMLColor_5), shadowColour); + swprintf(replacements,64,L"", GetHTMLColour(eHTMLColor_5), shadowColour); text = replaceAll(text, L"{*C5*}", replacements ); - swprintf_s(replacements,64,L"", GetHTMLColour(eHTMLColor_6), shadowColour); + swprintf(replacements,64,L"", GetHTMLColour(eHTMLColor_6), shadowColour); text = replaceAll(text, L"{*C6*}", replacements ); - swprintf_s(replacements,64,L"", GetHTMLColour(eHTMLColor_7), shadowColour); + swprintf(replacements,64,L"", GetHTMLColour(eHTMLColor_7), shadowColour); text = replaceAll(text, L"{*C7*}", replacements ); - swprintf_s(replacements,64,L"", GetHTMLColour(eHTMLColor_8), shadowColour); + swprintf(replacements,64,L"", GetHTMLColour(eHTMLColor_8), shadowColour); text = replaceAll(text, L"{*C8*}", replacements ); - swprintf_s(replacements,64,L"", GetHTMLColour(eHTMLColor_9), shadowColour); + swprintf(replacements,64,L"", GetHTMLColour(eHTMLColor_9), shadowColour); text = replaceAll(text, L"{*C9*}", replacements ); - swprintf_s(replacements,64,L"", GetHTMLColour(eHTMLColor_a), shadowColour); + swprintf(replacements,64,L"", GetHTMLColour(eHTMLColor_a), shadowColour); text = replaceAll(text, L"{*CA*}", replacements ); - swprintf_s(replacements,64,L"", GetHTMLColour(eHTMLColor_b), shadowColour); + swprintf(replacements,64,L"", GetHTMLColour(eHTMLColor_b), shadowColour); text = replaceAll(text, L"{*CB*}", replacements ); - swprintf_s(replacements,64,L"", GetHTMLColour(eHTMLColor_c), shadowColour); + swprintf(replacements,64,L"", GetHTMLColour(eHTMLColor_c), shadowColour); text = replaceAll(text, L"{*CC*}", replacements ); - swprintf_s(replacements,64,L"", GetHTMLColour(eHTMLColor_d), shadowColour); + swprintf(replacements,64,L"", GetHTMLColour(eHTMLColor_d), shadowColour); text = replaceAll(text, L"{*CD*}", replacements ); - swprintf_s(replacements,64,L"", GetHTMLColour(eHTMLColor_e), shadowColour); + swprintf(replacements,64,L"", GetHTMLColour(eHTMLColor_e), shadowColour); text = replaceAll(text, L"{*CE*}", replacements ); - swprintf_s(replacements,64,L"", GetHTMLColour(eHTMLColor_f), shadowColour); + swprintf(replacements,64,L"", GetHTMLColour(eHTMLColor_f), shadowColour); text = replaceAll(text, L"{*CF*}", replacements ); // Swap for southpaw. @@ -6824,7 +6824,7 @@ wstring CMinecraftApp::GetActionReplacement(int iPad, unsigned char ucAction) int size = 45; #endif - swprintf_s(string,128,L"", replacement.c_str(), size, size); + swprintf(string,128,L"", replacement.c_str(), size, size); return string; #endif @@ -6953,7 +6953,7 @@ wstring CMinecraftApp::GetVKReplacement(unsigned int uiVKey) int size = 45; #endif - swprintf_s(string,128,L"", replacement.c_str(), size, size); + swprintf(string,128,L"", replacement.c_str(), size, size); return string; #endif @@ -6984,7 +6984,7 @@ wstring CMinecraftApp::GetIconReplacement(unsigned int uiIcon) int size = 33; #endif - swprintf_s(string,128,L"", size, size); + swprintf(string,128,L"", size, size); wstring result = L""; switch(uiIcon) { @@ -9491,7 +9491,7 @@ wstring CMinecraftApp::getSkinPathFromId(DWORD skinId) if( GET_IS_DLC_SKIN_FROM_BITMASK(skinId) ) { // 4J Stu - DLC skins are numbered using decimal rather than hex to make it easier to number manually - swprintf_s(chars, 256, L"dlcskin%08d.png", GET_DLC_SKIN_ID_FROM_BITMASK(skinId)); + swprintf(chars, 256, L"dlcskin%08d.png", GET_DLC_SKIN_ID_FROM_BITMASK(skinId)); } else @@ -9500,11 +9500,11 @@ wstring CMinecraftApp::getSkinPathFromId(DWORD skinId) DWORD defaultSkinIndex = GET_DEFAULT_SKIN_ID_FROM_BITMASK(skinId); if( ugcSkinIndex == 0 ) { - swprintf_s(chars, 256, L"defskin%08X.png",defaultSkinIndex); + swprintf(chars, 256, L"defskin%08X.png",defaultSkinIndex); } else { - swprintf_s(chars, 256, L"ugcskin%08X.png",ugcSkinIndex); + swprintf(chars, 256, L"ugcskin%08X.png",ugcSkinIndex); } } return chars; @@ -9542,7 +9542,7 @@ int CMinecraftApp::TexturePackDialogReturned(void* pParam, int iPad, C4JStorage: #ifdef __ORBIS__ strcpy_s(chName, chKeyName); #else - sprintf_s(chName, "%s-%s", app.GetCommerceCategory(), chKeyName); + sprintf(chName, "%s-%s", app.GetCommerceCategory(), chKeyName); #endif app.GetDLCSkuIDFromProductList(chName, chSkuID); diff --git a/Minecraft.Client/Common/DLC/DLCManager.cpp b/Minecraft.Client/Common/DLC/DLCManager.cpp index 3172a6a8..6e5ff20f 100644 --- a/Minecraft.Client/Common/DLC/DLCManager.cpp +++ b/Minecraft.Client/Common/DLC/DLCManager.cpp @@ -297,7 +297,7 @@ DWORD DLCManager::checkForCorruptDLCAndAlert(bool showMessage /*= true*/) { // pass in the pack format string WCHAR wchFormat[132]; - swprintf_s(wchFormat, 132, L"%ls\n\n%%ls", firstCorruptPack->getName().c_str()); + swprintf(wchFormat, 132, L"%ls\n\n%%ls", firstCorruptPack->getName().c_str()); C4JStorage::EMessageResult result = ui.RequestErrorMessage( IDS_CORRUPT_DLC_TITLE, IDS_CORRUPT_DLC, uiIDA,1,ProfileManager.GetPrimaryPad(),nullptr,nullptr,wchFormat); diff --git a/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp b/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp index ddc09312..4e16e0f5 100644 --- a/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp +++ b/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp @@ -817,7 +817,7 @@ wstring CPlatformNetworkManagerStub::GatherRTTStats() if(!pQNetPlayer->IsLocal()) { ZeroMemory(stat,32*sizeof(WCHAR)); - swprintf_s(stat, 32, L"%d: %d/", i, pQNetPlayer->GetCurrentRtt() ); + swprintf(stat, 32, L"%d: %d/", i, pQNetPlayer->GetCurrentRtt() ); stats.append(stat); } } diff --git a/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.cpp index de58f278..1e6fa6fa 100644 --- a/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.cpp @@ -214,7 +214,7 @@ void IUIScene_AnvilMenu::handleTick() { LPCWSTR costString = app.GetString(IDS_REPAIR_COST); wchar_t temp[256]; - swprintf_s(temp, 256, costString, m_repairMenu->cost); + swprintf(temp, 256, costString, m_repairMenu->cost); m_costString = temp; if(!m_repairMenu->getSlot(AnvilMenu::RESULT_SLOT)->mayPickup(dynamic_pointer_cast(m_inventory->player->shared_from_this()))) { diff --git a/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.cpp index eae58d98..6fddece9 100644 --- a/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.cpp @@ -1284,7 +1284,7 @@ void IUIScene_CraftingMenu::UpdateDescriptionText(bool bCanBeMade) size = eHTMLSize_Splitscreen; } wchar_t startTags[64]; - swprintf_s(startTags,64,L"

",app.GetHTMLColour(eHTMLColor_Black)); + swprintf(startTags,64,L"

",app.GetHTMLColour(eHTMLColor_Black)); wsText= startTags + wsText + L"

"; setDescriptionText(wsText.c_str()); diff --git a/Minecraft.Client/Common/UI/IUIScene_PauseMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_PauseMenu.cpp index 9ba3adb3..e88ed08c 100644 --- a/Minecraft.Client/Common/UI/IUIScene_PauseMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_PauseMenu.cpp @@ -258,9 +258,9 @@ int IUIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4 // we have to retrieve the skuid from the store info, it can't be hardcoded since Sony may change it. // So we assume the first sku for the product is the one we want #ifdef __ORBIS__ - sprintf_s(chName,"%s",pSONYDLCInfo->chDLCKeyname); + sprintf(chName,"%s",pSONYDLCInfo->chDLCKeyname); #else - sprintf_s(chName,"%s-%s",app.GetCommerceCategory(),pSONYDLCInfo->chDLCKeyname); + sprintf(chName,"%s-%s",app.GetCommerceCategory(),pSONYDLCInfo->chDLCKeyname); #endif app.GetDLCSkuIDFromProductList(chName,chSkuID); // 4J-PB - need to check for an empty store diff --git a/Minecraft.Client/Common/UI/IUIScene_StartGame.cpp b/Minecraft.Client/Common/UI/IUIScene_StartGame.cpp index c4d35b08..735da438 100644 --- a/Minecraft.Client/Common/UI/IUIScene_StartGame.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_StartGame.cpp @@ -35,7 +35,7 @@ void IUIScene_StartGame::HandleDLCMountingComplete() if(dwImageBytes > 0 && pbImageData) { wchar_t imageName[64]; - swprintf_s(imageName,64,L"tpack%08x",tp->getId()); + swprintf(imageName,64,L"tpack%08x",tp->getId()); registerSubstitutionTexture(imageName, pbImageData, dwImageBytes); m_texturePackList.addPack(i,imageName); } @@ -190,14 +190,14 @@ void IUIScene_StartGame::UpdateTexturePackDescription(int index) //} wchar_t imageName[64]; - swprintf_s(imageName,64,L"tpack%08x",tp->getId()); + swprintf(imageName,64,L"tpack%08x",tp->getId()); m_bitmapTexturePackIcon.setTextureName(imageName); pbImageData = tp->getPackComparison(dwImageBytes); if(dwImageBytes > 0 && pbImageData) { - swprintf_s(imageName,64,L"texturePackComparison%08x",tp->getId()); + swprintf(imageName,64,L"texturePackComparison%08x",tp->getId()); registerSubstitutionTexture(imageName, pbImageData, dwImageBytes); m_bitmapComparison.setTextureName(imageName); } diff --git a/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.cpp b/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.cpp index b7a5e0f1..76d3babf 100644 --- a/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.cpp +++ b/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.cpp @@ -168,8 +168,8 @@ void UIComponent_TutorialPopup::_SetDescription(UIScene *interactScene, const ws // set the text colour wchar_t formatting[40]; // 4J Stu - Don't set HTML font size, that's set at design time in flash - //swprintf_s(formatting, 40, L"",app.GetHTMLColour(eHTMLColor_White),m_textFontSize); - swprintf_s(formatting, 40, L"",app.GetHTMLColour(eHTMLColor_White)); + //swprintf(formatting, 40, L"",app.GetHTMLColour(eHTMLColor_White),m_textFontSize); + swprintf(formatting, 40, L"",app.GetHTMLColour(eHTMLColor_White)); text = formatting + text; m_labelDescription.setLabel( text, true ); @@ -181,8 +181,8 @@ void UIComponent_TutorialPopup::_SetDescription(UIScene *interactScene, const ws // set the text colour wchar_t formatting[40]; // 4J Stu - Don't set HTML font size, that's set at design time in flash - //swprintf_s(formatting, 40, L"",app.GetHTMLColour(eHTMLColor_White),m_textFontSize); - swprintf_s(formatting, 40, L"",app.GetHTMLColour(eHTMLColor_White)); + //swprintf(formatting, 40, L"",app.GetHTMLColour(eHTMLColor_White),m_textFontSize); + swprintf(formatting, 40, L"",app.GetHTMLColour(eHTMLColor_White)); text = formatting + text; m_labelDescription.setLabel( text, true ); diff --git a/Minecraft.Client/Common/UI/UIController.cpp b/Minecraft.Client/Common/UI/UIController.cpp index b7106943..24b3aced 100644 --- a/Minecraft.Client/Common/UI/UIController.cpp +++ b/Minecraft.Client/Common/UI/UIController.cpp @@ -2805,7 +2805,7 @@ void UIController::UpdateTrialTimer(unsigned int iPad) { int iMins=dwTimeTicks/60; int iSeconds=dwTimeTicks%60; - swprintf_s( wcTime, 20, L"%d:%02d",iMins,iSeconds); + swprintf( wcTime, 20, L"%d:%02d",iMins,iSeconds); if(m_groups[static_cast(eUIGroup_Fullscreen)]->getPressStartToPlay()) m_groups[static_cast(eUIGroup_Fullscreen)]->getPressStartToPlay()->setTrialTimer(wcTime); } else @@ -2848,7 +2848,7 @@ void UIController::UpdateAutosaveCountdownTimer(unsigned int uiSeconds) { #if !(defined(_XBOX_ONE) || defined(__ORBIS__)) WCHAR wcAutosaveCountdown[100]; - swprintf_s( wcAutosaveCountdown, 100, app.GetString(IDS_AUTOSAVE_COUNTDOWN),uiSeconds); + swprintf( wcAutosaveCountdown, 100, app.GetString(IDS_AUTOSAVE_COUNTDOWN),uiSeconds); if(m_groups[static_cast(eUIGroup_Fullscreen)]->getPressStartToPlay()) m_groups[static_cast(eUIGroup_Fullscreen)]->getPressStartToPlay()->setTrialTimer(wcAutosaveCountdown); #endif } diff --git a/Minecraft.Client/Common/UI/UIScene_AnvilMenu.cpp b/Minecraft.Client/Common/UI/UIScene_AnvilMenu.cpp index 66dd468b..a3fb0d2d 100644 --- a/Minecraft.Client/Common/UI/UIScene_AnvilMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_AnvilMenu.cpp @@ -54,7 +54,7 @@ UIScene_AnvilMenu::UIScene_AnvilMenu(int iPad, void *_initData, UILayer *parentL { LPCWSTR costString = app.GetString(IDS_REPAIR_COST); wchar_t temp[256]; - swprintf_s(temp, 256, costString, m_repairMenu->cost); + swprintf(temp, 256, costString, m_repairMenu->cost); m_costString = temp; if(!m_repairMenu->getSlot(AnvilMenu::RESULT_SLOT)->mayPickup(dynamic_pointer_cast(m_inventory->player->shared_from_this()))) { diff --git a/Minecraft.Client/Common/UI/UIScene_ControlsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_ControlsMenu.cpp index 1396d983..939efde1 100644 --- a/Minecraft.Client/Common/UI/UIScene_ControlsMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_ControlsMenu.cpp @@ -30,7 +30,7 @@ UIScene_ControlsMenu::UIScene_ControlsMenu(int iPad, void *initData, UILayer *pa if(bNotInGame) { LPWSTR layoutString = new wchar_t[ 128 ]; - swprintf_s( layoutString, 128, L"%ls", VER_PRODUCTVERSION_STR_W); + swprintf( layoutString, 128, L"%ls", VER_PRODUCTVERSION_STR_W); m_labelVersion.init(layoutString); delete [] layoutString; } @@ -64,7 +64,7 @@ UIScene_ControlsMenu::UIScene_ControlsMenu(int iPad, void *initData, UILayer *pa #ifndef __PSVITA__ LPWSTR layoutString = new wchar_t[ 128 ]; - swprintf_s( layoutString, 128, L"%ls : %ls", app.GetString( IDS_CURRENT_LAYOUT ),app.GetString(m_iSchemeTextA[iSelected])); + swprintf( layoutString, 128, L"%ls : %ls", app.GetString( IDS_CURRENT_LAYOUT ),app.GetString(m_iSchemeTextA[iSelected])); #ifdef __ORBIS__ if (!InputManager.UsingRemoteVita()) #endif @@ -202,7 +202,7 @@ void UIScene_ControlsMenu::handlePress(F64 controlId, F64 childId) case eControl_Button2: app.SetGameSettings(m_iPad,eGameSetting_ControlScheme,static_cast(control)); LPWSTR layoutString = new wchar_t[ 128 ]; - swprintf_s( layoutString, 128, L"%ls : %ls", app.GetString( IDS_CURRENT_LAYOUT ),app.GetString(m_iSchemeTextA[control])); + swprintf( layoutString, 128, L"%ls : %ls", app.GetString( IDS_CURRENT_LAYOUT ),app.GetString(m_iSchemeTextA[control])); #ifdef __ORBIS__ if (!InputManager.UsingRemoteVita()) #endif diff --git a/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp b/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp index 5f56de81..c576a044 100644 --- a/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp @@ -64,10 +64,10 @@ UIScene_CreateWorldMenu::UIScene_CreateWorldMenu(int iPad, void *initData, UILay m_labelTexturePackDescription.init(L""); WCHAR TempString[256]; - swprintf_s( (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)); - swprintf_s( (WCHAR *)TempString, 256, L"%ls: %ls", app.GetString( IDS_SLIDER_GAMEMODE ),app.GetString(m_iGamemodeTitleSettingA[0])); + swprintf( (WCHAR *)TempString, 256, L"%ls: %ls", app.GetString( IDS_SLIDER_GAMEMODE ),app.GetString(m_iGamemodeTitleSettingA[0])); m_sliderGamemode.init(TempString,eControl_GameModeToggle,0,2,0); m_MoreOptionsParams.bGenerateOptions=TRUE; @@ -183,7 +183,7 @@ UIScene_CreateWorldMenu::UIScene_CreateWorldMenu(int iPad, void *initData, UILay if(dwImageBytes > 0 && pbImageData) { wchar_t imageName[64]; - swprintf_s(imageName,64,L"tpack%08x",tp->getId()); + swprintf(imageName,64,L"tpack%08x",tp->getId()); registerSubstitutionTexture(imageName, pbImageData, dwImageBytes); m_texturePackList.addPack(i,imageName); app.DebugPrintf("Adding texture pack %ls at %d\n",imageName,i); @@ -645,7 +645,7 @@ void UIScene_CreateWorldMenu::handleSliderMove(F64 sliderId, F64 currentValue) m_sliderDifficulty.handleSliderMove(value); app.SetGameSettings(m_iPad,eGameSetting_Difficulty,value); - swprintf_s( (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; case eControl_GameModeToggle: @@ -667,7 +667,7 @@ void UIScene_CreateWorldMenu::handleSliderMove(F64 sliderId, F64 currentValue) m_iGameModeId = GameType::SURVIVAL->getId(); } - swprintf_s( (WCHAR *)TempString, 256, L"%ls: %ls", app.GetString( IDS_SLIDER_GAMEMODE ),app.GetString(m_iGamemodeTitleSettingA[value])); + swprintf( (WCHAR *)TempString, 256, L"%ls: %ls", app.GetString( IDS_SLIDER_GAMEMODE ),app.GetString(m_iGamemodeTitleSettingA[value])); m_sliderGamemode.setLabel(TempString); break; diff --git a/Minecraft.Client/Common/UI/UIScene_Credits.cpp b/Minecraft.Client/Common/UI/UIScene_Credits.cpp index 06fe8d1c..02dc6620 100644 --- a/Minecraft.Client/Common/UI/UIScene_Credits.cpp +++ b/Minecraft.Client/Common/UI/UIScene_Credits.cpp @@ -538,11 +538,11 @@ UIScene_Credits::UIScene_Credits(int iPad, void *initData, UILayer *parentLayer) LPWSTR creditsString = new wchar_t[ 128 ]; if(gs_aCreditDefs[i].m_iStringID[1]!=NO_TRANSLATED_STRING) { - swprintf_s( creditsString, 128, gs_aCreditDefs[i].m_Text, app.GetString( gs_aCreditDefs[i].m_iStringID[0] ), app.GetString( gs_aCreditDefs[i].m_iStringID[1] ) ); + swprintf( creditsString, 128, gs_aCreditDefs[i].m_Text, app.GetString( gs_aCreditDefs[i].m_iStringID[0] ), app.GetString( gs_aCreditDefs[i].m_iStringID[1] ) ); } else { - swprintf_s( creditsString, 128, gs_aCreditDefs[i].m_Text, app.GetString( gs_aCreditDefs[i].m_iStringID[0] ) ); + swprintf( creditsString, 128, gs_aCreditDefs[i].m_Text, app.GetString( gs_aCreditDefs[i].m_iStringID[0] ) ); } setNextLabel(creditsString,gs_aCreditDefs[i].m_eType); delete [] creditsString; @@ -629,11 +629,11 @@ void UIScene_Credits::tick() } else if(pDef->m_iStringID[1]!=NO_TRANSLATED_STRING) { - swprintf_s( creditsString, 128, sanitisedString.c_str(), app.GetString( pDef->m_iStringID[0] ), app.GetString( pDef->m_iStringID[1] ) ); + swprintf( creditsString, 128, sanitisedString.c_str(), app.GetString( pDef->m_iStringID[0] ), app.GetString( pDef->m_iStringID[1] ) ); } else { - swprintf_s( creditsString, 128, sanitisedString.c_str(), app.GetString( pDef->m_iStringID[0] ) ); + swprintf( creditsString, 128, sanitisedString.c_str(), app.GetString( pDef->m_iStringID[0] ) ); } setNextLabel(creditsString,pDef->m_eType); diff --git a/Minecraft.Client/Common/UI/UIScene_DLCOffersMenu.cpp b/Minecraft.Client/Common/UI/UIScene_DLCOffersMenu.cpp index 437cdd66..5e644803 100644 --- a/Minecraft.Client/Common/UI/UIScene_DLCOffersMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_DLCOffersMenu.cpp @@ -780,7 +780,7 @@ void UIScene_DLCOffersMenu::GetDLCInfo( int iOfferC, bool bUpdateOnly ) wchar_t formatting[40]; wstring wstrTemp = app.GetString(IDS_NO_DLCOFFERS); -// swprintf_s(formatting, 40, L"", m_bIsSD?12:14); +// swprintf(formatting, 40, L"", m_bIsSD?12:14); // wstrTemp = formatting + wstrTemp; m_labelHTMLSellText.setLabel(wstrTemp); diff --git a/Minecraft.Client/Common/UI/UIScene_DebugCreateSchematic.cpp b/Minecraft.Client/Common/UI/UIScene_DebugCreateSchematic.cpp index ffc490e6..d698b51f 100644 --- a/Minecraft.Client/Common/UI/UIScene_DebugCreateSchematic.cpp +++ b/Minecraft.Client/Common/UI/UIScene_DebugCreateSchematic.cpp @@ -78,9 +78,9 @@ void UIScene_DebugCreateSchematic::onDirectEditFinished(UIControl_TextInput *inp if (input == &m_textInputName) { if (!value.empty()) - swprintf_s(m_data->name, 64, L"%ls", value.c_str()); + swprintf(m_data->name, 64, L"%ls", value.c_str()); else - swprintf_s(m_data->name, 64, L"schematic"); + swprintf(m_data->name, 64, L"schematic"); } else if (input == &m_textInputStartX) m_data->startX = iVal; else if (input == &m_textInputStartY) m_data->startY = iVal; @@ -260,11 +260,11 @@ int UIScene_DebugCreateSchematic::KeyboardCompleteCallback(LPVOID lpParam,bool b pClass->m_textInputName.setLabel(value); if(!value.empty()) { - swprintf_s(pClass->m_data->name,64,L"%ls", value.c_str()); + swprintf(pClass->m_data->name,64,L"%ls", value.c_str()); } else { - swprintf_s(pClass->m_data->name,64,L"schematic"); + swprintf(pClass->m_data->name,64,L"schematic"); } break; case eControl_StartX: diff --git a/Minecraft.Client/Common/UI/UIScene_DebugOverlay.cpp b/Minecraft.Client/Common/UI/UIScene_DebugOverlay.cpp index 206286c4..25191a25 100644 --- a/Minecraft.Client/Common/UI/UIScene_DebugOverlay.cpp +++ b/Minecraft.Client/Common/UI/UIScene_DebugOverlay.cpp @@ -25,11 +25,11 @@ UIScene_DebugOverlay::UIScene_DebugOverlay(int iPad, void *initData, UILayer *pa WCHAR tempString[256]; const int fovSliderVal = app.GetGameSettings(m_iPad, eGameSetting_FOV); const int fovDeg = 70 + fovSliderVal * 40 / 100; - swprintf_s( tempString, 256, L"Set fov (%d)", fovDeg); + swprintf( tempString, 256, L"Set fov (%d)", fovDeg); m_sliderFov.init(tempString,eControl_FOV,0,100,fovSliderVal); const float currentTime = pMinecraft->level->getLevelData()->getGameTime() % 24000; - swprintf_s( tempString, 256, L"Set time (unsafe) (%d)", static_cast(currentTime)); + swprintf( tempString, 256, L"Set time (unsafe) (%d)", static_cast(currentTime)); m_sliderTime.init(tempString,eControl_Time,0,240,currentTime/100); m_buttonRain.init(L"Toggle Rain",eControl_Rain); @@ -270,7 +270,7 @@ void UIScene_DebugOverlay::handleSliderMove(F64 sliderId, F64 currentValue) WCHAR tempString[256]; float currentTime = currentValue * 100; - swprintf_s( tempString, 256, L"Set time (unsafe) (%d)", static_cast(currentTime)); + swprintf( tempString, 256, L"Set time (unsafe) (%d)", static_cast(currentTime)); m_sliderTime.setLabel(tempString); } break; @@ -285,7 +285,7 @@ void UIScene_DebugOverlay::handleSliderMove(F64 sliderId, F64 currentValue) app.SetGameSettings(m_iPad, eGameSetting_FOV, v); WCHAR tempString[256]; - swprintf_s( tempString, 256, L"Set fov (%d)", fovDeg); + swprintf( tempString, 256, L"Set fov (%d)", fovDeg); m_sliderFov.setLabel(tempString); } break; diff --git a/Minecraft.Client/Common/UI/UIScene_DebugSetCamera.cpp b/Minecraft.Client/Common/UI/UIScene_DebugSetCamera.cpp index 2d4de8cf..51eab5aa 100644 --- a/Minecraft.Client/Common/UI/UIScene_DebugSetCamera.cpp +++ b/Minecraft.Client/Common/UI/UIScene_DebugSetCamera.cpp @@ -31,19 +31,19 @@ UIScene_DebugSetCamera::UIScene_DebugSetCamera(int iPad, void *initData, UILayer WCHAR TempString[256]; - swprintf_s( (WCHAR *)TempString, 256, L"%.2f", currentPosition->m_camX); + swprintf( (WCHAR *)TempString, 256, L"%.2f", currentPosition->m_camX); m_textInputX.init(TempString, eControl_CamX); - swprintf_s( (WCHAR *)TempString, 256, L"%.2f", currentPosition->m_camY); + swprintf( (WCHAR *)TempString, 256, L"%.2f", currentPosition->m_camY); m_textInputY.init(TempString, eControl_CamY); - swprintf_s( (WCHAR *)TempString, 256, L"%.2f", currentPosition->m_camZ); + swprintf( (WCHAR *)TempString, 256, L"%.2f", currentPosition->m_camZ); m_textInputZ.init(TempString, eControl_CamZ); - swprintf_s( (WCHAR *)TempString, 256, L"%.2f", currentPosition->m_yRot); + swprintf( (WCHAR *)TempString, 256, L"%.2f", currentPosition->m_yRot); m_textInputYRot.init(TempString, eControl_YRot); - swprintf_s( (WCHAR *)TempString, 256, L"%.2f", currentPosition->m_elev); + swprintf( (WCHAR *)TempString, 256, L"%.2f", currentPosition->m_elev); m_textInputElevation.init(TempString, eControl_Elevation); m_checkboxLockPlayer.init(L"Lock Player", eControl_LockPlayer, app.GetFreezePlayers()); diff --git a/Minecraft.Client/Common/UI/UIScene_EndPoem.cpp b/Minecraft.Client/Common/UI/UIScene_EndPoem.cpp index 29a79634..ead86c3d 100644 --- a/Minecraft.Client/Common/UI/UIScene_EndPoem.cpp +++ b/Minecraft.Client/Common/UI/UIScene_EndPoem.cpp @@ -33,7 +33,7 @@ UIScene_EndPoem::UIScene_EndPoem(int iPad, void *initData, UILayer *parentLayer) #endif //wchar_t startTags[64]; - //swprintf_s(startTags,64,L"",app.GetHTMLFontSize(eHTMLSize_EndPoem)); + //swprintf(startTags,64,L"",app.GetHTMLFontSize(eHTMLSize_EndPoem)); //noNoiseString.append(halfScreenLineBreaks); //noNoiseString.append(halfScreenLineBreaks); noNoiseString.append( app.GetString(IDS_WIN_TEXT) ); @@ -267,7 +267,7 @@ void UIScene_EndPoem::updateNoise() if(randomVal == 1) colour = eHTMLColor_9; else if(randomVal == 2) colour = eHTMLColor_a; ZeroMemory(replacements,64*sizeof(wchar_t)); - swprintf_s(replacements,64,L"%ls",app.GetHTMLColour(colour),randomCharStr.c_str()); + swprintf(replacements,64,L"%ls",app.GetHTMLColour(colour),randomCharStr.c_str()); replaceString.append(replacements); } diff --git a/Minecraft.Client/Common/UI/UIScene_FullscreenProgress.cpp b/Minecraft.Client/Common/UI/UIScene_FullscreenProgress.cpp index e4c75657..e39869a1 100644 --- a/Minecraft.Client/Common/UI/UIScene_FullscreenProgress.cpp +++ b/Minecraft.Client/Common/UI/UIScene_FullscreenProgress.cpp @@ -49,7 +49,7 @@ UIScene_FullscreenProgress::UIScene_FullscreenProgress(int iPad, void *initData, wstring wsText= app.FormatHTMLString(m_iPad,app.GetString(app.GetNextTip())); wchar_t startTags[64]; - swprintf_s(startTags,64,L"

",app.GetHTMLColour(eHTMLColor_White)); + swprintf(startTags,64,L"

",app.GetHTMLColour(eHTMLColor_White)); wsText= startTags + wsText + L"

"; m_labelTip.init(wsText); @@ -353,7 +353,7 @@ void UIScene_FullscreenProgress::handleTimerComplete(int id) // display the next tip wstring wsText=app.FormatHTMLString(m_iPad,app.GetString(app.GetNextTip())); wchar_t startTags[64]; - swprintf_s(startTags,64,L"

",app.GetHTMLColour(eHTMLColor_White)); + swprintf(startTags,64,L"

",app.GetHTMLColour(eHTMLColor_White)); wsText= startTags + wsText + L"

"; m_labelTip.setLabel(wsText); } diff --git a/Minecraft.Client/Common/UI/UIScene_HowToPlay.cpp b/Minecraft.Client/Common/UI/UIScene_HowToPlay.cpp index cfb818ed..bc721802 100644 --- a/Minecraft.Client/Common/UI/UIScene_HowToPlay.cpp +++ b/Minecraft.Client/Common/UI/UIScene_HowToPlay.cpp @@ -296,7 +296,7 @@ void UIScene_HowToPlay::StartPage( EHowToPlayPage ePage ) // Set the text colour wstring finalText(replacedText.c_str() ); wchar_t startTags[64]; - swprintf_s(startTags,64,L"",app.GetHTMLColour(eHTMLColor_White)); + swprintf(startTags,64,L"",app.GetHTMLColour(eHTMLColor_White)); finalText = startTags + finalText; vector paragraphs; diff --git a/Minecraft.Client/Common/UI/UIScene_JoinMenu.cpp b/Minecraft.Client/Common/UI/UIScene_JoinMenu.cpp index 996e99aa..3608437e 100644 --- a/Minecraft.Client/Common/UI/UIScene_JoinMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_JoinMenu.cpp @@ -94,7 +94,7 @@ void UIScene_JoinMenu::tick() if( m_selectedSession->data.players[i].isSignedIntoPSN() == false ) { char suffix[5]; - sprintf_s(suffix, " (%d)", m_selectedSession->data.players[i].getQuadrant() + 1); + sprintf(suffix, " (%d)", m_selectedSession->data.players[i].getQuadrant() + 1); playerName.append(suffix); } #endif @@ -798,7 +798,7 @@ int UIScene_JoinMenu::EditServerKeyboardCallback(LPVOID lpParam, bool bRes) pClass->m_editServerPhase = eEditServer_Port; wchar_t wDefaultPort[16] = {}; - swprintf_s(wDefaultPort, 16, L"%d", pClass->m_selectedSession->data.hostPort); + swprintf(wDefaultPort, 16, L"%d", pClass->m_selectedSession->data.hostPort); UIKeyboardInitData kbData; kbData.title = L"Server Port"; diff --git a/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp index d8fad3f9..1832e40c 100644 --- a/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp @@ -152,7 +152,7 @@ UIScene_LaunchMoreOptionsMenu::UIScene_LaunchMoreOptionsMenu(int iPad, void *ini size = eHTMLSize_Splitscreen; } wchar_t startTags[64]; - swprintf_s(startTags,64,L"",app.GetHTMLColour(eHTMLColor_White)); + swprintf(startTags,64,L"",app.GetHTMLColour(eHTMLColor_White)); wsText= startTags + wsText; if (m_tabIndex == TAB_WORLD_OPTIONS) m_labelDescription_WorldOptions.setLabel(wsText); @@ -513,7 +513,7 @@ void UIScene_LaunchMoreOptionsMenu::handleFocusChange(F64 controlId, F64 childId size = eHTMLSize_Splitscreen; } wchar_t startTags[64]; - swprintf_s(startTags,64,L"",app.GetHTMLColour(eHTMLColor_White)); + swprintf(startTags,64,L"",app.GetHTMLColour(eHTMLColor_White)); wsText = startTags + wsText; if (m_tabIndex == TAB_WORLD_OPTIONS) diff --git a/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp index 0f85f50e..5b52cb30 100644 --- a/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp @@ -69,11 +69,11 @@ UIScene_LeaderboardsMenu::UIScene_LeaderboardsMenu(int iPad, void *initData, UIL m_currentFilter = LeaderboardManager::eFM_Friends; wchar_t filterBuffer[40]; - swprintf_s(filterBuffer, 40, L"%ls%ls", app.GetString(IDS_LEADERBOARD_FILTER), app.GetString(IDS_LEADERBOARD_FILTER_FRIENDS)); + swprintf(filterBuffer, 40, L"%ls%ls", app.GetString(IDS_LEADERBOARD_FILTER), app.GetString(IDS_LEADERBOARD_FILTER_FRIENDS)); m_labelFilter.init(filterBuffer); wchar_t entriesBuffer[40]; - swprintf_s(entriesBuffer, 40, L"%ls%i", app.GetString(IDS_LEADERBOARD_ENTRIES), 0); + swprintf(entriesBuffer, 40, L"%ls%i", app.GetString(IDS_LEADERBOARD_ENTRIES), 0); m_labelEntries.init(entriesBuffer); ReadStats(-1); @@ -332,7 +332,7 @@ void UIScene_LeaderboardsMenu::handleInput(int iPad, int key, bool repeat, bool { m_currentFilter = LeaderboardManager::eFM_MyScore; wchar_t filterBuffer[40]; - swprintf_s(filterBuffer, 40, L"%ls%ls", app.GetString(IDS_LEADERBOARD_FILTER), app.GetString(IDS_LEADERBOARD_FILTER_MYSCORE)); + swprintf(filterBuffer, 40, L"%ls%ls", app.GetString(IDS_LEADERBOARD_FILTER), app.GetString(IDS_LEADERBOARD_FILTER_MYSCORE)); m_labelFilter.setLabel(filterBuffer); } break; @@ -340,7 +340,7 @@ void UIScene_LeaderboardsMenu::handleInput(int iPad, int key, bool repeat, bool { m_currentFilter = LeaderboardManager::eFM_TopRank; wchar_t filterBuffer[40]; - swprintf_s(filterBuffer, 40, L"%ls%ls", app.GetString(IDS_LEADERBOARD_FILTER), app.GetString(IDS_LEADERBOARD_FILTER_OVERALL)); + swprintf(filterBuffer, 40, L"%ls%ls", app.GetString(IDS_LEADERBOARD_FILTER), app.GetString(IDS_LEADERBOARD_FILTER_OVERALL)); m_labelFilter.setLabel(filterBuffer); } break; @@ -348,7 +348,7 @@ void UIScene_LeaderboardsMenu::handleInput(int iPad, int key, bool repeat, bool { m_currentFilter = LeaderboardManager::eFM_Friends; wchar_t filterBuffer[40]; - swprintf_s(filterBuffer, 40, L"%ls%ls", app.GetString(IDS_LEADERBOARD_FILTER), app.GetString(IDS_LEADERBOARD_FILTER_FRIENDS)); + swprintf(filterBuffer, 40, L"%ls%ls", app.GetString(IDS_LEADERBOARD_FILTER), app.GetString(IDS_LEADERBOARD_FILTER_FRIENDS)); m_labelFilter.setLabel(filterBuffer); } break; @@ -540,9 +540,9 @@ bool UIScene_LeaderboardsMenu::RetrieveStats() m_leaderboard.m_entries[entryIndex].m_row = entryIndex; m_leaderboard.m_entries[entryIndex].m_rank = entryIndex+1; - swprintf_s(m_leaderboard.m_entries[entryIndex].m_wcRank, 12, L"12345678");//(int)m_leaderboard.m_entries[entryIndex].m_rank); + swprintf(m_leaderboard.m_entries[entryIndex].m_wcRank, 12, L"12345678");//(int)m_leaderboard.m_entries[entryIndex].m_rank); - swprintf_s(m_leaderboard.m_entries[entryIndex].m_gamerTag, 17, L"WWWWWWWWWWWWWWWW"); + swprintf(m_leaderboard.m_entries[entryIndex].m_gamerTag, 17, L"WWWWWWWWWWWWWWWW"); //m_leaderboard.m_entries[entryIndex].m_locale = (entryIndex % 37) + 1; @@ -553,12 +553,12 @@ bool UIScene_LeaderboardsMenu::RetrieveStats() if( !isDistanceLeaderboard ) { m_leaderboard.m_entries[entryIndex].m_columns[i] = USHRT_MAX; - swprintf_s(m_leaderboard.m_entries[entryIndex].m_wcColumns[i], 12, L"%u", m_leaderboard.m_entries[entryIndex].m_columns[i]); + swprintf(m_leaderboard.m_entries[entryIndex].m_wcColumns[i], 12, L"%u", m_leaderboard.m_entries[entryIndex].m_columns[i]); } else { m_leaderboard.m_entries[entryIndex].m_columns[i] = UINT_MAX; - swprintf_s(m_leaderboard.m_entries[entryIndex].m_wcColumns[i], 12, L"%.1fkm", static_cast(m_leaderboard.m_entries[entryIndex].m_columns[i])/100.f/1000.f); + swprintf(m_leaderboard.m_entries[entryIndex].m_wcColumns[i], 12, L"%.1fkm", static_cast(m_leaderboard.m_entries[entryIndex].m_columns[i])/100.f/1000.f); } } @@ -706,7 +706,7 @@ void UIScene_LeaderboardsMenu::CopyLeaderboardEntry(LeaderboardManager::ReadScor leaderboardEntry->m_rank = statsRow->m_rank; DWORD displayRank = leaderboardEntry->m_rank; if(displayRank > 9999999) displayRank = 9999999; - swprintf_s(leaderboardEntry->m_wcRank, 12, L"%u", displayRank); + swprintf(leaderboardEntry->m_wcRank, 12, L"%u", displayRank); leaderboardEntry->m_idsErrorMessage = statsRow->m_idsErrorMessage; @@ -734,7 +734,7 @@ void UIScene_LeaderboardsMenu::CopyLeaderboardEntry(LeaderboardManager::ReadScor #ifdef __PS3__ // m_name can be unicode characters somehow for Japan - should use m_onlineID wstring wstr=convStringToWstring(statsRow->m_uid.getOnlineID()); - swprintf_s(leaderboardEntry->m_gamerTag, XUSER_NAME_SIZE, L"%ls",wstr.c_str()); + swprintf(leaderboardEntry->m_gamerTag, XUSER_NAME_SIZE, L"%ls",wstr.c_str()); #else memcpy_s(leaderboardEntry->m_gamerTag, sizeof(leaderboardEntry->m_gamerTag), statsRow->m_name.data(), statsRow->m_name.size() * sizeof(wchar_t)); #endif @@ -748,7 +748,7 @@ void UIScene_LeaderboardsMenu::CopyLeaderboardEntry(LeaderboardManager::ReadScor { DWORD displayValue = leaderboardEntry->m_columns[i]; if(displayValue > 99999) displayValue = 99999; - swprintf_s(leaderboardEntry->m_wcColumns[i], 12, L"%u",displayValue); + swprintf(leaderboardEntry->m_wcColumns[i], 12, L"%u",displayValue); #ifdef _DEBUG //app.DebugPrintf("Value - %d\n",leaderboardEntry->m_columns[i]); #endif @@ -773,7 +773,7 @@ void UIScene_LeaderboardsMenu::CopyLeaderboardEntry(LeaderboardManager::ReadScor if(iDigitC<4) { // m - swprintf_s(leaderboardEntry->m_wcColumns[i], 12, L"%um", leaderboardEntry->m_columns[i]); + swprintf(leaderboardEntry->m_wcColumns[i], 12, L"%um", leaderboardEntry->m_columns[i]); #ifdef _DEBUG //app.DebugPrintf("Display - %um\n", leaderboardEntry->m_columns[i]); #endif @@ -781,7 +781,7 @@ void UIScene_LeaderboardsMenu::CopyLeaderboardEntry(LeaderboardManager::ReadScor else if(iDigitC<8) { // km with a .X - swprintf_s(leaderboardEntry->m_wcColumns[i], 12, L"%.1fkm", static_cast(leaderboardEntry->m_columns[i])/1000.f); + swprintf(leaderboardEntry->m_wcColumns[i], 12, L"%.1fkm", static_cast(leaderboardEntry->m_columns[i])/1000.f); #ifdef _DEBUG //app.DebugPrintf("Display - %.1fkm\n", ((float)leaderboardEntry->m_columns[i])/1000.f); #endif @@ -789,7 +789,7 @@ void UIScene_LeaderboardsMenu::CopyLeaderboardEntry(LeaderboardManager::ReadScor else { // bigger than that, so no decimal point - swprintf_s(leaderboardEntry->m_wcColumns[i], 12, L"%.0fkm", static_cast(leaderboardEntry->m_columns[i])/1000.f); + swprintf(leaderboardEntry->m_wcColumns[i], 12, L"%.0fkm", static_cast(leaderboardEntry->m_columns[i])/1000.f); #ifdef _DEBUG //app.DebugPrintf("Display - %.0fkm\n", ((float)leaderboardEntry->m_columns[i])/1000.f); #endif @@ -855,11 +855,11 @@ void UIScene_LeaderboardsMenu::PopulateLeaderboard(LeaderboardManager::eStatsRet wchar_t entriesBuffer[40]; if(app.DebugSettingsOn() && (app.GetGameSettingsDebugMask()&(1L< 0 && pbImageData) { wchar_t imageName[64]; - swprintf_s(imageName,64,L"tpack%08x",tp->getId()); + swprintf(imageName,64,L"tpack%08x",tp->getId()); registerSubstitutionTexture(imageName, pbImageData, dwImageBytes); m_buttonListSaves.setTextureName( m_buttonListSaves.getItemCount() - 1, imageName ); } @@ -2019,7 +2019,7 @@ void UIScene_LoadCreateJoinMenu::UpdateGamesList() app.GetFileFromTPD(eTPDFileType_Icon,pbData,dwBytes,&pbImageData,&dwImageBytes ); if(dwImageBytes > 0 && pbImageData) { - swprintf_s(textureName,64,L"%ls",sessionInfo->displayLabel); + swprintf(textureName,64,L"%ls",sessionInfo->displayLabel); registerSubstitutionTexture(textureName,pbImageData,dwImageBytes); } } @@ -2028,7 +2028,7 @@ void UIScene_LoadCreateJoinMenu::UpdateGamesList() pbImageData = tp->getPackIcon(dwImageBytes); if(dwImageBytes > 0 && pbImageData) { - swprintf_s(textureName,64,L"%ls",sessionInfo->displayLabel); + swprintf(textureName,64,L"%ls",sessionInfo->displayLabel); registerSubstitutionTexture(textureName,pbImageData,dwImageBytes); } } @@ -2044,7 +2044,7 @@ void UIScene_LoadCreateJoinMenu::UpdateGamesList() if(dwImageBytes > 0 && pbImageData) { - swprintf_s(textureName,64,L"%ls",sessionInfo->displayLabel); + swprintf(textureName,64,L"%ls",sessionInfo->displayLabel); registerSubstitutionTexture(textureName,pbImageData,dwImageBytes); } } @@ -2600,7 +2600,7 @@ int UIScene_LoadCreateJoinMenu::MustSignInReturnedTexturePack(void *pParam,bool #ifdef __ORBIS__ strcpy_s(chName, chKeyName); #else - sprintf_s(chName,"%s-%s",app.GetCommerceCategory(),chKeyName); + sprintf(chName,"%s-%s",app.GetCommerceCategory(),chKeyName); #endif app.GetDLCSkuIDFromProductList(chName,chSkuID); // 4J-PB - need to check for an empty store @@ -2663,7 +2663,7 @@ int UIScene_LoadCreateJoinMenu::TexturePackDialogReturned(void *pParam,int iPad, #ifdef __ORBIS__ strcpy_s(chName, chKeyName); #else - sprintf_s(chName,"%s-%s",app.GetCommerceCategory(),chKeyName); + sprintf(chName,"%s-%s",app.GetCommerceCategory(),chKeyName); #endif app.GetDLCSkuIDFromProductList(chName,chSkuID); // 4J-PB - need to check for an empty store @@ -2978,7 +2978,7 @@ int UIScene_LoadCreateJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParame if(pClass->m_saveTransferDownloadCancelled) { WCHAR wcTemp[256]; - swprintf_s(wcTemp,256, app.GetString(IDS_CANCEL)); // MGH - should change this string to "cancelling download" + swprintf(wcTemp,256, app.GetString(IDS_CANCEL)); // MGH - should change this string to "cancelling download" m_wstrStageText=wcTemp; pMinecraft->progressRenderer->progressStage( m_wstrStageText ); } @@ -2993,7 +2993,7 @@ int UIScene_LoadCreateJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParame if(pClass->m_saveTransferDownloadCancelled) { WCHAR wcTemp[256]; - swprintf_s(wcTemp,256, app.GetString(IDS_CANCEL)); // MGH - should change this string to "cancelling download" + swprintf(wcTemp,256, app.GetString(IDS_CANCEL)); // MGH - should change this string to "cancelling download" m_wstrStageText=wcTemp; pMinecraft->progressRenderer->progressStage( m_wstrStageText ); } @@ -3032,8 +3032,8 @@ int UIScene_LoadCreateJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParame int dataProgress = app.getRemoteStorage()->getDataProgress(); pMinecraft->progressRenderer->progressStagePercentage(dataProgress); - //swprintf_s(wcTemp, 256, L"Downloading data : %d", dataProgress);//app.GetString(IDS_SAVETRANSFER_STAGE_GET_DATA),0,pClass->m_ulFileSize); - swprintf_s(wcTemp,256, app.GetString(IDS_SAVETRANSFER_STAGE_GET_DATA),dataProgress); + //swprintf(wcTemp, 256, L"Downloading data : %d", dataProgress);//app.GetString(IDS_SAVETRANSFER_STAGE_GET_DATA),0,pClass->m_ulFileSize); + swprintf(wcTemp,256, app.GetString(IDS_SAVETRANSFER_STAGE_GET_DATA),dataProgress); m_wstrStageText=wcTemp; pMinecraft->progressRenderer->progressStage( m_wstrStageText ); if(pClass->m_saveTransferDownloadCancelled && bAbortCalled == false) @@ -3193,7 +3193,7 @@ int UIScene_LoadCreateJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParame if(pClass->m_saveTransferDownloadCancelled) { WCHAR wcTemp[256]; - swprintf_s(wcTemp,256, app.GetString(IDS_CANCEL)); // MGH - should change this string to "cancelling download" + swprintf(wcTemp,256, app.GetString(IDS_CANCEL)); // MGH - should change this string to "cancelling download" m_wstrStageText=wcTemp; pMinecraft->progressRenderer->progressStage( m_wstrStageText ); pMinecraft->progressRenderer->progressStage( m_wstrStageText ); @@ -3397,8 +3397,8 @@ int UIScene_LoadCreateJoinMenu::UploadSonyCrossSaveThreadProc( LPVOID lpParamete int dataProgress = app.getRemoteStorage()->getDataProgress(); pMinecraft->progressRenderer->progressStagePercentage(dataProgress); - //swprintf_s(wcTemp, 256, L"Uploading data : %d", dataProgress);//app.GetString(IDS_SAVETRANSFER_STAGE_GET_DATA),0,pClass->m_ulFileSize); - swprintf_s(wcTemp,256, app.GetString(IDS_SAVETRANSFER_STAGE_PUT_DATA),dataProgress); + //swprintf(wcTemp, 256, L"Uploading data : %d", dataProgress);//app.GetString(IDS_SAVETRANSFER_STAGE_GET_DATA),0,pClass->m_ulFileSize); + swprintf(wcTemp,256, app.GetString(IDS_SAVETRANSFER_STAGE_PUT_DATA),dataProgress); m_wstrStageText=wcTemp; pMinecraft->progressRenderer->progressStage( m_wstrStageText ); @@ -3736,7 +3736,7 @@ int UIScene_LoadCreateJoinMenu::DownloadXbox360SaveThreadProc( LPVOID lpParamete WCHAR wcTemp[256]; pStateContainer->m_bSaveTransferCancelled=false; - swprintf_s(wcTemp,app.GetString(IDS_SAVE_TRANSFER_DOWNLOAD_CANCELLED)); + swprintf(wcTemp,app.GetString(IDS_SAVE_TRANSFER_DOWNLOAD_CANCELLED)); m_wstrStageText=wcTemp; pMinecraft->progressRenderer->progressStage( m_wstrStageText ); @@ -3789,7 +3789,7 @@ void UIScene_LoadCreateJoinMenu::RequestFileData( SaveTransferStateContainer *pC pMinecraft->progressRenderer->progressStagePercentage(0); - swprintf_s(wcTemp,app.GetString(IDS_SAVETRANSFER_STAGE_GET_DATA),0,UIScene_LoadCreateJoinMenu::s_ulFileSize); + swprintf(wcTemp,app.GetString(IDS_SAVETRANSFER_STAGE_GET_DATA),0,UIScene_LoadCreateJoinMenu::s_ulFileSize); m_wstrStageText=wcTemp; pMinecraft->progressRenderer->progressStage( m_wstrStageText ); @@ -3858,7 +3858,7 @@ int UIScene_LoadCreateJoinMenu::SaveTransferUpdateProgress(LPVOID lpParam,unsign if(pClass->m_bSaveTransferCancelled) // was cancelled { pMinecraft->progressRenderer->progressStage(IDS_SAVE_TRANSFER_DOWNLOAD_CANCELLING); - swprintf_s(wcTemp,app.GetString(IDS_SAVE_TRANSFER_DOWNLOAD_CANCELLING)); + swprintf(wcTemp,app.GetString(IDS_SAVE_TRANSFER_DOWNLOAD_CANCELLING)); m_wstrStageText=wcTemp; pMinecraft->progressRenderer->progressStage( m_wstrStageText ); } @@ -3867,7 +3867,7 @@ int UIScene_LoadCreateJoinMenu::SaveTransferUpdateProgress(LPVOID lpParam,unsign unsigned int uiProgress=(unsigned int)(((float)ulBytesReceived/float(UIScene_LoadCreateJoinMenu::s_ulFileSize))*100.0f); pMinecraft->progressRenderer->progressStagePercentage(uiProgress); - swprintf_s(wcTemp,app.GetString(IDS_SAVETRANSFER_STAGE_GET_DATA),((float)(ulBytesReceived))/1024000.0f,((float)UIScene_LoadCreateJoinMenu::s_ulFileSize)/1024000.0f); + swprintf(wcTemp,app.GetString(IDS_SAVETRANSFER_STAGE_GET_DATA),((float)(ulBytesReceived))/1024000.0f,((float)UIScene_LoadCreateJoinMenu::s_ulFileSize)/1024000.0f); m_wstrStageText=wcTemp; pMinecraft->progressRenderer->progressStage( m_wstrStageText ); } diff --git a/Minecraft.Client/Common/UI/UIScene_LoadCreateJoinMenuTest.cpp b/Minecraft.Client/Common/UI/UIScene_LoadCreateJoinMenuTest.cpp index b9addd61..767df71e 100644 --- a/Minecraft.Client/Common/UI/UIScene_LoadCreateJoinMenuTest.cpp +++ b/Minecraft.Client/Common/UI/UIScene_LoadCreateJoinMenuTest.cpp @@ -1134,7 +1134,7 @@ void UIScene_LoadCreateJoinMenu::AddDefaultButtons() if(dwImageBytes > 0 && pbImageData) { wchar_t imageName[64]; - swprintf_s(imageName,64,L"tpack%08x",tp->getId()); + swprintf(imageName,64,L"tpack%08x",tp->getId()); registerSubstitutionTexture(imageName, pbImageData, dwImageBytes); m_buttonListLoad.SetTextureName( m_buttonListLoad.getItemCount() - 1, imageName ); } @@ -2077,7 +2077,7 @@ void UIScene_LoadCreateJoinMenu::UpdateGamesList() app.GetFileFromTPD(eTPDFileType_Icon,pbData,dwBytes,&pbImageData,&dwImageBytes ); if(dwImageBytes > 0 && pbImageData) { - swprintf_s(textureName,64,L"%ls",sessionInfo->displayLabel); + swprintf(textureName,64,L"%ls",sessionInfo->displayLabel); registerSubstitutionTexture(textureName,pbImageData,dwImageBytes); } } @@ -2086,7 +2086,7 @@ void UIScene_LoadCreateJoinMenu::UpdateGamesList() pbImageData = tp->getPackIcon(dwImageBytes); if(dwImageBytes > 0 && pbImageData) { - swprintf_s(textureName,64,L"%ls",sessionInfo->displayLabel); + swprintf(textureName,64,L"%ls",sessionInfo->displayLabel); registerSubstitutionTexture(textureName,pbImageData,dwImageBytes); } } @@ -2102,7 +2102,7 @@ void UIScene_LoadCreateJoinMenu::UpdateGamesList() if(dwImageBytes > 0 && pbImageData) { - swprintf_s(textureName,64,L"%ls",sessionInfo->displayLabel); + swprintf(textureName,64,L"%ls",sessionInfo->displayLabel); registerSubstitutionTexture(textureName,pbImageData,dwImageBytes); } } @@ -2660,7 +2660,7 @@ int UIScene_LoadCreateJoinMenu::MustSignInReturnedTexturePack(void *pParam,bool #ifdef __ORBIS__ strcpy_s(chName, chKeyName); #else - sprintf_s(chName,"%s-%s",app.GetCommerceCategory(),chKeyName); + sprintf(chName,"%s-%s",app.GetCommerceCategory(),chKeyName); #endif app.GetDLCSkuIDFromProductList(chName,chSkuID); // 4J-PB - need to check for an empty store @@ -2723,7 +2723,7 @@ int UIScene_LoadCreateJoinMenu::TexturePackDialogReturned(void *pParam,int iPad, #ifdef __ORBIS__ strcpy_s(chName, chKeyName); #else - sprintf_s(chName,"%s-%s",app.GetCommerceCategory(),chKeyName); + sprintf(chName,"%s-%s",app.GetCommerceCategory(),chKeyName); #endif app.GetDLCSkuIDFromProductList(chName,chSkuID); // 4J-PB - need to check for an empty store @@ -3038,7 +3038,7 @@ int UIScene_LoadCreateJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParame if(pClass->m_saveTransferDownloadCancelled) { WCHAR wcTemp[256]; - swprintf_s(wcTemp,256, app.GetString(IDS_CANCEL)); // MGH - should change this string to "cancelling download" + swprintf(wcTemp,256, app.GetString(IDS_CANCEL)); // MGH - should change this string to "cancelling download" m_wstrStageText=wcTemp; pMinecraft->progressRenderer->progressStage( m_wstrStageText ); } @@ -3053,7 +3053,7 @@ int UIScene_LoadCreateJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParame if(pClass->m_saveTransferDownloadCancelled) { WCHAR wcTemp[256]; - swprintf_s(wcTemp,256, app.GetString(IDS_CANCEL)); // MGH - should change this string to "cancelling download" + swprintf(wcTemp,256, app.GetString(IDS_CANCEL)); // MGH - should change this string to "cancelling download" m_wstrStageText=wcTemp; pMinecraft->progressRenderer->progressStage( m_wstrStageText ); } @@ -3092,8 +3092,8 @@ int UIScene_LoadCreateJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParame int dataProgress = app.getRemoteStorage()->getDataProgress(); pMinecraft->progressRenderer->progressStagePercentage(dataProgress); - //swprintf_s(wcTemp, 256, L"Downloading data : %d", dataProgress);//app.GetString(IDS_SAVETRANSFER_STAGE_GET_DATA),0,pClass->m_ulFileSize); - swprintf_s(wcTemp,256, app.GetString(IDS_SAVETRANSFER_STAGE_GET_DATA),dataProgress); + //swprintf(wcTemp, 256, L"Downloading data : %d", dataProgress);//app.GetString(IDS_SAVETRANSFER_STAGE_GET_DATA),0,pClass->m_ulFileSize); + swprintf(wcTemp,256, app.GetString(IDS_SAVETRANSFER_STAGE_GET_DATA),dataProgress); m_wstrStageText=wcTemp; pMinecraft->progressRenderer->progressStage( m_wstrStageText ); if(pClass->m_saveTransferDownloadCancelled && bAbortCalled == false) @@ -3253,7 +3253,7 @@ int UIScene_LoadCreateJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParame if(pClass->m_saveTransferDownloadCancelled) { WCHAR wcTemp[256]; - swprintf_s(wcTemp,256, app.GetString(IDS_CANCEL)); // MGH - should change this string to "cancelling download" + swprintf(wcTemp,256, app.GetString(IDS_CANCEL)); // MGH - should change this string to "cancelling download" m_wstrStageText=wcTemp; pMinecraft->progressRenderer->progressStage( m_wstrStageText ); pMinecraft->progressRenderer->progressStage( m_wstrStageText ); @@ -3457,8 +3457,8 @@ int UIScene_LoadCreateJoinMenu::UploadSonyCrossSaveThreadProc( LPVOID lpParamete int dataProgress = app.getRemoteStorage()->getDataProgress(); pMinecraft->progressRenderer->progressStagePercentage(dataProgress); - //swprintf_s(wcTemp, 256, L"Uploading data : %d", dataProgress);//app.GetString(IDS_SAVETRANSFER_STAGE_GET_DATA),0,pClass->m_ulFileSize); - swprintf_s(wcTemp,256, app.GetString(IDS_SAVETRANSFER_STAGE_PUT_DATA),dataProgress); + //swprintf(wcTemp, 256, L"Uploading data : %d", dataProgress);//app.GetString(IDS_SAVETRANSFER_STAGE_GET_DATA),0,pClass->m_ulFileSize); + swprintf(wcTemp,256, app.GetString(IDS_SAVETRANSFER_STAGE_PUT_DATA),dataProgress); m_wstrStageText=wcTemp; pMinecraft->progressRenderer->progressStage( m_wstrStageText ); @@ -3796,7 +3796,7 @@ int UIScene_LoadCreateJoinMenu::DownloadXbox360SaveThreadProc( LPVOID lpParamete WCHAR wcTemp[256]; pStateContainer->m_bSaveTransferCancelled=false; - swprintf_s(wcTemp,app.GetString(IDS_SAVE_TRANSFER_DOWNLOAD_CANCELLED)); + swprintf(wcTemp,app.GetString(IDS_SAVE_TRANSFER_DOWNLOAD_CANCELLED)); m_wstrStageText=wcTemp; pMinecraft->progressRenderer->progressStage( m_wstrStageText ); @@ -3849,7 +3849,7 @@ void UIScene_LoadCreateJoinMenu::RequestFileData( SaveTransferStateContainer *pC pMinecraft->progressRenderer->progressStagePercentage(0); - swprintf_s(wcTemp,app.GetString(IDS_SAVETRANSFER_STAGE_GET_DATA),0,UIScene_LoadCreateJoinMenu::s_ulFileSize); + swprintf(wcTemp,app.GetString(IDS_SAVETRANSFER_STAGE_GET_DATA),0,UIScene_LoadCreateJoinMenu::s_ulFileSize); m_wstrStageText=wcTemp; pMinecraft->progressRenderer->progressStage( m_wstrStageText ); @@ -3918,7 +3918,7 @@ int UIScene_LoadCreateJoinMenu::SaveTransferUpdateProgress(LPVOID lpParam,unsign if(pClass->m_bSaveTransferCancelled) // was cancelled { pMinecraft->progressRenderer->progressStage(IDS_SAVE_TRANSFER_DOWNLOAD_CANCELLING); - swprintf_s(wcTemp,app.GetString(IDS_SAVE_TRANSFER_DOWNLOAD_CANCELLING)); + swprintf(wcTemp,app.GetString(IDS_SAVE_TRANSFER_DOWNLOAD_CANCELLING)); m_wstrStageText=wcTemp; pMinecraft->progressRenderer->progressStage( m_wstrStageText ); } @@ -3927,7 +3927,7 @@ int UIScene_LoadCreateJoinMenu::SaveTransferUpdateProgress(LPVOID lpParam,unsign unsigned int uiProgress=(unsigned int)(((float)ulBytesReceived/float(UIScene_LoadCreateJoinMenu::s_ulFileSize))*100.0f); pMinecraft->progressRenderer->progressStagePercentage(uiProgress); - swprintf_s(wcTemp,app.GetString(IDS_SAVETRANSFER_STAGE_GET_DATA),((float)(ulBytesReceived))/1024000.0f,((float)UIScene_LoadCreateJoinMenu::s_ulFileSize)/1024000.0f); + swprintf(wcTemp,app.GetString(IDS_SAVETRANSFER_STAGE_GET_DATA),((float)(ulBytesReceived))/1024000.0f,((float)UIScene_LoadCreateJoinMenu::s_ulFileSize)/1024000.0f); m_wstrStageText=wcTemp; pMinecraft->progressRenderer->progressStage( m_wstrStageText ); } diff --git a/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp index 9a087be5..8c2fa139 100644 --- a/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp @@ -86,10 +86,10 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLaye m_CurrentDifficulty=app.GetGameSettings(m_iPad,eGameSetting_Difficulty); WCHAR TempString[256]; - swprintf_s( (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)); - swprintf_s( (WCHAR *)TempString, 256, L"%ls: %ls", app.GetString( IDS_SLIDER_GAMEMODE ),app.GetString(m_iGamemodeTitleSettingA[0])); + swprintf( (WCHAR *)TempString, 256, L"%ls: %ls", app.GetString( IDS_SLIDER_GAMEMODE ),app.GetString(m_iGamemodeTitleSettingA[0])); m_sliderGamemode.init(TempString,eControl_GameModeToggle,0,2,0); m_MoreOptionsParams.bGenerateOptions=FALSE; @@ -189,7 +189,7 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLaye if(dwImageBytes > 0 && pbImageData) { wchar_t textureName[64]; - swprintf_s(textureName,64,L"loadsave"); + swprintf(textureName,64,L"loadsave"); registerSubstitutionTexture(textureName,pbImageData,dwImageBytes); m_bitmapIcon.setTextureName( textureName ); } @@ -297,7 +297,7 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLaye if(dwImageBytes > 0 && pbImageData) { wchar_t imageName[64]; - swprintf_s(imageName,64,L"tpack%08x",tp->getId()); + swprintf(imageName,64,L"tpack%08x",tp->getId()); registerSubstitutionTexture(imageName, pbImageData, dwImageBytes); m_texturePackList.addPack(i,imageName); } @@ -472,7 +472,7 @@ void UIScene_LoadMenu::tick() if(szSeed[0]!=0) { WCHAR TempString[256]; - swprintf_s( (WCHAR *)TempString, 256, L"%ls: %hs", app.GetString( IDS_SEED ),szSeed); + swprintf( (WCHAR *)TempString, 256, L"%ls: %hs", app.GetString( IDS_SEED ),szSeed); m_labelSeed.setLabel(TempString); } else @@ -921,7 +921,7 @@ void UIScene_LoadMenu::handleSliderMove(F64 sliderId, F64 currentValue) m_sliderDifficulty.handleSliderMove(value); app.SetGameSettings(m_iPad,eGameSetting_Difficulty,value); - swprintf_s( (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; case eControl_GameModeToggle: @@ -943,7 +943,7 @@ void UIScene_LoadMenu::handleSliderMove(F64 sliderId, F64 currentValue) m_iGameModeId = GameType::SURVIVAL->getId(); } - swprintf_s( (WCHAR *)TempString, 256, L"%ls: %ls", app.GetString( IDS_SLIDER_GAMEMODE ),app.GetString(m_iGamemodeTitleSettingA[value])); + swprintf( (WCHAR *)TempString, 256, L"%ls: %ls", app.GetString( IDS_SLIDER_GAMEMODE ),app.GetString(m_iGamemodeTitleSettingA[value])); m_sliderGamemode.setLabel(TempString); break; } diff --git a/Minecraft.Client/Common/UI/UIScene_PauseMenu.cpp b/Minecraft.Client/Common/UI/UIScene_PauseMenu.cpp index 61267aab..7695a363 100644 --- a/Minecraft.Client/Common/UI/UIScene_PauseMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_PauseMenu.cpp @@ -56,8 +56,8 @@ UIScene_PauseMenu::UIScene_PauseMenu(int iPad, void *initData, UILayer *parentLa // 4J-TomK - check for all possible labels being fed into BUTTON_PAUSE_SAVEGAME (Bug 163775) // this has to be done before button initialisation! wchar_t saveButtonLabels[2][256]; - swprintf_s( saveButtonLabels[0], 256, L"%ls", app.GetString( IDS_SAVE_GAME )); - swprintf_s( saveButtonLabels[1], 256, L"%ls", app.GetString( IDS_DISABLE_AUTOSAVE )); + swprintf( saveButtonLabels[0], 256, L"%ls", app.GetString( IDS_SAVE_GAME )); + swprintf( saveButtonLabels[1], 256, L"%ls", app.GetString( IDS_DISABLE_AUTOSAVE )); m_buttons[BUTTON_PAUSE_SAVEGAME].setAllPossibleLabels(2,saveButtonLabels); if(app.GetGameHostOption(eGameHostOption_DisableSaving) || m_bTrialTexturePack) @@ -245,8 +245,8 @@ void UIScene_PauseMenu::handlePreReload() // 4J-TomK - check for all possible labels being fed into BUTTON_PAUSE_SAVEGAME (Bug 163775) // this has to be done before button initialisation! wchar_t saveButtonLabels[2][256]; - swprintf_s( saveButtonLabels[0], 256, L"%ls", app.GetString( IDS_SAVE_GAME )); - swprintf_s( saveButtonLabels[1], 256, L"%ls", app.GetString( IDS_DISABLE_AUTOSAVE )); + swprintf( saveButtonLabels[0], 256, L"%ls", app.GetString( IDS_SAVE_GAME )); + swprintf( saveButtonLabels[1], 256, L"%ls", app.GetString( IDS_DISABLE_AUTOSAVE )); m_buttons[BUTTON_PAUSE_SAVEGAME].setAllPossibleLabels(2,saveButtonLabels); } #endif @@ -1223,7 +1223,7 @@ int UIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4J #ifdef __ORBIS__ strcpy_s(chName, chKeyName); #else - sprintf_s(chName,"%s-%s",app.GetCommerceCategory(),chKeyName); + sprintf(chName,"%s-%s",app.GetCommerceCategory(),chKeyName); #endif app.GetDLCSkuIDFromProductList(chName,chSkuID); @@ -1300,7 +1300,7 @@ int UIScene_PauseMenu::BuyTexturePack_SignInReturned(void *pParam,bool bContinue #ifdef __ORBIS__ strcpy_s(chName, chKeyName); #else - sprintf_s(chName,"%s-%s",app.GetCommerceCategory(),chKeyName); + sprintf(chName,"%s-%s",app.GetCommerceCategory(),chKeyName); #endif app.GetDLCSkuIDFromProductList(chName,chSkuID); diff --git a/Minecraft.Client/Common/UI/UIScene_QuadrantSignin.cpp b/Minecraft.Client/Common/UI/UIScene_QuadrantSignin.cpp index db679818..76676561 100644 --- a/Minecraft.Client/Common/UI/UIScene_QuadrantSignin.cpp +++ b/Minecraft.Client/Common/UI/UIScene_QuadrantSignin.cpp @@ -280,7 +280,7 @@ int UIScene_QuadrantSignin::AvatarReturned(LPVOID lpParam,PBYTE pbThumbnail,DWOR static unsigned int quadrantImageCount = 0; wchar_t iconName[32]; - swprintf_s(iconName,32,L"quadrantImage%05d",quadrantImageCount++); + swprintf(iconName,32,L"quadrantImage%05d",quadrantImageCount++); pClass->registerSubstitutionTexture(iconName,pbThumbnail,dwThumbnailBytes,true); pClass->m_bitmapIcon[pClass->m_lastRequestedAvatar].setTextureName(iconName); diff --git a/Minecraft.Client/Common/UI/UIScene_SettingsAudioMenu.cpp b/Minecraft.Client/Common/UI/UIScene_SettingsAudioMenu.cpp index 5248724d..850e1303 100644 --- a/Minecraft.Client/Common/UI/UIScene_SettingsAudioMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_SettingsAudioMenu.cpp @@ -8,10 +8,10 @@ UIScene_SettingsAudioMenu::UIScene_SettingsAudioMenu(int iPad, void *initData, U initialiseMovie(); WCHAR TempString[256]; - swprintf_s( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_MUSIC ),app.GetGameSettings(m_iPad,eGameSetting_MusicVolume)); + swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_MUSIC ),app.GetGameSettings(m_iPad,eGameSetting_MusicVolume)); m_sliderMusic.init(TempString,eControl_Music,0,100,app.GetGameSettings(m_iPad,eGameSetting_MusicVolume)); - swprintf_s( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SOUND ),app.GetGameSettings(m_iPad,eGameSetting_SoundFXVolume)); + swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SOUND ),app.GetGameSettings(m_iPad,eGameSetting_SoundFXVolume)); m_sliderSound.init(TempString,eControl_Sound,0,100,app.GetGameSettings(m_iPad,eGameSetting_SoundFXVolume)); m_checkboxCaveSounds.init(L"Cave Sounds", eControl_CaveSounds,(app.GetGameSettings(m_iPad,eGameSetting_CaveSounds)!=0)); @@ -105,7 +105,7 @@ void UIScene_SettingsAudioMenu::handleSliderMove(F64 sliderId, F64 currentValue) m_sliderMusic.handleSliderMove(value); app.SetGameSettings(m_iPad,eGameSetting_MusicVolume,value); - swprintf_s( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_MUSIC ),value); + swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_MUSIC ),value); m_sliderMusic.setLabel(TempString); break; @@ -113,7 +113,7 @@ void UIScene_SettingsAudioMenu::handleSliderMove(F64 sliderId, F64 currentValue) m_sliderSound.handleSliderMove(value); app.SetGameSettings(m_iPad,eGameSetting_SoundFXVolume,value); - swprintf_s( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SOUND ),value); + swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SOUND ),value); m_sliderSound.setLabel(TempString); break; diff --git a/Minecraft.Client/Common/UI/UIScene_SettingsControlMenu.cpp b/Minecraft.Client/Common/UI/UIScene_SettingsControlMenu.cpp index f68b1cfc..7dbd243b 100644 --- a/Minecraft.Client/Common/UI/UIScene_SettingsControlMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_SettingsControlMenu.cpp @@ -8,10 +8,10 @@ UIScene_SettingsControlMenu::UIScene_SettingsControlMenu(int iPad, void *initDat initialiseMovie(); WCHAR TempString[256]; - swprintf_s( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SENSITIVITY_INGAME ),app.GetGameSettings(m_iPad,eGameSetting_Sensitivity_InGame)); + swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SENSITIVITY_INGAME ),app.GetGameSettings(m_iPad,eGameSetting_Sensitivity_InGame)); m_sliderSensitivityInGame.init(TempString,eControl_SensitivityInGame,0,200,app.GetGameSettings(m_iPad,eGameSetting_Sensitivity_InGame)); - swprintf_s( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SENSITIVITY_INMENU ),app.GetGameSettings(m_iPad,eGameSetting_Sensitivity_InMenu)); + swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SENSITIVITY_INMENU ),app.GetGameSettings(m_iPad,eGameSetting_Sensitivity_InMenu)); m_sliderSensitivityInMenu.init(TempString,eControl_SensitivityInMenu,0,200,app.GetGameSettings(m_iPad,eGameSetting_Sensitivity_InMenu)); doHorizontalResizeCheck(); @@ -100,7 +100,7 @@ void UIScene_SettingsControlMenu::handleSliderMove(F64 sliderId, F64 currentValu m_sliderSensitivityInGame.handleSliderMove(value); app.SetGameSettings(m_iPad,eGameSetting_Sensitivity_InGame,value); - swprintf_s( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SENSITIVITY_INGAME ),value); + swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SENSITIVITY_INGAME ),value); m_sliderSensitivityInGame.setLabel(TempString); break; @@ -108,7 +108,7 @@ void UIScene_SettingsControlMenu::handleSliderMove(F64 sliderId, F64 currentValu m_sliderSensitivityInMenu.handleSliderMove(value); app.SetGameSettings(m_iPad,eGameSetting_Sensitivity_InMenu,value); - swprintf_s( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SENSITIVITY_INMENU ),value); + swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SENSITIVITY_INMENU ),value); m_sliderSensitivityInMenu.setLabel(TempString); break; diff --git a/Minecraft.Client/Common/UI/UIScene_SettingsGraphicsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_SettingsGraphicsMenu.cpp index 755a74a5..039bd940 100644 --- a/Minecraft.Client/Common/UI/UIScene_SettingsGraphicsMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_SettingsGraphicsMenu.cpp @@ -66,18 +66,18 @@ UIScene_SettingsGraphicsMenu::UIScene_SettingsGraphicsMenu(int iPad, void *initD WCHAR TempString[256]; - swprintf_s( TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_GAMMA ),app.GetGameSettings(m_iPad,eGameSetting_Gamma)); + swprintf( TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_GAMMA ),app.GetGameSettings(m_iPad,eGameSetting_Gamma)); m_sliderGamma.init(TempString,eControl_Gamma,0,100,app.GetGameSettings(m_iPad,eGameSetting_Gamma)); const int initialFovSlider = app.GetGameSettings(m_iPad, eGameSetting_FOV); const int initialFovDeg = sliderValueToFov(initialFovSlider); - swprintf_s(TempString, 256, L"FOV: %d", initialFovDeg); + swprintf(TempString, 256, L"FOV: %d", initialFovDeg); m_sliderFOV.init(TempString, eControl_FOV, 0, FOV_SLIDER_MAX, initialFovSlider); - swprintf_s( TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_INTERFACEOPACITY ),app.GetGameSettings(m_iPad,eGameSetting_InterfaceOpacity)); + swprintf( TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_INTERFACEOPACITY ),app.GetGameSettings(m_iPad,eGameSetting_InterfaceOpacity)); m_sliderInterfaceOpacity.init(TempString,eControl_InterfaceOpacity,0,100,app.GetGameSettings(m_iPad,eGameSetting_InterfaceOpacity)); - swprintf_s(TempString, 256, L"Render Distance: %d",app.GetGameSettings(m_iPad,eGameSetting_RenderDistance)); + swprintf(TempString, 256, L"Render Distance: %d",app.GetGameSettings(m_iPad,eGameSetting_RenderDistance)); m_sliderRenderDistance.init(TempString,eControl_RenderDistance,0,3,DistanceToLevel(app.GetGameSettings(m_iPad,eGameSetting_RenderDistance))); int currentGraphics = app.GetGameSettings(m_iPad, eGameSetting_GraphicsMode); @@ -88,7 +88,7 @@ UIScene_SettingsGraphicsMenu::UIScene_SettingsGraphicsMenu(int iPad, void *initD else if (currentGraphics == 2) graphicsText = L"Graphics: Fancy"; else graphicsText = L"Graphics: Extra"; - swprintf_s(TempString, 256, L"%ls", graphicsText); + swprintf(TempString, 256, L"%ls", graphicsText); m_sliderGraphicsMode.init(TempString, eControl_GraphicsMode, 0, 3, currentGraphics); doHorizontalResizeCheck(); @@ -206,7 +206,7 @@ void UIScene_SettingsGraphicsMenu::handleSliderMove(F64 sliderId, F64 currentVal m_sliderGamma.handleSliderMove(value); app.SetGameSettings(m_iPad,eGameSetting_Gamma,value); - swprintf_s( TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_GAMMA ),value); + swprintf( TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_GAMMA ),value); m_sliderGamma.setLabel(TempString); break; @@ -218,7 +218,7 @@ void UIScene_SettingsGraphicsMenu::handleSliderMove(F64 sliderId, F64 currentVal const int fovValue = sliderValueToFov(value); pMinecraft->gameRenderer->SetFovVal(static_cast(fovValue)); app.SetGameSettings(m_iPad, eGameSetting_FOV, value); - swprintf_s(TempString, 256, L"FOV: %d", fovValue); + swprintf(TempString, 256, L"FOV: %d", fovValue); m_sliderFOV.setLabel(TempString); } break; @@ -227,7 +227,7 @@ void UIScene_SettingsGraphicsMenu::handleSliderMove(F64 sliderId, F64 currentVal m_sliderInterfaceOpacity.handleSliderMove(value); app.SetGameSettings(m_iPad,eGameSetting_InterfaceOpacity,value); - swprintf_s( TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_INTERFACEOPACITY ),value); + swprintf( TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_INTERFACEOPACITY ),value); m_sliderInterfaceOpacity.setLabel(TempString); break; @@ -242,7 +242,7 @@ void UIScene_SettingsGraphicsMenu::handleSliderMove(F64 sliderId, F64 currentVal const Minecraft* mc = Minecraft::GetInstance(); mc->options->viewDistance = 3 - value; - swprintf_s(TempString,256,L"Render Distance: %d",dist); + swprintf(TempString,256,L"Render Distance: %d",dist); m_sliderRenderDistance.setLabel(TempString); } break; @@ -258,7 +258,7 @@ void UIScene_SettingsGraphicsMenu::handleSliderMove(F64 sliderId, F64 currentVal else if (value == 2) modeName = L"Fancy"; else if (value == 3) modeName = L"Extra"; - swprintf_s(TempString, 256, L"Graphics: %ls", modeName); + swprintf(TempString, 256, L"Graphics: %ls", modeName); m_sliderGraphicsMode.setLabel(TempString); } diff --git a/Minecraft.Client/Common/UI/UIScene_SettingsOptionsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_SettingsOptionsMenu.cpp index 1f7b5e5d..e015768e 100644 --- a/Minecraft.Client/Common/UI/UIScene_SettingsOptionsMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_SettingsOptionsMenu.cpp @@ -44,11 +44,11 @@ UIScene_SettingsOptionsMenu::UIScene_SettingsOptionsMenu(int iPad, void *initDat { if(i==0) { - swprintf_s( autosaveLabels[i], 256, L"%ls", app.GetString( IDS_SLIDER_AUTOSAVE_OFF )); + swprintf( autosaveLabels[i], 256, L"%ls", app.GetString( IDS_SLIDER_AUTOSAVE_OFF )); } else { - swprintf_s( autosaveLabels[i], 256, L"%ls: %d %ls", app.GetString( IDS_SLIDER_AUTOSAVE ),i*15, app.GetString( IDS_MINUTES )); + swprintf( autosaveLabels[i], 256, L"%ls: %d %ls", app.GetString( IDS_SLIDER_AUTOSAVE ),i*15, app.GetString( IDS_MINUTES )); } } @@ -63,7 +63,7 @@ UIScene_SettingsOptionsMenu::UIScene_SettingsOptionsMenu(int iPad, void *initDat wchar_t difficultyLabels[4][256]; for(unsigned int i = 0; i < 4; ++i) { - swprintf_s( difficultyLabels[i], 256, L"%ls: %ls", app.GetString( IDS_SLIDER_DIFFICULTY ),app.GetString(m_iDifficultyTitleSettingA[i])); + swprintf( difficultyLabels[i], 256, L"%ls: %ls", app.GetString( IDS_SLIDER_DIFFICULTY ),app.GetString(m_iDifficultyTitleSettingA[i])); } m_sliderDifficulty.setAllPossibleLabels(4,difficultyLabels); m_sliderDifficulty.init(difficultyLabels[ucValue],eControl_Difficulty,0,3,ucValue); @@ -75,7 +75,7 @@ UIScene_SettingsOptionsMenu::UIScene_SettingsOptionsMenu(int iPad, void *initDat size = eHTMLSize_Splitscreen; } wchar_t startTags[64]; - swprintf_s(startTags,64,L"",app.GetHTMLColour(eHTMLColor_White)); + swprintf(startTags,64,L"",app.GetHTMLColour(eHTMLColor_White)); wsText= startTags + wsText; m_labelDifficultyText.init(wsText); @@ -255,11 +255,11 @@ void UIScene_SettingsOptionsMenu::handleReload() { if(i==0) { - swprintf_s( autosaveLabels[i], 256, L"%ls", app.GetString( IDS_SLIDER_AUTOSAVE_OFF )); + swprintf( autosaveLabels[i], 256, L"%ls", app.GetString( IDS_SLIDER_AUTOSAVE_OFF )); } else { - swprintf_s( autosaveLabels[i], 256, L"%ls: %d %ls", app.GetString( IDS_SLIDER_AUTOSAVE ),i*15, app.GetString( IDS_MINUTES )); + swprintf( autosaveLabels[i], 256, L"%ls: %d %ls", app.GetString( IDS_SLIDER_AUTOSAVE ),i*15, app.GetString( IDS_MINUTES )); } } @@ -275,7 +275,7 @@ void UIScene_SettingsOptionsMenu::handleReload() wchar_t difficultyLabels[4][256]; for(unsigned int i = 0; i < 4; ++i) { - swprintf_s( difficultyLabels[i], 256, L"%ls: %ls", app.GetString( IDS_SLIDER_DIFFICULTY ),app.GetString(m_iDifficultyTitleSettingA[i])); + swprintf( difficultyLabels[i], 256, L"%ls: %ls", app.GetString( IDS_SLIDER_DIFFICULTY ),app.GetString(m_iDifficultyTitleSettingA[i])); } m_sliderDifficulty.setAllPossibleLabels(4,difficultyLabels); m_sliderDifficulty.init(difficultyLabels[ucValue],eControl_Difficulty,0,3,ucValue); @@ -287,7 +287,7 @@ void UIScene_SettingsOptionsMenu::handleReload() size = eHTMLSize_Splitscreen; } wchar_t startTags[64]; - swprintf_s(startTags,64,L"",app.GetHTMLColour(eHTMLColor_White)); + swprintf(startTags,64,L"",app.GetHTMLColour(eHTMLColor_White)); wsText= startTags + wsText; m_labelDifficultyText.init(wsText); @@ -376,7 +376,7 @@ void UIScene_SettingsOptionsMenu::handleSliderMove(F64 sliderId, F64 currentValu size = eHTMLSize_Splitscreen; } wchar_t startTags[64]; - swprintf_s(startTags,64,L"",app.GetHTMLColour(eHTMLColor_White)); + swprintf(startTags,64,L"",app.GetHTMLColour(eHTMLColor_White)); wsText= startTags + wsText; m_labelDifficultyText.setLabel(wsText.c_str()); break; diff --git a/Minecraft.Client/Common/UI/UIScene_SettingsUIMenu.cpp b/Minecraft.Client/Common/UI/UIScene_SettingsUIMenu.cpp index 35577a4a..6cb9b862 100644 --- a/Minecraft.Client/Common/UI/UIScene_SettingsUIMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_SettingsUIMenu.cpp @@ -19,10 +19,10 @@ UIScene_SettingsUIMenu::UIScene_SettingsUIMenu(int iPad, void *initData, UILayer WCHAR TempString[256]; - swprintf_s( (WCHAR *)TempString, 256, L"%ls: %d", app.GetString( IDS_SLIDER_UISIZE ),app.GetGameSettings(m_iPad,eGameSetting_UISize)+1); + swprintf( (WCHAR *)TempString, 256, L"%ls: %d", app.GetString( IDS_SLIDER_UISIZE ),app.GetGameSettings(m_iPad,eGameSetting_UISize)+1); m_sliderUISize.init(TempString,eControl_UISize,1,3,app.GetGameSettings(m_iPad,eGameSetting_UISize)+1); - swprintf_s( (WCHAR *)TempString, 256, L"%ls: %d", app.GetString( IDS_SLIDER_UISIZESPLITSCREEN ),app.GetGameSettings(m_iPad,eGameSetting_UISizeSplitscreen)+1); + swprintf( (WCHAR *)TempString, 256, L"%ls: %d", app.GetString( IDS_SLIDER_UISIZESPLITSCREEN ),app.GetGameSettings(m_iPad,eGameSetting_UISizeSplitscreen)+1); m_sliderUISizeSplitscreen.init(TempString,eControl_UISizeSplitscreen,1,3,app.GetGameSettings(m_iPad,eGameSetting_UISizeSplitscreen)+1); doHorizontalResizeCheck(); @@ -154,7 +154,7 @@ void UIScene_SettingsUIMenu::handleSliderMove(F64 sliderId, F64 currentValue) case eControl_UISize: m_sliderUISize.handleSliderMove(value); - swprintf_s( (WCHAR *)TempString, 256, L"%ls: %d", app.GetString( IDS_SLIDER_UISIZE ),value); + swprintf( (WCHAR *)TempString, 256, L"%ls: %d", app.GetString( IDS_SLIDER_UISIZE ),value); m_sliderUISize.setLabel(TempString); // is this different from the current value? @@ -169,7 +169,7 @@ void UIScene_SettingsUIMenu::handleSliderMove(F64 sliderId, F64 currentValue) case eControl_UISizeSplitscreen: m_sliderUISizeSplitscreen.handleSliderMove(value); - swprintf_s( (WCHAR *)TempString, 256, L"%ls: %d", app.GetString( IDS_SLIDER_UISIZESPLITSCREEN ),value); + swprintf( (WCHAR *)TempString, 256, L"%ls: %d", app.GetString( IDS_SLIDER_UISIZESPLITSCREEN ),value); m_sliderUISizeSplitscreen.setLabel(TempString); if(value != app.GetGameSettings(m_iPad,eGameSetting_UISizeSplitscreen)+1) diff --git a/Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp b/Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp index 35542577..1a9d0cb1 100644 --- a/Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp @@ -419,7 +419,7 @@ void UIScene_SkinSelectMenu::InputActionOK(unsigned int iPad) { // get the pack number from the skin id wchar_t chars[256]; - swprintf_s(chars, 256, L"dlcskin%08d.png", app.GetPlayerFavoriteSkin(iPad,m_skinIndex)); + swprintf(chars, 256, L"dlcskin%08d.png", app.GetPlayerFavoriteSkin(iPad,m_skinIndex)); DLCPack *Pack=app.m_dlcManager.getPackContainingSkin(chars); @@ -706,7 +706,7 @@ void UIScene_SkinSelectMenu::handleSkinIndexChanged() { // get the pack number from the skin id wchar_t chars[256]; - swprintf_s(chars, 256, L"dlcskin%08d.png", app.GetPlayerFavoriteSkin(m_iPad,m_skinIndex)); + swprintf(chars, 256, L"dlcskin%08d.png", app.GetPlayerFavoriteSkin(m_iPad,m_skinIndex)); Pack=app.m_dlcManager.getPackContainingSkin(chars); if(Pack) @@ -850,7 +850,7 @@ void UIScene_SkinSelectMenu::handleSkinIndexChanged() if(uiCurrentFavoriteC>0) { // get the pack number from the skin id - swprintf_s(chars, 256, L"dlcskin%08d.png", app.GetPlayerFavoriteSkin(m_iPad,nextIndex)); + swprintf(chars, 256, L"dlcskin%08d.png", app.GetPlayerFavoriteSkin(m_iPad,nextIndex)); Pack=app.m_dlcManager.getPackContainingSkin(chars); if(Pack) @@ -921,7 +921,7 @@ void UIScene_SkinSelectMenu::handleSkinIndexChanged() if(uiCurrentFavoriteC>0) { // get the pack number from the skin id - swprintf_s(chars, 256, L"dlcskin%08d.png", app.GetPlayerFavoriteSkin(m_iPad,previousIndex)); + swprintf(chars, 256, L"dlcskin%08d.png", app.GetPlayerFavoriteSkin(m_iPad,previousIndex)); Pack=app.m_dlcManager.getPackContainingSkin(chars); if(Pack) @@ -1109,7 +1109,7 @@ void UIScene_SkinSelectMenu::handlePackIndexChanged() bool found; wchar_t chars[256]; // get the pack number from the skin id - swprintf_s(chars, 256, L"dlcskin%08d.png", app.GetPlayerFavoriteSkin(m_iPad,app.GetPlayerFavoriteSkinsPos(m_iPad))); + swprintf(chars, 256, L"dlcskin%08d.png", app.GetPlayerFavoriteSkin(m_iPad,app.GetPlayerFavoriteSkinsPos(m_iPad))); DLCPack *Pack=app.m_dlcManager.getPackContainingSkin(chars); if(Pack) @@ -1576,7 +1576,7 @@ int UIScene_SkinSelectMenu::UnlockSkinReturned(void *pParam,int iPad,C4JStorage: // So we assume the first sku for the product is the one we want // while the store is screwed, hardcode the sku - //sprintf_s(chName,"%s-%s-%s",app.GetCommerceCategory(),pSONYDLCInfo->chDLCKeyname,"EURO"); + //sprintf(chName,"%s-%s-%s",app.GetCommerceCategory(),pSONYDLCInfo->chDLCKeyname,"EURO"); // MGH - keyname in the DLC file is 16 chars long, but there's no space for a nullptr terminating char memset(chKeyName, 0, sizeof(chKeyName)); @@ -1585,7 +1585,7 @@ int UIScene_SkinSelectMenu::UnlockSkinReturned(void *pParam,int iPad,C4JStorage: #ifdef __ORBIS__ strcpy_s(chName, chKeyName); #else - sprintf_s(chName,"%s-%s",app.GetCommerceCategory(),chKeyName); + sprintf(chName,"%s-%s",app.GetCommerceCategory(),chKeyName); #endif app.GetDLCSkuIDFromProductList(chName,chSkuID); diff --git a/Minecraft.Client/DLCTexturePack.cpp b/Minecraft.Client/DLCTexturePack.cpp index 0fa5ed7d..c6457511 100644 --- a/Minecraft.Client/DLCTexturePack.cpp +++ b/Minecraft.Client/DLCTexturePack.cpp @@ -192,7 +192,7 @@ void DLCTexturePack::loadColourTable() WCHAR szResourceLocator[ LOCATOR_SIZE ]; // Try and load the HTMLColours.col based off the common XML first, before the deprecated xuiscene_colourtable - swprintf_s(szResourceLocator, LOCATOR_SIZE,L"memory://%08X,%04X#HTMLColours.col",pbData, dwSize); + swprintf(szResourceLocator, LOCATOR_SIZE,L"memory://%08X,%04X#HTMLColours.col",pbData, dwSize); BYTE *data; UINT dataLength; if(XuiResourceLoadAll(szResourceLocator, &data, &dataLength) == S_OK) @@ -204,7 +204,7 @@ void DLCTexturePack::loadColourTable() else { - swprintf_s(szResourceLocator, LOCATOR_SIZE,L"memory://%08X,%04X#xuiscene_colourtable.xur",pbData, dwSize); + swprintf(szResourceLocator, LOCATOR_SIZE,L"memory://%08X,%04X#xuiscene_colourtable.xur",pbData, dwSize); HXUIOBJ hScene; HRESULT hr = XuiSceneCreate(szResourceLocator,szResourceLocator, nullptr, &hScene); @@ -568,7 +568,7 @@ void DLCTexturePack::loadUI() const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string WCHAR szResourceLocator[ LOCATOR_SIZE ]; - swprintf_s(szResourceLocator, LOCATOR_SIZE,L"memory://%08X,%04X#skin_Minecraft.xur",pbData, dwSize); + swprintf(szResourceLocator, LOCATOR_SIZE,L"memory://%08X,%04X#skin_Minecraft.xur",pbData, dwSize); XuiFreeVisuals(L""); @@ -642,7 +642,7 @@ wstring DLCTexturePack::getXuiRootPath() const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string WCHAR szResourceLocator[ LOCATOR_SIZE ]; - swprintf_s(szResourceLocator, LOCATOR_SIZE,L"memory://%08X,%04X#",pbData, dwSize); + swprintf(szResourceLocator, LOCATOR_SIZE,L"memory://%08X,%04X#",pbData, dwSize); path = szResourceLocator; } return path; diff --git a/Minecraft.Client/DefaultTexturePack.cpp b/Minecraft.Client/DefaultTexturePack.cpp index dab2abd8..d2712404 100644 --- a/Minecraft.Client/DefaultTexturePack.cpp +++ b/Minecraft.Client/DefaultTexturePack.cpp @@ -21,7 +21,7 @@ void DefaultTexturePack::loadIcon() WCHAR szResourceLocator[ LOCATOR_SIZE ]; const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(nullptr); - swprintf_s(szResourceLocator, LOCATOR_SIZE ,L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/Graphics/TexturePackIcon.png"); + swprintf(szResourceLocator, LOCATOR_SIZE ,L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/Graphics/TexturePackIcon.png"); UINT size = 0; HRESULT hr = XuiResourceLoadAllNoLoc(szResourceLocator, &m_iconData, &size); diff --git a/Minecraft.Client/FolderTexturePack.cpp b/Minecraft.Client/FolderTexturePack.cpp index d447ba95..05feca66 100644 --- a/Minecraft.Client/FolderTexturePack.cpp +++ b/Minecraft.Client/FolderTexturePack.cpp @@ -82,7 +82,7 @@ void FolderTexturePack::loadUI() const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string WCHAR szResourceLocator[ LOCATOR_SIZE ]; - swprintf_s(szResourceLocator, LOCATOR_SIZE,L"file://%lsTexturePack.xzp#skin_Minecraft.xur",getPath().c_str()); + swprintf(szResourceLocator, LOCATOR_SIZE,L"file://%lsTexturePack.xzp#skin_Minecraft.xur",getPath().c_str()); XuiFreeVisuals(L""); app.LoadSkin(szResourceLocator,nullptr);//L"TexturePack"); diff --git a/Minecraft.Client/Font.cpp b/Minecraft.Client/Font.cpp index 60141c9a..517e8fab 100644 --- a/Minecraft.Client/Font.cpp +++ b/Minecraft.Client/Font.cpp @@ -693,7 +693,7 @@ void Font::loadUnicodePage(int page) { wchar_t fileName[25]; //String fileName = String.format("/1_2_2/font/glyph_%02X.png", page); - swprintf_s(fileName,25,L"/1_2_2/font/glyph_%02X.png",page); + swprintf(fileName,25,L"/1_2_2/font/glyph_%02X.png",page); BufferedImage *image = new BufferedImage(fileName); //try //{ diff --git a/Minecraft.Client/Gui.cpp b/Minecraft.Client/Gui.cpp index f71fb9e5..a11a9834 100644 --- a/Minecraft.Client/Gui.cpp +++ b/Minecraft.Client/Gui.cpp @@ -775,7 +775,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse) bool blink = false; int col = blink ? 0xffffff : 0x80ff20; wchar_t formatted[10]; - swprintf_s(formatted, 10, L"%d",minecraft->player->experienceLevel); + swprintf(formatted, 10, L"%d",minecraft->player->experienceLevel); wstring str = formatted; int x = iWidthOffset + (screenWidth - font->width(str)) / 2; diff --git a/Minecraft.Client/LevelRenderer.cpp b/Minecraft.Client/LevelRenderer.cpp index 5064ac64..1844bd7e 100644 --- a/Minecraft.Client/LevelRenderer.cpp +++ b/Minecraft.Client/LevelRenderer.cpp @@ -3707,7 +3707,7 @@ void LevelRenderer::staticCtor() char threadName[256]; for(unsigned int i = 0; i < MAX_CHUNK_REBUILD_THREADS; ++i) { - sprintf_s(threadName, sizeof(threadName), "Rebuild Chunk Thread %d\n",i); + sprintf(threadName,"Rebuild Chunk Thread %d\n",i); rebuildThreads[i] = new C4JThread(rebuildChunkThreadProc,(void *)i,threadName); s_activationEventA[i] = new C4JThread::Event(); diff --git a/Minecraft.Client/LivingEntityRenderer.cpp b/Minecraft.Client/LivingEntityRenderer.cpp index d28ed130..5309e664 100644 --- a/Minecraft.Client/LivingEntityRenderer.cpp +++ b/Minecraft.Client/LivingEntityRenderer.cpp @@ -562,7 +562,7 @@ void LivingEntityRenderer::renderNameTag(shared_ptr mob, const wst else { memset(wchName,0,sizeof(WCHAR)*2); - swprintf_s(wchName, 2, L"%d",player->getPlayerIndex()+1); + swprintf(wchName, 2, L"%d",player->getPlayerIndex()+1); playerName=wchName; player->SetPlayerNameValidState(false); } @@ -572,7 +572,7 @@ void LivingEntityRenderer::renderNameTag(shared_ptr mob, const wst break; case Player::ePlayerNameValid_False: memset(wchName,0,sizeof(WCHAR)*2); - swprintf_s(wchName, 2, L"%d",player->getPlayerIndex()+1); + swprintf(wchName, 2, L"%d",player->getPlayerIndex()+1); playerName=wchName; break; } diff --git a/Minecraft.Client/MinecraftServer.cpp b/Minecraft.Client/MinecraftServer.cpp index 08bbbbb5..31d830d9 100644 --- a/Minecraft.Client/MinecraftServer.cpp +++ b/Minecraft.Client/MinecraftServer.cpp @@ -2000,7 +2000,7 @@ void MinecraftServer::run(int64_t seed, void *lpParameter) if(!targetFileDir.exists()) targetFileDir.mkdir(); wchar_t filename[128]; - swprintf_s(filename,128,L"%ls%dx%dx%d.sch",initData->name,(initData->endX - initData->startX + 1), (initData->endY - initData->startY + 1), (initData->endZ - initData->startZ + 1)); + swprintf(filename,128,L"%ls%dx%dx%d.sch",initData->name,(initData->endX - initData->startX + 1), (initData->endY - initData->startY + 1), (initData->endZ - initData->startZ + 1)); File dataFile = File( targetFileDir, wstring(filename) ); if(dataFile.exists()) dataFile._delete(); diff --git a/Minecraft.Client/Minimap.cpp b/Minecraft.Client/Minimap.cpp index 9cb5e7d7..1110e7ed 100644 --- a/Minecraft.Client/Minimap.cpp +++ b/Minecraft.Client/Minimap.cpp @@ -246,7 +246,7 @@ void Minimap::render(shared_ptr player, Textures *textures, shared_ptrx); int posy = floor(player->y); int posz = floor(player->z); - swprintf_s(playerPosText, 32, L"X: %d, Y: %d, Z: %d", posx, posy, posz); + swprintf(playerPosText, 32, L"X: %d, Y: %d, Z: %d", posx, posy, posz); font->draw(playerPosText, x, y, Minecraft::GetInstance()->getColourTable()->getColour(eMinecraftColour_Map_Text)); } diff --git a/Minecraft.Client/PlayerConnection.cpp b/Minecraft.Client/PlayerConnection.cpp index 7281a1d6..eb376e6d 100644 --- a/Minecraft.Client/PlayerConnection.cpp +++ b/Minecraft.Client/PlayerConnection.cpp @@ -1254,7 +1254,7 @@ void PlayerConnection::handleSetCreativeModeSlot(shared_ptrgetAuxValue()); + swprintf(buf,64,L"map_%d", item->getAuxValue()); std::wstring id = wstring(buf); if( data == nullptr ) { diff --git a/Minecraft.Client/SelectWorldScreen.cpp b/Minecraft.Client/SelectWorldScreen.cpp index 03f037c0..c6d417c5 100644 --- a/Minecraft.Client/SelectWorldScreen.cpp +++ b/Minecraft.Client/SelectWorldScreen.cpp @@ -291,7 +291,7 @@ void SelectWorldScreen::WorldSelectionList::renderItem(int i, int x, int y, int wchar_t buffer[20]; // 4J Stu - Currently shows years as 4 digits, where java only showed 2 - swprintf_s(buffer,20,L"%d/%d/%d %d:%02d",time.wDay, time.wMonth, time.wYear, time.wHour, time.wMinute); // 4J - TODO Localise this + swprintf(buffer,20,L"%d/%d/%d %d:%02d",time.wDay, time.wMonth, time.wYear, time.wHour, time.wMinute); // 4J - TODO Localise this id = id + L" (" + buffer; int64_t size = levelSummary->getSizeOnDisk(); diff --git a/Minecraft.Client/ServerChunkCache.cpp b/Minecraft.Client/ServerChunkCache.cpp index 2bb54353..e96e63a2 100644 --- a/Minecraft.Client/ServerChunkCache.cpp +++ b/Minecraft.Client/ServerChunkCache.cpp @@ -808,7 +808,7 @@ bool ServerChunkCache::save(bool force, ProgressListener *progressListener) if(saveThreads[j] == nullptr) { char threadName[256]; - sprintf_s(threadName,"Save thread %d\n",j); + sprintf(threadName,"Save thread %d\n",j); SetThreadName(threadId[j], threadName); //saveThreads[j] = CreateThread(nullptr,0,runSaveThreadProc,&threadData[j],CREATE_SUSPENDED,&threadId[j]); diff --git a/Minecraft.World/AttributeModifier.cpp b/Minecraft.World/AttributeModifier.cpp index 14e4ba04..ae8a6aab 100644 --- a/Minecraft.World/AttributeModifier.cpp +++ b/Minecraft.World/AttributeModifier.cpp @@ -125,11 +125,11 @@ HtmlString AttributeModifier::getHoverText(eATTRIBUTE_ID attribute) wchar_t formatted[256]; if (percentage) { - swprintf_s(formatted, 256, L"%ls%d%ls %ls", (amount > 0 ? L"+" : L"-"), static_cast(displayAmount), L"%", app.GetString(Attribute::getName(attribute))); + swprintf(formatted, 256, L"%ls%d%ls %ls", (amount > 0 ? L"+" : L"-"), static_cast(displayAmount), L"%", app.GetString(Attribute::getName(attribute))); } else { - swprintf_s(formatted, 256, L"%ls%.1g %ls", (amount > 0 ? L"+" : L"-"), displayAmount, app.GetString(Attribute::getName(attribute))); + swprintf(formatted, 256, L"%ls%.1g %ls", (amount > 0 ? L"+" : L"-"), displayAmount, app.GetString(Attribute::getName(attribute))); } return HtmlString(formatted, color); diff --git a/Minecraft.World/BiomeSource.cpp b/Minecraft.World/BiomeSource.cpp index a2f6fc76..05dfd4b3 100644 --- a/Minecraft.World/BiomeSource.cpp +++ b/Minecraft.World/BiomeSource.cpp @@ -525,7 +525,7 @@ int64_t BiomeSource::findSeed(LevelType *generator) srcInfo.Height = 54 * 16; char buf[256]; - sprintf_s(buf,"GAME:\\BiomeTest%d.bmp",k); + sprintf(buf,"GAME:\\BiomeTest%d.bmp",k); RenderManager.SaveTextureData(buf, &srcInfo, (int *)pixels); delete [] pixels; diff --git a/Minecraft.World/ByteArrayTag.h b/Minecraft.World/ByteArrayTag.h index cb5716a9..b134c53f 100644 --- a/Minecraft.World/ByteArrayTag.h +++ b/Minecraft.World/ByteArrayTag.h @@ -33,7 +33,7 @@ public: wstring toString() { static wchar_t buf[32]; - swprintf_s(buf, 32, L"[%d bytes]",data.length); + swprintf(buf, 32, L"[%d bytes]",data.length); return wstring( buf ); } diff --git a/Minecraft.World/ByteTag.h b/Minecraft.World/ByteTag.h index 2455ca89..372ff131 100644 --- a/Minecraft.World/ByteTag.h +++ b/Minecraft.World/ByteTag.h @@ -15,7 +15,7 @@ public: wstring toString() { static wchar_t buf[32]; - swprintf_s(buf,32,L"%d",data); + swprintf(buf,32,L"%d",data); return wstring( buf ); } diff --git a/Minecraft.World/C4JThread.cpp b/Minecraft.World/C4JThread.cpp index 2c14f6ee..5b67b55a 100644 --- a/Minecraft.World/C4JThread.cpp +++ b/Minecraft.World/C4JThread.cpp @@ -55,7 +55,7 @@ C4JThread::C4JThread( C4JThreadStartFunc* startFunc, void* param, const char* th m_stackSize = 16384; #ifdef __PS3__ - sprintf_s(m_threadName, "(4J) %s", threadName ); + sprintf(m_threadName, "(4J) %s", threadName ); #else sprintf_s(m_threadName,64, "(4J) %s", threadName ); #endif @@ -133,7 +133,7 @@ C4JThread::C4JThread( const char* mainThreadName) m_stackSize = 0; #ifdef __PS3__ - sprintf_s(m_threadName, "(4J) %s", mainThreadName); + sprintf(m_threadName, "(4J) %s", mainThreadName); #else sprintf_s(m_threadName, 64, "(4J) %s", mainThreadName); #endif diff --git a/Minecraft.World/ChunkStorageProfileDecorator.cpp b/Minecraft.World/ChunkStorageProfileDecorator.cpp index 12ebcd13..375048db 100644 --- a/Minecraft.World/ChunkStorageProfileDecorator.cpp +++ b/Minecraft.World/ChunkStorageProfileDecorator.cpp @@ -43,9 +43,9 @@ void ChunkStorageProfilerDecorator::tick() { #ifndef _CONTENT_PACKAGE #ifdef __PSVITA__ - sprintf_s(buf,"Average load time: %f (%lld)",0.000001 * (double) timeSpentLoading / (double) loadCount, loadCount); + sprintf(buf,"Average load time: %f (%lld)",0.000001 * (double) timeSpentLoading / (double) loadCount, loadCount); #else - sprintf_s(buf,"Average load time: %f (%I64d)",0.000001 * static_cast(timeSpentLoading) / static_cast(loadCount), loadCount); + sprintf(buf,"Average load time: %f (%I64d)",0.000001 * static_cast(timeSpentLoading) / static_cast(loadCount), loadCount); #endif app.DebugPrintf(buf); #endif @@ -54,9 +54,9 @@ void ChunkStorageProfilerDecorator::tick() { #ifndef _CONTENT_PACKAGE #ifdef __PSVITA__ - sprintf_s(buf,"Average save time: %f (%lld)",0.000001 * (double) timeSpentSaving / (double) loadCount, loadCount); + sprintf(buf,"Average save time: %f (%lld)",0.000001 * (double) timeSpentSaving / (double) loadCount, loadCount); #else - sprintf_s(buf,"Average save time: %f (%I64d)",0.000001 * static_cast(timeSpentSaving) / static_cast(loadCount), loadCount); + sprintf(buf,"Average save time: %f (%I64d)",0.000001 * static_cast(timeSpentSaving) / static_cast(loadCount), loadCount); #endif app.DebugPrintf(buf); #endif diff --git a/Minecraft.World/CompoundTag.h b/Minecraft.World/CompoundTag.h index 8c6f94f9..9619d957 100644 --- a/Minecraft.World/CompoundTag.h +++ b/Minecraft.World/CompoundTag.h @@ -226,7 +226,7 @@ public: { static const int bufSize = 32; static wchar_t buf[bufSize]; - swprintf_s(buf,bufSize,L"%zu entries",tags.size()); + swprintf(buf,bufSize,L"%zu entries",tags.size()); return wstring( buf ); } /* diff --git a/Minecraft.World/ConsoleSaveFileOriginal.cpp b/Minecraft.World/ConsoleSaveFileOriginal.cpp index 08feef74..611d06e9 100644 --- a/Minecraft.World/ConsoleSaveFileOriginal.cpp +++ b/Minecraft.World/ConsoleSaveFileOriginal.cpp @@ -980,7 +980,7 @@ void ConsoleSaveFileOriginal::DebugFlushToFile(void *compressedData /*= nullptr* { cutFileName = m_fileName.substr(0, XCONTENT_MAX_FILENAME_LENGTH - 25); } - swprintf_s(fileName, XCONTENT_MAX_FILENAME_LENGTH+1, L"\\v%04d-%ls%02d.%02d.%02d.%02d.%02d.mcs",VER_PRODUCTBUILD,cutFileName.c_str(), t.wMonth, t.wDay, t.wHour, t.wMinute, t.wSecond); + swprintf(fileName, XCONTENT_MAX_FILENAME_LENGTH+1, L"\\v%04d-%ls%02d.%02d.%02d.%02d.%02d.mcs",VER_PRODUCTBUILD,cutFileName.c_str(), t.wMonth, t.wDay, t.wHour, t.wMinute, t.wSecond); #ifdef _UNICODE wstring wtemp = targetFileDir.getPath() + wstring(fileName); diff --git a/Minecraft.World/DoubleTag.h b/Minecraft.World/DoubleTag.h index 4a367158..f122695c 100644 --- a/Minecraft.World/DoubleTag.h +++ b/Minecraft.World/DoubleTag.h @@ -16,7 +16,7 @@ public: wstring toString() { static wchar_t buf[32]; - swprintf_s(buf,32,L"%f",data); + swprintf(buf,32,L"%f",data); return wstring( buf ); } diff --git a/Minecraft.World/Enchantment.cpp b/Minecraft.World/Enchantment.cpp index a213dd53..c2f981a6 100644 --- a/Minecraft.World/Enchantment.cpp +++ b/Minecraft.World/Enchantment.cpp @@ -154,7 +154,7 @@ int Enchantment::getDescriptionId() HtmlString Enchantment::getFullname(int level) { wchar_t formatted[256]; - swprintf_s(formatted, 256, L"%ls %ls", app.GetString(getDescriptionId()), getLevelString(level).c_str()); + swprintf(formatted, 256, L"%ls %ls", app.GetString(getDescriptionId()), getLevelString(level).c_str()); return HtmlString(formatted, eHTMLColor_f); } diff --git a/Minecraft.World/File.cpp b/Minecraft.World/File.cpp index 103c7083..0ed6e6cf 100644 --- a/Minecraft.World/File.cpp +++ b/Minecraft.World/File.cpp @@ -291,7 +291,7 @@ std::vector *File::listFiles() const else if(lpFileName[0] == '/') // already fully qualified path strcpy_s(filePath, lpFileName ); else - sprintf_s(filePath,"%s/%s",getUsrDirPath(), lpFileName ); + sprintf(filePath,"%s/%s",getUsrDirPath(), lpFileName ); int fd; CellFsErrno err = cellFsOpendir(filePath , &fd); @@ -319,7 +319,7 @@ std::vector *File::listFiles() const else if(lpFileName[0] == '/') // already fully qualified path strcpy_s(filePath, lpFileName ); else - sprintf_s(filePath,"%s/%s",getUsrDirPath(), lpFileName ); + sprintf(filePath,"%s/%s",getUsrDirPath(), lpFileName ); bool exists = sceFiosDirectoryExistsSync( nullptr, filePath ); if( !exists ) @@ -371,7 +371,7 @@ std::vector *File::listFiles() const #ifdef _UNICODE WCHAR path[MAX_PATH]; - swprintf_s( path, L"%ls\\*", getPath().c_str() ); + swprintf( path, L"%ls\\*", getPath().c_str() ); HANDLE hFind = FindFirstFile( path, &wfd); if(hFind != INVALID_HANDLE_VALUE) { @@ -434,7 +434,7 @@ std::vector *File::listFiles(FileFilter *filter) const else if(lpFileName[0] == '/') // already fully qualified path strcpy_s(filePath, lpFileName ); else - sprintf_s(filePath,"%s/%s",getUsrDirPath(), lpFileName ); + sprintf(filePath,"%s/%s",getUsrDirPath(), lpFileName ); int fd; CellFsErrno err = cellFsOpendir(filePath, &fd); @@ -463,7 +463,7 @@ std::vector *File::listFiles(FileFilter *filter) const WIN32_FIND_DATA wfd; DWORD dwAttr = FILE_ATTRIBUTE_DIRECTORY; - swprintf_s( path, L"%ls\\*", getPath().c_str() ); + swprintf( path, L"%ls\\*", getPath().c_str() ); HANDLE hFind = FindFirstFile( path, &wfd); if(hFind != INVALID_HANDLE_VALUE) { @@ -484,7 +484,7 @@ std::vector *File::listFiles(FileFilter *filter) const WIN32_FIND_DATA wfd; //DWORD dwAttr = FILE_ATTRIBUTE_DIRECTORY; - sprintf_s( path, "%s\\*", wstringtofilename( getPath() ) ); + sprintf( path, "%s\\*", wstringtofilename( getPath() ) ); HANDLE hFind = FindFirstFile( path, &wfd); if(hFind != INVALID_HANDLE_VALUE) { @@ -536,7 +536,7 @@ int64_t File::length() else if(lpFileName[0] == '/') // already fully qualified path strcpy_s(filePath, lpFileName ); else - sprintf_s(filePath,"%s/%s",getUsrDirPath(), lpFileName ); + sprintf(filePath,"%s/%s",getUsrDirPath(), lpFileName ); #ifndef _CONTENT_PACKAGE //printf("+++File::length - %s\n",filePath); @@ -572,7 +572,7 @@ int64_t File::length() else if(lpFileName[0] == '/') // already fully qualified path strcpy_s(filePath, lpFileName ); else - sprintf_s(filePath,"%s/%s",getUsrDirPath(), lpFileName ); + sprintf(filePath,"%s/%s",getUsrDirPath(), lpFileName ); // check if the file exists first SceFiosStat statData; diff --git a/Minecraft.World/FloatTag.h b/Minecraft.World/FloatTag.h index 4a69d6b8..4aed70bc 100644 --- a/Minecraft.World/FloatTag.h +++ b/Minecraft.World/FloatTag.h @@ -16,7 +16,7 @@ public: wstring toString() { static wchar_t buf[32]; - swprintf_s(buf, 32, L"%f",data); + swprintf(buf, 32, L"%f",data); return wstring( buf ); } diff --git a/Minecraft.World/HangingEntityItem.cpp b/Minecraft.World/HangingEntityItem.cpp index f7a8a528..97ddb31d 100644 --- a/Minecraft.World/HangingEntityItem.cpp +++ b/Minecraft.World/HangingEntityItem.cpp @@ -103,7 +103,7 @@ void HangingEntityItem::appendHoverText(shared_ptr itemInstance, s wchar_t formatted[256]; ZeroMemory(formatted, 256 * sizeof(wchar_t)); - swprintf_s(formatted, 256, L"** %ls %dx%d",Painting::Motive::values[motive]->name.c_str(),Painting::Motive::values[motive]->w/16,Painting::Motive::values[motive]->h/16); + swprintf(formatted, 256, L"** %ls %dx%d",Painting::Motive::values[motive]->name.c_str(),Painting::Motive::values[motive]->w/16,Painting::Motive::values[motive]->h/16); wstring motiveName = formatted; diff --git a/Minecraft.World/IntArrayTag.h b/Minecraft.World/IntArrayTag.h index 4a692d22..6a4f1113 100644 --- a/Minecraft.World/IntArrayTag.h +++ b/Minecraft.World/IntArrayTag.h @@ -51,7 +51,7 @@ public: wstring toString() { static wchar_t buf[32]; - swprintf_s(buf, 32, L"[%d bytes]",data.length); + swprintf(buf, 32, L"[%d bytes]",data.length); return wstring( buf ); } diff --git a/Minecraft.World/IntTag.h b/Minecraft.World/IntTag.h index 17a9a0a6..47d78eba 100644 --- a/Minecraft.World/IntTag.h +++ b/Minecraft.World/IntTag.h @@ -15,7 +15,7 @@ public: wstring toString() { static wchar_t buf[32]; - swprintf_s(buf, 32, L"%d", data); + swprintf(buf, 32, L"%d", data); return wstring( buf ); } diff --git a/Minecraft.World/ItemInstance.cpp b/Minecraft.World/ItemInstance.cpp index 07a33d73..97128707 100644 --- a/Minecraft.World/ItemInstance.cpp +++ b/Minecraft.World/ItemInstance.cpp @@ -615,7 +615,7 @@ vector *ItemInstance::getHoverText(shared_ptr player, bool a // if (advanced) // { // wchar_t text [256]; - // swprintf_s(text, 256, L"Color: LOCALISE #%08X", display->getInt(L"color")); + // swprintf(text, 256, L"Color: LOCALISE #%08X", display->getInt(L"color")); // lines->push_back(HtmlString(text)); // } // else diff --git a/Minecraft.World/Level.cpp b/Minecraft.World/Level.cpp index 309941a4..d5936ef8 100644 --- a/Minecraft.World/Level.cpp +++ b/Minecraft.World/Level.cpp @@ -2885,7 +2885,7 @@ wstring Level::gatherStats() { wchar_t buf[64]; EnterCriticalSection(&m_entitiesCS); - swprintf_s(buf,64,L"All:%d",entities.size()); + swprintf(buf,64,L"All:%d",entities.size()); LeaveCriticalSection(&m_entitiesCS); return wstring(buf); } diff --git a/Minecraft.World/ListTag.h b/Minecraft.World/ListTag.h index bf4c085d..910b44b7 100644 --- a/Minecraft.World/ListTag.h +++ b/Minecraft.World/ListTag.h @@ -46,7 +46,7 @@ public: wstring toString() { static wchar_t buf[64]; - swprintf_s(buf,64,L"%zu entries of type %ls",list.size(),Tag::getTagName(type)); + swprintf(buf,64,L"%zu entries of type %ls",list.size(),Tag::getTagName(type)); return wstring( buf ); } /* diff --git a/Minecraft.World/LongTag.h b/Minecraft.World/LongTag.h index 721214a0..0da2d074 100644 --- a/Minecraft.World/LongTag.h +++ b/Minecraft.World/LongTag.h @@ -15,7 +15,7 @@ public: wstring toString() { static wchar_t buf[32]; - swprintf_s(buf,32,L"%I64d",data); + swprintf(buf,32,L"%I64d",data); return wstring(buf); } diff --git a/Minecraft.World/MapItem.cpp b/Minecraft.World/MapItem.cpp index e17a3269..b7f521b8 100644 --- a/Minecraft.World/MapItem.cpp +++ b/Minecraft.World/MapItem.cpp @@ -319,7 +319,7 @@ void MapItem::onCraftedBy(shared_ptr itemInstance, Level *level, s itemInstance->setAuxValue(level->getAuxValueForMap(player->getXuid(), player->dimension, centreXC, centreZC, mapScale)); - swprintf_s(buf,64,L"map_%d", itemInstance->getAuxValue()); + swprintf(buf,64,L"map_%d", itemInstance->getAuxValue()); std::wstring id = wstring(buf); shared_ptr data = getSavedData(itemInstance->getAuxValue(), level); diff --git a/Minecraft.World/McRegionChunkStorage.cpp b/Minecraft.World/McRegionChunkStorage.cpp index 994cf83e..ad07a66e 100644 --- a/Minecraft.World/McRegionChunkStorage.cpp +++ b/Minecraft.World/McRegionChunkStorage.cpp @@ -122,7 +122,7 @@ LevelChunk *McRegionChunkStorage::load(Level *level, int x, int z) if (!chunkData->contains(L"Level")) { char buf[256]; - sprintf_s(buf,"Chunk file at %d, %d is missing level data, skipping\n",x, z); + sprintf(buf,"Chunk file at %d, %d is missing level data, skipping\n",x, z); app.DebugPrintf(buf); delete chunkData; return nullptr; @@ -130,7 +130,7 @@ LevelChunk *McRegionChunkStorage::load(Level *level, int x, int z) if (!chunkData->getCompound(L"Level")->contains(L"Blocks")) { char buf[256]; - sprintf_s(buf,"Chunk file at %d, %d is missing block data, skipping\n",x, z); + sprintf(buf,"Chunk file at %d, %d is missing block data, skipping\n",x, z); app.DebugPrintf(buf); delete chunkData; return nullptr; @@ -141,7 +141,7 @@ LevelChunk *McRegionChunkStorage::load(Level *level, int x, int z) if (!levelChunk->isAt(x, z)) { char buf[256]; - sprintf_s(buf,"Chunk file at %d, %d is in the wrong location; relocating. Expected %d, %d, got %d, %d\n", + sprintf(buf,"Chunk file at %d, %d is in the wrong location; relocating. Expected %d, %d, got %d, %d\n", x, z, x, z, levelChunk->x, levelChunk->z); app.DebugPrintf(buf); delete levelChunk; @@ -327,7 +327,7 @@ void McRegionChunkStorage::staticCtor() for(unsigned int i = 0; i < 3; ++i) { char threadName[256]; - sprintf_s(threadName,"McRegion Save thread %d\n",i); + sprintf(threadName,"McRegion Save thread %d\n",i); SetThreadName(0, threadName); //saveThreads[j] = CreateThread(nullptr,0,runSaveThreadProc,&threadData[j],CREATE_SUSPENDED,&threadId[j]); diff --git a/Minecraft.World/MobEffect.cpp b/Minecraft.World/MobEffect.cpp index 21d64348..4ded9c41 100644 --- a/Minecraft.World/MobEffect.cpp +++ b/Minecraft.World/MobEffect.cpp @@ -302,12 +302,12 @@ wstring MobEffect::formatDuration(MobEffectInstance *instance) if (seconds < 10) { - swprintf_s(temp, 8, L"%d:0%d",minutes,seconds); + swprintf(temp, 8, L"%d:0%d",minutes,seconds); //return minutes + ":0" + seconds; } else { - swprintf_s(temp, 8, L"%d:%d",minutes,seconds); + swprintf(temp, 8, L"%d:%d",minutes,seconds); //return minutes + ":" + seconds; } diff --git a/Minecraft.World/NbtSlotFile.cpp b/Minecraft.World/NbtSlotFile.cpp index 33174522..96a27993 100644 --- a/Minecraft.World/NbtSlotFile.cpp +++ b/Minecraft.World/NbtSlotFile.cpp @@ -168,7 +168,7 @@ void NbtSlotFile::replaceSlot(int slot, vector *tags) wchar_t buf[256]; largest = compressed.length; #ifndef _CONTENT_PACKAGE - swprintf_s(buf, 256, L"New largest: %I64d (%ls)\n",largest,tag->getString(L"id").c_str() ); + swprintf(buf, 256, L"New largest: %I64d (%ls)\n",largest,tag->getString(L"id").c_str() ); OutputDebugStringW(buf); #endif } diff --git a/Minecraft.World/NumberFormaters.h b/Minecraft.World/NumberFormaters.h index 3e2fcc7d..5f641819 100644 --- a/Minecraft.World/NumberFormaters.h +++ b/Minecraft.World/NumberFormaters.h @@ -9,7 +9,7 @@ public: { // TODO 4J Stu - Change the length of the formatted number wchar_t output[256]; - swprintf_s( output, 256, L"%d", value); + swprintf( output, 256, L"%d", value); wstring result = wstring( output ); return result; } @@ -25,7 +25,7 @@ public: { // TODO 4J Stu - Change the length of the formatted number wchar_t output[256]; - swprintf_s( output, 256, formatString.c_str(), value); + swprintf( output, 256, formatString.c_str(), value); wstring result = wstring( output ); return result; } diff --git a/Minecraft.World/OldChunkStorage.cpp b/Minecraft.World/OldChunkStorage.cpp index 7f12213e..a3ba13d4 100644 --- a/Minecraft.World/OldChunkStorage.cpp +++ b/Minecraft.World/OldChunkStorage.cpp @@ -70,11 +70,11 @@ File OldChunkStorage::getFile(int x, int z) #else _itow(x,xRadix36,36); _itow(z,zRadix36,36); - swprintf_s(name,MAX_PATH_SIZE,L"c.%ls.%ls.dat",xRadix36,zRadix36); + swprintf(name,MAX_PATH_SIZE,L"c.%ls.%ls.dat",xRadix36,zRadix36); _itow(x & 63,path1,36); _itow(z & 63,path2,36); #endif - //sprintf_s(file,"%s\\%s",dir,path1); + //sprintf(file,"%s\\%s",dir,path1); File file( dir, wstring( path1 ) ); if( !file.exists() ) { @@ -99,7 +99,7 @@ File OldChunkStorage::getFile(int x, int z) //strcat(file,"\\"); //strcat(file,name); - //sprintf_s(file,"%s\\%s",file,name); + //sprintf(file,"%s\\%s",file,name); file = File( file, wstring( name ) ); if ( !file.exists() ) { @@ -124,14 +124,14 @@ LevelChunk *OldChunkStorage::load(Level *level, int x, int z) if (!tag->contains(L"Level")) { char buf[256]; - sprintf_s(buf,"Chunk file at %d, %d is missing level data, skipping\n",x,z); + sprintf(buf,"Chunk file at %d, %d is missing level data, skipping\n",x,z); app.DebugPrintf(buf); return nullptr; } if (!tag->getCompound(L"Level")->contains(L"Blocks")) { char buf[256]; - sprintf_s(buf,"Chunk file at %d, %d is missing block data, skipping\n",x,z); + sprintf(buf,"Chunk file at %d, %d is missing block data, skipping\n",x,z); app.DebugPrintf(buf); return nullptr; } @@ -139,7 +139,7 @@ LevelChunk *OldChunkStorage::load(Level *level, int x, int z) if (!levelChunk->isAt(x, z)) { char buf[256]; - sprintf_s(buf,"Chunk fileat %d, %d is in the wrong location; relocating. Expected %d, %d, got %d, %d\n", + sprintf(buf,"Chunk fileat %d, %d is in the wrong location; relocating. Expected %d, %d, got %d, %d\n", x, z, x, z, levelChunk->x, levelChunk->z); app.DebugPrintf(buf); tag->putInt(L"xPos", x); @@ -168,7 +168,7 @@ void OldChunkStorage::save(Level *level, LevelChunk *levelChunk) // 4J - removed try/catch // try { //char tmpFileName[MAX_PATH_SIZE]; - //sprintf_s(tmpFileName,"%s\\%s",dir,"tmp_chunk.dat"); + //sprintf(tmpFileName,"%s\\%s",dir,"tmp_chunk.dat"); File tmpFile( dir, L"tmp_chunk.dat" ); // System.out.println("Saving chunk "+levelChunk.x+", "+levelChunk.z); diff --git a/Minecraft.World/Player.cpp b/Minecraft.World/Player.cpp index e3f7ddba..d1a1cb1a 100644 --- a/Minecraft.World/Player.cpp +++ b/Minecraft.World/Player.cpp @@ -854,7 +854,7 @@ wstring Player::getCapePathFromId(DWORD capeId) if( GET_IS_DLC_SKIN_FROM_BITMASK(capeId) ) { // 4J Stu - DLC skins are numbered using decimal rather than hex to make it easier to number manually - swprintf_s(chars,256,L"dlccape%08d.png",GET_DLC_SKIN_ID_FROM_BITMASK(capeId)); + swprintf(chars,256,L"dlccape%08d.png",GET_DLC_SKIN_ID_FROM_BITMASK(capeId)); } else @@ -863,11 +863,11 @@ wstring Player::getCapePathFromId(DWORD capeId) DWORD defaultCapeIndex = GET_DEFAULT_SKIN_ID_FROM_BITMASK(capeId); if( ugcCapeIndex == 0 ) { - swprintf_s(chars,256,L"defcape%08X.png",defaultCapeIndex); + swprintf(chars,256,L"defcape%08X.png",defaultCapeIndex); } else { - swprintf_s(chars,256,L"ugccape%08X.png",ugcCapeIndex); + swprintf(chars,256,L"ugccape%08X.png",ugcCapeIndex); } } return chars; diff --git a/Minecraft.World/RecordingItem.cpp b/Minecraft.World/RecordingItem.cpp index c014e1cf..3475263f 100644 --- a/Minecraft.World/RecordingItem.cpp +++ b/Minecraft.World/RecordingItem.cpp @@ -49,7 +49,7 @@ void RecordingItem::appendHoverText(shared_ptr itemInstance, share eMinecraftColour color = getRarity(shared_ptr())->color; wchar_t text[256]; - swprintf_s(text, 256, L"%ls %ls", L"C418 -", recording.c_str()); + swprintf(text, 256, L"%ls %ls", L"C418 -", recording.c_str()); lines->push_back(HtmlString(text, color)); } diff --git a/Minecraft.World/RegionFileCache.cpp b/Minecraft.World/RegionFileCache.cpp index bb066f23..c7931146 100644 --- a/Minecraft.World/RegionFileCache.cpp +++ b/Minecraft.World/RegionFileCache.cpp @@ -22,7 +22,7 @@ RegionFile *RegionFileCache::_getRegionFile(ConsoleSaveFile *saveFile, const wst { // 4J Jev - changed back to use of the File class. //char file[MAX_PATH_SIZE]; - //sprintf_s(file,"%s\\region\\r.%d.%d.mcr",basePath,chunkX >> 5,chunkZ >> 5); + //sprintf(file,"%s\\region\\r.%d.%d.mcr",basePath,chunkX >> 5,chunkZ >> 5); //File regionDir(basePath, L"region"); diff --git a/Minecraft.World/ShortTag.h b/Minecraft.World/ShortTag.h index 5fb488f6..e00dfd9c 100644 --- a/Minecraft.World/ShortTag.h +++ b/Minecraft.World/ShortTag.h @@ -15,7 +15,7 @@ public: wstring toString() { static wchar_t buf[32]; - swprintf_s(buf,32,L"%d",data); + swprintf(buf,32,L"%d",data); return wstring( buf ); } diff --git a/Minecraft.World/SignTileEntity.cpp b/Minecraft.World/SignTileEntity.cpp index 57c1fbd2..b949e429 100644 --- a/Minecraft.World/SignTileEntity.cpp +++ b/Minecraft.World/SignTileEntity.cpp @@ -66,7 +66,7 @@ void SignTileEntity::load(CompoundTag *tag) for (int i = 0; i < MAX_SIGN_LINES; i++) { wchar_t buf[16]; - swprintf_s(buf, 16, L"Text%d", (i+1) ); + swprintf(buf, 16, L"Text%d", (i+1) ); m_wsmessages[i] = tag->getString( buf ); if (m_wsmessages[i].length() > MAX_LINE_LENGTH) m_wsmessages[i] = m_wsmessages[i].substr(0, MAX_LINE_LENGTH); } diff --git a/Minecraft.World/ZonedChunkStorage.cpp b/Minecraft.World/ZonedChunkStorage.cpp index fd3557f6..75df6a0c 100644 --- a/Minecraft.World/ZonedChunkStorage.cpp +++ b/Minecraft.World/ZonedChunkStorage.cpp @@ -161,7 +161,7 @@ void ZonedChunkStorage::tick() for ( int64_t key : toClose ) { char buf[256]; - sprintf_s(buf,"Closing zone %I64d\n",key); + sprintf(buf,"Closing zone %I64d\n",key); app.DebugPrintf(buf); zoneFiles[key]->close(); zoneFiles.erase(zoneFiles.find(key));