diff --git a/Minecraft.Client/ArchiveFile.cpp b/Minecraft.Client/ArchiveFile.cpp index 786f89ae..608428b6 100644 --- a/Minecraft.Client/ArchiveFile.cpp +++ b/Minecraft.Client/ArchiveFile.cpp @@ -115,7 +115,7 @@ byteArray ArchiveFile::getFile(const wstring &filename) #if defined _XBOX_ONE || defined __ORBIS__ || defined _WINDOWS64 out = byteArray(data->filesize ); - memcpy_s( out.data, out.length, m_cachedData + data->ptr, data->filesize ); + memcpy( out.data, m_cachedData + data->ptr, data->filesize ); #else #ifdef _UNICODE diff --git a/Minecraft.Client/Camera.cpp b/Minecraft.Client/Camera.cpp index 31652c22..4de96349 100644 --- a/Minecraft.Client/Camera.cpp +++ b/Minecraft.Client/Camera.cpp @@ -44,8 +44,8 @@ void Camera::prepare(shared_ptr player, bool mirror) XMVECTOR _det; XMFLOAT4 trans; - memcpy_s(&_modelview, sizeof(_modelview), modelview->_getDataPointer(), 64); - memcpy_s(&_proj, sizeof(_proj), projection->_getDataPointer(), 64); + memcpy( &_modelview, modelview->_getDataPointer(), 64 ); + memcpy( &_proj, projection->_getDataPointer(), 64 ); #if ( defined __ORBIS__ ) || ( defined __PSVITA__ ) _modelview = transpose(_modelview); diff --git a/Minecraft.Client/Common/Consoles_App.cpp b/Minecraft.Client/Common/Consoles_App.cpp index dcd74d7a..aad69227 100644 --- a/Minecraft.Client/Common/Consoles_App.cpp +++ b/Minecraft.Client/Common/Consoles_App.cpp @@ -795,7 +795,7 @@ static void Win64_LoadSettings(GAME_SETTINGS *gs) { GAME_SETTINGS temp = {}; if (fread(&temp, sizeof(GAME_SETTINGS), 1, f) == 1) - memcpy_s(gs, sizeof(GAME_SETTINGS), &temp, sizeof(GAME_SETTINGS)); + memcpy(gs, &temp, sizeof(GAME_SETTINGS)); fclose(f); } } @@ -7709,7 +7709,7 @@ void CMinecraftApp::SetSpecialTutorialCompletionFlag(int iPad, int index) void CMinecraftApp::SetUniqueMapName(char *pszUniqueMapName) { - memcpy_s(m_pszUniqueMapName, sizeof(m_pszUniqueMapName), pszUniqueMapName, 14); + memcpy(m_pszUniqueMapName,pszUniqueMapName,14); } char *CMinecraftApp::GetUniqueMapName(void) @@ -7752,9 +7752,9 @@ void CMinecraftApp::AddLevelToBannedLevelList(int iPad, PlayerUID xuid, char *ps #ifdef _DURANGO memcpy(&pBannedListData->wchPlayerUID, xuid.toString().c_str(), sizeof(WCHAR)*64); #else - memcpy_s(&pBannedListData->xuid, sizeof(PlayerUID), &xuid, sizeof(PlayerUID)); + memcpy(&pBannedListData->xuid, &xuid, sizeof(PlayerUID)); #endif - strcpy_s(pBannedListData->pszLevelName, sizeof(pBannedListData->pszLevelName), pszLevelName); + strcpy_s(pBannedListData->pszLevelName,pszLevelName); m_vBannedListA[iPad]->push_back(pBannedListData); if (bWriteToTMS) @@ -7764,7 +7764,7 @@ void CMinecraftApp::AddLevelToBannedLevelList(int iPad, PlayerUID xuid, char *ps int iCount=0; for (PBANNEDLISTDATA pData : *m_vBannedListA[iPad] ) { - memcpy_s(&pBannedList[iCount++], sizeof(BANNEDLISTDATA), pData, sizeof(BANNEDLISTDATA)); + memcpy(&pBannedList[iCount++],pData,sizeof(BANNEDLISTDATA)); } // 4J-PB - write to TMS++ now @@ -7851,7 +7851,7 @@ void CMinecraftApp::RemoveLevelFromBannedLevelList(int iPad, PlayerUID xuid, cha { PBANNEDLISTDATA pBannedListData =m_vBannedListA[iPad]->at(i); - memcpy_s(&pBannedList[i], sizeof(BANNEDLISTDATA), pBannedListData, sizeof(BANNEDLISTDATA)); + memcpy(&pBannedList[i],pBannedListData,sizeof(BANNEDLISTDATA)); } #ifdef _XBOX StorageManager.WriteTMSFile(iPad,C4JStorage::eGlobalStorage_TitleUser,L"BannedList",(PBYTE)pBannedList, dwDataBytes); @@ -8800,7 +8800,7 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool pTMSPPreq->lpCallbackParam=this; pTMSPPreq->eStorageFacility=C4JStorage::eGlobalStorage_Title; pTMSPPreq->eFileTypeVal=C4JStorage::TMS_FILETYPE_BINARY; - memcpy_s(pTMSPPreq->wchFilename, sizeof(pTMSPPreq->wchFilename), pDLC->wchDataFile, sizeof(WCHAR) * MAX_BANNERNAME_SIZE); + memcpy(pTMSPPreq->wchFilename,pDLC->wchDataFile,sizeof(WCHAR)*MAX_BANNERNAME_SIZE); pTMSPPreq->eType=e_DLC_TexturePackData; pTMSPPreq->eState=e_TMS_ContentState_Queued; m_bAllTMSContentRetrieved=false; @@ -8922,7 +8922,7 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool pTMSPPreq->eFileTypeVal=C4JStorage::TMS_FILETYPE_BINARY; //wcstombs(pTMSPPreq->szFilename,pDLC->wchBanner,MAX_TMSFILENAME_SIZE); - memcpy_s(pTMSPPreq->wchFilename, sizeof(pTMSPPreq->wchFilename), pDLC->wchBanner, sizeof(WCHAR) * MAX_BANNERNAME_SIZE); + memcpy(pTMSPPreq->wchFilename,pDLC->wchBanner,sizeof(WCHAR)*MAX_BANNERNAME_SIZE); pTMSPPreq->eType=eType; pTMSPPreq->eState=e_TMS_ContentState_Queued; m_bAllTMSContentRetrieved=false; diff --git a/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp b/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp index fec298e4..c261e0cd 100644 --- a/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp +++ b/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp @@ -653,7 +653,7 @@ void ConsoleSchematicFile::generateSchematicFile(DataOutputStream *dos, Level *l break; case Compression::eCompressionType_None: default: - memcpy_s(ucTemp, inputSize, result.data, inputSize); + memcpy( ucTemp, result.data, inputSize ); break; }; diff --git a/Minecraft.Client/Common/GameRules/GameRuleManager.cpp b/Minecraft.Client/Common/GameRules/GameRuleManager.cpp index 96677388..63cbf628 100644 --- a/Minecraft.Client/Common/GameRules/GameRuleManager.cpp +++ b/Minecraft.Client/Common/GameRules/GameRuleManager.cpp @@ -422,7 +422,7 @@ bool GameRuleManager::readRuleFile(LevelGenerationOptions *lgo, BYTE *dIn, UINT switch(compressionType) { case Compression::eCompressionType_None: - memcpy_s(decompressedBuffer.data, decompressedBuffer.length, compressedBuffer.data, uncompressedSize); + memcpy(decompressedBuffer.data, compressedBuffer.data, uncompressedSize); break; case Compression::eCompressionType_RLE: diff --git a/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp b/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp index 4e16e0f5..d2221a52 100644 --- a/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp +++ b/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp @@ -716,7 +716,7 @@ void CPlatformNetworkManagerStub::SystemFlagAddPlayer(INetworkPlayer *pNetworkPl { if( pNetworkPlayer->IsSameSystem(m_playerFlags[i]->m_pNetworkPlayer) ) { - memcpy_s(newPlayerFlags->flags, newPlayerFlags->count / 8, m_playerFlags[i]->flags, m_playerFlags[i]->count / 8); + memcpy( newPlayerFlags->flags, m_playerFlags[i]->flags, m_playerFlags[i]->count / 8 ); break; } } diff --git a/Minecraft.Client/Common/UI/UIController.cpp b/Minecraft.Client/Common/UI/UIController.cpp index 24b3aced..3183acb2 100644 --- a/Minecraft.Client/Common/UI/UIController.cpp +++ b/Minecraft.Client/Common/UI/UIController.cpp @@ -2977,7 +2977,7 @@ C4JStorage::EMessageResult UIController::RequestMessageBox(UINT uiTitle, UINT ui QueuedMessageBoxData *queuedData = new QueuedMessageBoxData(); queuedData->info = param; queuedData->info.uiOptionA = new UINT[param.uiOptionC]; - memcpy_s(queuedData->info.uiOptionA, param.uiOptionC * sizeof(UINT), param.uiOptionA, param.uiOptionC * sizeof(UINT)); + memcpy(queuedData->info.uiOptionA, param.uiOptionA, param.uiOptionC * sizeof(UINT)); queuedData->iPad = dwPad; queuedData->layer = eUILayer_Error; // Ensures that these don't get wiped out by a CloseAllScenes call m_queuedMessageBoxData.push_back(queuedData); diff --git a/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp index 5b52cb30..6d1c6499 100644 --- a/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp @@ -736,7 +736,7 @@ void UIScene_LeaderboardsMenu::CopyLeaderboardEntry(LeaderboardManager::ReadScor wstring wstr=convStringToWstring(statsRow->m_uid.getOnlineID()); 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)); + memcpy(leaderboardEntry->m_gamerTag, statsRow->m_name.data(), statsRow->m_name.size() * sizeof(wchar_t)); #endif // Copy the other columns diff --git a/Minecraft.Client/Common/UI/UIScene_LoadCreateJoinMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LoadCreateJoinMenu.cpp index 2be4f1a2..79ee4ce5 100644 --- a/Minecraft.Client/Common/UI/UIScene_LoadCreateJoinMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_LoadCreateJoinMenu.cpp @@ -155,7 +155,7 @@ int UIScene_LoadCreateJoinMenu::LoadSaveDataThumbnailReturned(LPVOID lpParam,PBY if(pbThumbnail && dwThumbnailBytes) { pClass->m_saveDetails[pClass->m_iRequestingThumbnailId].pbThumbnailData = new BYTE[dwThumbnailBytes]; - memcpy_s(pClass->m_saveDetails[pClass->m_iRequestingThumbnailId].pbThumbnailData, dwThumbnailBytes, pbThumbnail, dwThumbnailBytes); + memcpy(pClass->m_saveDetails[pClass->m_iRequestingThumbnailId].pbThumbnailData, pbThumbnail, dwThumbnailBytes); pClass->m_saveDetails[pClass->m_iRequestingThumbnailId].dwThumbnailSize = dwThumbnailBytes; } else @@ -773,10 +773,10 @@ void UIScene_LoadCreateJoinMenu::tick() else { m_buttonListSaves.addItem(m_pSaveDetails->SaveInfoA[origIdx].UTF8SaveTitle, L""); - memcpy_s(m_saveDetails[i].UTF8SaveName, sizeof(m_saveDetails[i].UTF8SaveName), m_pSaveDetails->SaveInfoA[origIdx].UTF8SaveTitle, 128); + memcpy(m_saveDetails[i].UTF8SaveName, m_pSaveDetails->SaveInfoA[origIdx].UTF8SaveTitle, 128); } m_saveDetails[i].saveId = origIdx; - memcpy_s(m_saveDetails[i].UTF8SaveFilename, sizeof(m_saveDetails[i].UTF8SaveFilename), m_pSaveDetails->SaveInfoA[origIdx].UTF8SaveFilename, MAX_SAVEFILENAME_LENGTH); + memcpy(m_saveDetails[i].UTF8SaveFilename, m_pSaveDetails->SaveInfoA[origIdx].UTF8SaveFilename, MAX_SAVEFILENAME_LENGTH); } #else m_buttonListSaves.addItem(m_pSaveDetails->SaveInfoA[i].UTF8SaveTitle, L""); diff --git a/Minecraft.Client/Extrax64Stubs.cpp b/Minecraft.Client/Extrax64Stubs.cpp index fc6289d3..fa99e13a 100644 --- a/Minecraft.Client/Extrax64Stubs.cpp +++ b/Minecraft.Client/Extrax64Stubs.cpp @@ -433,7 +433,7 @@ HRESULT XMemDecompress( SIZE_T SrcSize ) { - memcpy_s(pDestination, *pDestSize, pSource, SrcSize); + memcpy(pDestination, pSource, SrcSize); *pDestSize = SrcSize; return S_OK; @@ -464,7 +464,7 @@ HRESULT XMemCompress( SIZE_T SrcSize ) { - memcpy_s(pDestination, *pDestSize, pSource, SrcSize); + memcpy(pDestination, pSource, SrcSize); *pDestSize = SrcSize; return S_OK; diff --git a/Minecraft.Client/Texture.cpp b/Minecraft.Client/Texture.cpp index e5315cde..389dac3d 100644 --- a/Minecraft.Client/Texture.cpp +++ b/Minecraft.Client/Texture.cpp @@ -632,7 +632,7 @@ void Texture::transferFromImage(BufferedImage *image) if( image->getData( level ) ) { - memcpy_s( tempData, ww * hh * 4, image->getData( level ), ww * hh * 4); + memcpy( tempData, image->getData( level ), ww * hh * 4); for (int y = 0; y < hh; y++) { for (int x = 0; x < ww; x++) diff --git a/Minecraft.Client/Textures.cpp b/Minecraft.Client/Textures.cpp index afc485f9..691ca1c6 100644 --- a/Minecraft.Client/Textures.cpp +++ b/Minecraft.Client/Textures.cpp @@ -473,7 +473,7 @@ void Textures::bindTextureLayers(ResourceLocation *resource) mergedWidth = width; mergedHeight = height; mergedPixels = intArray(width * height); - memcpy_s(mergedPixels.data, width * height * sizeof(int), layerPixels.data, width * height * sizeof(int)); + memcpy(mergedPixels.data, layerPixels.data, width * height * sizeof(int)); hasMergedPixels = true; } else if( width == mergedWidth && height == mergedHeight ) @@ -514,7 +514,7 @@ void Textures::bindTextureLayers(ResourceLocation *resource) if( hasMergedPixels ) { BufferedImage *mergedImage = new BufferedImage(mergedWidth, mergedHeight, BufferedImage::TYPE_INT_ARGB); - memcpy_s(mergedImage->getData(), mergedWidth * mergedHeight * sizeof(int), mergedPixels.data, mergedWidth * mergedHeight * sizeof(int)); + memcpy(mergedImage->getData(), mergedPixels.data, mergedWidth * mergedHeight * sizeof(int)); delete[] mergedPixels.data; id = getTexture(mergedImage, C4JRender::TEXTURE_FORMAT_RxGyBzAw, false); } @@ -776,7 +776,7 @@ void Textures::loadTexture(BufferedImage *img, int id, bool blur, bool clamp) // 4J - added - have we loaded mipmap data for this level? Use that rather than generating if possible if( img->getData( level ) ) { - memcpy_s( tempData, ww * hh * 4, img->getData( level ), ww * hh * 4); + memcpy( tempData, img->getData( level ), ww * hh * 4); #ifndef _XBOX // Swap ARGB to RGBA for( int i = 0; i < ww * hh ; i++ ) diff --git a/Minecraft.Client/Windows64/KeyboardMouseInput.cpp b/Minecraft.Client/Windows64/KeyboardMouseInput.cpp index 49eadbce..be6efe90 100644 --- a/Minecraft.Client/Windows64/KeyboardMouseInput.cpp +++ b/Minecraft.Client/Windows64/KeyboardMouseInput.cpp @@ -90,16 +90,16 @@ void KeyboardMouseInput::ClearAllState() void KeyboardMouseInput::Tick() { - memcpy_s(m_keyDownPrev, sizeof(m_keyDownPrev), m_keyDown, sizeof(m_keyDown)); - memcpy_s(m_mouseButtonDownPrev, sizeof(m_mouseButtonDownPrev), m_mouseButtonDown, sizeof(m_mouseButtonDown)); + memcpy(m_keyDownPrev, m_keyDown, sizeof(m_keyDown)); + memcpy(m_mouseButtonDownPrev, m_mouseButtonDown, sizeof(m_mouseButtonDown)); - memcpy_s(m_keyPressed, sizeof(m_keyPressed), m_keyPressedAccum, sizeof(m_keyPressedAccum)); - memcpy_s(m_keyReleased, sizeof(m_keyReleased), m_keyReleasedAccum, sizeof(m_keyReleasedAccum)); + memcpy(m_keyPressed, m_keyPressedAccum, sizeof(m_keyPressedAccum)); + memcpy(m_keyReleased, m_keyReleasedAccum, sizeof(m_keyReleasedAccum)); memset(m_keyPressedAccum, 0, sizeof(m_keyPressedAccum)); memset(m_keyReleasedAccum, 0, sizeof(m_keyReleasedAccum)); - memcpy_s(m_mouseBtnPressed, sizeof(m_mouseBtnPressed), m_mouseBtnPressedAccum, sizeof(m_mouseBtnPressedAccum)); - memcpy_s(m_mouseBtnReleased, sizeof(m_mouseBtnReleased), m_mouseBtnReleasedAccum, sizeof(m_mouseBtnReleasedAccum)); + memcpy(m_mouseBtnPressed, m_mouseBtnPressedAccum, sizeof(m_mouseBtnPressedAccum)); + memcpy(m_mouseBtnReleased, m_mouseBtnReleasedAccum, sizeof(m_mouseBtnReleasedAccum)); memset(m_mouseBtnPressedAccum, 0, sizeof(m_mouseBtnPressedAccum)); memset(m_mouseBtnReleasedAccum, 0, sizeof(m_mouseBtnReleasedAccum)); diff --git a/Minecraft.Client/glWrapper.cpp b/Minecraft.Client/glWrapper.cpp index 17d4d56c..d13e1a69 100644 --- a/Minecraft.Client/glWrapper.cpp +++ b/Minecraft.Client/glWrapper.cpp @@ -68,7 +68,7 @@ void glScaled(double x,double y,double z) void glGetFloat(int type, FloatBuffer *buff) { - memcpy_s(buff->_getDataPointer(), 64, RenderManager.MatrixGet(type), 64); + memcpy(buff->_getDataPointer(),RenderManager.MatrixGet(type),64); } void glDeleteLists(int first,int count)