mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-25 00:53:41 +00:00
Use standard DLC mount callback types
This commit is contained in:
parent
dbc8071183
commit
082dc2033d
|
|
@ -61,7 +61,7 @@ DWORD C4JStorage::InstallOffer(int iOfferIDC, __uint64 *ullOfferIDA, int(*Func)(
|
|||
DWORD C4JStorage::GetAvailableDLCCount(int iPad) { return 0; }
|
||||
C4JStorage::EDLCStatus C4JStorage::GetInstalledDLC(int iPad, int(*Func)(LPVOID, int, int), LPVOID lpParam) { return EDLC_NoInstalledDLC; }
|
||||
XCONTENT_DATA& C4JStorage::GetDLC(DWORD dw) { return s_dummyContentData; }
|
||||
DWORD C4JStorage::MountInstalledDLC(int iPad, DWORD dwDLC, int(*Func)(LPVOID, int, DWORD, DWORD), LPVOID lpParam, LPCSTR szMountDrive) { return 0; }
|
||||
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; }
|
||||
void C4JStorage::GetMountedDLCFileList(const char *szMountDrive, std::vector<std::string> &fileList) { fileList.clear(); }
|
||||
std::string C4JStorage::GetMountedPath(std::string szMount) { return ""; }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
//#include <xtms.h>
|
||||
|
||||
|
|
@ -299,7 +300,7 @@ public:
|
|||
|
||||
C4JStorage::EDLCStatus GetInstalledDLC(int iPad,int( *Func)(LPVOID, int, int),LPVOID lpParam);
|
||||
XCONTENT_DATA& GetDLC(DWORD dw);
|
||||
DWORD MountInstalledDLC(int iPad,DWORD dwDLC,int( *Func)(LPVOID, int, DWORD,DWORD),LPVOID lpParam,LPCSTR szMountDrive=NULL);
|
||||
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);
|
||||
void GetMountedDLCFileList(const char* szMountDrive, std::vector<std::string>& fileList);
|
||||
std::string GetMountedPath(std::string szMount);
|
||||
|
|
|
|||
|
|
@ -5077,7 +5077,7 @@ void CMinecraftApp::MountNextDLC(int iPad)
|
|||
#define CONTENT_DATA_DISPLAY_NAME(a) (a.wszDisplayName)
|
||||
#endif
|
||||
|
||||
int CMinecraftApp::DLCMountedCallback(void *pParam,int iPad,DWORD dwErr,DWORD dwLicenceMask)
|
||||
int CMinecraftApp::DLCMountedCallback(void *pParam,int iPad,std::uint32_t dwErr,std::uint32_t dwLicenceMask)
|
||||
{
|
||||
#if defined(_XBOX) || defined(_DURANGO) || defined(__PS3__) || defined(__ORBIS__) || defined(_WINDOWS64) || defined (__PSVITA__) //Chris TODO
|
||||
app.DebugPrintf("--- CMinecraftApp::DLCMountedCallback\n");
|
||||
|
|
@ -5085,7 +5085,7 @@ int CMinecraftApp::DLCMountedCallback(void *pParam,int iPad,DWORD dwErr,DWORD dw
|
|||
if(dwErr!=ERROR_SUCCESS)
|
||||
{
|
||||
// corrupt DLC
|
||||
app.DebugPrintf("Failed to mount DLC for pad %d: %d\n",iPad,dwErr);
|
||||
app.DebugPrintf("Failed to mount DLC for pad %d: %u\n",iPad,dwErr);
|
||||
app.m_dlcManager.incrementUnnamedCorruptCount();
|
||||
}
|
||||
else
|
||||
|
|
@ -5126,7 +5126,7 @@ int CMinecraftApp::DLCMountedCallback(void *pParam,int iPad,DWORD dwErr,DWORD dw
|
|||
}
|
||||
else
|
||||
{
|
||||
app.DebugPrintf("Pack \"%ls\" is already installed. Updating license to %d\n", CONTENT_DATA_DISPLAY_NAME(ContentData), dwLicenceMask);
|
||||
app.DebugPrintf("Pack \"%ls\" is already installed. Updating license to %u\n", CONTENT_DATA_DISPLAY_NAME(ContentData), dwLicenceMask);
|
||||
|
||||
pack->SetDLCMountIndex(app.m_iTotalDLCInstalled);
|
||||
pack->SetDLCDeviceID(ContentData.DeviceID);
|
||||
|
|
|
|||
|
|
@ -318,7 +318,7 @@ public:
|
|||
bool StartInstallDLCProcess(int iPad);
|
||||
static int DLCInstalledCallback(void *pParam,int iOfferC,int iPad);
|
||||
void HandleDLCLicenseChange();
|
||||
static int DLCMountedCallback(void *pParam,int iPad,DWORD dwErr,DWORD dwLicenceMask);
|
||||
static int DLCMountedCallback(void *pParam,int iPad,std::uint32_t dwErr,std::uint32_t dwLicenceMask);
|
||||
void MountNextDLC(int iPad);
|
||||
//static int DLCReadCallback(LPVOID pParam,C4JStorage::DLC_FILE_DETAILS *pDLCData);
|
||||
void HandleDLC(DLCPack *pack);
|
||||
|
|
|
|||
|
|
@ -602,7 +602,7 @@ DWORD C4JStorage::InstallOffer(int iOfferIDC,ULONGLONG *ullOfferIDA,int(
|
|||
DWORD C4JStorage::GetAvailableDLCCount( int iPad) { return 0; }
|
||||
XCONTENT_DATA& C4JStorage::GetDLC(DWORD 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; }
|
||||
DWORD C4JStorage::MountInstalledDLC(int iPad,DWORD dwDLC,int( *Func)(LPVOID, int, DWORD,DWORD),LPVOID lpParam,LPCSTR szMountDrive) { return 0; }
|
||||
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; }
|
||||
C4JStorage::ETMSStatus C4JStorage::ReadTMSFile(int iQuadrant,eGlobalStorage eStorageFacility,C4JStorage::eTMS_FileType eFileType, WCHAR *pwchFilename,BYTE **ppBuffer,DWORD *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,BYTE *pBuffer,DWORD dwBufferSize) { return true; }
|
||||
|
|
|
|||
|
|
@ -310,14 +310,14 @@ std::wstring DLCTexturePack::getFilePath(std::uint32_t packId, std::wstring file
|
|||
return app.getFilePath(packId,filename,bAddDataFolder);
|
||||
}
|
||||
|
||||
int DLCTexturePack::packMounted(LPVOID pParam,int iPad,DWORD dwErr,DWORD dwLicenceMask)
|
||||
int DLCTexturePack::packMounted(void *pParam,int iPad,std::uint32_t dwErr,std::uint32_t dwLicenceMask)
|
||||
{
|
||||
DLCTexturePack *texturePack = (DLCTexturePack *)pParam;
|
||||
DLCTexturePack *texturePack = static_cast<DLCTexturePack *>(pParam);
|
||||
texturePack->m_bLoadingData = false;
|
||||
if(dwErr!=ERROR_SUCCESS)
|
||||
{
|
||||
// corrupt DLC
|
||||
app.DebugPrintf("Failed to mount DLC for pad %d: %d\n",iPad,dwErr);
|
||||
app.DebugPrintf("Failed to mount DLC for pad %d: %u\n",iPad,dwErr);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ private:
|
|||
static std::wstring getFilePath(std::uint32_t packId, std::wstring filename, bool bAddDataFolder=true);
|
||||
|
||||
public:
|
||||
static int packMounted(LPVOID pParam,int iPad,DWORD dwErr,DWORD dwLicenceMask);
|
||||
static int packMounted(void *pParam,int iPad,std::uint32_t dwErr,std::uint32_t dwLicenceMask);
|
||||
virtual void loadData();
|
||||
virtual void loadUI();
|
||||
virtual void unloadUI();
|
||||
|
|
|
|||
Loading…
Reference in a new issue