From a0202d55c99cdeb4dd3c36dd60006953d04d4997 Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Mon, 16 Mar 2026 04:46:00 +1100 Subject: [PATCH] Remove WinAPI control types from DLC storage APIs --- 4J.Storage/4J_Storage.cpp | 18 +++++++++--------- 4J.Storage/4J_Storage.h | 19 ++++++++++--------- Minecraft.Client/Platform/Extrax64Stubs.cpp | 14 +++++++------- 3 files changed, 26 insertions(+), 25 deletions(-) diff --git a/4J.Storage/4J_Storage.cpp b/4J.Storage/4J_Storage.cpp index 13524a91d..156552f9d 100644 --- a/4J.Storage/4J_Storage.cpp +++ b/4J.Storage/4J_Storage.cpp @@ -124,34 +124,34 @@ void C4JStorage::RegisterMarketplaceCountsCallback( void C4JStorage::SetDLCPackageRoot(char* pszDLCRoot) {} C4JStorage::EDLCStatus C4JStorage::GetDLCOffers( int iPad, int (*Func)(void*, int, std::uint32_t, int), void* lpParam, - DWORD dwOfferTypesBitmask) { + std::uint32_t dwOfferTypesBitmask) { return EDLC_NoOffers; } -DWORD C4JStorage::CancelGetDLCOffers() { return 0; } +unsigned int C4JStorage::CancelGetDLCOffers() { return 0; } void C4JStorage::ClearDLCOffers() {} -XMARKETPLACE_CONTENTOFFER_INFO& C4JStorage::GetOffer(DWORD dw) { +XMARKETPLACE_CONTENTOFFER_INFO& C4JStorage::GetOffer(unsigned int dw) { return s_dummyOffer; } int C4JStorage::GetOfferCount() { return 0; } -DWORD C4JStorage::InstallOffer(int iOfferIDC, __uint64* ullOfferIDA, - int (*Func)(void*, int, int), void* lpParam, - bool bTrial) { +unsigned int C4JStorage::InstallOffer(int iOfferIDC, __uint64* ullOfferIDA, + int (*Func)(void*, int, int), + void* lpParam, bool bTrial) { return 0; } -DWORD C4JStorage::GetAvailableDLCCount(int iPad) { return 0; } +unsigned int C4JStorage::GetAvailableDLCCount(int iPad) { return 0; } C4JStorage::EDLCStatus C4JStorage::GetInstalledDLC(int iPad, int (*Func)(void*, int, int), void* lpParam) { return EDLC_NoInstalledDLC; } -XCONTENT_DATA& C4JStorage::GetDLC(DWORD dw) { return s_dummyContentData; } +XCONTENT_DATA& C4JStorage::GetDLC(unsigned int dw) { return s_dummyContentData; } 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; } -DWORD C4JStorage::UnmountInstalledDLC(LPCSTR szMountDrive) { return 0; } +unsigned int C4JStorage::UnmountInstalledDLC(LPCSTR szMountDrive) { return 0; } void C4JStorage::GetMountedDLCFileList(const char* szMountDrive, std::vector& fileList) { fileList.clear(); diff --git a/4J.Storage/4J_Storage.h b/4J.Storage/4J_Storage.h index 8bc90ceb7..c5680846c 100644 --- a/4J.Storage/4J_Storage.h +++ b/4J.Storage/4J_Storage.h @@ -286,25 +286,26 @@ public: void SetDLCPackageRoot(char* pszDLCRoot); C4JStorage::EDLCStatus GetDLCOffers( int iPad, int (*Func)(void*, int, std::uint32_t, int), void* lpParam, - DWORD dwOfferTypesBitmask = XMARKETPLACE_OFFERING_TYPE_CONTENT); - DWORD CancelGetDLCOffers(); + std::uint32_t dwOfferTypesBitmask = + XMARKETPLACE_OFFERING_TYPE_CONTENT); + unsigned int CancelGetDLCOffers(); void ClearDLCOffers(); - XMARKETPLACE_CONTENTOFFER_INFO& GetOffer(DWORD dw); + XMARKETPLACE_CONTENTOFFER_INFO& GetOffer(unsigned int dw); int GetOfferCount(); - DWORD InstallOffer(int iOfferIDC, __uint64* ullOfferIDA, - int (*Func)(void*, int, int), void* lpParam, - bool bTrial = false); - DWORD GetAvailableDLCCount(int iPad); + unsigned int InstallOffer(int iOfferIDC, __uint64* ullOfferIDA, + int (*Func)(void*, int, int), void* lpParam, + bool bTrial = false); + unsigned int GetAvailableDLCCount(int iPad); C4JStorage::EDLCStatus GetInstalledDLC(int iPad, int (*Func)(void*, int, int), void* lpParam); - XCONTENT_DATA& GetDLC(DWORD dw); + XCONTENT_DATA& GetDLC(unsigned int dw); std::uint32_t MountInstalledDLC(int iPad, std::uint32_t dwDLC, int (*Func)(void*, int, std::uint32_t, std::uint32_t), void* lpParam, LPCSTR szMountDrive = NULL); - DWORD UnmountInstalledDLC(LPCSTR szMountDrive = NULL); + unsigned int UnmountInstalledDLC(LPCSTR szMountDrive = NULL); void GetMountedDLCFileList(const char* szMountDrive, std::vector& fileList); std::string GetMountedPath(std::string szMount); diff --git a/Minecraft.Client/Platform/Extrax64Stubs.cpp b/Minecraft.Client/Platform/Extrax64Stubs.cpp index 18bfb1415..b7304721e 100644 --- a/Minecraft.Client/Platform/Extrax64Stubs.cpp +++ b/Minecraft.Client/Platform/Extrax64Stubs.cpp @@ -593,17 +593,17 @@ PSAVE_DETAILS C4JStorage::ReturnSavesInfo() {return NULL;} void C4JStorage::RegisterMarketplaceCountsCallback(int ( *Func)(LPVOID lpParam, C4JStorage::DLC_TMS_DETAILS *, int), LPVOID lpParam ) {} void C4JStorage::SetDLCPackageRoot(char *pszDLCRoot) {} -C4JStorage::EDLCStatus C4JStorage::GetDLCOffers(int iPad,int( *Func)(void *, int, std::uint32_t, int),void *lpParam, DWORD dwOfferTypesBitmaskT) { return C4JStorage::EDLC_Idle; } -DWORD C4JStorage::CancelGetDLCOffers() { return 0; } +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(DWORD dw) { static XMARKETPLACE_CONTENTOFFER_INFO retval = {0}; return retval; } +XMARKETPLACE_CONTENTOFFER_INFO& C4JStorage::GetOffer(unsigned int dw) { static XMARKETPLACE_CONTENTOFFER_INFO retval = {0}; return retval; } int C4JStorage::GetOfferCount() { return 0; } -DWORD C4JStorage::InstallOffer(int iOfferIDC,ULONGLONG *ullOfferIDA,int( *Func)(LPVOID, int, int),LPVOID lpParam, bool bTrial) { return 0; } -DWORD C4JStorage::GetAvailableDLCCount( int iPad) { return 0; } -XCONTENT_DATA& C4JStorage::GetDLC(DWORD dw) { static XCONTENT_DATA retval = {0}; return retval; } +unsigned int C4JStorage::InstallOffer(int iOfferIDC,ULONGLONG *ullOfferIDA,int( *Func)(LPVOID, int, int),LPVOID 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; } -DWORD C4JStorage::UnmountInstalledDLC(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 *pdwBufferSize,int( *Func)(LPVOID, WCHAR *,int, bool, int),LPVOID lpParam, int iAction) { return C4JStorage::ETMSStatus_Idle; } bool C4JStorage::WriteTMSFile(int iQuadrant,eGlobalStorage eStorageFacility,WCHAR *pwchFilename,std::uint8_t *pBuffer,unsigned int dwBufferSize) { return true; } bool C4JStorage::DeleteTMSFile(int iQuadrant,eGlobalStorage eStorageFacility,WCHAR *pwchFilename) { return true; }