From 51e61a12b4ca9b2aa54b5a474ba1b879196d290d Mon Sep 17 00:00:00 2001 From: Tropical <42101043+tropicaaal@users.noreply.github.com> Date: Mon, 30 Mar 2026 00:16:26 -0500 Subject: [PATCH 1/2] refactor: replace some win32 typedefs --- Minecraft.Client/Minecraft.cpp | 2 +- Minecraft.Client/Network/ServerChunkCache.cpp | 2 +- .../Platform/Common/App_structs.h | 2 +- .../Platform/Common/Consoles_App.cpp | 2 +- .../Platform/Common/Consoles_App.h | 2 +- .../GameRules/LevelGenerationOptions.cpp | 6 +- .../Common/GameRules/LevelGenerationOptions.h | 2 +- .../Leaderboards/SonyLeaderboardManager.cpp | 2 +- .../Leaderboards/SonyLeaderboardManager.h | 2 +- .../Common/Network/GameNetworkManager.cpp | 2 +- .../UI/IUIScene_AbstractContainerMenu.cpp | 4 +- .../Common/UI/IUIScene_CreativeMenu.cpp | 2 +- .../Common/UI/UIControl_EnchantmentBook.h | 2 +- .../Platform/Common/UI/UIController.h | 12 +-- .../Common/UI/UIScene_CraftingMenu.cpp | 2 +- .../Platform/Common/UI/UIScene_CraftingMenu.h | 2 +- .../Platform/Common/UI/UIScene_DeathMenu.cpp | 8 +- .../Platform/Common/UI/UIScene_PauseMenu.cpp | 16 ++-- .../Common/UI/UIScene_QuadrantSignin.h | 2 +- .../Common/UI/UIScene_TradingMenu.cpp | 2 +- .../Platform/Common/UI/UIScene_TradingMenu.h | 2 +- .../Platform/Common/UI/UIStructs.h | 4 +- .../Platform/Common/XML/ATGXmlParser.cpp | 4 +- .../Platform/Common/XML/ATGXmlParser.h | 12 +-- .../Platform/Common/XML/xmlFilesCallback.h | 12 +-- Minecraft.Client/Platform/Extrax64Stubs.cpp | 76 +++++++++---------- .../Platform/Linux/Linux_Minecraft.cpp | 10 +-- .../Platform/Linux/Sentient/SentientManager.h | 38 +++++----- .../Platform/Linux/Sentient/SentientStats.h | 38 +++++----- .../Platform/Linux/Stubs/d3d11_stubs.h | 2 +- .../Platform/Linux/Stubs/winapi_stubs.h | 66 ++++++++-------- .../Platform/Windows64/4JLibs/inc/4J_Input.h | 4 +- .../Windows64/4JLibs/inc/4J_Profile.h | 28 +++---- .../Windows64/4JLibs/inc/4J_Storage.h | 44 +++++------ .../Windows64/Sentient/SentientManager.h | 38 +++++----- .../Windows64/Sentient/SentientStats.h | 38 +++++----- .../Windows64/Windows64_Minecraft.cpp | 12 +-- .../Platform/Windows64/XML/ATGXmlParser.h | 12 +-- Minecraft.Client/Platform/extraX64client.h | 2 +- .../Blocks/TileEntities/SignTileEntity.cpp | 4 +- Minecraft.World/IO/Streams/Compression.cpp | 2 +- Minecraft.World/Level/CustomLevelSource.cpp | 4 +- Minecraft.World/Network/Connection.h | 8 +- .../Platform/x64headers/extraX64.h | 2 +- .../WorldGen/Layers/BiomeOverrideLayer.cpp | 2 +- 45 files changed, 268 insertions(+), 272 deletions(-) diff --git a/Minecraft.Client/Minecraft.cpp b/Minecraft.Client/Minecraft.cpp index 8ac8af1b4..5997dc05b 100644 --- a/Minecraft.Client/Minecraft.cpp +++ b/Minecraft.Client/Minecraft.cpp @@ -3467,7 +3467,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) { // // see if we can react to this // if(app.GetXuiAction(iPad)==eAppAction_Idle) // { - // app.SetAction(iPad,eAppAction_DebugText,(LPVOID)wchInput); + // app.SetAction(iPad,eAppAction_DebugText,(void*)wchInput); // } // } // } diff --git a/Minecraft.Client/Network/ServerChunkCache.cpp b/Minecraft.Client/Network/ServerChunkCache.cpp index fdbeeef52..16561fb39 100644 --- a/Minecraft.Client/Network/ServerChunkCache.cpp +++ b/Minecraft.Client/Network/ServerChunkCache.cpp @@ -855,7 +855,7 @@ TilePos* ServerChunkCache::findNearestMapFeature( void ServerChunkCache::recreateLogicStructuresForChunk(int chunkX, int chunkZ) { } -int ServerChunkCache::runSaveThreadProc(LPVOID lpParam) { +int ServerChunkCache::runSaveThreadProc(void* lpParam) { SaveThreadData* params = (SaveThreadData*)lpParam; if (params->useSharedThreadStorage) { diff --git a/Minecraft.Client/Platform/Common/App_structs.h b/Minecraft.Client/Platform/Common/App_structs.h index 2e44678a5..f6fa6cd08 100644 --- a/Minecraft.Client/Platform/Common/App_structs.h +++ b/Minecraft.Client/Platform/Common/App_structs.h @@ -176,7 +176,7 @@ typedef struct _TMSPPRequest { C4JStorage::eTMS_FILETYPEVAL eFileTypeVal; // char szFilename[MAX_TMSFILENAME_SIZE]; int (*CallbackFunc)(void*, int, int, C4JStorage::PTMSPP_FILEDATA, - LPCSTR szFilename); + const char* szFilename); WCHAR wchFilename[MAX_TMSFILENAME_SIZE]; void* lpCallbackParam; diff --git a/Minecraft.Client/Platform/Common/Consoles_App.cpp b/Minecraft.Client/Platform/Common/Consoles_App.cpp index b9e56c0fc..23d96294b 100644 --- a/Minecraft.Client/Platform/Common/Consoles_App.cpp +++ b/Minecraft.Client/Platform/Common/Consoles_App.cpp @@ -6964,7 +6964,7 @@ bool CMinecraftApp::RetrieveNextDLCContent() { int CMinecraftApp::TMSPPFileReturned(void* pParam, int iPad, int iUserData, C4JStorage::PTMSPP_FILEDATA pFileData, - LPCSTR szFilename) { + const char* szFilename) { CMinecraftApp* pClass = (CMinecraftApp*)pParam; diff --git a/Minecraft.Client/Platform/Common/Consoles_App.h b/Minecraft.Client/Platform/Common/Consoles_App.h index 213346da2..7ee44b1a3 100644 --- a/Minecraft.Client/Platform/Common/Consoles_App.h +++ b/Minecraft.Client/Platform/Common/Consoles_App.h @@ -869,7 +869,7 @@ public: static int TMSPPFileReturned(void* pParam, int iPad, int iUserData, C4JStorage::PTMSPP_FILEDATA pFileData, - LPCSTR szFilename); + const char* szFilename); DLC_INFO* GetDLCInfoTrialOffer(int iIndex); DLC_INFO* GetDLCInfoFullOffer(int iIndex); diff --git a/Minecraft.Client/Platform/Common/GameRules/LevelGenerationOptions.cpp b/Minecraft.Client/Platform/Common/GameRules/LevelGenerationOptions.cpp index 51f0bf4c8..315a04698 100644 --- a/Minecraft.Client/Platform/Common/GameRules/LevelGenerationOptions.cpp +++ b/Minecraft.Client/Platform/Common/GameRules/LevelGenerationOptions.cpp @@ -487,7 +487,7 @@ void LevelGenerationOptions::loadBaseSaveData() { } } -int LevelGenerationOptions::packMounted(LPVOID pParam, int iPad, DWORD dwErr, +int LevelGenerationOptions::packMounted(void* pParam, int iPad, DWORD dwErr, DWORD dwLicenceMask) { LevelGenerationOptions* lgo = (LevelGenerationOptions*)pParam; lgo->m_bLoadingData = false; @@ -545,7 +545,7 @@ int LevelGenerationOptions::packMounted(LPVOID pParam, int iPad, DWORD dwErr, DWORD dwFileSize = grf.length(); DWORD bytesRead; PBYTE pbData = (PBYTE) new BYTE[dwFileSize]; - BOOL bSuccess = ReadFile(fileHandle, pbData, dwFileSize, + bool bSuccess = ReadFile(fileHandle, pbData, dwFileSize, &bytesRead, NULL); if (bSuccess == FALSE) { app.FatalLoadError(); @@ -602,7 +602,7 @@ int LevelGenerationOptions::packMounted(LPVOID pParam, int iPad, DWORD dwErr, if (fileHandle != INVALID_HANDLE_VALUE) { DWORD bytesRead, dwFileSize = GetFileSize(fileHandle, NULL); PBYTE pbData = (PBYTE) new BYTE[dwFileSize]; - BOOL bSuccess = ReadFile(fileHandle, pbData, dwFileSize, + bool bSuccess = ReadFile(fileHandle, pbData, dwFileSize, &bytesRead, NULL); if (bSuccess == FALSE) { app.FatalLoadError(); diff --git a/Minecraft.Client/Platform/Common/GameRules/LevelGenerationOptions.h b/Minecraft.Client/Platform/Common/GameRules/LevelGenerationOptions.h index 0777d85dd..d78914935 100644 --- a/Minecraft.Client/Platform/Common/GameRules/LevelGenerationOptions.h +++ b/Minecraft.Client/Platform/Common/GameRules/LevelGenerationOptions.h @@ -219,7 +219,7 @@ public: getUnfinishedSchematicFiles(); void loadBaseSaveData(); - static int packMounted(LPVOID pParam, int iPad, DWORD dwErr, + static int packMounted(void* pParam, int iPad, DWORD dwErr, DWORD dwLicenceMask); // 4J-JEV: diff --git a/Minecraft.Client/Platform/Common/Leaderboards/SonyLeaderboardManager.cpp b/Minecraft.Client/Platform/Common/Leaderboards/SonyLeaderboardManager.cpp index 03cba8312..ab445280b 100644 --- a/Minecraft.Client/Platform/Common/Leaderboards/SonyLeaderboardManager.cpp +++ b/Minecraft.Client/Platform/Common/Leaderboards/SonyLeaderboardManager.cpp @@ -54,7 +54,7 @@ SonyLeaderboardManager::~SonyLeaderboardManager() { DeleteCriticalSection(&m_csViewsLock); } -int SonyLeaderboardManager::scoreboardThreadEntry(LPVOID lpParam) { +int SonyLeaderboardManager::scoreboardThreadEntry(void* lpParam) { ShutdownManager::HasStarted(ShutdownManager::eLeaderboardThread); SonyLeaderboardManager* self = reinterpret_cast(lpParam); diff --git a/Minecraft.Client/Platform/Common/Leaderboards/SonyLeaderboardManager.h b/Minecraft.Client/Platform/Common/Leaderboards/SonyLeaderboardManager.h index de6a4386e..88f5230c5 100644 --- a/Minecraft.Client/Platform/Common/Leaderboards/SonyLeaderboardManager.h +++ b/Minecraft.Client/Platform/Common/Leaderboards/SonyLeaderboardManager.h @@ -30,7 +30,7 @@ protected: // SceNpId m_myNpId; - static int scoreboardThreadEntry(LPVOID lpParam); + static int scoreboardThreadEntry(void* lpParam); void scoreboardThreadInternal(); virtual bool getScoreByIds(); diff --git a/Minecraft.Client/Platform/Common/Network/GameNetworkManager.cpp b/Minecraft.Client/Platform/Common/Network/GameNetworkManager.cpp index bda8428c4..0f65e346d 100644 --- a/Minecraft.Client/Platform/Common/Network/GameNetworkManager.cpp +++ b/Minecraft.Client/Platform/Common/Network/GameNetworkManager.cpp @@ -186,7 +186,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft, DWORD bytesRead, dwFileSize = GetFileSize(fileHandle, NULL); PBYTE pbData = (PBYTE) new BYTE[dwFileSize]; - BOOL bSuccess = + bool bSuccess = ReadFile(fileHandle, pbData, dwFileSize, &bytesRead, NULL); if (bSuccess == FALSE) { diff --git a/Minecraft.Client/Platform/Common/UI/IUIScene_AbstractContainerMenu.cpp b/Minecraft.Client/Platform/Common/UI/IUIScene_AbstractContainerMenu.cpp index db0aa476d..52a82ec41 100644 --- a/Minecraft.Client/Platform/Common/UI/IUIScene_AbstractContainerMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/IUIScene_AbstractContainerMenu.cpp @@ -1095,9 +1095,9 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction, ui.AnimateKeyPress(iPad, iAction, bRepeat, true, false); int buttonNum = 0; // 0 = LeftMouse, 1 = RightMouse - BOOL quickKeyHeld = FALSE; // Represents shift key on PC + bool quickKeyHeld = FALSE; // Represents shift key on PC - BOOL validKeyPress = FALSE; + bool validKeyPress = FALSE; bool itemEditorKeyPress = false; // Ignore input from other players diff --git a/Minecraft.Client/Platform/Common/UI/IUIScene_CreativeMenu.cpp b/Minecraft.Client/Platform/Common/UI/IUIScene_CreativeMenu.cpp index f33c798aa..d168e526a 100644 --- a/Minecraft.Client/Platform/Common/UI/IUIScene_CreativeMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/IUIScene_CreativeMenu.cpp @@ -1195,7 +1195,7 @@ bool IUIScene_CreativeMenu::handleValidKeyPress(int iPad, int buttonNum, } void IUIScene_CreativeMenu::handleOutsideClicked(int iPad, int buttonNum, - BOOL quickKeyHeld) { + bool quickKeyHeld) { // Drop items. Minecraft* pMinecraft = Minecraft::GetInstance(); diff --git a/Minecraft.Client/Platform/Common/UI/UIControl_EnchantmentBook.h b/Minecraft.Client/Platform/Common/UI/UIControl_EnchantmentBook.h index aeec87136..9df260f15 100644 --- a/Minecraft.Client/Platform/Common/UI/UIControl_EnchantmentBook.h +++ b/Minecraft.Client/Platform/Common/UI/UIControl_EnchantmentBook.h @@ -15,7 +15,7 @@ private: float flip, oFlip, flipT, flipA; float open, oOpen; - // BOOL m_bDirty; + // bool m_bDirty; // float m_fScale,m_fAlpha; // int m_iPad; std::shared_ptr last; diff --git a/Minecraft.Client/Platform/Common/UI/UIController.h b/Minecraft.Client/Platform/Common/UI/UIController.h index 83129abfa..b04a9d7dd 100644 --- a/Minecraft.Client/Platform/Common/UI/UIController.h +++ b/Minecraft.Client/Platform/Common/UI/UIController.h @@ -390,19 +390,19 @@ public: virtual C4JStorage::EMessageResult RequestAlertMessage( UINT uiTitle, UINT uiText, UINT* uiOptionA, UINT uiOptionC, DWORD dwPad = XUSER_INDEX_ANY, - int (*Func)(LPVOID, int, const C4JStorage::EMessageResult) = NULL, - LPVOID lpParam = NULL, WCHAR* pwchFormatString = NULL); + int (*Func)(void*, int, const C4JStorage::EMessageResult) = NULL, + void* lpParam = NULL, WCHAR* pwchFormatString = NULL); virtual C4JStorage::EMessageResult RequestErrorMessage( UINT uiTitle, UINT uiText, UINT* uiOptionA, UINT uiOptionC, DWORD dwPad = XUSER_INDEX_ANY, - int (*Func)(LPVOID, int, const C4JStorage::EMessageResult) = NULL, - LPVOID lpParam = NULL, WCHAR* pwchFormatString = NULL); + int (*Func)(void*, int, const C4JStorage::EMessageResult) = NULL, + void* lpParam = NULL, WCHAR* pwchFormatString = NULL); private: virtual C4JStorage::EMessageResult RequestMessageBox( UINT uiTitle, UINT uiText, UINT* uiOptionA, UINT uiOptionC, DWORD dwPad, - int (*Func)(LPVOID, int, const C4JStorage::EMessageResult), - LPVOID lpParam, WCHAR* pwchFormatString, DWORD dwFocusButton, + int (*Func)(void*, int, const C4JStorage::EMessageResult), + void* lpParam, WCHAR* pwchFormatString, DWORD dwFocusButton, bool bIsError); public: diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_CraftingMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_CraftingMenu.cpp index 3f493b6b8..750d6fe96 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_CraftingMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_CraftingMenu.cpp @@ -601,7 +601,7 @@ void UIScene_CraftingMenu::HandleMessage(EUIMessage message, void* data) { }; } -void UIScene_CraftingMenu::handleInventoryUpdated(LPVOID data) { +void UIScene_CraftingMenu::handleInventoryUpdated(void* data) { HandleInventoryUpdated(); } diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_CraftingMenu.h b/Minecraft.Client/Platform/Common/UI/UIScene_CraftingMenu.h index fb2ce18e7..1383312c1 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_CraftingMenu.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_CraftingMenu.h @@ -180,7 +180,7 @@ protected: virtual void UpdateMultiPanel(); virtual void HandleMessage(EUIMessage message, void* data); - void handleInventoryUpdated(LPVOID data); + void handleInventoryUpdated(void* data); // 4J - TomK If update tooltips is called then make sure the correct parent // is invoked! (both UIScene AND IUIScene_CraftingMenu have an instance of diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_DeathMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_DeathMenu.cpp index c5668671c..a65e7bb48 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_DeathMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_DeathMenu.cpp @@ -102,7 +102,7 @@ void UIScene_DeathMenu::handlePress(F64 controlId, F64 childId) { IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME_PROGRESS_LOST, uiIDA, 2, m_iPad, &IUIScene_PauseMenu::ExitGameDialogReturned, - (LPVOID)GetCallbackUniqueId()); + (void*)GetCallbackUniqueId()); } else { if (g_NetworkManager.IsHost()) { uiIDA[0] = IDS_CONFIRM_CANCEL; @@ -113,7 +113,7 @@ void UIScene_DeathMenu::handlePress(F64 controlId, F64 childId) { IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME, uiIDA, 3, m_iPad, &IUIScene_PauseMenu::ExitGameSaveDialogReturned, - (LPVOID)GetCallbackUniqueId()); + (void*)GetCallbackUniqueId()); } else { uiIDA[0] = IDS_CONFIRM_CANCEL; uiIDA[1] = IDS_CONFIRM_OK; @@ -122,7 +122,7 @@ void UIScene_DeathMenu::handlePress(F64 controlId, F64 childId) { IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME, uiIDA, 2, m_iPad, &IUIScene_PauseMenu::ExitGameDialogReturned, - (LPVOID)GetCallbackUniqueId()); + (void*)GetCallbackUniqueId()); } } } else { @@ -149,7 +149,7 @@ void UIScene_DeathMenu::handlePress(F64 controlId, F64 childId) { IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME_PROGRESS_LOST, uiIDA, 2, m_iPad, &IUIScene_PauseMenu::ExitGameDialogReturned, - (LPVOID)GetCallbackUniqueId()); + (void*)GetCallbackUniqueId()); } else { TelemetryManager->RecordLevelExit( m_iPad, eSen_LevelExitStatus_Failed); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_PauseMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_PauseMenu.cpp index 023e6aada..05336f12e 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_PauseMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_PauseMenu.cpp @@ -360,7 +360,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId) { IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME_PROGRESS_LOST, uiIDA, 2, m_iPad, &IUIScene_PauseMenu::ExitGameDialogReturned, - (LPVOID)GetCallbackUniqueId()); + (void*)GetCallbackUniqueId()); } else { if (g_NetworkManager.IsHost()) { uiIDA[0] = IDS_CONFIRM_CANCEL; @@ -374,14 +374,14 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId) { uiIDA, 3, m_iPad, &UIScene_PauseMenu:: ExitGameSaveDialogReturned, - (LPVOID)GetCallbackUniqueId()); + (void*)GetCallbackUniqueId()); } else { ui.RequestAlertMessage( IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME, uiIDA, 3, m_iPad, &UIScene_PauseMenu:: ExitGameSaveDialogReturned, - (LPVOID)GetCallbackUniqueId()); + (void*)GetCallbackUniqueId()); } } else { uiIDA[0] = IDS_CONFIRM_CANCEL; @@ -391,7 +391,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId) { IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME, uiIDA, 2, m_iPad, &IUIScene_PauseMenu::ExitGameDialogReturned, - (LPVOID)GetCallbackUniqueId()); + (void*)GetCallbackUniqueId()); } } } else { @@ -427,7 +427,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId) { IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME_PROGRESS_LOST, uiIDA, 2, m_iPad, &IUIScene_PauseMenu::ExitGameDialogReturned, - (LPVOID)GetCallbackUniqueId()); + (void*)GetCallbackUniqueId()); } else { int playTime = -1; @@ -460,7 +460,7 @@ void UIScene_PauseMenu::PerformActionSaveGame() { ui.RequestAlertMessage(IDS_UNLOCK_TITLE, IDS_UNLOCK_TOSAVE_TEXT, uiIDA, 2, m_iPad, &UIScene_PauseMenu::UnlockFullSaveReturned, - (LPVOID)GetCallbackUniqueId()); + (void*)GetCallbackUniqueId()); } return; @@ -488,7 +488,7 @@ void UIScene_PauseMenu::PerformActionSaveGame() { IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, IDS_WARNING_DLC_TRIALTEXTUREPACK_TEXT, uiIDA, 2, m_iPad, &UIScene_PauseMenu::WarningTrialTexturePackReturned, - (LPVOID)GetCallbackUniqueId()); + (void*)GetCallbackUniqueId()); } return; @@ -512,7 +512,7 @@ void UIScene_PauseMenu::PerformActionSaveGame() { ui.RequestAlertMessage( IDS_TITLE_SAVE_GAME, IDS_CONFIRM_SAVE_GAME, uiIDA, 2, m_iPad, &IUIScene_PauseMenu::SaveGameDialogReturned, - (LPVOID)GetCallbackUniqueId()); + (void*)GetCallbackUniqueId()); } else { // flag a app action of save game app.SetAction(m_iPad, eAppAction_SaveGame); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_QuadrantSignin.h b/Minecraft.Client/Platform/Common/UI/UIScene_QuadrantSignin.h index c4162ed9d..2a1f33619 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_QuadrantSignin.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_QuadrantSignin.h @@ -103,7 +103,7 @@ public: virtual void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool& handled); // 4jcraft: made public for thumbnail thunk - static int AvatarReturned(LPVOID lpParam, PBYTE pbThumbnail, + static int AvatarReturned(void* lpParam, PBYTE pbThumbnail, DWORD dwThumbnailBytes); private: diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_TradingMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_TradingMenu.cpp index 9c2c91211..180fdd0f5 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_TradingMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_TradingMenu.cpp @@ -279,6 +279,6 @@ void UIScene_TradingMenu::HandleMessage(EUIMessage message, void* data) { }; } -void UIScene_TradingMenu::handleInventoryUpdated(LPVOID data) { +void UIScene_TradingMenu::handleInventoryUpdated(void* data) { HandleInventoryUpdated(); } diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_TradingMenu.h b/Minecraft.Client/Platform/Common/UI/UIScene_TradingMenu.h index 5445832e2..472827520 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_TradingMenu.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_TradingMenu.h @@ -78,7 +78,7 @@ protected: virtual void setOfferDescription(std::vector* description); virtual void HandleMessage(EUIMessage message, void* data); - void handleInventoryUpdated(LPVOID data); + void handleInventoryUpdated(void* data); int getPad() { return m_iPad; } }; \ No newline at end of file diff --git a/Minecraft.Client/Platform/Common/UI/UIStructs.h b/Minecraft.Client/Platform/Common/UI/UIStructs.h index 1e69d976d..3d169093f 100644 --- a/Minecraft.Client/Platform/Common/UI/UIStructs.h +++ b/Minecraft.Client/Platform/Common/UI/UIStructs.h @@ -392,8 +392,8 @@ typedef struct _MessageBoxInfo { UINT* uiOptionA; UINT uiOptionC; DWORD dwPad; - int (*Func)(LPVOID, int, const C4JStorage::EMessageResult); - LPVOID lpParam; + int (*Func)(void*, int, const C4JStorage::EMessageResult); + void* lpParam; // C4JStringTable *pStringTable; // 4J Stu - We don't need this for our // internal message boxes wchar_t* pwchFormatString; diff --git a/Minecraft.Client/Platform/Common/XML/ATGXmlParser.cpp b/Minecraft.Client/Platform/Common/XML/ATGXmlParser.cpp index 0560884da..13daca7d7 100644 --- a/Minecraft.Client/Platform/Common/XML/ATGXmlParser.cpp +++ b/Minecraft.Client/Platform/Common/XML/ATGXmlParser.cpp @@ -344,7 +344,7 @@ HRESULT XMLParser::AdvanceName() // and getting another chunk of the file if needed // Returns S_OK if there are more characters, E_ABORT for no characters to read //------------------------------------------------------------------------------------- -HRESULT XMLParser::AdvanceCharacter( BOOL bOkToFail ) +HRESULT XMLParser::AdvanceCharacter( bool bOkToFail ) { if( m_bSkipNextAdvance ) { @@ -737,7 +737,7 @@ ISAXCallback* XMLParser::GetSAXCallbackInterface() //------------------------------------------------------------------------------------- HRESULT XMLParser::MainParseLoop() { - BOOL bWhiteSpaceOnly = TRUE; + bool bWhiteSpaceOnly = TRUE; HRESULT hr = S_OK; if( FAILED( m_pISAXCallback->StartDocument() ) ) diff --git a/Minecraft.Client/Platform/Common/XML/ATGXmlParser.h b/Minecraft.Client/Platform/Common/XML/ATGXmlParser.h index 75142e3e3..bfa46f2b3 100644 --- a/Minecraft.Client/Platform/Common/XML/ATGXmlParser.h +++ b/Minecraft.Client/Platform/Common/XML/ATGXmlParser.h @@ -58,11 +58,11 @@ public: virtual HRESULT ElementBegin( CONST WCHAR* strName, UINT NameLen, CONST XMLAttribute *pAttributes, UINT NumAttributes ) = 0; - virtual HRESULT ElementContent( CONST WCHAR *strData, UINT DataLen, BOOL More ) = 0; + virtual HRESULT ElementContent( CONST WCHAR *strData, UINT DataLen, bool More ) = 0; virtual HRESULT ElementEnd( CONST WCHAR *strName, UINT NameLen ) = 0; virtual HRESULT CDATABegin( ) = 0; - virtual HRESULT CDATAData( CONST WCHAR *strCDATA, UINT CDATALen, BOOL bMore ) = 0; + virtual HRESULT CDATAData( CONST WCHAR *strCDATA, UINT CDATALen, bool bMore ) = 0; virtual HRESULT CDATAEnd( ) = 0; virtual VOID Error( HRESULT hError, CONST CHAR *strMessage ) = 0; @@ -111,7 +111,7 @@ public: private: HRESULT MainParseLoop(); - HRESULT AdvanceCharacter( BOOL bOkToFail = FALSE ); + HRESULT AdvanceCharacter( bool bOkToFail = FALSE ); VOID SkipNextAdvance(); HRESULT ConsumeSpace(); @@ -144,10 +144,10 @@ private: BYTE* m_pReadPtr; WCHAR* m_pWritePtr; // write pointer within m_pBuf - BOOL m_bUnicode; // TRUE = 16-bits, FALSE = 8-bits - BOOL m_bReverseBytes; // TRUE = reverse bytes, FALSE = don't reverse + bool m_bUnicode; // TRUE = 16-bits, FALSE = 8-bits + bool m_bReverseBytes; // TRUE = reverse bytes, FALSE = don't reverse - BOOL m_bSkipNextAdvance; + bool m_bSkipNextAdvance; WCHAR m_Ch; // Current character being parsed }; diff --git a/Minecraft.Client/Platform/Common/XML/xmlFilesCallback.h b/Minecraft.Client/Platform/Common/XML/xmlFilesCallback.h index 351a0d487..5f9d349ae 100644 --- a/Minecraft.Client/Platform/Common/XML/xmlFilesCallback.h +++ b/Minecraft.Client/Platform/Common/XML/xmlFilesCallback.h @@ -80,13 +80,13 @@ public: } }; - virtual HRESULT ElementContent( CONST WCHAR *strData, UINT DataLen, BOOL More ) { return S_OK; }; + virtual HRESULT ElementContent( CONST WCHAR *strData, UINT DataLen, bool More ) { return S_OK; }; virtual HRESULT ElementEnd( CONST WCHAR *strName, UINT NameLen ){ return S_OK; }; virtual HRESULT CDATABegin( ) { return S_OK; }; - virtual HRESULT CDATAData( CONST WCHAR *strCDATA, UINT CDATALen, BOOL bMore ){ return S_OK; }; + virtual HRESULT CDATAData( CONST WCHAR *strCDATA, UINT CDATALen, bool bMore ){ return S_OK; }; virtual HRESULT CDATAEnd( ){ return S_OK; }; @@ -161,13 +161,13 @@ public: } - virtual HRESULT ElementContent( CONST WCHAR *strData, UINT DataLen, BOOL More ) { return S_OK; }; + virtual HRESULT ElementContent( CONST WCHAR *strData, UINT DataLen, bool More ) { return S_OK; }; virtual HRESULT ElementEnd( CONST WCHAR *strName, UINT NameLen ){ return S_OK; }; virtual HRESULT CDATABegin( ) { return S_OK; }; - virtual HRESULT CDATAData( CONST WCHAR *strCDATA, UINT CDATALen, BOOL bMore ){ return S_OK; }; + virtual HRESULT CDATAData( CONST WCHAR *strCDATA, UINT CDATALen, bool bMore ){ return S_OK; }; virtual HRESULT CDATAEnd( ){ return S_OK; }; @@ -313,13 +313,13 @@ public: } }; - virtual HRESULT ElementContent( CONST WCHAR *strData, UINT DataLen, BOOL More ) { return S_OK; }; + virtual HRESULT ElementContent( CONST WCHAR *strData, UINT DataLen, bool More ) { return S_OK; }; virtual HRESULT ElementEnd( CONST WCHAR *strName, UINT NameLen ){ return S_OK; }; virtual HRESULT CDATABegin( ) { return S_OK; }; - virtual HRESULT CDATAData( CONST WCHAR *strCDATA, UINT CDATALen, BOOL bMore ){ return S_OK; }; + virtual HRESULT CDATAData( CONST WCHAR *strCDATA, UINT CDATALen, bool bMore ){ return S_OK; }; virtual HRESULT CDATAEnd( ){ return S_OK; }; diff --git a/Minecraft.Client/Platform/Extrax64Stubs.cpp b/Minecraft.Client/Platform/Extrax64Stubs.cpp index e4e144ce0..a445fa36b 100644 --- a/Minecraft.Client/Platform/Extrax64Stubs.cpp +++ b/Minecraft.Client/Platform/Extrax64Stubs.cpp @@ -164,7 +164,7 @@ DWORD MinecraftDynamicConfigurations::GetTrialTime() { return DYNAMIC_CONFIG_DEF void XSetThreadProcessor(HANDLE a, int b) {} // #if !(0) && !(0) -// BOOL XCloseHandle(HANDLE a) { return CloseHandle(a); } +// bool XCloseHandle(HANDLE a) { return CloseHandle(a); } // #endif // 0 DWORD XUserGetSigninInfo( @@ -181,7 +181,7 @@ LPCWSTR CXuiStringTable::Lookup(UINT nIndex) { return L"String"; } void CXuiStringTable::Clear() {} HRESULT CXuiStringTable::Load(LPCWSTR szId) { return S_OK; } -DWORD XUserAreUsersFriends( DWORD dwUserIndex, PPlayerUID pXuids, DWORD dwXuidCount, PBOOL pfResult, void *pOverlapped) { return 0; } +DWORD XUserAreUsersFriends( DWORD dwUserIndex, PPlayerUID pXuids, DWORD dwXuidCount, bool* pfResult, void *pOverlapped) { return 0; } HRESULT XMemDecompress( XMEMDECOMPRESSION_CONTEXT Context, @@ -302,7 +302,7 @@ void XMemDestroyDecompressionContext(XMEMDECOMPRESSION_CONTEXT Context) //#if 1 DWORD XGetLanguage() { return 1; } DWORD XGetLocale() { return 0; } -DWORD XEnableGuestSignin(BOOL fEnable) { return 0; } +DWORD XEnableGuestSignin(bool fEnable) { return 0; } @@ -458,10 +458,10 @@ void C_4JProfile::ShowProfileCard(int iPad, PlayerUID targetUid) {} #if defined(__linux__) C4JStorage::C4JStorage() {} void C4JStorage::Tick() {} -C4JStorage::EMessageResult C4JStorage::RequestMessageBox(unsigned int uiTitle, unsigned int uiText, unsigned int *uiOptionA,unsigned int uiOptionC, unsigned int pad, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult),LPVOID lpParam, C4JStringTable *pStringTable, WCHAR *pwchFormatString,unsigned int focusButton) { return C4JStorage::EMessage_Undefined; } +C4JStorage::EMessageResult C4JStorage::RequestMessageBox(unsigned int uiTitle, unsigned int uiText, unsigned int *uiOptionA,unsigned int uiOptionC, unsigned int pad, int( *Func)(void*,int,const C4JStorage::EMessageResult),void* lpParam, C4JStringTable *pStringTable, WCHAR *pwchFormatString,unsigned int focusButton) { return C4JStorage::EMessage_Undefined; } C4JStorage::EMessageResult C4JStorage::GetMessageBoxResult() { return C4JStorage::EMessage_Undefined; } -bool C4JStorage::SetSaveDevice(int( *Func)(LPVOID,const bool),LPVOID lpParam, bool bForceResetOfSaveDevice) { return true; } -void C4JStorage::Init(LPCWSTR pwchDefaultSaveName,char *pszSavePackName,int iMinimumSaveSize, int( *Func)(LPVOID, const ESavingMessage, int),LPVOID lpParam) {} +bool C4JStorage::SetSaveDevice(int( *Func)(void*,const bool),void* lpParam, bool bForceResetOfSaveDevice) { return true; } +void C4JStorage::Init(LPCWSTR pwchDefaultSaveName,char *pszSavePackName,int iMinimumSaveSize, int( *Func)(void*, const ESavingMessage, int),void* lpParam) {} void C4JStorage::ResetSaveData() {} void C4JStorage::SetDefaultSaveNameForKeyboardDisplay(LPCWSTR pwchDefaultSaveName) {} void C4JStorage::SetSaveTitle(LPCWSTR pwchDefaultSaveName) {} @@ -469,49 +469,49 @@ LPCWSTR C4JStorage::GetSaveTitle() { return L""; } bool C4JStorage::GetSaveUniqueNumber(INT *piVal) { return true; } bool C4JStorage::GetSaveUniqueFilename(char *pszName) { return true; } void C4JStorage::SetSaveUniqueFilename(char *szFilename) { } -void C4JStorage::SetState(ESaveGameControlState eControlState,int( *Func)(LPVOID,const bool),LPVOID lpParam) {} +void C4JStorage::SetState(ESaveGameControlState eControlState,int( *Func)(void*,const bool),void* lpParam) {} void C4JStorage::SetSaveDisabled(bool bDisable) {} bool C4JStorage::GetSaveDisabled(void) { return false; } unsigned int C4JStorage::GetSaveSize() { return 0; } void C4JStorage::GetSaveData(void *pvData,unsigned int *pulBytes) {} PVOID C4JStorage::AllocateSaveData(unsigned int ulBytes) { return new char[ulBytes]; } void C4JStorage::SaveSaveData(unsigned int ulBytes,PBYTE pbThumbnail,DWORD cbThumbnail,PBYTE pbTextData, DWORD dwTextLen) {} -void C4JStorage::CopySaveDataToNewSave(std::uint8_t *pbThumbnail,unsigned int cbThumbnail,WCHAR *wchNewName,int ( *Func)(LPVOID lpParam, bool), LPVOID lpParam) {} +void C4JStorage::CopySaveDataToNewSave(std::uint8_t *pbThumbnail,unsigned int cbThumbnail,WCHAR *wchNewName,int ( *Func)(void* lpParam, bool), void* lpParam) {} void C4JStorage::SetSaveDeviceSelected(unsigned int uiPad,bool bSelected) {} bool C4JStorage::GetSaveDeviceSelected(unsigned int iPad) { return true; } C4JStorage::ELoadGameStatus C4JStorage::DoesSaveExist(bool *pbExists) { return C4JStorage::ELoadGame_Idle; } bool C4JStorage::EnoughSpaceForAMinSaveGame() { return true; } void C4JStorage::SetSaveMessageVPosition(float fY) {} -//C4JStorage::ESGIStatus C4JStorage::GetSavesInfo(int iPad,bool ( *Func)(LPVOID, int, CACHEINFOSTRUCT *, int, HRESULT),LPVOID lpParam,char *pszSavePackName) { return C4JStorage::ESGIStatus_Idle; } -C4JStorage::ESaveGameState C4JStorage::GetSavesInfo(int iPad,int ( *Func)(LPVOID lpParam,SAVE_DETAILS *pSaveDetails,const bool),LPVOID lpParam,char *pszSavePackName) { return C4JStorage::ESaveGame_Idle; } +//C4JStorage::ESGIStatus C4JStorage::GetSavesInfo(int iPad,bool ( *Func)(void*, int, CACHEINFOSTRUCT *, int, HRESULT),void* lpParam,char *pszSavePackName) { return C4JStorage::ESGIStatus_Idle; } +C4JStorage::ESaveGameState C4JStorage::GetSavesInfo(int iPad,int ( *Func)(void* lpParam,SAVE_DETAILS *pSaveDetails,const bool),void* lpParam,char *pszSavePackName) { return C4JStorage::ESaveGame_Idle; } void C4JStorage::GetSaveCacheFileInfo(unsigned int fileIndex,XCONTENT_DATA &xContentData) {} void C4JStorage::GetSaveCacheFileInfo(unsigned int fileIndex, std::uint8_t * *ppbImageData, unsigned int *pImageBytes) {} -C4JStorage::ESaveGameState C4JStorage::LoadSaveData(PSAVE_INFO pSaveInfo,int( *Func)(LPVOID lpParam,const bool, const bool), LPVOID lpParam) {return C4JStorage::ESaveGame_Idle;} -C4JStorage::EDeleteGameStatus C4JStorage::DeleteSaveData(PSAVE_INFO pSaveInfo,int( *Func)(LPVOID lpParam,const bool), LPVOID lpParam) { return C4JStorage::EDeleteGame_Idle; } +C4JStorage::ESaveGameState C4JStorage::LoadSaveData(PSAVE_INFO pSaveInfo,int( *Func)(void* lpParam,const bool, const bool), void* lpParam) {return C4JStorage::ESaveGame_Idle;} +C4JStorage::EDeleteGameStatus C4JStorage::DeleteSaveData(PSAVE_INFO pSaveInfo,int( *Func)(void* lpParam,const bool), void* lpParam) { return C4JStorage::EDeleteGame_Idle; } PSAVE_DETAILS C4JStorage::ReturnSavesInfo() {return NULL;} -void C4JStorage::RegisterMarketplaceCountsCallback(int ( *Func)(LPVOID lpParam, C4JStorage::DLC_TMS_DETAILS *, int), LPVOID lpParam ) {} +void C4JStorage::RegisterMarketplaceCountsCallback(int ( *Func)(void* lpParam, C4JStorage::DLC_TMS_DETAILS *, int), void* lpParam ) {} void C4JStorage::SetDLCPackageRoot(char *pszDLCRoot) {} C4JStorage::EDLCStatus C4JStorage::GetDLCOffers(int iPad,int( *Func)(void *, int, std::uint32_t, int),void *lpParam, std::uint32_t dwOfferTypesBitmaskT) { return C4JStorage::EDLC_Idle; } unsigned int C4JStorage::CancelGetDLCOffers() { return 0; } void C4JStorage::ClearDLCOffers() {} XMARKETPLACE_CONTENTOFFER_INFO& C4JStorage::GetOffer(unsigned int dw) { static XMARKETPLACE_CONTENTOFFER_INFO retval = {0}; return retval; } int C4JStorage::GetOfferCount() { return 0; } -unsigned int C4JStorage::InstallOffer(int iOfferIDC,ULONGLONG *ullOfferIDA,int( *Func)(LPVOID, int, int),LPVOID lpParam, bool bTrial) { return 0; } +unsigned int C4JStorage::InstallOffer(int iOfferIDC,ULONGLONG *ullOfferIDA,int( *Func)(void*, int, int),void* lpParam, bool bTrial) { return 0; } unsigned int C4JStorage::GetAvailableDLCCount( int iPad) { return 0; } XCONTENT_DATA& C4JStorage::GetDLC(unsigned int dw) { static XCONTENT_DATA retval = {0}; return retval; } -C4JStorage::EDLCStatus C4JStorage::GetInstalledDLC(int iPad,int( *Func)(LPVOID, int, int),LPVOID lpParam) { return C4JStorage::EDLC_Idle; } -std::uint32_t C4JStorage::MountInstalledDLC(int iPad,std::uint32_t dwDLC,int( *Func)(void *, int, std::uint32_t, std::uint32_t),void *lpParam,LPCSTR szMountDrive) { return 0; } -unsigned int C4JStorage::UnmountInstalledDLC(LPCSTR szMountDrive) { return 0; } -C4JStorage::ETMSStatus C4JStorage::ReadTMSFile(int iQuadrant,eGlobalStorage eStorageFacility,C4JStorage::eTMS_FileType eFileType, WCHAR *pwchFilename,std::uint8_t **ppBuffer,unsigned int *pBufferSize,int( *Func)(LPVOID, WCHAR *,int, bool, int),LPVOID lpParam, int iAction) { return C4JStorage::ETMSStatus_Idle; } +C4JStorage::EDLCStatus C4JStorage::GetInstalledDLC(int iPad,int( *Func)(void*, int, int),void* lpParam) { return C4JStorage::EDLC_Idle; } +std::uint32_t C4JStorage::MountInstalledDLC(int iPad,std::uint32_t dwDLC,int( *Func)(void *, int, std::uint32_t, std::uint32_t),void *lpParam,const char* szMountDrive) { return 0; } +unsigned int C4JStorage::UnmountInstalledDLC(const char* szMountDrive) { return 0; } +C4JStorage::ETMSStatus C4JStorage::ReadTMSFile(int iQuadrant,eGlobalStorage eStorageFacility,C4JStorage::eTMS_FileType eFileType, WCHAR *pwchFilename,std::uint8_t **ppBuffer,unsigned int *pBufferSize,int( *Func)(void*, WCHAR *,int, bool, int),void* lpParam, int iAction) { return C4JStorage::ETMSStatus_Idle; } bool C4JStorage::WriteTMSFile(int iQuadrant,eGlobalStorage eStorageFacility,WCHAR *pwchFilename,std::uint8_t *pBuffer,unsigned int bufferSize) { return true; } bool C4JStorage::DeleteTMSFile(int iQuadrant,eGlobalStorage eStorageFacility,WCHAR *pwchFilename) { return true; } void C4JStorage::StoreTMSPathName(WCHAR *pwchName) {} unsigned int C4JStorage::CRC(unsigned char *buf, int len) { return 0; } struct PTMSPP_FILEDATA; -C4JStorage::ETMSStatus C4JStorage::TMSPP_ReadFile(int iPad,C4JStorage::eGlobalStorage eStorageFacility,C4JStorage::eTMS_FILETYPEVAL eFileTypeVal,LPCSTR szFilename,int( *Func)(LPVOID,int,int,PTMSPP_FILEDATA, LPCSTR)/*=NULL*/,LPVOID lpParam/*=NULL*/, int iUserData/*=0*/) {return C4JStorage::ETMSStatus_Idle;} +C4JStorage::ETMSStatus C4JStorage::TMSPP_ReadFile(int iPad,C4JStorage::eGlobalStorage eStorageFacility,C4JStorage::eTMS_FILETYPEVAL eFileTypeVal,const char* szFilename,int( *Func)(void*,int,int,PTMSPP_FILEDATA, const char*)/*=NULL*/,void* lpParam/*=NULL*/, int iUserData/*=0*/) {return C4JStorage::ETMSStatus_Idle;} #endif #endif @@ -521,25 +521,25 @@ C4JStorage::ETMSStatus C4JStorage::TMSPP_ReadFile(int iPad,C4JStorage::eGloba HRESULT CSentientManager::Init() { return S_OK; } HRESULT CSentientManager::Tick() { return S_OK; } HRESULT CSentientManager::Flush() { return S_OK; } -BOOL CSentientManager::RecordPlayerSessionStart(DWORD dwUserId) { return true; } -BOOL CSentientManager::RecordPlayerSessionExit(DWORD dwUserId, int exitStatus) { return true; } -BOOL CSentientManager::RecordHeartBeat(DWORD dwUserId) { return true; } -BOOL CSentientManager::RecordLevelStart(DWORD dwUserId, ESen_FriendOrMatch friendsOrMatch, ESen_CompeteOrCoop competeOrCoop, int difficulty, DWORD numberOfLocalPlayers, DWORD numberOfOnlinePlayers) { return true; } -BOOL CSentientManager::RecordLevelExit(DWORD dwUserId, ESen_LevelExitStatus levelExitStatus) { return true; } -BOOL CSentientManager::RecordLevelSaveOrCheckpoint(DWORD dwUserId, INT saveOrCheckPointID, INT saveSizeInBytes) { return true; } -BOOL CSentientManager::RecordLevelResume(DWORD dwUserId, ESen_FriendOrMatch friendsOrMatch, ESen_CompeteOrCoop competeOrCoop, int difficulty, DWORD numberOfLocalPlayers, DWORD numberOfOnlinePlayers, INT saveOrCheckPointID) { return true; } -BOOL CSentientManager::RecordPauseOrInactive(DWORD dwUserId) { return true; } -BOOL CSentientManager::RecordUnpauseOrActive(DWORD dwUserId) { return true; } -BOOL CSentientManager::RecordMenuShown(DWORD dwUserId, INT menuID, INT optionalMenuSubID) { return true; } -BOOL CSentientManager::RecordAchievementUnlocked(DWORD dwUserId, INT achievementID, INT achievementGamerscore) { return true; } -BOOL CSentientManager::RecordMediaShareUpload(DWORD dwUserId, ESen_MediaDestination mediaDestination, ESen_MediaType mediaType) { return true; } -BOOL CSentientManager::RecordUpsellPresented(DWORD dwUserId, ESen_UpsellID upsellId, INT marketplaceOfferID) { return true; } -BOOL CSentientManager::RecordUpsellResponded(DWORD dwUserId, ESen_UpsellID upsellId, INT marketplaceOfferID, ESen_UpsellOutcome upsellOutcome) { return true; } -BOOL CSentientManager::RecordPlayerDiedOrFailed(DWORD dwUserId, INT lowResMapX, INT lowResMapY, INT lowResMapZ, INT mapID, INT playerWeaponID, INT enemyWeaponID, ETelemetryChallenges enemyTypeID) { return true; } -BOOL CSentientManager::RecordEnemyKilledOrOvercome(DWORD dwUserId, INT lowResMapX, INT lowResMapY, INT lowResMapZ, INT mapID, INT playerWeaponID, INT enemyWeaponID, ETelemetryChallenges enemyTypeID) { return true; } -BOOL CSentientManager::RecordSkinChanged(DWORD dwUserId, DWORD dwSkinId) { return true; } -BOOL CSentientManager::RecordBanLevel(DWORD dwUserId) { return true; } -BOOL CSentientManager::RecordUnBanLevel(DWORD dwUserId) { return true; } +bool CSentientManager::RecordPlayerSessionStart(DWORD dwUserId) { return true; } +bool CSentientManager::RecordPlayerSessionExit(DWORD dwUserId, int exitStatus) { return true; } +bool CSentientManager::RecordHeartBeat(DWORD dwUserId) { return true; } +bool CSentientManager::RecordLevelStart(DWORD dwUserId, ESen_FriendOrMatch friendsOrMatch, ESen_CompeteOrCoop competeOrCoop, int difficulty, DWORD numberOfLocalPlayers, DWORD numberOfOnlinePlayers) { return true; } +bool CSentientManager::RecordLevelExit(DWORD dwUserId, ESen_LevelExitStatus levelExitStatus) { return true; } +bool CSentientManager::RecordLevelSaveOrCheckpoint(DWORD dwUserId, INT saveOrCheckPointID, INT saveSizeInBytes) { return true; } +bool CSentientManager::RecordLevelResume(DWORD dwUserId, ESen_FriendOrMatch friendsOrMatch, ESen_CompeteOrCoop competeOrCoop, int difficulty, DWORD numberOfLocalPlayers, DWORD numberOfOnlinePlayers, INT saveOrCheckPointID) { return true; } +bool CSentientManager::RecordPauseOrInactive(DWORD dwUserId) { return true; } +bool CSentientManager::RecordUnpauseOrActive(DWORD dwUserId) { return true; } +bool CSentientManager::RecordMenuShown(DWORD dwUserId, INT menuID, INT optionalMenuSubID) { return true; } +bool CSentientManager::RecordAchievementUnlocked(DWORD dwUserId, INT achievementID, INT achievementGamerscore) { return true; } +bool CSentientManager::RecordMediaShareUpload(DWORD dwUserId, ESen_MediaDestination mediaDestination, ESen_MediaType mediaType) { return true; } +bool CSentientManager::RecordUpsellPresented(DWORD dwUserId, ESen_UpsellID upsellId, INT marketplaceOfferID) { return true; } +bool CSentientManager::RecordUpsellResponded(DWORD dwUserId, ESen_UpsellID upsellId, INT marketplaceOfferID, ESen_UpsellOutcome upsellOutcome) { return true; } +bool CSentientManager::RecordPlayerDiedOrFailed(DWORD dwUserId, INT lowResMapX, INT lowResMapY, INT lowResMapZ, INT mapID, INT playerWeaponID, INT enemyWeaponID, ETelemetryChallenges enemyTypeID) { return true; } +bool CSentientManager::RecordEnemyKilledOrOvercome(DWORD dwUserId, INT lowResMapX, INT lowResMapY, INT lowResMapZ, INT mapID, INT playerWeaponID, INT enemyWeaponID, ETelemetryChallenges enemyTypeID) { return true; } +bool CSentientManager::RecordSkinChanged(DWORD dwUserId, DWORD dwSkinId) { return true; } +bool CSentientManager::RecordBanLevel(DWORD dwUserId) { return true; } +bool CSentientManager::RecordUnBanLevel(DWORD dwUserId) { return true; } INT CSentientManager::GetMultiplayerInstanceID() { return 0; } INT CSentientManager::GenerateMultiplayerInstanceId() { return 0; } void CSentientManager::SetMultiplayerInstanceId(INT value) {} diff --git a/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp b/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp index 827a20bd9..44138b18c 100644 --- a/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp +++ b/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp @@ -101,7 +101,7 @@ DWORD dwProfileSettingsA[NUM_PROFILE_VALUES] = { uint8_t* AddRichPresenceString(int iID); void FreeRichPresenceStrings(); -BOOL g_bWidescreen = TRUE; +bool g_bWidescreen = TRUE; void DefineActions(void) { // The app needs to define the actions required, and the possible mappings @@ -583,7 +583,7 @@ HRESULT InitDevice() { // Create a render target view ID3D11Texture2D* pBackBuffer = NULL; hr = g_pSwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), - (LPVOID*)&pBackBuffer); + (void**)&pBackBuffer); if (FAILED(hr)) return hr; // Create a depth stencil buffer @@ -716,7 +716,7 @@ int main(int argc, const char* argv[]) { StorageManager.Init(0, app.GetString(IDS_DEFAULT_SAVENAME), (char*)"savegame.dat", FIFTY_ONE_MB, &CConsoleMinecraftApp::DisplaySavingMessage, - (LPVOID)&app, (char*)""); + (void*)&app, (char*)""); //////////////// // Initialise // @@ -1049,7 +1049,7 @@ volatile int sectCheck = 48; CRITICAL_SECTION memCS; DWORD tlsIdx; -LPVOID XMemAlloc(SIZE_T dwSize, DWORD dwAllocAttributes) { +void* XMemAlloc(SIZE_T dwSize, DWORD dwAllocAttributes) { if (!trackStarted) { void* p = XMemAllocDefault(dwSize, dwAllocAttributes); size_t realSize = XMemSizeDefault(p, dwAllocAttributes); @@ -1176,7 +1176,7 @@ void MemSect(int section) { } else { value = (value << 6) | section; } - TlsSetValue(tlsIdx, (LPVOID)value); + TlsSetValue(tlsIdx, (void*)value); } void MemPixStuff() { diff --git a/Minecraft.Client/Platform/Linux/Sentient/SentientManager.h b/Minecraft.Client/Platform/Linux/Sentient/SentientManager.h index 09181c170..2c0c2ddfd 100644 --- a/Minecraft.Client/Platform/Linux/Sentient/SentientManager.h +++ b/Minecraft.Client/Platform/Linux/Sentient/SentientManager.h @@ -26,45 +26,45 @@ public: HRESULT Flush(); - BOOL RecordPlayerSessionStart(DWORD dwUserId); - BOOL RecordPlayerSessionExit(DWORD dwUserId, int exitStatus); - BOOL RecordHeartBeat(DWORD dwUserId); - BOOL RecordLevelStart(DWORD dwUserId, ESen_FriendOrMatch friendsOrMatch, + bool RecordPlayerSessionStart(DWORD dwUserId); + bool RecordPlayerSessionExit(DWORD dwUserId, int exitStatus); + bool RecordHeartBeat(DWORD dwUserId); + bool RecordLevelStart(DWORD dwUserId, ESen_FriendOrMatch friendsOrMatch, ESen_CompeteOrCoop competeOrCoop, int difficulty, DWORD numberOfLocalPlayers, DWORD numberOfOnlinePlayers); - BOOL RecordLevelExit(DWORD dwUserId, ESen_LevelExitStatus levelExitStatus); - BOOL RecordLevelSaveOrCheckpoint(DWORD dwUserId, INT saveOrCheckPointID, + bool RecordLevelExit(DWORD dwUserId, ESen_LevelExitStatus levelExitStatus); + bool RecordLevelSaveOrCheckpoint(DWORD dwUserId, INT saveOrCheckPointID, INT saveSizeInBytes); - BOOL RecordLevelResume(DWORD dwUserId, ESen_FriendOrMatch friendsOrMatch, + bool RecordLevelResume(DWORD dwUserId, ESen_FriendOrMatch friendsOrMatch, ESen_CompeteOrCoop competeOrCoop, int difficulty, DWORD numberOfLocalPlayers, DWORD numberOfOnlinePlayers, INT saveOrCheckPointID); - BOOL RecordPauseOrInactive(DWORD dwUserId); - BOOL RecordUnpauseOrActive(DWORD dwUserId); - BOOL RecordMenuShown(DWORD dwUserId, INT menuID, INT optionalMenuSubID); - BOOL RecordAchievementUnlocked(DWORD dwUserId, INT achievementID, + bool RecordPauseOrInactive(DWORD dwUserId); + bool RecordUnpauseOrActive(DWORD dwUserId); + bool RecordMenuShown(DWORD dwUserId, INT menuID, INT optionalMenuSubID); + bool RecordAchievementUnlocked(DWORD dwUserId, INT achievementID, INT achievementGamerscore); - BOOL RecordMediaShareUpload(DWORD dwUserId, + bool RecordMediaShareUpload(DWORD dwUserId, ESen_MediaDestination mediaDestination, ESen_MediaType mediaType); - BOOL RecordUpsellPresented(DWORD dwUserId, ESen_UpsellID upsellId, + bool RecordUpsellPresented(DWORD dwUserId, ESen_UpsellID upsellId, INT marketplaceOfferID); - BOOL RecordUpsellResponded(DWORD dwUserId, ESen_UpsellID upsellId, + bool RecordUpsellResponded(DWORD dwUserId, ESen_UpsellID upsellId, INT marketplaceOfferID, ESen_UpsellOutcome upsellOutcome); - BOOL RecordPlayerDiedOrFailed(DWORD dwUserId, INT lowResMapX, + bool RecordPlayerDiedOrFailed(DWORD dwUserId, INT lowResMapX, INT lowResMapY, INT lowResMapZ, INT mapID, INT playerWeaponID, INT enemyWeaponID, ETelemetryChallenges enemyTypeID); - BOOL RecordEnemyKilledOrOvercome(DWORD dwUserId, INT lowResMapX, + bool RecordEnemyKilledOrOvercome(DWORD dwUserId, INT lowResMapX, INT lowResMapY, INT lowResMapZ, INT mapID, INT playerWeaponID, INT enemyWeaponID, ETelemetryChallenges enemyTypeID); - BOOL RecordSkinChanged(DWORD dwUserId, DWORD dwSkinId); - BOOL RecordBanLevel(DWORD dwUserId); - BOOL RecordUnBanLevel(DWORD dwUserId); + bool RecordSkinChanged(DWORD dwUserId, DWORD dwSkinId); + bool RecordBanLevel(DWORD dwUserId); + bool RecordUnBanLevel(DWORD dwUserId); INT GetMultiplayerInstanceID(); INT GenerateMultiplayerInstanceId(); diff --git a/Minecraft.Client/Platform/Linux/Sentient/SentientStats.h b/Minecraft.Client/Platform/Linux/Sentient/SentientStats.h index 7115e25d5..8b05924c3 100644 --- a/Minecraft.Client/Platform/Linux/Sentient/SentientStats.h +++ b/Minecraft.Client/Platform/Linux/Sentient/SentientStats.h @@ -12,77 +12,77 @@ // PlayerSessionStart // Player signed in or joined -BOOL SenStatPlayerSessionStart ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT TitleBuildID, INT SkeletonDistanceInInches, INT EnrollmentType, INT NumberOfSkeletonsInView ); +bool SenStatPlayerSessionStart ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT TitleBuildID, INT SkeletonDistanceInInches, INT EnrollmentType, INT NumberOfSkeletonsInView ); // PlayerSessionExit // Player signed out or left -BOOL SenStatPlayerSessionExit ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID ); +bool SenStatPlayerSessionExit ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID ); // HeartBeat // Sent every 60 seconds by title -BOOL SenStatHeartBeat ( DWORD dwUserID, INT SecondsSinceInitialize ); +bool SenStatHeartBeat ( DWORD dwUserID, INT SecondsSinceInitialize ); // LevelStart // Level started -BOOL SenStatLevelStart ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT SingleOrMultiplayer, INT FriendsOrMatch, INT CompeteOrCoop, INT DifficultyLevel, INT NumberOfLocalPlayers, INT NumberOfOnlinePlayers, INT License, INT DefaultGameControls, INT AudioSettings, INT SkeletonDistanceInInches, INT NumberOfSkeletonsInView ); +bool SenStatLevelStart ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT SingleOrMultiplayer, INT FriendsOrMatch, INT CompeteOrCoop, INT DifficultyLevel, INT NumberOfLocalPlayers, INT NumberOfOnlinePlayers, INT License, INT DefaultGameControls, INT AudioSettings, INT SkeletonDistanceInInches, INT NumberOfSkeletonsInView ); // LevelExit // Level exited -BOOL SenStatLevelExit ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT LevelExitStatus, INT LevelExitProgressStat1, INT LevelExitProgressStat2, INT LevelDurationInSeconds ); +bool SenStatLevelExit ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT LevelExitStatus, INT LevelExitProgressStat1, INT LevelExitProgressStat2, INT LevelDurationInSeconds ); // LevelSaveOrCheckpoint // Level saved explicitly or implicitly -BOOL SenStatLevelSaveOrCheckpoint ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT LevelExitProgressStat1, INT LevelExitProgressStat2, INT LevelDurationInSeconds, INT SaveOrCheckPointID ); +bool SenStatLevelSaveOrCheckpoint ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT LevelExitProgressStat1, INT LevelExitProgressStat2, INT LevelDurationInSeconds, INT SaveOrCheckPointID ); // LevelResume // Level resumed from a save or restarted at a checkpoint -BOOL SenStatLevelResume ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT SingleOrMultiplayer, INT FriendsOrMatch, INT CompeteOrCoop, INT DifficultyLevel, INT NumberOfLocalPlayers, INT NumberOfOnlinePlayers, INT License, INT DefaultGameControls, INT SaveOrCheckPointID, INT AudioSettings, INT SkeletonDistanceInInches, INT NumberOfSkeletonsInView ); +bool SenStatLevelResume ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT SingleOrMultiplayer, INT FriendsOrMatch, INT CompeteOrCoop, INT DifficultyLevel, INT NumberOfLocalPlayers, INT NumberOfOnlinePlayers, INT License, INT DefaultGameControls, INT SaveOrCheckPointID, INT AudioSettings, INT SkeletonDistanceInInches, INT NumberOfSkeletonsInView ); // PauseOrInactive // Player paused game or has become inactive, level and mode are for what the player is leaving -BOOL SenStatPauseOrInactive ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID ); +bool SenStatPauseOrInactive ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID ); // UnpauseOrActive // Player unpaused game or has become active, level and mode are for what the player is entering into -BOOL SenStatUnpauseOrActive ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID ); +bool SenStatUnpauseOrActive ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID ); // MenuShown // A menu screen or major menu area has been shown -BOOL SenStatMenuShown ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT MenuID, INT OptionalMenuSubID, INT LevelInstanceID, INT MultiplayerInstanceID ); +bool SenStatMenuShown ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT MenuID, INT OptionalMenuSubID, INT LevelInstanceID, INT MultiplayerInstanceID ); // AchievementUnlocked // An achievement was unlocked -BOOL SenStatAchievementUnlocked ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT AchievementID, INT AchievementGamerscore ); +bool SenStatAchievementUnlocked ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT AchievementID, INT AchievementGamerscore ); // MediaShareUpload // The user uploaded something to Kinect Share -BOOL SenStatMediaShareUpload ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT MediaDestination, INT MediaType ); +bool SenStatMediaShareUpload ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT MediaDestination, INT MediaType ); // UpsellPresented // The user is shown an upsell to purchase something -BOOL SenStatUpsellPresented ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT UpsellID, INT MarketplaceOfferID ); +bool SenStatUpsellPresented ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT UpsellID, INT MarketplaceOfferID ); // UpsellResponded // The user responded to the upsell -BOOL SenStatUpsellResponded ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT UpsellID, INT MarketplaceOfferID, INT UpsellOutcome ); +bool SenStatUpsellResponded ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT UpsellID, INT MarketplaceOfferID, INT UpsellOutcome ); // PlayerDiedOrFailed // The player died or failed a challenge - can be used for many types of failure -BOOL SenStatPlayerDiedOrFailed ( DWORD dwUserID, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT LowResMapX, INT LowResMapY, INT LowResMapZ, INT MapID, INT PlayerWeaponID, INT EnemyWeaponID, INT EnemyTypeID, INT SecondsSinceInitialize, INT CopyOfSecondsSinceInitialize ); +bool SenStatPlayerDiedOrFailed ( DWORD dwUserID, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT LowResMapX, INT LowResMapY, INT LowResMapZ, INT MapID, INT PlayerWeaponID, INT EnemyWeaponID, INT EnemyTypeID, INT SecondsSinceInitialize, INT CopyOfSecondsSinceInitialize ); // EnemyKilledOrOvercome // The player killed an enemy or overcame or solved a major challenge -BOOL SenStatEnemyKilledOrOvercome ( DWORD dwUserID, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT LowResMapX, INT LowResMapY, INT LowResMapZ, INT MapID, INT PlayerWeaponID, INT EnemyWeaponID, INT EnemyTypeID, INT SecondsSinceInitialize, INT CopyOfSecondsSinceInitialize ); +bool SenStatEnemyKilledOrOvercome ( DWORD dwUserID, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT LowResMapX, INT LowResMapY, INT LowResMapZ, INT MapID, INT PlayerWeaponID, INT EnemyWeaponID, INT EnemyTypeID, INT SecondsSinceInitialize, INT CopyOfSecondsSinceInitialize ); // SkinChanged // The player has changed their skin, level and mode are for what the player is currently in -BOOL SenStatSkinChanged ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT SkinID ); +bool SenStatSkinChanged ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT SkinID ); // BanLevel // The player has banned a level, level and mode are for what the player is currently in and banning -BOOL SenStatBanLevel ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID ); +bool SenStatBanLevel ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID ); // UnBanLevel // The player has ubbanned a level, level and mode are for what the player is currently in and unbanning -BOOL SenStatUnBanLevel ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID ); +bool SenStatUnBanLevel ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID ); diff --git a/Minecraft.Client/Platform/Linux/Stubs/d3d11_stubs.h b/Minecraft.Client/Platform/Linux/Stubs/d3d11_stubs.h index 4e922fcc9..80a468daa 100644 --- a/Minecraft.Client/Platform/Linux/Stubs/d3d11_stubs.h +++ b/Minecraft.Client/Platform/Linux/Stubs/d3d11_stubs.h @@ -36,7 +36,7 @@ typedef RECT D3D11_RECT; typedef void ID3D11RenderTargetView; typedef void ID3D11DepthStencilView; typedef void ID3D11Buffer; -// typedef DWORD (*PTHREAD_START_ROUTINE)( LPVOID lpThreadParameter); +// typedef DWORD (*PTHREAD_START_ROUTINE)( void* lpThreadParameter); // typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE; // Used only by windows/durango gdraw and UIController. Will be unnecessary once diff --git a/Minecraft.Client/Platform/Linux/Stubs/winapi_stubs.h b/Minecraft.Client/Platform/Linux/Stubs/winapi_stubs.h index d17686f2d..a828f6954 100644 --- a/Minecraft.Client/Platform/Linux/Stubs/winapi_stubs.h +++ b/Minecraft.Client/Platform/Linux/Stubs/winapi_stubs.h @@ -18,11 +18,7 @@ #define S_OK 0 typedef unsigned int DWORD; -typedef const char* LPCSTR; -typedef bool BOOL; -typedef BOOL* PBOOL; -typedef BOOL* LPBOOL; -typedef void* LPVOID; +typedef bool bool; typedef wchar_t WCHAR; typedef unsigned char BYTE; typedef BYTE* PBYTE; @@ -426,7 +422,7 @@ static inline HANDLE CreateFile(const wchar_t* lpFileName, dwFlagsAndAttributes, hTemplateFile); } -static inline BOOL CloseHandle(HANDLE hObject) { +static inline bool CloseHandle(HANDLE hObject) { if (hObject == INVALID_HANDLE_VALUE) return FALSE; return close((int)(intptr_t)hObject) == 0; } @@ -442,7 +438,7 @@ static inline DWORD GetFileSize(HANDLE hFile, DWORD* lpFileSizeHigh) { return (DWORD)(st.st_size & 0xFFFFFFFF); } -static inline BOOL GetFileSizeEx(HANDLE hFile, LARGE_INTEGER* lpFileSize) { +static inline bool GetFileSizeEx(HANDLE hFile, LARGE_INTEGER* lpFileSize) { struct stat st{}; if (fstat((int)(intptr_t)hFile, &st) != 0) return FALSE; if (lpFileSize) { @@ -453,7 +449,7 @@ static inline BOOL GetFileSizeEx(HANDLE hFile, LARGE_INTEGER* lpFileSize) { return TRUE; } -static inline BOOL ReadFile(HANDLE hFile, void* lpBuffer, +static inline bool ReadFile(HANDLE hFile, void* lpBuffer, DWORD nNumberOfBytesToRead, DWORD* lpNumberOfBytesRead, void* lpOverlapped) { ssize_t n = read((int)(intptr_t)hFile, lpBuffer, nNumberOfBytesToRead); @@ -461,7 +457,7 @@ static inline BOOL ReadFile(HANDLE hFile, void* lpBuffer, return n >= 0; } -static inline BOOL WriteFile(HANDLE hFile, const void* lpBuffer, +static inline bool WriteFile(HANDLE hFile, const void* lpBuffer, DWORD nNumberOfBytesToWrite, DWORD* lpNumberOfBytesWritten, void* lpOverlapped) { @@ -500,7 +496,7 @@ static inline DWORD GetFileAttributes(const char* lpFileName) { return GetFileAttributesA(lpFileName); } -static inline BOOL GetFileAttributesExA(const char* lpFileName, +static inline bool GetFileAttributesExA(const char* lpFileName, GET_FILEEX_INFO_LEVELS fInfoLevelId, void* lpFileInformation) { if (fInfoLevelId != GetFileExInfoStandard || !lpFileInformation) @@ -518,36 +514,36 @@ static inline BOOL GetFileAttributesExA(const char* lpFileName, return TRUE; } -static inline BOOL GetFileAttributesEx(const char* lpFileName, +static inline bool GetFileAttributesEx(const char* lpFileName, GET_FILEEX_INFO_LEVELS fInfoLevelId, void* lpFileInformation) { return GetFileAttributesExA(lpFileName, fInfoLevelId, lpFileInformation); } -static inline BOOL CreateDirectoryA(const char* lpPathName, +static inline bool CreateDirectoryA(const char* lpPathName, void* lpSecurityAttributes) { return mkdir(lpPathName, 0755) == 0; } -static inline BOOL CreateDirectory(const char* lpPathName, +static inline bool CreateDirectory(const char* lpPathName, void* lpSecurityAttributes) { return CreateDirectoryA(lpPathName, lpSecurityAttributes); } -static inline BOOL DeleteFileA(const char* lpFileName) { +static inline bool DeleteFileA(const char* lpFileName) { return unlink(lpFileName) == 0; } -static inline BOOL DeleteFile(const char* lpFileName) { +static inline bool DeleteFile(const char* lpFileName) { return DeleteFileA(lpFileName); } -static inline BOOL MoveFileA(const char* lpExistingFileName, +static inline bool MoveFileA(const char* lpExistingFileName, const char* lpNewFileName) { return rename(lpExistingFileName, lpNewFileName) == 0; } -static inline BOOL MoveFile(const char* lpExistingFileName, +static inline bool MoveFile(const char* lpExistingFileName, const char* lpNewFileName) { return MoveFileA(lpExistingFileName, lpNewFileName); } @@ -613,7 +609,7 @@ static inline HANDLE FindFirstFile(const char* lpFileName, } // https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-findnextfilea -static inline BOOL FindNextFileA(HANDLE hFindFile, +static inline bool FindNextFileA(HANDLE hFindFile, WIN32_FIND_DATAA* lpFindFileData) { if (hFindFile == INVALID_HANDLE_VALUE || !lpFindFileData) return FALSE; _LINUXSTUBS_FIND_HANDLE* fh = (_LINUXSTUBS_FIND_HANDLE*)hFindFile; @@ -639,13 +635,13 @@ static inline BOOL FindNextFileA(HANDLE hFindFile, return FALSE; } -static inline BOOL FindNextFile(HANDLE hFindFile, +static inline bool FindNextFile(HANDLE hFindFile, WIN32_FIND_DATAA* lpFindFileData) { return FindNextFileA(hFindFile, lpFindFileData); } // https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-findclose -static inline BOOL FindClose(HANDLE hFindFile) { +static inline bool FindClose(HANDLE hFindFile) { if (hFindFile == INVALID_HANDLE_VALUE) return FALSE; _LINUXSTUBS_FIND_HANDLE* fh = (_LINUXSTUBS_FIND_HANDLE*)hFindFile; closedir(fh->dir); @@ -707,7 +703,7 @@ static inline VOID GetLocalTime(LPSYSTEMTIME lpSystemTime) { } // https://learn.microsoft.com/en-us/windows/win32/api/timezoneapi/nf-timezoneapi-systemtimetofiletime -static inline BOOL SystemTimeToFileTime(const SYSTEMTIME* lpSystemTime, +static inline bool SystemTimeToFileTime(const SYSTEMTIME* lpSystemTime, LPFILETIME lpFileTime) { struct tm tm = {}; tm.tm_year = lpSystemTime->wYear - 1900; @@ -728,7 +724,7 @@ static inline BOOL SystemTimeToFileTime(const SYSTEMTIME* lpSystemTime, } // https://learn.microsoft.com/en-us/windows/win32/api/timezoneapi/nf-timezoneapi-filetimetosystemtime -static inline BOOL FileTimeToSystemTime(const FILETIME* lpFileTime, +static inline bool FileTimeToSystemTime(const FILETIME* lpFileTime, LPSYSTEMTIME lpSystemTime) { ULONGLONG ft = ((ULONGLONG)lpFileTime->dwHighDateTime << 32) | lpFileTime->dwLowDateTime; @@ -748,13 +744,13 @@ static inline DWORD GetTickCount() { return (long long)ts.tv_sec * 1000 + (long long)ts.tv_nsec / 1000000; } -static inline BOOL QueryPerformanceFrequency(LARGE_INTEGER* lpFrequency) { +static inline bool QueryPerformanceFrequency(LARGE_INTEGER* lpFrequency) { // nanoseconds lpFrequency->QuadPart = 1000000000; return false; } -static inline BOOL QueryPerformanceCounter(LARGE_INTEGER* lpPerformanceCount) { +static inline bool QueryPerformanceCounter(LARGE_INTEGER* lpPerformanceCount) { struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); @@ -766,7 +762,7 @@ static inline BOOL QueryPerformanceCounter(LARGE_INTEGER* lpPerformanceCount) { } // https://learn.microsoft.com/en-us/windows/win32/api/debugapi/nf-debugapi-outputdebugstringa -static inline VOID OutputDebugStringA(LPCSTR lpOutputString) { +static inline VOID OutputDebugStringA(const char* lpOutputString) { if (!lpOutputString) return; fputs(lpOutputString, stderr); } @@ -777,7 +773,7 @@ static inline VOID OutputDebugStringW(LPCWSTR lpOutputString) { fprintf(stderr, "%ls", lpOutputString); } -static inline VOID OutputDebugString(LPCSTR lpOutputString) { +static inline VOID OutputDebugString(const char* lpOutputString) { return OutputDebugStringA(lpOutputString); } @@ -797,12 +793,12 @@ static inline HANDLE CreateEvent(int manual_reset, int initial_state) { return (HANDLE)ev; } -static inline HANDLE CreateEvent(void*, BOOL manual_reset, BOOL initial_state, +static inline HANDLE CreateEvent(void*, bool manual_reset, bool initial_state, void*) { return CreateEvent(manual_reset, initial_state); } -static inline BOOL SetEvent(HANDLE hEvent) { +static inline bool SetEvent(HANDLE hEvent) { Event* ev = (Event*)hEvent; if (!ev) return FALSE; pthread_mutex_lock(&ev->mutex); @@ -815,7 +811,7 @@ static inline BOOL SetEvent(HANDLE hEvent) { return TRUE; } -static inline BOOL ResetEvent(HANDLE hEvent) { +static inline bool ResetEvent(HANDLE hEvent) { Event* ev = (Event*)hEvent; if (!ev) return FALSE; pthread_mutex_lock(&ev->mutex); @@ -874,7 +870,7 @@ static inline DWORD WaitForSingleObject(HANDLE hHandle, DWORD dwMilliseconds) { static inline DWORD WaitForMultipleObjects(DWORD nCount, const HANDLE* lpHandles, - BOOL bWaitAll, + bool bWaitAll, DWORD dwMilliseconds) { if (bWaitAll) { for (DWORD i = 0; i < nCount; i++) @@ -1005,13 +1001,13 @@ static inline DWORD ResumeThread(HANDLE hThread) { return 0; } -static inline BOOL SetThreadPriority(HANDLE hThread, int nPriority) { +static inline bool SetThreadPriority(HANDLE hThread, int nPriority) { (void)hThread; (void)nPriority; return TRUE; } -static inline BOOL GetExitCodeThread(HANDLE hThread, DWORD* lpExitCode) { +static inline bool GetExitCodeThread(HANDLE hThread, DWORD* lpExitCode) { LinuxThread* lt = (LinuxThread*)hThread; if (!lt || !lpExitCode) return FALSE; *lpExitCode = lt->exitCode; @@ -1060,9 +1056,9 @@ static inline int swprintf_s(wchar_t* buf, size_t sz, const wchar_t* fmt, ...) { return ret; } -static inline HMODULE GetModuleHandle(LPCSTR lpModuleName) { return 0; } +static inline HMODULE GetModuleHandle(const char* lpModuleName) { return 0; } -static inline LPVOID VirtualAlloc(LPVOID lpAddress, SIZE_T dwSize, +static inline void* VirtualAlloc(void* lpAddress, SIZE_T dwSize, DWORD flAllocationType, DWORD flProtect) { // MEM_COMMIT | MEM_RESERVE → mmap anonymous int prot = 0; @@ -1083,7 +1079,7 @@ static inline LPVOID VirtualAlloc(LPVOID lpAddress, SIZE_T dwSize, return p; } -static inline BOOL VirtualFree(LPVOID lpAddress, SIZE_T dwSize, +static inline bool VirtualFree(void* lpAddress, SIZE_T dwSize, DWORD dwFreeType) { if (lpAddress == NULL) return FALSE; // MEM_RELEASE (0x8000) frees the whole region diff --git a/Minecraft.Client/Platform/Windows64/4JLibs/inc/4J_Input.h b/Minecraft.Client/Platform/Windows64/4JLibs/inc/4J_Input.h index 51e79b098..2a2a7895c 100644 --- a/Minecraft.Client/Platform/Windows64/4JLibs/inc/4J_Input.h +++ b/Minecraft.Client/Platform/Windows64/4JLibs/inc/4J_Input.h @@ -107,8 +107,8 @@ public: void SetMenuDisplayed(int iPad, bool bVal); -// EKeyboardResult RequestKeyboard(UINT uiTitle, UINT uiText, UINT uiDesc, DWORD dwPad, WCHAR *pwchResult, UINT uiResultSize,int( *Func)(LPVOID,const bool),LPVOID lpParam,EKeyboardMode eMode,C4JStringTable *pStringTable=NULL); -// EKeyboardResult RequestKeyboard(UINT uiTitle, LPCWSTR pwchDefault, UINT uiDesc, DWORD dwPad, WCHAR *pwchResult, UINT uiResultSize,int( *Func)(LPVOID,const bool),LPVOID lpParam, EKeyboardMode eMode,C4JStringTable *pStringTable=NULL); +// EKeyboardResult RequestKeyboard(UINT uiTitle, UINT uiText, UINT uiDesc, DWORD dwPad, WCHAR *pwchResult, UINT uiResultSize,int( *Func)(void*,const bool),void* lpParam,EKeyboardMode eMode,C4JStringTable *pStringTable=NULL); +// EKeyboardResult RequestKeyboard(UINT uiTitle, LPCWSTR pwchDefault, UINT uiDesc, DWORD dwPad, WCHAR *pwchResult, UINT uiResultSize,int( *Func)(void*,const bool),void* lpParam, EKeyboardMode eMode,C4JStringTable *pStringTable=NULL); EKeyboardResult RequestKeyboard(const wchar_t *Title, const wchar_t *Text, int iPad, unsigned int uiMaxChars, int( *Func)(void *,const bool), void *lpParam, C_4JInput::EKeyboardMode eMode); void GetText(uint16_t *UTF16String); diff --git a/Minecraft.Client/Platform/Windows64/4JLibs/inc/4J_Profile.h b/Minecraft.Client/Platform/Windows64/4JLibs/inc/4J_Profile.h index 4e6fc606c..1e6b5c7be 100644 --- a/Minecraft.Client/Platform/Windows64/4JLibs/inc/4J_Profile.h +++ b/Minecraft.Client/Platform/Windows64/4JLibs/inc/4J_Profile.h @@ -54,21 +54,21 @@ public: bool IsSignedIn(int iQuadrant); bool IsSignedInLive(int iProf); bool IsGuest(int iQuadrant); - UINT RequestSignInUI(bool bFromInvite,bool bLocalGame,bool bNoGuestsAllowed,bool bMultiplayerSignIn,bool bAddUser, int( *Func)(LPVOID,const bool, const int iPad),LPVOID lpParam,int iQuadrant=XUSER_INDEX_ANY); - UINT DisplayOfflineProfile(int( *Func)(LPVOID,const bool, const int iPad),LPVOID lpParam,int iQuadrant=XUSER_INDEX_ANY); - UINT RequestConvertOfflineToGuestUI(int( *Func)(LPVOID,const bool, const int iPad),LPVOID lpParam,int iQuadrant=XUSER_INDEX_ANY); + UINT RequestSignInUI(bool bFromInvite,bool bLocalGame,bool bNoGuestsAllowed,bool bMultiplayerSignIn,bool bAddUser, int( *Func)(void*,const bool, const int iPad),void* lpParam,int iQuadrant=XUSER_INDEX_ANY); + UINT DisplayOfflineProfile(int( *Func)(void*,const bool, const int iPad),void* lpParam,int iQuadrant=XUSER_INDEX_ANY); + UINT RequestConvertOfflineToGuestUI(int( *Func)(void*,const bool, const int iPad),void* lpParam,int iQuadrant=XUSER_INDEX_ANY); void SetPrimaryPlayerChanged(bool bVal); bool QuerySigninStatus(void); void GetXUID(int iPad, PlayerUID *pXuid,bool bOnlineXuid); - BOOL AreXUIDSEqual(PlayerUID xuid1,PlayerUID xuid2); - BOOL XUIDIsGuest(PlayerUID xuid); + bool AreXUIDSEqual(PlayerUID xuid1,PlayerUID xuid2); + bool XUIDIsGuest(PlayerUID xuid); bool AllowedToPlayMultiplayer(int iProf); bool GetChatAndContentRestrictions(int iPad,bool *pbChatRestricted,bool *pbContentRestricted,int *piAge); void StartTrialGame(); // disables saves and leaderboard, and change state to readyforgame from pregame - void AllowedPlayerCreatedContent(int iPad, bool thisQuadrantOnly, BOOL *allAllowed, BOOL *friendsAllowed); - BOOL CanViewPlayerCreatedContent(int iPad, bool thisQuadrantOnly, PPlayerUID pXuids, DWORD dwXuidCount ); + void AllowedPlayerCreatedContent(int iPad, bool thisQuadrantOnly, bool *allAllowed, bool *friendsAllowed); + bool CanViewPlayerCreatedContent(int iPad, bool thisQuadrantOnly, PPlayerUID pXuids, DWORD dwXuidCount ); void ShowProfileCard(int iPad, PlayerUID targetUid); - bool GetProfileAvatar(int iPad,int( *Func)(LPVOID lpParam,PBYTE pbThumbnail,DWORD dwThumbnailBytes), LPVOID lpParam); + bool GetProfileAvatar(int iPad,int( *Func)(void* lpParam,PBYTE pbThumbnail,DWORD dwThumbnailBytes), void* lpParam); void CancelProfileAvatarRequest(); @@ -78,18 +78,18 @@ public: char* GetGamertag(int iPad); std::wstring GetDisplayName(int iPad); bool IsFullVersion(); - void SetSignInChangeCallback(void ( *Func)(LPVOID, bool, unsigned int),LPVOID lpParam); - void SetNotificationsCallback(void ( *Func)(LPVOID, DWORD, unsigned int),LPVOID lpParam); + void SetSignInChangeCallback(void ( *Func)(void*, bool, unsigned int),void* lpParam); + void SetNotificationsCallback(void ( *Func)(void*, DWORD, unsigned int),void* lpParam); bool RegionIsNorthAmerica(void); bool LocaleIsUSorCanada(void); HRESULT GetLiveConnectionStatus(); bool IsSystemUIDisplayed(); - void SetProfileReadErrorCallback(void ( *Func)(LPVOID), LPVOID lpParam); + void SetProfileReadErrorCallback(void ( *Func)(void*), void* lpParam); // PROFILE DATA - int SetDefaultOptionsCallback(int( *Func)(LPVOID,PROFILESETTINGS *, const int iPad),LPVOID lpParam); - int SetOldProfileVersionCallback(int( *Func)(LPVOID,unsigned char *, const unsigned short,const int),LPVOID lpParam); + int SetDefaultOptionsCallback(int( *Func)(void*,PROFILESETTINGS *, const int iPad),void* lpParam); + int SetOldProfileVersionCallback(int( *Func)(void*,unsigned char *, const unsigned short,const int),void* lpParam); PROFILESETTINGS * GetDashboardProfileSettings(int iPad); void WriteToProfile(int iQuadrant, bool bGameDefinedDataChanged=false, bool bOverride5MinuteLimitOnProfileWrites=false); void ForceQueuedProfileWrites(int iPad=XUSER_INDEX_ANY); @@ -116,7 +116,7 @@ public: // PURCHASE void DisplayFullVersionPurchase(bool bRequired, int iQuadrant, int iUpsellParam = -1); - void SetUpsellCallback(void ( *Func)(LPVOID lpParam, eUpsellType type, eUpsellResponse response, int iUserData),LPVOID lpParam); + void SetUpsellCallback(void ( *Func)(void* lpParam, eUpsellType type, eUpsellResponse response, int iUserData),void* lpParam); // Debug void SetDebugFullOverride(bool bVal); // To override the license version (trail/full). Only in debug/release, not ContentPackage diff --git a/Minecraft.Client/Platform/Windows64/4JLibs/inc/4J_Storage.h b/Minecraft.Client/Platform/Windows64/4JLibs/inc/4J_Storage.h index 9577ff706..4d3a821f3 100644 --- a/Minecraft.Client/Platform/Windows64/4JLibs/inc/4J_Storage.h +++ b/Minecraft.Client/Platform/Windows64/4JLibs/inc/4J_Storage.h @@ -239,31 +239,31 @@ public: // Messages C4JStorage::EMessageResult RequestMessageBox(UINT uiTitle, UINT uiText, UINT *uiOptionA,UINT uiOptionC, DWORD dwPad=XUSER_INDEX_ANY, - int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)=NULL,LPVOID lpParam=NULL, C4JStringTable *pStringTable=NULL, WCHAR *pwchFormatString=NULL,DWORD dwFocusButton=0); + int( *Func)(void*,int,const C4JStorage::EMessageResult)=NULL,void* lpParam=NULL, C4JStringTable *pStringTable=NULL, WCHAR *pwchFormatString=NULL,DWORD dwFocusButton=0); C4JStorage::EMessageResult GetMessageBoxResult(); // save device - bool SetSaveDevice(int( *Func)(LPVOID,const bool),LPVOID lpParam, bool bForceResetOfSaveDevice=false); + bool SetSaveDevice(int( *Func)(void*,const bool),void* lpParam, bool bForceResetOfSaveDevice=false); // savegame - void Init(unsigned int uiSaveVersion,LPCWSTR pwchDefaultSaveName,char *pszSavePackName,int iMinimumSaveSize,int( *Func)(LPVOID, const ESavingMessage, int),LPVOID lpParam,LPCSTR szGroupID); + void Init(unsigned int uiSaveVersion,LPCWSTR pwchDefaultSaveName,char *pszSavePackName,int iMinimumSaveSize,int( *Func)(void*, const ESavingMessage, int),void* lpParam,const char* szGroupID); void ResetSaveData(); // Call before a new save to clear out stored save file name void SetDefaultSaveNameForKeyboardDisplay(LPCWSTR pwchDefaultSaveName); void SetSaveTitle(LPCWSTR pwchDefaultSaveName); bool GetSaveUniqueNumber(INT *piVal); bool GetSaveUniqueFilename(char *pszName); void SetSaveUniqueFilename(char *szFilename); - void SetState(ESaveGameControlState eControlState,int( *Func)(LPVOID,const bool),LPVOID lpParam); + void SetState(ESaveGameControlState eControlState,int( *Func)(void*,const bool),void* lpParam); void SetSaveDisabled(bool bDisable); bool GetSaveDisabled(void); unsigned int GetSaveSize(); void GetSaveData(void *pvData,unsigned int *puiBytes); PVOID AllocateSaveData(unsigned int uiBytes); void SetSaveImages( PBYTE pbThumbnail,DWORD dwThumbnailBytes,PBYTE pbImage,DWORD dwImageBytes, PBYTE pbTextData ,DWORD dwTextDataBytes); // Sets the thumbnail & image for the save, optionally setting the metadata in the png - C4JStorage::ESaveGameState SaveSaveData(int( *Func)(LPVOID ,const bool),LPVOID lpParam); - void CopySaveDataToNewSave(PBYTE pbThumbnail,DWORD cbThumbnail,WCHAR *wchNewName,int ( *Func)(LPVOID lpParam, bool), LPVOID lpParam); + C4JStorage::ESaveGameState SaveSaveData(int( *Func)(void* ,const bool),void* lpParam); + void CopySaveDataToNewSave(PBYTE pbThumbnail,DWORD cbThumbnail,WCHAR *wchNewName,int ( *Func)(void* lpParam, bool), void* lpParam); void SetSaveDeviceSelected(unsigned int uiPad,bool bSelected); bool GetSaveDeviceSelected(unsigned int iPad); C4JStorage::ESaveGameState DoesSaveExist(bool *pbExists); @@ -271,50 +271,50 @@ public: void SetSaveMessageVPosition(float fY); // The 'Saving' message will display at a default position unless changed // Get the info for the saves - C4JStorage::ESaveGameState GetSavesInfo(int iPad,int ( *Func)(LPVOID lpParam,SAVE_DETAILS *pSaveDetails,const bool),LPVOID lpParam,char *pszSavePackName); + C4JStorage::ESaveGameState GetSavesInfo(int iPad,int ( *Func)(void* lpParam,SAVE_DETAILS *pSaveDetails,const bool),void* lpParam,char *pszSavePackName); PSAVE_DETAILS ReturnSavesInfo(); void ClearSavesInfo(); // Clears results - C4JStorage::ESaveGameState LoadSaveDataThumbnail(PSAVE_INFO pSaveInfo,int( *Func)(LPVOID lpParam,PBYTE pbThumbnail,DWORD dwThumbnailBytes), LPVOID lpParam); // Get the thumbnail for an individual save referenced by pSaveInfo + C4JStorage::ESaveGameState LoadSaveDataThumbnail(PSAVE_INFO pSaveInfo,int( *Func)(void* lpParam,PBYTE pbThumbnail,DWORD dwThumbnailBytes), void* lpParam); // Get the thumbnail for an individual save referenced by pSaveInfo void GetSaveCacheFileInfo(DWORD dwFile,XCONTENT_DATA &xContentData); void GetSaveCacheFileInfo(DWORD dwFile, PBYTE *ppbImageData, DWORD *pdwImageBytes); // Load the save. Need to call GetSaveData once the callback is called - C4JStorage::ESaveGameState LoadSaveData(PSAVE_INFO pSaveInfo,int( *Func)(LPVOID lpParam,const bool, const bool), LPVOID lpParam); - C4JStorage::ESaveGameState DeleteSaveData(PSAVE_INFO pSaveInfo,int( *Func)(LPVOID lpParam,const bool), LPVOID lpParam); + C4JStorage::ESaveGameState LoadSaveData(PSAVE_INFO pSaveInfo,int( *Func)(void* lpParam,const bool, const bool), void* lpParam); + C4JStorage::ESaveGameState DeleteSaveData(PSAVE_INFO pSaveInfo,int( *Func)(void* lpParam,const bool), void* lpParam); // DLC - void RegisterMarketplaceCountsCallback(int ( *Func)(LPVOID lpParam, C4JStorage::DLC_TMS_DETAILS *, int), LPVOID lpParam ); + void RegisterMarketplaceCountsCallback(int ( *Func)(void* lpParam, C4JStorage::DLC_TMS_DETAILS *, int), void* lpParam ); void SetDLCPackageRoot(char *pszDLCRoot); - C4JStorage::EDLCStatus GetDLCOffers(int iPad,int( *Func)(LPVOID, int, DWORD, int),LPVOID lpParam, DWORD dwOfferTypesBitmask=XMARKETPLACE_OFFERING_TYPE_CONTENT); + C4JStorage::EDLCStatus GetDLCOffers(int iPad,int( *Func)(void*, int, DWORD, int),void* lpParam, DWORD dwOfferTypesBitmask=XMARKETPLACE_OFFERING_TYPE_CONTENT); DWORD CancelGetDLCOffers(); void ClearDLCOffers(); XMARKETPLACE_CONTENTOFFER_INFO& GetOffer(DWORD dw); int GetOfferCount(); - DWORD InstallOffer(int iOfferIDC, uint64_t *ullOfferIDA,int( *Func)(LPVOID, int, int),LPVOID lpParam, bool bTrial=false); + DWORD InstallOffer(int iOfferIDC, uint64_t *ullOfferIDA,int( *Func)(void*, int, int),void* lpParam, bool bTrial=false); DWORD GetAvailableDLCCount( int iPad); - C4JStorage::EDLCStatus GetInstalledDLC(int iPad,int( *Func)(LPVOID, int, int),LPVOID lpParam); + C4JStorage::EDLCStatus GetInstalledDLC(int iPad,int( *Func)(void*, int, int),void* lpParam); XCONTENT_DATA& GetDLC(DWORD dw); - DWORD MountInstalledDLC(int iPad,DWORD dwDLC,int( *Func)(LPVOID, int, DWORD,DWORD),LPVOID lpParam,LPCSTR szMountDrive=NULL); - DWORD UnmountInstalledDLC(LPCSTR szMountDrive = NULL); + DWORD MountInstalledDLC(int iPad,DWORD dwDLC,int( *Func)(void*, int, DWORD,DWORD),void* lpParam,const char* szMountDrive=NULL); + DWORD UnmountInstalledDLC(const char* szMountDrive = NULL); void GetMountedDLCFileList(const char* szMountDrive, std::vector& fileList); std::string GetMountedPath(std::string szMount); // Global title storage C4JStorage::ETMSStatus ReadTMSFile(int iQuadrant,eGlobalStorage eStorageFacility,C4JStorage::eTMS_FileType eFileType, - WCHAR *pwchFilename,BYTE **ppBuffer,DWORD *pdwBufferSize,int( *Func)(LPVOID, WCHAR *,int, bool, int)=NULL,LPVOID lpParam=NULL, int iAction=0); + WCHAR *pwchFilename,BYTE **ppBuffer,DWORD *pdwBufferSize,int( *Func)(void*, WCHAR *,int, bool, int)=NULL,void* lpParam=NULL, int iAction=0); bool WriteTMSFile(int iQuadrant,eGlobalStorage eStorageFacility,WCHAR *pwchFilename,BYTE *pBuffer,DWORD dwBufferSize); bool DeleteTMSFile(int iQuadrant,eGlobalStorage eStorageFacility,WCHAR *pwchFilename); void StoreTMSPathName(WCHAR *pwchName=NULL); // TMS++ - // C4JStorage::ETMSStatus TMSPP_WriteFile(int iPad,C4JStorage::eGlobalStorage eStorageFacility,C4JStorage::eTMS_FILETYPEVAL eFileTypeVal,C4JStorage::eTMS_UGCTYPE eUGCType,CHAR *pchFilePath,CHAR *pchBuffer,DWORD dwBufferSize,int( *Func)(LPVOID,int,int)=NULL,LPVOID lpParam=NULL, int iUserData=0); - // C4JStorage::ETMSStatus TMSPP_GetUserQuotaInfo(int iPad,TMSCLIENT_CALLBACK Func,LPVOID lpParam, int iUserData=0); - C4JStorage::ETMSStatus TMSPP_ReadFile(int iPad,C4JStorage::eGlobalStorage eStorageFacility,C4JStorage::eTMS_FILETYPEVAL eFileTypeVal,LPCSTR szFilename,int( *Func)(LPVOID,int,int,PTMSPP_FILEDATA, LPCSTR)=NULL,LPVOID lpParam=NULL, int iUserData=0); - // C4JStorage::ETMSStatus TMSPP_ReadFileList(int iPad,C4JStorage::eGlobalStorage eStorageFacility,CHAR *pchFilePath,int( *Func)(LPVOID,int,int,PTMSPP_FILE_LIST)=NULL,LPVOID lpParam=NULL, int iUserData=0); - // C4JStorage::ETMSStatus TMSPP_DeleteFile(int iPad,LPCSTR szFilePath,C4JStorage::eTMS_FILETYPEVAL eFileTypeVal,int( *Func)(LPVOID,int,int),LPVOID lpParam=NULL, int iUserData=0); + // C4JStorage::ETMSStatus TMSPP_WriteFile(int iPad,C4JStorage::eGlobalStorage eStorageFacility,C4JStorage::eTMS_FILETYPEVAL eFileTypeVal,C4JStorage::eTMS_UGCTYPE eUGCType,CHAR *pchFilePath,CHAR *pchBuffer,DWORD dwBufferSize,int( *Func)(void*,int,int)=NULL,void* lpParam=NULL, int iUserData=0); + // C4JStorage::ETMSStatus TMSPP_GetUserQuotaInfo(int iPad,TMSCLIENT_CALLBACK Func,void* lpParam, int iUserData=0); + C4JStorage::ETMSStatus TMSPP_ReadFile(int iPad,C4JStorage::eGlobalStorage eStorageFacility,C4JStorage::eTMS_FILETYPEVAL eFileTypeVal,const char* szFilename,int( *Func)(void*,int,int,PTMSPP_FILEDATA, const char*)=NULL,void* lpParam=NULL, int iUserData=0); + // C4JStorage::ETMSStatus TMSPP_ReadFileList(int iPad,C4JStorage::eGlobalStorage eStorageFacility,CHAR *pchFilePath,int( *Func)(void*,int,int,PTMSPP_FILE_LIST)=NULL,void* lpParam=NULL, int iUserData=0); + // C4JStorage::ETMSStatus TMSPP_DeleteFile(int iPad,const char* szFilePath,C4JStorage::eTMS_FILETYPEVAL eFileTypeVal,int( *Func)(void*,int,int),void* lpParam=NULL, int iUserData=0); // bool TMSPP_InFileList(eGlobalStorage eStorageFacility, int iPad,const std::wstring &Filename); // unsigned int CRC(unsigned char *buf, int len); diff --git a/Minecraft.Client/Platform/Windows64/Sentient/SentientManager.h b/Minecraft.Client/Platform/Windows64/Sentient/SentientManager.h index 09181c170..2c0c2ddfd 100644 --- a/Minecraft.Client/Platform/Windows64/Sentient/SentientManager.h +++ b/Minecraft.Client/Platform/Windows64/Sentient/SentientManager.h @@ -26,45 +26,45 @@ public: HRESULT Flush(); - BOOL RecordPlayerSessionStart(DWORD dwUserId); - BOOL RecordPlayerSessionExit(DWORD dwUserId, int exitStatus); - BOOL RecordHeartBeat(DWORD dwUserId); - BOOL RecordLevelStart(DWORD dwUserId, ESen_FriendOrMatch friendsOrMatch, + bool RecordPlayerSessionStart(DWORD dwUserId); + bool RecordPlayerSessionExit(DWORD dwUserId, int exitStatus); + bool RecordHeartBeat(DWORD dwUserId); + bool RecordLevelStart(DWORD dwUserId, ESen_FriendOrMatch friendsOrMatch, ESen_CompeteOrCoop competeOrCoop, int difficulty, DWORD numberOfLocalPlayers, DWORD numberOfOnlinePlayers); - BOOL RecordLevelExit(DWORD dwUserId, ESen_LevelExitStatus levelExitStatus); - BOOL RecordLevelSaveOrCheckpoint(DWORD dwUserId, INT saveOrCheckPointID, + bool RecordLevelExit(DWORD dwUserId, ESen_LevelExitStatus levelExitStatus); + bool RecordLevelSaveOrCheckpoint(DWORD dwUserId, INT saveOrCheckPointID, INT saveSizeInBytes); - BOOL RecordLevelResume(DWORD dwUserId, ESen_FriendOrMatch friendsOrMatch, + bool RecordLevelResume(DWORD dwUserId, ESen_FriendOrMatch friendsOrMatch, ESen_CompeteOrCoop competeOrCoop, int difficulty, DWORD numberOfLocalPlayers, DWORD numberOfOnlinePlayers, INT saveOrCheckPointID); - BOOL RecordPauseOrInactive(DWORD dwUserId); - BOOL RecordUnpauseOrActive(DWORD dwUserId); - BOOL RecordMenuShown(DWORD dwUserId, INT menuID, INT optionalMenuSubID); - BOOL RecordAchievementUnlocked(DWORD dwUserId, INT achievementID, + bool RecordPauseOrInactive(DWORD dwUserId); + bool RecordUnpauseOrActive(DWORD dwUserId); + bool RecordMenuShown(DWORD dwUserId, INT menuID, INT optionalMenuSubID); + bool RecordAchievementUnlocked(DWORD dwUserId, INT achievementID, INT achievementGamerscore); - BOOL RecordMediaShareUpload(DWORD dwUserId, + bool RecordMediaShareUpload(DWORD dwUserId, ESen_MediaDestination mediaDestination, ESen_MediaType mediaType); - BOOL RecordUpsellPresented(DWORD dwUserId, ESen_UpsellID upsellId, + bool RecordUpsellPresented(DWORD dwUserId, ESen_UpsellID upsellId, INT marketplaceOfferID); - BOOL RecordUpsellResponded(DWORD dwUserId, ESen_UpsellID upsellId, + bool RecordUpsellResponded(DWORD dwUserId, ESen_UpsellID upsellId, INT marketplaceOfferID, ESen_UpsellOutcome upsellOutcome); - BOOL RecordPlayerDiedOrFailed(DWORD dwUserId, INT lowResMapX, + bool RecordPlayerDiedOrFailed(DWORD dwUserId, INT lowResMapX, INT lowResMapY, INT lowResMapZ, INT mapID, INT playerWeaponID, INT enemyWeaponID, ETelemetryChallenges enemyTypeID); - BOOL RecordEnemyKilledOrOvercome(DWORD dwUserId, INT lowResMapX, + bool RecordEnemyKilledOrOvercome(DWORD dwUserId, INT lowResMapX, INT lowResMapY, INT lowResMapZ, INT mapID, INT playerWeaponID, INT enemyWeaponID, ETelemetryChallenges enemyTypeID); - BOOL RecordSkinChanged(DWORD dwUserId, DWORD dwSkinId); - BOOL RecordBanLevel(DWORD dwUserId); - BOOL RecordUnBanLevel(DWORD dwUserId); + bool RecordSkinChanged(DWORD dwUserId, DWORD dwSkinId); + bool RecordBanLevel(DWORD dwUserId); + bool RecordUnBanLevel(DWORD dwUserId); INT GetMultiplayerInstanceID(); INT GenerateMultiplayerInstanceId(); diff --git a/Minecraft.Client/Platform/Windows64/Sentient/SentientStats.h b/Minecraft.Client/Platform/Windows64/Sentient/SentientStats.h index 7115e25d5..8b05924c3 100644 --- a/Minecraft.Client/Platform/Windows64/Sentient/SentientStats.h +++ b/Minecraft.Client/Platform/Windows64/Sentient/SentientStats.h @@ -12,77 +12,77 @@ // PlayerSessionStart // Player signed in or joined -BOOL SenStatPlayerSessionStart ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT TitleBuildID, INT SkeletonDistanceInInches, INT EnrollmentType, INT NumberOfSkeletonsInView ); +bool SenStatPlayerSessionStart ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT TitleBuildID, INT SkeletonDistanceInInches, INT EnrollmentType, INT NumberOfSkeletonsInView ); // PlayerSessionExit // Player signed out or left -BOOL SenStatPlayerSessionExit ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID ); +bool SenStatPlayerSessionExit ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID ); // HeartBeat // Sent every 60 seconds by title -BOOL SenStatHeartBeat ( DWORD dwUserID, INT SecondsSinceInitialize ); +bool SenStatHeartBeat ( DWORD dwUserID, INT SecondsSinceInitialize ); // LevelStart // Level started -BOOL SenStatLevelStart ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT SingleOrMultiplayer, INT FriendsOrMatch, INT CompeteOrCoop, INT DifficultyLevel, INT NumberOfLocalPlayers, INT NumberOfOnlinePlayers, INT License, INT DefaultGameControls, INT AudioSettings, INT SkeletonDistanceInInches, INT NumberOfSkeletonsInView ); +bool SenStatLevelStart ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT SingleOrMultiplayer, INT FriendsOrMatch, INT CompeteOrCoop, INT DifficultyLevel, INT NumberOfLocalPlayers, INT NumberOfOnlinePlayers, INT License, INT DefaultGameControls, INT AudioSettings, INT SkeletonDistanceInInches, INT NumberOfSkeletonsInView ); // LevelExit // Level exited -BOOL SenStatLevelExit ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT LevelExitStatus, INT LevelExitProgressStat1, INT LevelExitProgressStat2, INT LevelDurationInSeconds ); +bool SenStatLevelExit ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT LevelExitStatus, INT LevelExitProgressStat1, INT LevelExitProgressStat2, INT LevelDurationInSeconds ); // LevelSaveOrCheckpoint // Level saved explicitly or implicitly -BOOL SenStatLevelSaveOrCheckpoint ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT LevelExitProgressStat1, INT LevelExitProgressStat2, INT LevelDurationInSeconds, INT SaveOrCheckPointID ); +bool SenStatLevelSaveOrCheckpoint ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT LevelExitProgressStat1, INT LevelExitProgressStat2, INT LevelDurationInSeconds, INT SaveOrCheckPointID ); // LevelResume // Level resumed from a save or restarted at a checkpoint -BOOL SenStatLevelResume ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT SingleOrMultiplayer, INT FriendsOrMatch, INT CompeteOrCoop, INT DifficultyLevel, INT NumberOfLocalPlayers, INT NumberOfOnlinePlayers, INT License, INT DefaultGameControls, INT SaveOrCheckPointID, INT AudioSettings, INT SkeletonDistanceInInches, INT NumberOfSkeletonsInView ); +bool SenStatLevelResume ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT SingleOrMultiplayer, INT FriendsOrMatch, INT CompeteOrCoop, INT DifficultyLevel, INT NumberOfLocalPlayers, INT NumberOfOnlinePlayers, INT License, INT DefaultGameControls, INT SaveOrCheckPointID, INT AudioSettings, INT SkeletonDistanceInInches, INT NumberOfSkeletonsInView ); // PauseOrInactive // Player paused game or has become inactive, level and mode are for what the player is leaving -BOOL SenStatPauseOrInactive ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID ); +bool SenStatPauseOrInactive ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID ); // UnpauseOrActive // Player unpaused game or has become active, level and mode are for what the player is entering into -BOOL SenStatUnpauseOrActive ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID ); +bool SenStatUnpauseOrActive ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID ); // MenuShown // A menu screen or major menu area has been shown -BOOL SenStatMenuShown ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT MenuID, INT OptionalMenuSubID, INT LevelInstanceID, INT MultiplayerInstanceID ); +bool SenStatMenuShown ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT MenuID, INT OptionalMenuSubID, INT LevelInstanceID, INT MultiplayerInstanceID ); // AchievementUnlocked // An achievement was unlocked -BOOL SenStatAchievementUnlocked ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT AchievementID, INT AchievementGamerscore ); +bool SenStatAchievementUnlocked ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT AchievementID, INT AchievementGamerscore ); // MediaShareUpload // The user uploaded something to Kinect Share -BOOL SenStatMediaShareUpload ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT MediaDestination, INT MediaType ); +bool SenStatMediaShareUpload ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT MediaDestination, INT MediaType ); // UpsellPresented // The user is shown an upsell to purchase something -BOOL SenStatUpsellPresented ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT UpsellID, INT MarketplaceOfferID ); +bool SenStatUpsellPresented ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT UpsellID, INT MarketplaceOfferID ); // UpsellResponded // The user responded to the upsell -BOOL SenStatUpsellResponded ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT UpsellID, INT MarketplaceOfferID, INT UpsellOutcome ); +bool SenStatUpsellResponded ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT UpsellID, INT MarketplaceOfferID, INT UpsellOutcome ); // PlayerDiedOrFailed // The player died or failed a challenge - can be used for many types of failure -BOOL SenStatPlayerDiedOrFailed ( DWORD dwUserID, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT LowResMapX, INT LowResMapY, INT LowResMapZ, INT MapID, INT PlayerWeaponID, INT EnemyWeaponID, INT EnemyTypeID, INT SecondsSinceInitialize, INT CopyOfSecondsSinceInitialize ); +bool SenStatPlayerDiedOrFailed ( DWORD dwUserID, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT LowResMapX, INT LowResMapY, INT LowResMapZ, INT MapID, INT PlayerWeaponID, INT EnemyWeaponID, INT EnemyTypeID, INT SecondsSinceInitialize, INT CopyOfSecondsSinceInitialize ); // EnemyKilledOrOvercome // The player killed an enemy or overcame or solved a major challenge -BOOL SenStatEnemyKilledOrOvercome ( DWORD dwUserID, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT LowResMapX, INT LowResMapY, INT LowResMapZ, INT MapID, INT PlayerWeaponID, INT EnemyWeaponID, INT EnemyTypeID, INT SecondsSinceInitialize, INT CopyOfSecondsSinceInitialize ); +bool SenStatEnemyKilledOrOvercome ( DWORD dwUserID, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT LowResMapX, INT LowResMapY, INT LowResMapZ, INT MapID, INT PlayerWeaponID, INT EnemyWeaponID, INT EnemyTypeID, INT SecondsSinceInitialize, INT CopyOfSecondsSinceInitialize ); // SkinChanged // The player has changed their skin, level and mode are for what the player is currently in -BOOL SenStatSkinChanged ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT SkinID ); +bool SenStatSkinChanged ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID, INT SkinID ); // BanLevel // The player has banned a level, level and mode are for what the player is currently in and banning -BOOL SenStatBanLevel ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID ); +bool SenStatBanLevel ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID ); // UnBanLevel // The player has ubbanned a level, level and mode are for what the player is currently in and unbanning -BOOL SenStatUnBanLevel ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID ); +bool SenStatUnBanLevel ( DWORD dwUserID, INT SecondsSinceInitialize, INT ModeID, INT OptionalSubModeID, INT LevelID, INT OptionalSubLevelID, INT LevelInstanceID, INT MultiplayerInstanceID ); diff --git a/Minecraft.Client/Platform/Windows64/Windows64_Minecraft.cpp b/Minecraft.Client/Platform/Windows64/Windows64_Minecraft.cpp index a93dd7b07..e468c230e 100644 --- a/Minecraft.Client/Platform/Windows64/Windows64_Minecraft.cpp +++ b/Minecraft.Client/Platform/Windows64/Windows64_Minecraft.cpp @@ -66,7 +66,7 @@ DWORD dwProfileSettingsA[NUM_PROFILE_VALUES] = { // running for a long time. //------------------------------------------------------------------------------------- -BOOL g_bWidescreen = TRUE; +bool g_bWidescreen = TRUE; int g_iScreenWidth = 1920; int g_iScreenHeight = 1080; @@ -476,7 +476,7 @@ ATOM MyRegisterClass(HINSTANCE hInstance) { // In this function, we save the instance handle in a global variable and // create and display the main program window. // -BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) { +bool InitInstance(HINSTANCE hInstance, int nCmdShow) { g_hInst = hInstance; // Store instance handle in our global variable RECT wr = {0, 0, g_iScreenWidth, @@ -601,7 +601,7 @@ HRESULT InitDevice() { // Create a render target view ID3D11Texture2D* pBackBuffer = NULL; hr = g_pSwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), - (LPVOID*)&pBackBuffer); + (void**)&pBackBuffer); if (FAILED(hr)) return hr; // Create a depth stencil buffer @@ -756,7 +756,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, // Set a callback for the default player options to be set - when there is // no profile data for the player ProfileManager.SetDefaultOptionsCallback( - &CConsoleMinecraftApp::DefaultOptionsCallback, (LPVOID)&app); + &CConsoleMinecraftApp::DefaultOptionsCallback, (void*)&app); // QNet needs to be setup after profile manager, as we do not want its // Notify listener to handle XN_SYS_SIGNINCHANGED notifications. This does // mean that we need to have a callback in the ProfileManager for @@ -935,7 +935,7 @@ volatile int sectCheck = 48; CRITICAL_SECTION memCS; DWORD tlsIdx; -LPVOID XMemAlloc(SIZE_T dwSize, DWORD dwAllocAttributes) { +void* XMemAlloc(SIZE_T dwSize, DWORD dwAllocAttributes) { if (!trackStarted) { void* p = XMemAllocDefault(dwSize, dwAllocAttributes); size_t realSize = XMemSizeDefault(p, dwAllocAttributes); @@ -1062,7 +1062,7 @@ void MemSect(int section) { } else { value = (value << 6) | section; } - TlsSetValue(tlsIdx, (LPVOID)value); + TlsSetValue(tlsIdx, (void*)value); } void MemPixStuff() { diff --git a/Minecraft.Client/Platform/Windows64/XML/ATGXmlParser.h b/Minecraft.Client/Platform/Windows64/XML/ATGXmlParser.h index 75142e3e3..bfa46f2b3 100644 --- a/Minecraft.Client/Platform/Windows64/XML/ATGXmlParser.h +++ b/Minecraft.Client/Platform/Windows64/XML/ATGXmlParser.h @@ -58,11 +58,11 @@ public: virtual HRESULT ElementBegin( CONST WCHAR* strName, UINT NameLen, CONST XMLAttribute *pAttributes, UINT NumAttributes ) = 0; - virtual HRESULT ElementContent( CONST WCHAR *strData, UINT DataLen, BOOL More ) = 0; + virtual HRESULT ElementContent( CONST WCHAR *strData, UINT DataLen, bool More ) = 0; virtual HRESULT ElementEnd( CONST WCHAR *strName, UINT NameLen ) = 0; virtual HRESULT CDATABegin( ) = 0; - virtual HRESULT CDATAData( CONST WCHAR *strCDATA, UINT CDATALen, BOOL bMore ) = 0; + virtual HRESULT CDATAData( CONST WCHAR *strCDATA, UINT CDATALen, bool bMore ) = 0; virtual HRESULT CDATAEnd( ) = 0; virtual VOID Error( HRESULT hError, CONST CHAR *strMessage ) = 0; @@ -111,7 +111,7 @@ public: private: HRESULT MainParseLoop(); - HRESULT AdvanceCharacter( BOOL bOkToFail = FALSE ); + HRESULT AdvanceCharacter( bool bOkToFail = FALSE ); VOID SkipNextAdvance(); HRESULT ConsumeSpace(); @@ -144,10 +144,10 @@ private: BYTE* m_pReadPtr; WCHAR* m_pWritePtr; // write pointer within m_pBuf - BOOL m_bUnicode; // TRUE = 16-bits, FALSE = 8-bits - BOOL m_bReverseBytes; // TRUE = reverse bytes, FALSE = don't reverse + bool m_bUnicode; // TRUE = 16-bits, FALSE = 8-bits + bool m_bReverseBytes; // TRUE = reverse bytes, FALSE = don't reverse - BOOL m_bSkipNextAdvance; + bool m_bSkipNextAdvance; WCHAR m_Ch; // Current character being parsed }; diff --git a/Minecraft.Client/Platform/extraX64client.h b/Minecraft.Client/Platform/extraX64client.h index 0ba6980cd..b9c9d3d86 100644 --- a/Minecraft.Client/Platform/extraX64client.h +++ b/Minecraft.Client/Platform/extraX64client.h @@ -43,7 +43,7 @@ DWORD XUserAreUsersFriends( DWORD dwUserIndex, PPlayerUID pXuids, DWORD dwXuidCount, - PBOOL pfResult, + bool* pfResult, void *pOverlapped); class XSOCIAL_IMAGEPOSTPARAMS diff --git a/Minecraft.World/Blocks/TileEntities/SignTileEntity.cpp b/Minecraft.World/Blocks/TileEntities/SignTileEntity.cpp index 5fa6218a3..dc9e0ebf4 100644 --- a/Minecraft.World/Blocks/TileEntities/SignTileEntity.cpp +++ b/Minecraft.World/Blocks/TileEntities/SignTileEntity.cpp @@ -34,7 +34,7 @@ SignTileEntity::SignTileEntity() : TileEntity() { SignTileEntity::~SignTileEntity() { // TODO ORBIS_STUBBED; // 4J-PB - we don't need to verify strings anymore - - // InputManager.CancelQueuedVerifyStrings(&SignTileEntity::StringVerifyCallback,(LPVOID)this); + // InputManager.CancelQueuedVerifyStrings(&SignTileEntity::StringVerifyCallback,(void*)this); } void SignTileEntity::save(CompoundTag* tag) { @@ -125,7 +125,7 @@ void SignTileEntity::setChanged() { // at this point, we can ask the online string verifier if our sign text is ok #if 0 m_bVerified=true; #else - if(!InputManager.VerifyStrings((WCHAR**)&wcMessages,MAX_SIGN_LINES,&SignTileEntity::StringVerifyCallback,(LPVOID)this)) + if(!InputManager.VerifyStrings((WCHAR**)&wcMessages,MAX_SIGN_LINES,&SignTileEntity::StringVerifyCallback,(void*)this)) { // Nothing to verify m_bVerified=true; diff --git a/Minecraft.World/IO/Streams/Compression.cpp b/Minecraft.World/IO/Streams/Compression.cpp index 0088c886d..931382e2e 100644 --- a/Minecraft.World/IO/Streams/Compression.cpp +++ b/Minecraft.World/IO/Streams/Compression.cpp @@ -293,7 +293,7 @@ HRESULT Compression::Decompress(void* pDestination, unsigned int* pDestSize, // platforms (so no virtual mem stuff) void Compression::VitaVirtualDecompress( void* pDestination, unsigned int* pDestSize, void* pSource, - unsigned int SrcSize) // (LPVOID buf, SIZE_T dwSize, LPVOID dst) + unsigned int SrcSize) // (void* buf, SIZE_T dwSize, void* dst) { std::uint8_t* pSrc = (std::uint8_t*)pSource; int Offset = 0; diff --git a/Minecraft.World/Level/CustomLevelSource.cpp b/Minecraft.World/Level/CustomLevelSource.cpp index 107082b74..68d1de581 100644 --- a/Minecraft.World/Level/CustomLevelSource.cpp +++ b/Minecraft.World/Level/CustomLevelSource.cpp @@ -43,7 +43,7 @@ CustomLevelSource::CustomLevelSource(Level* level, int64_t seed, app.DebugPrintf("Heightmap binary is too large!!\n"); __debugbreak(); } - BOOL bSuccess = ReadFile(file, m_heightmapOverride.data, dwFileSize, + bool bSuccess = ReadFile(file, m_heightmapOverride.data, dwFileSize, &bytesRead, NULL); if (bSuccess == FALSE) { @@ -77,7 +77,7 @@ CustomLevelSource::CustomLevelSource(Level* level, int64_t seed, app.DebugPrintf("waterheight binary is too large!!\n"); __debugbreak(); } - BOOL bSuccess = ReadFile(file, m_waterheightOverride.data, dwFileSize, + bool bSuccess = ReadFile(file, m_waterheightOverride.data, dwFileSize, &bytesRead, NULL); if (bSuccess == FALSE) { diff --git a/Minecraft.World/Network/Connection.h b/Minecraft.World/Network/Connection.h index 8930cfb69..d949ac2b2 100644 --- a/Minecraft.World/Network/Connection.h +++ b/Minecraft.World/Network/Connection.h @@ -17,10 +17,10 @@ class ByteArrayOutputStream; class Connection { - friend DWORD WINAPI runRead(LPVOID lpParam); - friend DWORD WINAPI runWrite(LPVOID lpParam); - friend DWORD WINAPI runSendAndQuit(LPVOID lpParam); - friend DWORD WINAPI runClose(LPVOID lpParam); + friend DWORD WINAPI runRead(void* lpParam); + friend DWORD WINAPI runWrite(void* lpParam); + friend DWORD WINAPI runSendAndQuit(void* lpParam); + friend DWORD WINAPI runClose(void* lpParam); private: static const int SEND_BUFFER_SIZE = 1024 * 5; diff --git a/Minecraft.World/Platform/x64headers/extraX64.h b/Minecraft.World/Platform/x64headers/extraX64.h index 7b6fadc9a..ad540e617 100644 --- a/Minecraft.World/Platform/x64headers/extraX64.h +++ b/Minecraft.World/Platform/x64headers/extraX64.h @@ -397,7 +397,7 @@ const int XC_LOCALE_LATIN_AMERICA = 240; DWORD XGetLanguage(); DWORD XGetLocale(); -DWORD XEnableGuestSignin(BOOL fEnable); +DWORD XEnableGuestSignin(bool fEnable); class D3DXVECTOR3 { public: diff --git a/Minecraft.World/WorldGen/Layers/BiomeOverrideLayer.cpp b/Minecraft.World/WorldGen/Layers/BiomeOverrideLayer.cpp index cc56b9491..9b76ae2e6 100644 --- a/Minecraft.World/WorldGen/Layers/BiomeOverrideLayer.cpp +++ b/Minecraft.World/WorldGen/Layers/BiomeOverrideLayer.cpp @@ -32,7 +32,7 @@ BiomeOverrideLayer::BiomeOverrideLayer(int seedMixup) : Layer(seedMixup) { app.DebugPrintf("Biomemap binary is too large!!\n"); __debugbreak(); } - BOOL bSuccess = + bool bSuccess = ReadFile(file, m_biomeOverride.data, dwFileSize, &bytesRead, NULL); if (bSuccess == FALSE) { From 2ebead56cad5f161a574a0219b42ed2933686fdb Mon Sep 17 00:00:00 2001 From: Tropical <42101043+tropicaaal@users.noreply.github.com> Date: Mon, 30 Mar 2026 00:17:42 -0500 Subject: [PATCH 2/2] remove bool identity type --- Minecraft.Client/Platform/Linux/Stubs/winapi_stubs.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Minecraft.Client/Platform/Linux/Stubs/winapi_stubs.h b/Minecraft.Client/Platform/Linux/Stubs/winapi_stubs.h index a828f6954..5f0b9b447 100644 --- a/Minecraft.Client/Platform/Linux/Stubs/winapi_stubs.h +++ b/Minecraft.Client/Platform/Linux/Stubs/winapi_stubs.h @@ -18,7 +18,6 @@ #define S_OK 0 typedef unsigned int DWORD; -typedef bool bool; typedef wchar_t WCHAR; typedef unsigned char BYTE; typedef BYTE* PBYTE;