mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-20 09:57:10 +00:00
Merge branch 'dev' into feat/iggy-dev
This commit is contained in:
commit
1bad0a3048
|
|
@ -572,7 +572,7 @@ void C_4JInput::SetJoypadStickAxisMap(int, unsigned int, unsigned int) {}
|
||||||
void C_4JInput::SetJoypadStickTriggerMap(int, unsigned int, unsigned int) {}
|
void C_4JInput::SetJoypadStickTriggerMap(int, unsigned int, unsigned int) {}
|
||||||
void C_4JInput::SetKeyRepeatRate(float, float) {}
|
void C_4JInput::SetKeyRepeatRate(float, float) {}
|
||||||
void C_4JInput::SetDebugSequence(const char*, int (*)(void*), void*) {}
|
void C_4JInput::SetDebugSequence(const char*, int (*)(void*), void*) {}
|
||||||
FLOAT C_4JInput::GetIdleSeconds(int) { return 0.f; }
|
float C_4JInput::GetIdleSeconds(int) { return 0.f; }
|
||||||
bool C_4JInput::IsPadConnected(int iPad) { return iPad == 0; }
|
bool C_4JInput::IsPadConnected(int iPad) { return iPad == 0; }
|
||||||
|
|
||||||
// Silly check, we check if we have a keyboard.
|
// Silly check, we check if we have a keyboard.
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ enum EKeyboardResult {
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _STRING_VERIFY_RESPONSE {
|
typedef struct _STRING_VERIFY_RESPONSE {
|
||||||
WORD wNumStrings;
|
std::uint16_t wNumStrings;
|
||||||
HRESULT* pStringResult;
|
HRESULT* pStringResult;
|
||||||
} STRING_VERIFY_RESPONSE;
|
} STRING_VERIFY_RESPONSE;
|
||||||
|
|
||||||
|
|
@ -96,7 +96,7 @@ public:
|
||||||
void SetKeyRepeatRate(float fRepeatDelaySecs, float fRepeatRateSecs);
|
void SetKeyRepeatRate(float fRepeatDelaySecs, float fRepeatRateSecs);
|
||||||
void SetDebugSequence(const char* chSequenceA, int (*Func)(void*),
|
void SetDebugSequence(const char* chSequenceA, int (*Func)(void*),
|
||||||
void* lpParam);
|
void* lpParam);
|
||||||
FLOAT GetIdleSeconds(int iPad);
|
float GetIdleSeconds(int iPad);
|
||||||
bool IsPadConnected(int iPad);
|
bool IsPadConnected(int iPad);
|
||||||
|
|
||||||
// In-Game values which may have been remapped due to Southpaw, swap
|
// In-Game values which may have been remapped due to Southpaw, swap
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,12 @@ C_4JProfile ProfileManager;
|
||||||
|
|
||||||
static void* s_profileData[4] = {};
|
static void* s_profileData[4] = {};
|
||||||
|
|
||||||
void C_4JProfile::Initialise(DWORD dwTitleID, DWORD dwOfferID,
|
void C_4JProfile::Initialise(std::uint32_t dwTitleID,
|
||||||
|
std::uint32_t dwOfferID,
|
||||||
unsigned short usProfileVersion,
|
unsigned short usProfileVersion,
|
||||||
UINT uiProfileValuesC, UINT uiProfileSettingsC,
|
unsigned int uiProfileValuesC,
|
||||||
DWORD* pdwProfileSettingsA,
|
unsigned int uiProfileSettingsC,
|
||||||
|
std::uint32_t* pdwProfileSettingsA,
|
||||||
int iGameDefinedDataSizeX4,
|
int iGameDefinedDataSizeX4,
|
||||||
unsigned int* puiGameDefinedDataChangedBitmask) {
|
unsigned int* puiGameDefinedDataChangedBitmask) {
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
|
|
@ -25,22 +27,21 @@ void C_4JProfile::SetLockedProfile(int iProf) {}
|
||||||
bool C_4JProfile::IsSignedIn(int iQuadrant) { return iQuadrant == 0; }
|
bool C_4JProfile::IsSignedIn(int iQuadrant) { return iQuadrant == 0; }
|
||||||
bool C_4JProfile::IsSignedInLive(int iProf) { return false; }
|
bool C_4JProfile::IsSignedInLive(int iProf) { return false; }
|
||||||
bool C_4JProfile::IsGuest(int iQuadrant) { return false; }
|
bool C_4JProfile::IsGuest(int iQuadrant) { return false; }
|
||||||
UINT C_4JProfile::RequestSignInUI(bool bFromInvite, bool bLocalGame,
|
unsigned int C_4JProfile::RequestSignInUI(
|
||||||
bool bNoGuestsAllowed,
|
bool bFromInvite, bool bLocalGame, bool bNoGuestsAllowed,
|
||||||
bool bMultiplayerSignIn, bool bAddUser,
|
bool bMultiplayerSignIn, bool bAddUser,
|
||||||
int (*Func)(void*, const bool,
|
int (*Func)(void*, const bool, const int iPad), void* lpParam,
|
||||||
const int iPad),
|
int iQuadrant) {
|
||||||
void* lpParam, int iQuadrant) {
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
UINT C_4JProfile::DisplayOfflineProfile(int (*Func)(void*, const bool,
|
unsigned int C_4JProfile::DisplayOfflineProfile(
|
||||||
const int iPad),
|
int (*Func)(void*, const bool, const int iPad), void* lpParam,
|
||||||
void* lpParam, int iQuadrant) {
|
int iQuadrant) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
UINT C_4JProfile::RequestConvertOfflineToGuestUI(int (*Func)(void*, const bool,
|
unsigned int C_4JProfile::RequestConvertOfflineToGuestUI(
|
||||||
const int iPad),
|
int (*Func)(void*, const bool, const int iPad), void* lpParam,
|
||||||
void* lpParam, int iQuadrant) {
|
int iQuadrant) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
void C_4JProfile::SetPrimaryPlayerChanged(bool bVal) {}
|
void C_4JProfile::SetPrimaryPlayerChanged(bool bVal) {}
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,11 @@ public:
|
||||||
// 4 players have game defined data, puiGameDefinedDataChangedBitmask needs
|
// 4 players have game defined data, puiGameDefinedDataChangedBitmask needs
|
||||||
// to be checked by the game side to see if there's an update needed - it'll
|
// to be checked by the game side to see if there's an update needed - it'll
|
||||||
// have the bits set for players to be updated
|
// have the bits set for players to be updated
|
||||||
void Initialise(DWORD dwTitleID, DWORD dwOfferID,
|
void Initialise(std::uint32_t dwTitleID, std::uint32_t dwOfferID,
|
||||||
unsigned short usProfileVersion, UINT uiProfileValuesC,
|
unsigned short usProfileVersion,
|
||||||
UINT uiProfileSettingsC, DWORD* pdwProfileSettingsA,
|
unsigned int uiProfileValuesC,
|
||||||
|
unsigned int uiProfileSettingsC,
|
||||||
|
std::uint32_t* pdwProfileSettingsA,
|
||||||
int iGameDefinedDataSizeX4,
|
int iGameDefinedDataSizeX4,
|
||||||
unsigned int* puiGameDefinedDataChangedBitmask);
|
unsigned int* puiGameDefinedDataChangedBitmask);
|
||||||
void SetTrialTextStringTable(CXuiStringTable* pStringTable, int iAccept,
|
void SetTrialTextStringTable(CXuiStringTable* pStringTable, int iAccept,
|
||||||
|
|
@ -50,17 +52,18 @@ public:
|
||||||
bool IsSignedIn(int iQuadrant);
|
bool IsSignedIn(int iQuadrant);
|
||||||
bool IsSignedInLive(int iProf);
|
bool IsSignedInLive(int iProf);
|
||||||
bool IsGuest(int iQuadrant);
|
bool IsGuest(int iQuadrant);
|
||||||
UINT RequestSignInUI(bool bFromInvite, bool bLocalGame,
|
unsigned int RequestSignInUI(bool bFromInvite, bool bLocalGame,
|
||||||
bool bNoGuestsAllowed, bool bMultiplayerSignIn,
|
bool bNoGuestsAllowed,
|
||||||
bool bAddUser,
|
bool bMultiplayerSignIn, bool bAddUser,
|
||||||
int (*Func)(void*, const bool, const int iPad),
|
int (*Func)(void*, const bool, const int iPad),
|
||||||
void* lpParam, int iQuadrant = XUSER_INDEX_ANY);
|
void* lpParam,
|
||||||
UINT DisplayOfflineProfile(int (*Func)(void*, const bool, const int iPad),
|
int iQuadrant = XUSER_INDEX_ANY);
|
||||||
void* lpParam, int iQuadrant = XUSER_INDEX_ANY);
|
unsigned int DisplayOfflineProfile(
|
||||||
UINT RequestConvertOfflineToGuestUI(int (*Func)(void*, const bool,
|
int (*Func)(void*, const bool, const int iPad), void* lpParam,
|
||||||
const int iPad),
|
int iQuadrant = XUSER_INDEX_ANY);
|
||||||
void* lpParam,
|
unsigned int RequestConvertOfflineToGuestUI(
|
||||||
int iQuadrant = XUSER_INDEX_ANY);
|
int (*Func)(void*, const bool, const int iPad), void* lpParam,
|
||||||
|
int iQuadrant = XUSER_INDEX_ANY);
|
||||||
void SetPrimaryPlayerChanged(bool bVal);
|
void SetPrimaryPlayerChanged(bool bVal);
|
||||||
bool QuerySigninStatus(void);
|
bool QuerySigninStatus(void);
|
||||||
void GetXUID(int iPad, PlayerUID* pXuid, bool bOnlineXuid);
|
void GetXUID(int iPad, PlayerUID* pXuid, bool bOnlineXuid);
|
||||||
|
|
|
||||||
|
|
@ -689,12 +689,13 @@ HRESULT C4JRender::LoadTextureData(const char* szFilename,
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT C4JRender::LoadTextureData(BYTE* pbData, DWORD dwBytes,
|
HRESULT C4JRender::LoadTextureData(std::uint8_t* pbData,
|
||||||
|
std::uint32_t byteCount,
|
||||||
D3DXIMAGE_INFO* pSrcInfo, int** ppDataOut) {
|
D3DXIMAGE_INFO* pSrcInfo, int** ppDataOut) {
|
||||||
int width, height, channels;
|
int width, height, channels;
|
||||||
|
|
||||||
unsigned char* data =
|
unsigned char* data =
|
||||||
stbi_load_from_memory(pbData, dwBytes, &width, &height, &channels, 4);
|
stbi_load_from_memory(pbData, byteCount, &width, &height, &channels, 4);
|
||||||
if (!data) return E_FAIL;
|
if (!data) return E_FAIL;
|
||||||
|
|
||||||
HRESULT hr = LoadFromSTB(data, width, height, pSrcInfo, ppDataOut);
|
HRESULT hr = LoadFromSTB(data, width, height, pSrcInfo, ppDataOut);
|
||||||
|
|
|
||||||
|
|
@ -30,10 +30,10 @@ typedef struct {
|
||||||
} D3DXIMAGE_INFO;
|
} D3DXIMAGE_INFO;
|
||||||
|
|
||||||
typedef struct _XSOCIAL_PREVIEWIMAGE {
|
typedef struct _XSOCIAL_PREVIEWIMAGE {
|
||||||
BYTE* pBytes;
|
std::uint8_t* pBytes;
|
||||||
DWORD Pitch;
|
std::uint32_t Pitch;
|
||||||
DWORD Width;
|
std::uint32_t Width;
|
||||||
DWORD Height;
|
std::uint32_t Height;
|
||||||
// D3DFORMAT Format;
|
// D3DFORMAT Format;
|
||||||
} XSOCIAL_PREVIEWIMAGE, *PXSOCIAL_PREVIEWIMAGE;
|
} XSOCIAL_PREVIEWIMAGE, *PXSOCIAL_PREVIEWIMAGE;
|
||||||
|
|
||||||
|
|
@ -171,7 +171,7 @@ public:
|
||||||
void TextureDynamicUpdateEnd();
|
void TextureDynamicUpdateEnd();
|
||||||
HRESULT LoadTextureData(const char* szFilename, D3DXIMAGE_INFO* pSrcInfo,
|
HRESULT LoadTextureData(const char* szFilename, D3DXIMAGE_INFO* pSrcInfo,
|
||||||
int** ppDataOut);
|
int** ppDataOut);
|
||||||
HRESULT LoadTextureData(BYTE* pbData, DWORD dwBytes,
|
HRESULT LoadTextureData(std::uint8_t* pbData, std::uint32_t byteCount,
|
||||||
D3DXIMAGE_INFO* pSrcInfo, int** ppDataOut);
|
D3DXIMAGE_INFO* pSrcInfo, int** ppDataOut);
|
||||||
HRESULT SaveTextureData(const char* szFilename, D3DXIMAGE_INFO* pSrcInfo,
|
HRESULT SaveTextureData(const char* szFilename, D3DXIMAGE_INFO* pSrcInfo,
|
||||||
int* ppDataOut);
|
int* ppDataOut);
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,11 @@ C4JStorage::C4JStorage() : m_pStringTable(nullptr) {}
|
||||||
void C4JStorage::Tick(void) {}
|
void C4JStorage::Tick(void) {}
|
||||||
|
|
||||||
C4JStorage::EMessageResult C4JStorage::RequestMessageBox(
|
C4JStorage::EMessageResult C4JStorage::RequestMessageBox(
|
||||||
UINT uiTitle, UINT uiText, UINT* uiOptionA, UINT uiOptionC, DWORD dwPad,
|
unsigned int uiTitle, unsigned int uiText, unsigned int* uiOptionA,
|
||||||
|
unsigned int uiOptionC, unsigned int pad,
|
||||||
int (*Func)(void*, int, const C4JStorage::EMessageResult), void* lpParam,
|
int (*Func)(void*, int, const C4JStorage::EMessageResult), void* lpParam,
|
||||||
C4JStringTable* pStringTable, WCHAR* pwchFormatString,
|
C4JStringTable* pStringTable, WCHAR* pwchFormatString,
|
||||||
DWORD dwFocusButton) {
|
unsigned int focusButton) {
|
||||||
return EMessage_ResultAccept;
|
return EMessage_ResultAccept;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -57,15 +58,19 @@ void C4JStorage::GetSaveData(void* pvData, unsigned int* puiBytes) {
|
||||||
PVOID C4JStorage::AllocateSaveData(unsigned int uiBytes) {
|
PVOID C4JStorage::AllocateSaveData(unsigned int uiBytes) {
|
||||||
return malloc(uiBytes);
|
return malloc(uiBytes);
|
||||||
}
|
}
|
||||||
void C4JStorage::SetSaveImages(PBYTE pbThumbnail, DWORD dwThumbnailBytes,
|
void C4JStorage::SetSaveImages(std::uint8_t* pbThumbnail,
|
||||||
PBYTE pbImage, DWORD dwImageBytes,
|
unsigned int thumbnailBytes,
|
||||||
PBYTE pbTextData, DWORD dwTextDataBytes) {}
|
std::uint8_t* pbImage,
|
||||||
|
unsigned int imageBytes,
|
||||||
|
std::uint8_t* pbTextData,
|
||||||
|
unsigned int textDataBytes) {}
|
||||||
C4JStorage::ESaveGameState C4JStorage::SaveSaveData(int (*Func)(void*,
|
C4JStorage::ESaveGameState C4JStorage::SaveSaveData(int (*Func)(void*,
|
||||||
const bool),
|
const bool),
|
||||||
void* lpParam) {
|
void* lpParam) {
|
||||||
return ESaveGame_Idle;
|
return ESaveGame_Idle;
|
||||||
}
|
}
|
||||||
void C4JStorage::CopySaveDataToNewSave(PBYTE pbThumbnail, DWORD cbThumbnail,
|
void C4JStorage::CopySaveDataToNewSave(std::uint8_t* pbThumbnail,
|
||||||
|
unsigned int cbThumbnail,
|
||||||
WCHAR* wchNewName,
|
WCHAR* wchNewName,
|
||||||
int (*Func)(void* lpParam, bool),
|
int (*Func)(void* lpParam, bool),
|
||||||
void* lpParam) {}
|
void* lpParam) {}
|
||||||
|
|
@ -92,14 +97,15 @@ C4JStorage::ESaveGameState C4JStorage::LoadSaveDataThumbnail(
|
||||||
void* lpParam) {
|
void* lpParam) {
|
||||||
return ESaveGame_Idle;
|
return ESaveGame_Idle;
|
||||||
}
|
}
|
||||||
void C4JStorage::GetSaveCacheFileInfo(DWORD dwFile,
|
void C4JStorage::GetSaveCacheFileInfo(unsigned int fileIndex,
|
||||||
XCONTENT_DATA& xContentData) {
|
XCONTENT_DATA& xContentData) {
|
||||||
memset(&xContentData, 0, sizeof(xContentData));
|
memset(&xContentData, 0, sizeof(xContentData));
|
||||||
}
|
}
|
||||||
void C4JStorage::GetSaveCacheFileInfo(DWORD dwFile, PBYTE* ppbImageData,
|
void C4JStorage::GetSaveCacheFileInfo(unsigned int fileIndex,
|
||||||
DWORD* pdwImageBytes) {
|
std::uint8_t** ppbImageData,
|
||||||
|
unsigned int* pImageBytes) {
|
||||||
if (ppbImageData) *ppbImageData = nullptr;
|
if (ppbImageData) *ppbImageData = nullptr;
|
||||||
if (pdwImageBytes) *pdwImageBytes = 0;
|
if (pImageBytes) *pImageBytes = 0;
|
||||||
}
|
}
|
||||||
C4JStorage::ESaveGameState C4JStorage::LoadSaveData(
|
C4JStorage::ESaveGameState C4JStorage::LoadSaveData(
|
||||||
PSAVE_INFO pSaveInfo, int (*Func)(void* lpParam, const bool, const bool),
|
PSAVE_INFO pSaveInfo, int (*Func)(void* lpParam, const bool, const bool),
|
||||||
|
|
@ -118,21 +124,21 @@ void C4JStorage::RegisterMarketplaceCountsCallback(
|
||||||
void C4JStorage::SetDLCPackageRoot(char* pszDLCRoot) {}
|
void C4JStorage::SetDLCPackageRoot(char* pszDLCRoot) {}
|
||||||
C4JStorage::EDLCStatus C4JStorage::GetDLCOffers(
|
C4JStorage::EDLCStatus C4JStorage::GetDLCOffers(
|
||||||
int iPad, int (*Func)(void*, int, std::uint32_t, int), void* lpParam,
|
int iPad, int (*Func)(void*, int, std::uint32_t, int), void* lpParam,
|
||||||
DWORD dwOfferTypesBitmask) {
|
std::uint32_t dwOfferTypesBitmask) {
|
||||||
return EDLC_NoOffers;
|
return EDLC_NoOffers;
|
||||||
}
|
}
|
||||||
DWORD C4JStorage::CancelGetDLCOffers() { return 0; }
|
unsigned int C4JStorage::CancelGetDLCOffers() { return 0; }
|
||||||
void C4JStorage::ClearDLCOffers() {}
|
void C4JStorage::ClearDLCOffers() {}
|
||||||
XMARKETPLACE_CONTENTOFFER_INFO& C4JStorage::GetOffer(DWORD dw) {
|
XMARKETPLACE_CONTENTOFFER_INFO& C4JStorage::GetOffer(unsigned int dw) {
|
||||||
return s_dummyOffer;
|
return s_dummyOffer;
|
||||||
}
|
}
|
||||||
int C4JStorage::GetOfferCount() { return 0; }
|
int C4JStorage::GetOfferCount() { return 0; }
|
||||||
DWORD C4JStorage::InstallOffer(int iOfferIDC, __uint64* ullOfferIDA,
|
unsigned int C4JStorage::InstallOffer(int iOfferIDC, __uint64* ullOfferIDA,
|
||||||
int (*Func)(void*, int, int), void* lpParam,
|
int (*Func)(void*, int, int),
|
||||||
bool bTrial) {
|
void* lpParam, bool bTrial) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
DWORD C4JStorage::GetAvailableDLCCount(int iPad) { return 0; }
|
unsigned int C4JStorage::GetAvailableDLCCount(int iPad) { return 0; }
|
||||||
C4JStorage::EDLCStatus C4JStorage::GetInstalledDLC(int iPad,
|
C4JStorage::EDLCStatus C4JStorage::GetInstalledDLC(int iPad,
|
||||||
int (*Func)(void*, int, int),
|
int (*Func)(void*, int, int),
|
||||||
void* lpParam) {
|
void* lpParam) {
|
||||||
|
|
@ -141,14 +147,14 @@ C4JStorage::EDLCStatus C4JStorage::GetInstalledDLC(int iPad,
|
||||||
}
|
}
|
||||||
return EDLC_NoInstalledDLC;
|
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(
|
std::uint32_t C4JStorage::MountInstalledDLC(
|
||||||
int iPad, std::uint32_t dwDLC,
|
int iPad, std::uint32_t dwDLC,
|
||||||
int (*Func)(void*, int, std::uint32_t, std::uint32_t), void* lpParam,
|
int (*Func)(void*, int, std::uint32_t, std::uint32_t), void* lpParam,
|
||||||
LPCSTR szMountDrive) {
|
LPCSTR szMountDrive) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
DWORD C4JStorage::UnmountInstalledDLC(LPCSTR szMountDrive) { return 0; }
|
unsigned int C4JStorage::UnmountInstalledDLC(LPCSTR szMountDrive) { return 0; }
|
||||||
void C4JStorage::GetMountedDLCFileList(const char* szMountDrive,
|
void C4JStorage::GetMountedDLCFileList(const char* szMountDrive,
|
||||||
std::vector<std::string>& fileList) {
|
std::vector<std::string>& fileList) {
|
||||||
fileList.clear();
|
fileList.clear();
|
||||||
|
|
@ -156,14 +162,14 @@ void C4JStorage::GetMountedDLCFileList(const char* szMountDrive,
|
||||||
std::string C4JStorage::GetMountedPath(std::string szMount) { return ""; }
|
std::string C4JStorage::GetMountedPath(std::string szMount) { return ""; }
|
||||||
C4JStorage::ETMSStatus C4JStorage::ReadTMSFile(
|
C4JStorage::ETMSStatus C4JStorage::ReadTMSFile(
|
||||||
int iQuadrant, eGlobalStorage eStorageFacility,
|
int iQuadrant, eGlobalStorage eStorageFacility,
|
||||||
C4JStorage::eTMS_FileType eFileType, WCHAR* pwchFilename, BYTE** ppBuffer,
|
C4JStorage::eTMS_FileType eFileType, WCHAR* pwchFilename,
|
||||||
DWORD* pdwBufferSize, int (*Func)(void*, WCHAR*, int, bool, int),
|
std::uint8_t** ppBuffer, unsigned int* pBufferSize,
|
||||||
void* lpParam, int iAction) {
|
int (*Func)(void*, WCHAR*, int, bool, int), void* lpParam, int iAction) {
|
||||||
return ETMSStatus_Fail;
|
return ETMSStatus_Fail;
|
||||||
}
|
}
|
||||||
bool C4JStorage::WriteTMSFile(int iQuadrant, eGlobalStorage eStorageFacility,
|
bool C4JStorage::WriteTMSFile(int iQuadrant, eGlobalStorage eStorageFacility,
|
||||||
WCHAR* pwchFilename, BYTE* pBuffer,
|
WCHAR* pwchFilename, std::uint8_t* pBuffer,
|
||||||
DWORD dwBufferSize) {
|
unsigned int bufferSize) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool C4JStorage::DeleteTMSFile(int iQuadrant, eGlobalStorage eStorageFacility,
|
bool C4JStorage::DeleteTMSFile(int iQuadrant, eGlobalStorage eStorageFacility,
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ typedef struct {
|
||||||
char UTF8SaveFilename[MAX_SAVEFILENAME_LENGTH];
|
char UTF8SaveFilename[MAX_SAVEFILENAME_LENGTH];
|
||||||
char UTF8SaveTitle[MAX_DISPLAYNAME_LENGTH];
|
char UTF8SaveTitle[MAX_DISPLAYNAME_LENGTH];
|
||||||
CONTAINER_METADATA metaData;
|
CONTAINER_METADATA metaData;
|
||||||
PBYTE thumbnailData;
|
std::uint8_t* thumbnailData;
|
||||||
} SAVE_INFO, *PSAVE_INFO;
|
} SAVE_INFO, *PSAVE_INFO;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
@ -40,14 +40,14 @@ public:
|
||||||
// Structs defined in the DLC_Creator, but added here to be used in the app
|
// Structs defined in the DLC_Creator, but added here to be used in the app
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned int uiFileSize;
|
unsigned int uiFileSize;
|
||||||
DWORD dwType;
|
std::uint32_t dwType;
|
||||||
DWORD dwWchCount; // count of WCHAR in next array
|
std::uint32_t dwWchCount; // count of WCHAR in next array
|
||||||
WCHAR wchFile[1];
|
WCHAR wchFile[1];
|
||||||
} DLC_FILE_DETAILS, *PDLC_FILE_DETAILS;
|
} DLC_FILE_DETAILS, *PDLC_FILE_DETAILS;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
DWORD dwType;
|
std::uint32_t dwType;
|
||||||
DWORD dwWchCount; // count of WCHAR in next array;
|
std::uint32_t dwWchCount; // count of WCHAR in next array;
|
||||||
WCHAR wchData[1]; // will be an array of size dwBytes
|
WCHAR wchData[1]; // will be an array of size dwBytes
|
||||||
} DLC_FILE_PARAM, *PDLC_FILE_PARAM;
|
} DLC_FILE_PARAM, *PDLC_FILE_PARAM;
|
||||||
// End of DLC_Creator structs
|
// End of DLC_Creator structs
|
||||||
|
|
@ -55,17 +55,18 @@ public:
|
||||||
typedef struct {
|
typedef struct {
|
||||||
WCHAR wchDisplayName[XCONTENT_MAX_DISPLAYNAME_LENGTH];
|
WCHAR wchDisplayName[XCONTENT_MAX_DISPLAYNAME_LENGTH];
|
||||||
CHAR szFileName[XCONTENT_MAX_FILENAME_LENGTH];
|
CHAR szFileName[XCONTENT_MAX_FILENAME_LENGTH];
|
||||||
DWORD dwImageOffset;
|
std::uint32_t dwImageOffset;
|
||||||
DWORD dwImageBytes;
|
std::uint32_t dwImageBytes;
|
||||||
} CACHEINFOSTRUCT;
|
} CACHEINFOSTRUCT;
|
||||||
|
|
||||||
// structure to hold DLC info in TMS
|
// structure to hold DLC info in TMS
|
||||||
typedef struct {
|
typedef struct {
|
||||||
DWORD dwVersion;
|
std::uint32_t dwVersion;
|
||||||
DWORD dwNewOffers;
|
std::uint32_t dwNewOffers;
|
||||||
DWORD dwTotalOffers;
|
std::uint32_t dwTotalOffers;
|
||||||
DWORD dwInstalledTotalOffers;
|
std::uint32_t dwInstalledTotalOffers;
|
||||||
BYTE bPadding[1024 - sizeof(DWORD) * 4]; // future expansion
|
std::uint8_t bPadding[1024 - sizeof(std::uint32_t) * 4];
|
||||||
|
// future expansion
|
||||||
} DLC_TMS_DETAILS;
|
} DLC_TMS_DETAILS;
|
||||||
|
|
||||||
enum eGTS_FileTypes { eGTS_Type_Skin = 0, eGTS_Type_Cape, eGTS_Type_MAX };
|
enum eGTS_FileTypes { eGTS_Type_Skin = 0, eGTS_Type_Cape, eGTS_Type_MAX };
|
||||||
|
|
@ -188,8 +189,8 @@ public:
|
||||||
} TMSPP_FILE_LIST, *PTMSPP_FILE_LIST;
|
} TMSPP_FILE_LIST, *PTMSPP_FILE_LIST;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
DWORD dwSize;
|
unsigned int size;
|
||||||
PBYTE pbData;
|
std::uint8_t* pbData;
|
||||||
} TMSPP_FILEDATA, *PTMSPP_FILEDATA;
|
} TMSPP_FILEDATA, *PTMSPP_FILEDATA;
|
||||||
|
|
||||||
C4JStorage();
|
C4JStorage();
|
||||||
|
|
@ -198,11 +199,11 @@ public:
|
||||||
|
|
||||||
// Messages
|
// Messages
|
||||||
C4JStorage::EMessageResult RequestMessageBox(
|
C4JStorage::EMessageResult RequestMessageBox(
|
||||||
UINT uiTitle, UINT uiText, UINT* uiOptionA, UINT uiOptionC,
|
unsigned int uiTitle, unsigned int uiText, unsigned int* uiOptionA,
|
||||||
DWORD dwPad = XUSER_INDEX_ANY,
|
unsigned int uiOptionC, unsigned int pad = XUSER_INDEX_ANY,
|
||||||
int (*Func)(void*, int, const C4JStorage::EMessageResult) = NULL,
|
int (*Func)(void*, int, const C4JStorage::EMessageResult) = NULL,
|
||||||
void* lpParam = NULL, C4JStringTable* pStringTable = NULL,
|
void* lpParam = NULL, C4JStringTable* pStringTable = NULL,
|
||||||
WCHAR* pwchFormatString = NULL, DWORD dwFocusButton = 0);
|
WCHAR* pwchFormatString = NULL, unsigned int focusButton = 0);
|
||||||
|
|
||||||
C4JStorage::EMessageResult GetMessageBoxResult();
|
C4JStorage::EMessageResult GetMessageBoxResult();
|
||||||
|
|
||||||
|
|
@ -230,14 +231,16 @@ public:
|
||||||
void GetSaveData(void* pvData, unsigned int* puiBytes);
|
void GetSaveData(void* pvData, unsigned int* puiBytes);
|
||||||
PVOID AllocateSaveData(unsigned int uiBytes);
|
PVOID AllocateSaveData(unsigned int uiBytes);
|
||||||
void SetSaveImages(
|
void SetSaveImages(
|
||||||
PBYTE pbThumbnail, DWORD dwThumbnailBytes, PBYTE pbImage,
|
std::uint8_t* pbThumbnail, unsigned int thumbnailBytes,
|
||||||
DWORD dwImageBytes, PBYTE pbTextData,
|
std::uint8_t* pbImage, unsigned int imageBytes,
|
||||||
DWORD dwTextDataBytes); // Sets the thumbnail & image for the save,
|
std::uint8_t* pbTextData,
|
||||||
// optionally setting the metadata in the png
|
unsigned int textDataBytes); // Sets the thumbnail & image for the
|
||||||
|
// save, optionally setting the
|
||||||
|
// metadata in the png
|
||||||
C4JStorage::ESaveGameState SaveSaveData(int (*Func)(void*, const bool),
|
C4JStorage::ESaveGameState SaveSaveData(int (*Func)(void*, const bool),
|
||||||
void* lpParam);
|
void* lpParam);
|
||||||
void CopySaveDataToNewSave(PBYTE pbThumbnail, DWORD cbThumbnail,
|
void CopySaveDataToNewSave(std::uint8_t* pbThumbnail,
|
||||||
WCHAR* wchNewName,
|
unsigned int cbThumbnail, WCHAR* wchNewName,
|
||||||
int (*Func)(void* lpParam, bool), void* lpParam);
|
int (*Func)(void* lpParam, bool), void* lpParam);
|
||||||
void SetSaveDeviceSelected(unsigned int uiPad, bool bSelected);
|
void SetSaveDeviceSelected(unsigned int uiPad, bool bSelected);
|
||||||
bool GetSaveDeviceSelected(unsigned int iPad);
|
bool GetSaveDeviceSelected(unsigned int iPad);
|
||||||
|
|
@ -261,9 +264,10 @@ public:
|
||||||
void* lpParam); // Get the thumbnail for an individual save referenced
|
void* lpParam); // Get the thumbnail for an individual save referenced
|
||||||
// by pSaveInfo
|
// by pSaveInfo
|
||||||
|
|
||||||
void GetSaveCacheFileInfo(DWORD dwFile, XCONTENT_DATA& xContentData);
|
void GetSaveCacheFileInfo(unsigned int fileIndex, XCONTENT_DATA& xContentData);
|
||||||
void GetSaveCacheFileInfo(DWORD dwFile, PBYTE* ppbImageData,
|
void GetSaveCacheFileInfo(unsigned int fileIndex,
|
||||||
DWORD* pdwImageBytes);
|
std::uint8_t** ppbImageData,
|
||||||
|
unsigned int* pImageBytes);
|
||||||
|
|
||||||
// Load the save. Need to call GetSaveData once the callback is called
|
// Load the save. Need to call GetSaveData once the callback is called
|
||||||
C4JStorage::ESaveGameState LoadSaveData(PSAVE_INFO pSaveInfo,
|
C4JStorage::ESaveGameState LoadSaveData(PSAVE_INFO pSaveInfo,
|
||||||
|
|
@ -282,25 +286,26 @@ public:
|
||||||
void SetDLCPackageRoot(char* pszDLCRoot);
|
void SetDLCPackageRoot(char* pszDLCRoot);
|
||||||
C4JStorage::EDLCStatus GetDLCOffers(
|
C4JStorage::EDLCStatus GetDLCOffers(
|
||||||
int iPad, int (*Func)(void*, int, std::uint32_t, int), void* lpParam,
|
int iPad, int (*Func)(void*, int, std::uint32_t, int), void* lpParam,
|
||||||
DWORD dwOfferTypesBitmask = XMARKETPLACE_OFFERING_TYPE_CONTENT);
|
std::uint32_t dwOfferTypesBitmask =
|
||||||
DWORD CancelGetDLCOffers();
|
XMARKETPLACE_OFFERING_TYPE_CONTENT);
|
||||||
|
unsigned int CancelGetDLCOffers();
|
||||||
void ClearDLCOffers();
|
void ClearDLCOffers();
|
||||||
XMARKETPLACE_CONTENTOFFER_INFO& GetOffer(DWORD dw);
|
XMARKETPLACE_CONTENTOFFER_INFO& GetOffer(unsigned int dw);
|
||||||
int GetOfferCount();
|
int GetOfferCount();
|
||||||
DWORD InstallOffer(int iOfferIDC, __uint64* ullOfferIDA,
|
unsigned int InstallOffer(int iOfferIDC, __uint64* ullOfferIDA,
|
||||||
int (*Func)(void*, int, int), void* lpParam,
|
int (*Func)(void*, int, int), void* lpParam,
|
||||||
bool bTrial = false);
|
bool bTrial = false);
|
||||||
DWORD GetAvailableDLCCount(int iPad);
|
unsigned int GetAvailableDLCCount(int iPad);
|
||||||
|
|
||||||
C4JStorage::EDLCStatus GetInstalledDLC(int iPad,
|
C4JStorage::EDLCStatus GetInstalledDLC(int iPad,
|
||||||
int (*Func)(void*, int, int),
|
int (*Func)(void*, int, int),
|
||||||
void* lpParam);
|
void* lpParam);
|
||||||
XCONTENT_DATA& GetDLC(DWORD dw);
|
XCONTENT_DATA& GetDLC(unsigned int dw);
|
||||||
std::uint32_t MountInstalledDLC(int iPad, std::uint32_t dwDLC,
|
std::uint32_t MountInstalledDLC(int iPad, std::uint32_t dwDLC,
|
||||||
int (*Func)(void*, int, std::uint32_t,
|
int (*Func)(void*, int, std::uint32_t,
|
||||||
std::uint32_t),
|
std::uint32_t),
|
||||||
void* lpParam, LPCSTR szMountDrive = NULL);
|
void* lpParam, LPCSTR szMountDrive = NULL);
|
||||||
DWORD UnmountInstalledDLC(LPCSTR szMountDrive = NULL);
|
unsigned int UnmountInstalledDLC(LPCSTR szMountDrive = NULL);
|
||||||
void GetMountedDLCFileList(const char* szMountDrive,
|
void GetMountedDLCFileList(const char* szMountDrive,
|
||||||
std::vector<std::string>& fileList);
|
std::vector<std::string>& fileList);
|
||||||
std::string GetMountedPath(std::string szMount);
|
std::string GetMountedPath(std::string szMount);
|
||||||
|
|
@ -309,11 +314,12 @@ public:
|
||||||
C4JStorage::ETMSStatus ReadTMSFile(
|
C4JStorage::ETMSStatus ReadTMSFile(
|
||||||
int iQuadrant, eGlobalStorage eStorageFacility,
|
int iQuadrant, eGlobalStorage eStorageFacility,
|
||||||
C4JStorage::eTMS_FileType eFileType, WCHAR* pwchFilename,
|
C4JStorage::eTMS_FileType eFileType, WCHAR* pwchFilename,
|
||||||
BYTE** ppBuffer, DWORD* pdwBufferSize,
|
std::uint8_t** ppBuffer, unsigned int* pBufferSize,
|
||||||
int (*Func)(void*, WCHAR*, int, bool, int) = NULL, void* lpParam = NULL,
|
int (*Func)(void*, WCHAR*, int, bool, int) = NULL, void* lpParam = NULL,
|
||||||
int iAction = 0);
|
int iAction = 0);
|
||||||
bool WriteTMSFile(int iQuadrant, eGlobalStorage eStorageFacility,
|
bool WriteTMSFile(int iQuadrant, eGlobalStorage eStorageFacility,
|
||||||
WCHAR* pwchFilename, BYTE* pBuffer, DWORD dwBufferSize);
|
WCHAR* pwchFilename, std::uint8_t* pBuffer,
|
||||||
|
unsigned int bufferSize);
|
||||||
bool DeleteTMSFile(int iQuadrant, eGlobalStorage eStorageFacility,
|
bool DeleteTMSFile(int iQuadrant, eGlobalStorage eStorageFacility,
|
||||||
WCHAR* pwchFilename);
|
WCHAR* pwchFilename);
|
||||||
void StoreTMSPathName(WCHAR* pwchName = NULL);
|
void StoreTMSPathName(WCHAR* pwchName = NULL);
|
||||||
|
|
@ -323,7 +329,7 @@ public:
|
||||||
C4JStorage::ETMSStatus WriteTMSFile(
|
C4JStorage::ETMSStatus WriteTMSFile(
|
||||||
int iPad, C4JStorage::eGlobalStorage eStorageFacility,
|
int iPad, C4JStorage::eGlobalStorage eStorageFacility,
|
||||||
C4JStorage::eTMS_FileType eFileType, CHAR* pchFilePath, CHAR* pchBuffer,
|
C4JStorage::eTMS_FileType eFileType, CHAR* pchFilePath, CHAR* pchBuffer,
|
||||||
DWORD dwBufferSize, TMSCLIENT_CALLBACK Func, LPVOID lpParam);
|
unsigned int bufferSize, TMSCLIENT_CALLBACK Func, LPVOID lpParam);
|
||||||
HRESULT GetUserQuotaInfo(int iPad, TMSCLIENT_CALLBACK Func, LPVOID lpParam);
|
HRESULT GetUserQuotaInfo(int iPad, TMSCLIENT_CALLBACK Func, LPVOID lpParam);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -903,7 +903,7 @@ void MinecraftServer::Suspend() {
|
||||||
QueryPerformanceCounter(&qwNewTime);
|
QueryPerformanceCounter(&qwNewTime);
|
||||||
|
|
||||||
qwDeltaTime.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
|
qwDeltaTime.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
|
||||||
fElapsedTime = fSecsPerTick * ((FLOAT)(qwDeltaTime.QuadPart));
|
fElapsedTime = fSecsPerTick * static_cast<float>(qwDeltaTime.QuadPart);
|
||||||
|
|
||||||
// 4J-JEV: Flush stats and call PlayerSessionExit.
|
// 4J-JEV: Flush stats and call PlayerSessionExit.
|
||||||
for (int iPad = 0; iPad < XUSER_MAX_COUNT; iPad++) {
|
for (int iPad = 0; iPad < XUSER_MAX_COUNT; iPad++) {
|
||||||
|
|
@ -1272,7 +1272,7 @@ void MinecraftServer::run(__int64 seed, void* lpParameter) {
|
||||||
qwDeltaTime.QuadPart =
|
qwDeltaTime.QuadPart =
|
||||||
qwNewTime.QuadPart - qwTime.QuadPart;
|
qwNewTime.QuadPart - qwTime.QuadPart;
|
||||||
fElapsedTime =
|
fElapsedTime =
|
||||||
fSecsPerTick * ((FLOAT)(qwDeltaTime.QuadPart));
|
fSecsPerTick * static_cast<float>(qwDeltaTime.QuadPart);
|
||||||
app.DebugPrintf("Autosave: Elapsed time %f\n",
|
app.DebugPrintf("Autosave: Elapsed time %f\n",
|
||||||
fElapsedTime);
|
fElapsedTime);
|
||||||
} break;
|
} break;
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ TMS_FILE;
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
std::uint8_t *pbData;
|
std::uint8_t *pbData;
|
||||||
unsigned int dwBytes;
|
unsigned int byteCount;
|
||||||
std::uint8_t ucRefCount;
|
std::uint8_t ucRefCount;
|
||||||
}
|
}
|
||||||
MEMDATA,*PMEMDATA;
|
MEMDATA,*PMEMDATA;
|
||||||
|
|
@ -197,7 +197,7 @@ FEATURE_DATA;
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
std::uint8_t *pBannedList;
|
std::uint8_t *pBannedList;
|
||||||
unsigned int dwBytes;
|
unsigned int byteCount;
|
||||||
}
|
}
|
||||||
BANNEDLIST;
|
BANNEDLIST;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5285,8 +5285,8 @@ int CMinecraftApp::DLCMountedCallback(void *pParam,int iPad,std::uint32_t dwErr,
|
||||||
m_Time.qwAppTime.QuadPart += qwDeltaTime.QuadPart;
|
m_Time.qwAppTime.QuadPart += qwDeltaTime.QuadPart;
|
||||||
m_Time.qwTime.QuadPart = qwNewTime.QuadPart;
|
m_Time.qwTime.QuadPart = qwNewTime.QuadPart;
|
||||||
|
|
||||||
m_Time.fElapsedTime = m_Time.fSecsPerTick * ((FLOAT)(qwDeltaTime.QuadPart));
|
m_Time.fElapsedTime = m_Time.fSecsPerTick * static_cast<float>(qwDeltaTime.QuadPart);
|
||||||
m_Time.fAppTime = m_Time.fSecsPerTick * ((FLOAT)(m_Time.qwAppTime.QuadPart));
|
m_Time.fAppTime = m_Time.fSecsPerTick * static_cast<float>(m_Time.qwAppTime.QuadPart);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -5319,7 +5319,7 @@ bool CMinecraftApp::isXuidDeadmau5(PlayerUID xuid)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMinecraftApp::AddMemoryTextureFile(const std::wstring &wName, std::uint8_t *pbData, unsigned int dwBytes)
|
void CMinecraftApp::AddMemoryTextureFile(const std::wstring &wName, std::uint8_t *pbData, unsigned int byteCount)
|
||||||
{
|
{
|
||||||
EnterCriticalSection(&csMemFilesLock);
|
EnterCriticalSection(&csMemFilesLock);
|
||||||
// check it's not already in
|
// check it's not already in
|
||||||
|
|
@ -5332,13 +5332,13 @@ void CMinecraftApp::AddMemoryTextureFile(const std::wstring &wName, std::uint8_t
|
||||||
#endif
|
#endif
|
||||||
pData = (*it).second;
|
pData = (*it).second;
|
||||||
|
|
||||||
if(pData->dwBytes == 0 && dwBytes != 0)
|
if(pData->byteCount == 0 && byteCount != 0)
|
||||||
{
|
{
|
||||||
// This should never be NULL if dwBytes is 0
|
// This should never be NULL if byteCount is 0
|
||||||
if(pData->pbData!=NULL) delete [] pData->pbData;
|
if(pData->pbData!=NULL) delete [] pData->pbData;
|
||||||
|
|
||||||
pData->pbData=pbData;
|
pData->pbData=pbData;
|
||||||
pData->dwBytes=dwBytes;
|
pData->byteCount=byteCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
++pData->ucRefCount;
|
++pData->ucRefCount;
|
||||||
|
|
@ -5353,10 +5353,9 @@ void CMinecraftApp::AddMemoryTextureFile(const std::wstring &wName, std::uint8_t
|
||||||
|
|
||||||
// add this texture to the list of memory texture files - it will then be picked up by the level renderer's AddEntity
|
// add this texture to the list of memory texture files - it will then be picked up by the level renderer's AddEntity
|
||||||
|
|
||||||
pData = (PMEMDATA)new BYTE[sizeof(MEMDATA)];
|
pData = new MEMDATA();
|
||||||
ZeroMemory( pData, sizeof(MEMDATA) );
|
|
||||||
pData->pbData=pbData;
|
pData->pbData=pbData;
|
||||||
pData->dwBytes=dwBytes;
|
pData->byteCount=byteCount;
|
||||||
pData->ucRefCount = 1;
|
pData->ucRefCount = 1;
|
||||||
|
|
||||||
// use the xuid to access the skin data
|
// use the xuid to access the skin data
|
||||||
|
|
@ -5382,7 +5381,7 @@ void CMinecraftApp::RemoveMemoryTextureFile(const std::wstring &wName)
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
wprintf(L"Erasing the memory texture file data for %ls\n", wName.c_str());
|
wprintf(L"Erasing the memory texture file data for %ls\n", wName.c_str());
|
||||||
#endif
|
#endif
|
||||||
delete [] pData;
|
delete pData;
|
||||||
m_MEM_Files.erase(wName);
|
m_MEM_Files.erase(wName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -5414,7 +5413,7 @@ bool CMinecraftApp::IsFileInMemoryTextures(const std::wstring &wName)
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMinecraftApp::GetMemFileDetails(const std::wstring &wName, std::uint8_t **ppbData, unsigned int *pdwBytes)
|
void CMinecraftApp::GetMemFileDetails(const std::wstring &wName, std::uint8_t **ppbData, unsigned int *pByteCount)
|
||||||
{
|
{
|
||||||
EnterCriticalSection(&csMemFilesLock);
|
EnterCriticalSection(&csMemFilesLock);
|
||||||
AUTO_VAR(it, m_MEM_Files.find(wName));
|
AUTO_VAR(it, m_MEM_Files.find(wName));
|
||||||
|
|
@ -5422,12 +5421,12 @@ void CMinecraftApp::GetMemFileDetails(const std::wstring &wName, std::uint8_t **
|
||||||
{
|
{
|
||||||
PMEMDATA pData = (*it).second;
|
PMEMDATA pData = (*it).second;
|
||||||
*ppbData=pData->pbData;
|
*ppbData=pData->pbData;
|
||||||
*pdwBytes=pData->dwBytes;
|
*pByteCount=pData->byteCount;
|
||||||
}
|
}
|
||||||
LeaveCriticalSection(&csMemFilesLock);
|
LeaveCriticalSection(&csMemFilesLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMinecraftApp::AddMemoryTPDFile(int iConfig, std::uint8_t *pbData, unsigned int dwBytes)
|
void CMinecraftApp::AddMemoryTPDFile(int iConfig, std::uint8_t *pbData, unsigned int byteCount)
|
||||||
{
|
{
|
||||||
EnterCriticalSection(&csMemTPDLock);
|
EnterCriticalSection(&csMemTPDLock);
|
||||||
// check it's not already in
|
// check it's not already in
|
||||||
|
|
@ -5435,10 +5434,9 @@ void CMinecraftApp::AddMemoryTPDFile(int iConfig, std::uint8_t *pbData, unsigned
|
||||||
AUTO_VAR(it, m_MEM_TPD.find(iConfig));
|
AUTO_VAR(it, m_MEM_TPD.find(iConfig));
|
||||||
if(it == m_MEM_TPD.end())
|
if(it == m_MEM_TPD.end())
|
||||||
{
|
{
|
||||||
pData = (PMEMDATA)new BYTE[sizeof(MEMDATA)];
|
pData = new MEMDATA();
|
||||||
ZeroMemory( pData, sizeof(MEMDATA) );
|
|
||||||
pData->pbData=pbData;
|
pData->pbData=pbData;
|
||||||
pData->dwBytes=dwBytes;
|
pData->byteCount=byteCount;
|
||||||
pData->ucRefCount = 1;
|
pData->ucRefCount = 1;
|
||||||
|
|
||||||
m_MEM_TPD[iConfig]=pData;
|
m_MEM_TPD[iConfig]=pData;
|
||||||
|
|
@ -5456,7 +5454,7 @@ void CMinecraftApp::RemoveMemoryTPDFile(int iConfig)
|
||||||
if(it != m_MEM_TPD.end())
|
if(it != m_MEM_TPD.end())
|
||||||
{
|
{
|
||||||
pData=m_MEM_TPD[iConfig];
|
pData=m_MEM_TPD[iConfig];
|
||||||
delete [] pData;
|
delete pData;
|
||||||
m_MEM_TPD.erase(iConfig);
|
m_MEM_TPD.erase(iConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5516,7 +5514,7 @@ bool CMinecraftApp::IsFileInTPD(int iConfig)
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMinecraftApp::GetTPD(int iConfig, std::uint8_t **ppbData, unsigned int *pdwBytes)
|
void CMinecraftApp::GetTPD(int iConfig, std::uint8_t **ppbData, unsigned int *pByteCount)
|
||||||
{
|
{
|
||||||
EnterCriticalSection(&csMemTPDLock);
|
EnterCriticalSection(&csMemTPDLock);
|
||||||
AUTO_VAR(it, m_MEM_TPD.find(iConfig));
|
AUTO_VAR(it, m_MEM_TPD.find(iConfig));
|
||||||
|
|
@ -5524,7 +5522,7 @@ void CMinecraftApp::GetTPD(int iConfig, std::uint8_t **ppbData, unsigned int *pd
|
||||||
{
|
{
|
||||||
PMEMDATA pData = (*it).second;
|
PMEMDATA pData = (*it).second;
|
||||||
*ppbData=pData->pbData;
|
*ppbData=pData->pbData;
|
||||||
*pdwBytes=pData->dwBytes;
|
*pByteCount=pData->byteCount;
|
||||||
}
|
}
|
||||||
LeaveCriticalSection(&csMemTPDLock);
|
LeaveCriticalSection(&csMemTPDLock);
|
||||||
}
|
}
|
||||||
|
|
@ -6099,7 +6097,7 @@ std::wstring CMinecraftApp::FormatHTMLString(int iPad, const std::wstring &desc,
|
||||||
#endif // _XBOX
|
#endif // _XBOX
|
||||||
|
|
||||||
// Fix for #8903 - UI: Localization: KOR/JPN/CHT: Button Icons are rendered with padding space, which looks no good
|
// Fix for #8903 - UI: Localization: KOR/JPN/CHT: Button Icons are rendered with padding space, which looks no good
|
||||||
DWORD dwLanguage = XGetLanguage( );
|
std::uint32_t dwLanguage = XGetLanguage( );
|
||||||
switch(dwLanguage)
|
switch(dwLanguage)
|
||||||
{
|
{
|
||||||
case XC_LANGUAGE_KOREAN:
|
case XC_LANGUAGE_KOREAN:
|
||||||
|
|
@ -8334,14 +8332,14 @@ int CMinecraftApp::TMSPPFileReturned(void *pParam,int iPad,int iUserData,C4JStor
|
||||||
case e_DLC_TexturePackData:
|
case e_DLC_TexturePackData:
|
||||||
{
|
{
|
||||||
// 4J-PB - we need to allocate memory for the file data and copy into it, since the current data is a reference into the blob download memory
|
// 4J-PB - we need to allocate memory for the file data and copy into it, since the current data is a reference into the blob download memory
|
||||||
std::uint8_t *pbData = new std::uint8_t[pFileData->dwSize];
|
std::uint8_t *pbData = new std::uint8_t[pFileData->size];
|
||||||
memcpy(pbData,pFileData->pbData,pFileData->dwSize);
|
memcpy(pbData,pFileData->pbData,pFileData->size);
|
||||||
|
|
||||||
pClass->m_vTMSPPData.push_back(pbData);
|
pClass->m_vTMSPPData.push_back(pbData);
|
||||||
app.DebugPrintf("Got texturepack data\n");
|
app.DebugPrintf("Got texturepack data\n");
|
||||||
// get the config value for the texture pack
|
// get the config value for the texture pack
|
||||||
int iConfig=app.GetTPConfigVal(pCurrent->wchFilename);
|
int iConfig=app.GetTPConfigVal(pCurrent->wchFilename);
|
||||||
app.AddMemoryTPDFile(iConfig, pbData, pFileData->dwSize);
|
app.AddMemoryTPDFile(iConfig, pbData, pFileData->size);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
@ -8349,12 +8347,12 @@ int CMinecraftApp::TMSPPFileReturned(void *pParam,int iPad,int iUserData,C4JStor
|
||||||
if(pFileData->pbData[0]==0x89)
|
if(pFileData->pbData[0]==0x89)
|
||||||
{
|
{
|
||||||
// 4J-PB - we need to allocate memory for the file data and copy into it, since the current data is a reference into the blob download memory
|
// 4J-PB - we need to allocate memory for the file data and copy into it, since the current data is a reference into the blob download memory
|
||||||
std::uint8_t *pbData = new std::uint8_t[pFileData->dwSize];
|
std::uint8_t *pbData = new std::uint8_t[pFileData->size];
|
||||||
memcpy(pbData,pFileData->pbData,pFileData->dwSize);
|
memcpy(pbData,pFileData->pbData,pFileData->size);
|
||||||
|
|
||||||
pClass->m_vTMSPPData.push_back(pbData);
|
pClass->m_vTMSPPData.push_back(pbData);
|
||||||
app.DebugPrintf("Got image data - %ls\n",pCurrent->wchFilename);
|
app.DebugPrintf("Got image data - %ls\n",pCurrent->wchFilename);
|
||||||
app.AddMemoryTextureFile(pCurrent->wchFilename, pbData, pFileData->dwSize);
|
app.AddMemoryTextureFile(pCurrent->wchFilename, pbData, pFileData->size);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -8371,12 +8369,12 @@ int CMinecraftApp::TMSPPFileReturned(void *pParam,int iPad,int iUserData,C4JStor
|
||||||
app.DebugPrintf("--- Got texturepack data %ls\n",pCurrent->wchFilename);
|
app.DebugPrintf("--- Got texturepack data %ls\n",pCurrent->wchFilename);
|
||||||
// get the config value for the texture pack
|
// get the config value for the texture pack
|
||||||
int iConfig=app.GetTPConfigVal(pCurrent->wchFilename);
|
int iConfig=app.GetTPConfigVal(pCurrent->wchFilename);
|
||||||
app.AddMemoryTPDFile(iConfig, pFileData->pbData, pFileData->dwSize);
|
app.AddMemoryTPDFile(iConfig, pFileData->pbData, pFileData->size);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
app.DebugPrintf("--- Got image data - %ls\n",pCurrent->wchFilename);
|
app.DebugPrintf("--- Got image data - %ls\n",pCurrent->wchFilename);
|
||||||
app.AddMemoryTextureFile(pCurrent->wchFilename, pFileData->pbData, pFileData->dwSize);
|
app.AddMemoryTextureFile(pCurrent->wchFilename, pFileData->pbData, pFileData->size);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -291,7 +291,7 @@ public:
|
||||||
static void NotificationsCallback(void *pParam,std::uint32_t dwNotification, unsigned int uiParam);
|
static void NotificationsCallback(void *pParam,std::uint32_t dwNotification, unsigned int uiParam);
|
||||||
|
|
||||||
// for the ethernet being disconnected
|
// for the ethernet being disconnected
|
||||||
static void LiveLinkChangeCallback(void *pParam,BOOL bConnected);
|
static void LiveLinkChangeCallback(void *pParam, bool bConnected);
|
||||||
bool GetLiveLinkRequired() {return m_bLiveLinkRequired;}
|
bool GetLiveLinkRequired() {return m_bLiveLinkRequired;}
|
||||||
void SetLiveLinkRequired(bool required) {m_bLiveLinkRequired=required;}
|
void SetLiveLinkRequired(bool required) {m_bLiveLinkRequired=required;}
|
||||||
|
|
||||||
|
|
@ -341,16 +341,16 @@ public:
|
||||||
bool isXuidNotch(PlayerUID xuid);
|
bool isXuidNotch(PlayerUID xuid);
|
||||||
bool isXuidDeadmau5(PlayerUID xuid);
|
bool isXuidDeadmau5(PlayerUID xuid);
|
||||||
|
|
||||||
void AddMemoryTextureFile(const std::wstring &wName, std::uint8_t *pbData, unsigned int dwBytes);
|
void AddMemoryTextureFile(const std::wstring &wName, std::uint8_t *pbData, unsigned int byteCount);
|
||||||
void RemoveMemoryTextureFile(const std::wstring &wName);
|
void RemoveMemoryTextureFile(const std::wstring &wName);
|
||||||
void GetMemFileDetails(const std::wstring &wName, std::uint8_t **ppbData, unsigned int *pdwBytes);
|
void GetMemFileDetails(const std::wstring &wName, std::uint8_t **ppbData, unsigned int *pByteCount);
|
||||||
bool IsFileInMemoryTextures(const std::wstring &wName);
|
bool IsFileInMemoryTextures(const std::wstring &wName);
|
||||||
|
|
||||||
// Texture Pack Data files (icon, banner, comparison shot & text)
|
// Texture Pack Data files (icon, banner, comparison shot & text)
|
||||||
void AddMemoryTPDFile(int iConfig, std::uint8_t *pbData, unsigned int dwBytes);
|
void AddMemoryTPDFile(int iConfig, std::uint8_t *pbData, unsigned int byteCount);
|
||||||
void RemoveMemoryTPDFile(int iConfig);
|
void RemoveMemoryTPDFile(int iConfig);
|
||||||
bool IsFileInTPD(int iConfig);
|
bool IsFileInTPD(int iConfig);
|
||||||
void GetTPD(int iConfig, std::uint8_t **ppbData, unsigned int *pdwBytes);
|
void GetTPD(int iConfig, std::uint8_t **ppbData, unsigned int *pByteCount);
|
||||||
int GetTPDSize() {return m_MEM_TPD.size();}
|
int GetTPDSize() {return m_MEM_TPD.size();}
|
||||||
#ifndef __PS3__
|
#ifndef __PS3__
|
||||||
int GetTPConfigVal(WCHAR *pwchDataFile);
|
int GetTPConfigVal(WCHAR *pwchDataFile);
|
||||||
|
|
@ -839,12 +839,12 @@ public:
|
||||||
|
|
||||||
bool GetBanListRead(int iPad) { return m_bRead_BannedListA[iPad];}
|
bool GetBanListRead(int iPad) { return m_bRead_BannedListA[iPad];}
|
||||||
void SetBanListRead(int iPad,bool bVal) { m_bRead_BannedListA[iPad]=bVal;}
|
void SetBanListRead(int iPad,bool bVal) { m_bRead_BannedListA[iPad]=bVal;}
|
||||||
void ClearBanList(int iPad) { BannedListA[iPad].pBannedList=NULL;BannedListA[iPad].dwBytes=0;}
|
void ClearBanList(int iPad) { BannedListA[iPad].pBannedList=NULL;BannedListA[iPad].byteCount=0;}
|
||||||
|
|
||||||
std::uint32_t GetRequiredTexturePackID() { return m_dwRequiredTexturePackID; }
|
std::uint32_t GetRequiredTexturePackID() { return m_dwRequiredTexturePackID; }
|
||||||
void SetRequiredTexturePackID(std::uint32_t texturePackId) { m_dwRequiredTexturePackID = texturePackId; }
|
void SetRequiredTexturePackID(std::uint32_t texturePackId) { m_dwRequiredTexturePackID = texturePackId; }
|
||||||
|
|
||||||
virtual void GetFileFromTPD(eTPDFileType eType, std::uint8_t *pbData, unsigned int dwBytes, std::uint8_t **ppbData, unsigned int *pdwBytes ) {*ppbData = NULL; *pdwBytes = 0;}
|
virtual void GetFileFromTPD(eTPDFileType eType, std::uint8_t *pbData, unsigned int byteCount, std::uint8_t **ppbData, unsigned int *pByteCount ) {*ppbData = NULL; *pByteCount = 0;}
|
||||||
|
|
||||||
//XTITLE_DEPLOYMENT_TYPE getDeploymentType() { return m_titleDeploymentType; }
|
//XTITLE_DEPLOYMENT_TYPE getDeploymentType() { return m_titleDeploymentType; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -395,12 +395,12 @@ DWORD XEnableGuestSignin(BOOL fEnable) { return 0; }
|
||||||
#ifdef _WINDOWS64
|
#ifdef _WINDOWS64
|
||||||
static void *profileData[4];
|
static void *profileData[4];
|
||||||
static bool s_bProfileIsFullVersion;
|
static bool s_bProfileIsFullVersion;
|
||||||
void C_4JProfile::Initialise( DWORD dwTitleID,
|
void C_4JProfile::Initialise( std::uint32_t dwTitleID,
|
||||||
DWORD dwOfferID,
|
std::uint32_t dwOfferID,
|
||||||
unsigned short usProfileVersion,
|
unsigned short usProfileVersion,
|
||||||
UINT uiProfileValuesC,
|
unsigned int uiProfileValuesC,
|
||||||
UINT uiProfileSettingsC,
|
unsigned int uiProfileSettingsC,
|
||||||
DWORD *pdwProfileSettingsA,
|
std::uint32_t *pdwProfileSettingsA,
|
||||||
int iGameDefinedDataSizeX4,
|
int iGameDefinedDataSizeX4,
|
||||||
unsigned int *puiGameDefinedDataChangedBitmask)
|
unsigned int *puiGameDefinedDataChangedBitmask)
|
||||||
{
|
{
|
||||||
|
|
@ -467,9 +467,9 @@ void C_4JProfile::SetLockedProfile(int iProf) {}
|
||||||
bool C_4JProfile::IsSignedIn(int iQuadrant) { return ( iQuadrant == 0); }
|
bool C_4JProfile::IsSignedIn(int iQuadrant) { return ( iQuadrant == 0); }
|
||||||
bool C_4JProfile::IsSignedInLive(int iProf) { return true; }
|
bool C_4JProfile::IsSignedInLive(int iProf) { return true; }
|
||||||
bool C_4JProfile::IsGuest(int iQuadrant) { return false; }
|
bool C_4JProfile::IsGuest(int iQuadrant) { return false; }
|
||||||
UINT C_4JProfile::RequestSignInUI(bool bFromInvite,bool bLocalGame,bool bNoGuestsAllowed,bool bMultiplayerSignIn,bool bAddUser, int( *Func)(void *,const bool, const int iPad),void *lpParam,int iQuadrant) { return 0; }
|
unsigned int C_4JProfile::RequestSignInUI(bool bFromInvite,bool bLocalGame,bool bNoGuestsAllowed,bool bMultiplayerSignIn,bool bAddUser, int( *Func)(void *,const bool, const int iPad),void *lpParam,int iQuadrant) { return 0; }
|
||||||
UINT C_4JProfile::DisplayOfflineProfile(int( *Func)(void *,const bool, const int iPad),void *lpParam,int iQuadrant) { return 0; }
|
unsigned int C_4JProfile::DisplayOfflineProfile(int( *Func)(void *,const bool, const int iPad),void *lpParam,int iQuadrant) { return 0; }
|
||||||
UINT C_4JProfile::RequestConvertOfflineToGuestUI(int( *Func)(void *,const bool, const int iPad),void *lpParam,int iQuadrant) { return 0; }
|
unsigned int C_4JProfile::RequestConvertOfflineToGuestUI(int( *Func)(void *,const bool, const int iPad),void *lpParam,int iQuadrant) { return 0; }
|
||||||
void C_4JProfile::SetPrimaryPlayerChanged(bool bVal) {}
|
void C_4JProfile::SetPrimaryPlayerChanged(bool bVal) {}
|
||||||
bool C_4JProfile::QuerySigninStatus(void) { return true; }
|
bool C_4JProfile::QuerySigninStatus(void) { return true; }
|
||||||
void C_4JProfile::GetXUID(int iPad, PlayerUID *pXuid,bool bOnlineXuid) {*pXuid = 0xe000d45248242f2e; }
|
void C_4JProfile::GetXUID(int iPad, PlayerUID *pXuid,bool bOnlineXuid) {*pXuid = 0xe000d45248242f2e; }
|
||||||
|
|
@ -558,7 +558,7 @@ void C_4JProfile::ShowProfileCard(int iPad, PlayerUID targetUid) {}
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
C4JStorage::C4JStorage() {}
|
C4JStorage::C4JStorage() {}
|
||||||
void C4JStorage::Tick() {}
|
void C4JStorage::Tick() {}
|
||||||
C4JStorage::EMessageResult C4JStorage::RequestMessageBox(UINT uiTitle, UINT uiText, UINT *uiOptionA,UINT uiOptionC, DWORD dwPad, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult),LPVOID lpParam, C4JStringTable *pStringTable, WCHAR *pwchFormatString,DWORD dwFocusButton) { 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)(LPVOID,int,const C4JStorage::EMessageResult),LPVOID lpParam, C4JStringTable *pStringTable, WCHAR *pwchFormatString,unsigned int focusButton) { return C4JStorage::EMessage_Undefined; }
|
||||||
C4JStorage::EMessageResult C4JStorage::GetMessageBoxResult() { 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; }
|
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) {}
|
void C4JStorage::Init(LPCWSTR pwchDefaultSaveName,char *pszSavePackName,int iMinimumSaveSize, int( *Func)(LPVOID, const ESavingMessage, int),LPVOID lpParam) {}
|
||||||
|
|
@ -576,7 +576,7 @@ unsigned int C4JStorage::GetSaveSize() { return 0; }
|
||||||
void C4JStorage::GetSaveData(void *pvData,unsigned int *pulBytes) {}
|
void C4JStorage::GetSaveData(void *pvData,unsigned int *pulBytes) {}
|
||||||
PVOID C4JStorage::AllocateSaveData(unsigned int ulBytes) { return new char[ulBytes]; }
|
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::SaveSaveData(unsigned int ulBytes,PBYTE pbThumbnail,DWORD cbThumbnail,PBYTE pbTextData, DWORD dwTextLen) {}
|
||||||
void C4JStorage::CopySaveDataToNewSave(PBYTE pbThumbnail,DWORD cbThumbnail,WCHAR *wchNewName,int ( *Func)(LPVOID lpParam, bool), LPVOID lpParam) {}
|
void C4JStorage::CopySaveDataToNewSave(std::uint8_t *pbThumbnail,unsigned int cbThumbnail,WCHAR *wchNewName,int ( *Func)(LPVOID lpParam, bool), LPVOID lpParam) {}
|
||||||
void C4JStorage::SetSaveDeviceSelected(unsigned int uiPad,bool bSelected) {}
|
void C4JStorage::SetSaveDeviceSelected(unsigned int uiPad,bool bSelected) {}
|
||||||
bool C4JStorage::GetSaveDeviceSelected(unsigned int iPad) { return true; }
|
bool C4JStorage::GetSaveDeviceSelected(unsigned int iPad) { return true; }
|
||||||
C4JStorage::ELoadGameStatus C4JStorage::DoesSaveExist(bool *pbExists) { return C4JStorage::ELoadGame_Idle; }
|
C4JStorage::ELoadGameStatus C4JStorage::DoesSaveExist(bool *pbExists) { return C4JStorage::ELoadGame_Idle; }
|
||||||
|
|
@ -585,27 +585,27 @@ 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::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::ESaveGameState C4JStorage::GetSavesInfo(int iPad,int ( *Func)(LPVOID lpParam,SAVE_DETAILS *pSaveDetails,const bool),LPVOID lpParam,char *pszSavePackName) { return C4JStorage::ESaveGame_Idle; }
|
||||||
|
|
||||||
void C4JStorage::GetSaveCacheFileInfo(DWORD dwFile,XCONTENT_DATA &xContentData) {}
|
void C4JStorage::GetSaveCacheFileInfo(unsigned int fileIndex,XCONTENT_DATA &xContentData) {}
|
||||||
void C4JStorage::GetSaveCacheFileInfo(DWORD dwFile, PBYTE *ppbImageData, DWORD *pdwImageBytes) {}
|
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::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::EDeleteGameStatus C4JStorage::DeleteSaveData(PSAVE_INFO pSaveInfo,int( *Func)(LPVOID lpParam,const bool), LPVOID lpParam) { return C4JStorage::EDeleteGame_Idle; }
|
||||||
PSAVE_DETAILS C4JStorage::ReturnSavesInfo() {return NULL;}
|
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)(LPVOID lpParam, C4JStorage::DLC_TMS_DETAILS *, int), LPVOID lpParam ) {}
|
||||||
void C4JStorage::SetDLCPackageRoot(char *pszDLCRoot) {}
|
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; }
|
C4JStorage::EDLCStatus C4JStorage::GetDLCOffers(int iPad,int( *Func)(void *, int, std::uint32_t, int),void *lpParam, std::uint32_t dwOfferTypesBitmaskT) { return C4JStorage::EDLC_Idle; }
|
||||||
DWORD C4JStorage::CancelGetDLCOffers() { return 0; }
|
unsigned int C4JStorage::CancelGetDLCOffers() { return 0; }
|
||||||
void C4JStorage::ClearDLCOffers() {}
|
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; }
|
int C4JStorage::GetOfferCount() { return 0; }
|
||||||
DWORD 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)(LPVOID, int, int),LPVOID lpParam, bool bTrial) { return 0; }
|
||||||
DWORD C4JStorage::GetAvailableDLCCount( int iPad) { return 0; }
|
unsigned int C4JStorage::GetAvailableDLCCount( int iPad) { return 0; }
|
||||||
XCONTENT_DATA& C4JStorage::GetDLC(DWORD dw) { static XCONTENT_DATA retval = {0}; return retval; }
|
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; }
|
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; }
|
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,BYTE **ppBuffer,DWORD *pdwBufferSize,int( *Func)(LPVOID, WCHAR *,int, bool, int),LPVOID lpParam, int iAction) { return C4JStorage::ETMSStatus_Idle; }
|
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; }
|
||||||
bool C4JStorage::WriteTMSFile(int iQuadrant,eGlobalStorage eStorageFacility,WCHAR *pwchFilename,BYTE *pBuffer,DWORD dwBufferSize) { return true; }
|
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; }
|
bool C4JStorage::DeleteTMSFile(int iQuadrant,eGlobalStorage eStorageFacility,WCHAR *pwchFilename) { return true; }
|
||||||
void C4JStorage::StoreTMSPathName(WCHAR *pwchName) {}
|
void C4JStorage::StoreTMSPathName(WCHAR *pwchName) {}
|
||||||
unsigned int C4JStorage::CRC(unsigned char *buf, int len) { return 0; }
|
unsigned int C4JStorage::CRC(unsigned char *buf, int len) { return 0; }
|
||||||
|
|
|
||||||
|
|
@ -728,7 +728,7 @@ void ConsoleSaveFileOriginal::Flush(bool autosave, bool updateThumbnail) {
|
||||||
QueryPerformanceCounter(&qwNewTime);
|
QueryPerformanceCounter(&qwNewTime);
|
||||||
|
|
||||||
qwDeltaTime.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
|
qwDeltaTime.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
|
||||||
fElapsedTime = fSecsPerTick * ((FLOAT)(qwDeltaTime.QuadPart));
|
fElapsedTime = fSecsPerTick * static_cast<float>(qwDeltaTime.QuadPart);
|
||||||
|
|
||||||
app.DebugPrintf("Check buffer size: Elapsed time %f\n", fElapsedTime);
|
app.DebugPrintf("Check buffer size: Elapsed time %f\n", fElapsedTime);
|
||||||
PIXEndNamedEvent();
|
PIXEndNamedEvent();
|
||||||
|
|
@ -759,7 +759,7 @@ void ConsoleSaveFileOriginal::Flush(bool autosave, bool updateThumbnail) {
|
||||||
QueryPerformanceCounter(&qwNewTime);
|
QueryPerformanceCounter(&qwNewTime);
|
||||||
|
|
||||||
qwDeltaTime.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
|
qwDeltaTime.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
|
||||||
fElapsedTime = fSecsPerTick * ((FLOAT)(qwDeltaTime.QuadPart));
|
fElapsedTime = fSecsPerTick * static_cast<float>(qwDeltaTime.QuadPart);
|
||||||
|
|
||||||
app.DebugPrintf("Compress: Elapsed time %f\n", fElapsedTime);
|
app.DebugPrintf("Compress: Elapsed time %f\n", fElapsedTime);
|
||||||
PIXEndNamedEvent();
|
PIXEndNamedEvent();
|
||||||
|
|
|
||||||
|
|
@ -1344,7 +1344,7 @@ void ConsoleSaveFileSplit::Flush(bool autosave, bool updateThumbnail) {
|
||||||
QueryPerformanceCounter(&qwNewTime);
|
QueryPerformanceCounter(&qwNewTime);
|
||||||
|
|
||||||
qwDeltaTime.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
|
qwDeltaTime.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
|
||||||
fElapsedTime = fSecsPerTick * ((FLOAT)(qwDeltaTime.QuadPart));
|
fElapsedTime = fSecsPerTick * static_cast<float>(qwDeltaTime.QuadPart);
|
||||||
|
|
||||||
app.DebugPrintf("Check buffer size: Elapsed time %f\n", fElapsedTime);
|
app.DebugPrintf("Check buffer size: Elapsed time %f\n", fElapsedTime);
|
||||||
PIXEndNamedEvent();
|
PIXEndNamedEvent();
|
||||||
|
|
@ -1367,7 +1367,7 @@ void ConsoleSaveFileSplit::Flush(bool autosave, bool updateThumbnail) {
|
||||||
QueryPerformanceCounter(&qwNewTime);
|
QueryPerformanceCounter(&qwNewTime);
|
||||||
|
|
||||||
qwDeltaTime.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
|
qwDeltaTime.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
|
||||||
fElapsedTime = fSecsPerTick * ((FLOAT)(qwDeltaTime.QuadPart));
|
fElapsedTime = fSecsPerTick * static_cast<float>(qwDeltaTime.QuadPart);
|
||||||
|
|
||||||
app.DebugPrintf("Compress: Elapsed time %f\n", fElapsedTime);
|
app.DebugPrintf("Compress: Elapsed time %f\n", fElapsedTime);
|
||||||
PIXEndNamedEvent();
|
PIXEndNamedEvent();
|
||||||
|
|
|
||||||
|
|
@ -3450,8 +3450,8 @@ void Level::checkLight(LightLayer::variety layer, int xc, int yc, int zc,
|
||||||
{
|
{
|
||||||
QueryPerformanceCounter( &qwNewTime );
|
QueryPerformanceCounter( &qwNewTime );
|
||||||
qwDeltaTime2.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
|
qwDeltaTime2.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
|
||||||
fElapsedTime1 = fSecsPerTick * ((FLOAT)(qwDeltaTime1.QuadPart));
|
fElapsedTime1 = fSecsPerTick * static_cast<float>(qwDeltaTime1.QuadPart);
|
||||||
fElapsedTime2 = fSecsPerTick * ((FLOAT)(qwDeltaTime2.QuadPart));
|
fElapsedTime2 = fSecsPerTick * static_cast<float>(qwDeltaTime2.QuadPart);
|
||||||
if( ( darktcc > 0 ) | ( tcc > 0 ) )
|
if( ( darktcc > 0 ) | ( tcc > 0 ) )
|
||||||
{
|
{
|
||||||
printf("%d %d %d %f + %f = %f\n", darktcc, tcc, darktcc + tcc, fElapsedTime1 * 1000.0f, fElapsedTime2 * 1000.0f, ( fElapsedTime1 + fElapsedTime2 ) * 1000.0f);
|
printf("%d %d %d %f + %f = %f\n", darktcc, tcc, darktcc + tcc, fElapsedTime1 * 1000.0f, fElapsedTime2 * 1000.0f, ( fElapsedTime1 + fElapsedTime2 ) * 1000.0f);
|
||||||
|
|
|
||||||
|
|
@ -113,8 +113,10 @@ C4JThread::C4JThread(C4JThreadStartFunc* startFunc, void* param,
|
||||||
#else
|
#else
|
||||||
m_threadID = 0;
|
m_threadID = 0;
|
||||||
m_threadHandle = 0;
|
m_threadHandle = 0;
|
||||||
|
DWORD threadID = 0;
|
||||||
m_threadHandle = CreateThread(NULL, m_stackSize, entryPoint, this,
|
m_threadHandle = CreateThread(NULL, m_stackSize, entryPoint, this,
|
||||||
CREATE_SUSPENDED, &m_threadID);
|
CREATE_SUSPENDED, &threadID);
|
||||||
|
m_threadID = threadID;
|
||||||
#endif
|
#endif
|
||||||
EnterCriticalSection(&ms_threadListCS);
|
EnterCriticalSection(&ms_threadListCS);
|
||||||
ms_threadList.push_back(this);
|
ms_threadList.push_back(this);
|
||||||
|
|
@ -383,7 +385,7 @@ void C4JThread::SetPriority(int priority) {
|
||||||
#endif // __PS3__
|
#endif // __PS3__
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD C4JThread::WaitForCompletion(int timeoutMs) {
|
std::uint32_t C4JThread::WaitForCompletion(int timeoutMs) {
|
||||||
#ifdef __PS3__
|
#ifdef __PS3__
|
||||||
if (timeoutMs == INFINITE) timeoutMs = SYS_NO_TIMEOUT;
|
if (timeoutMs == INFINITE) timeoutMs = SYS_NO_TIMEOUT;
|
||||||
return m_completionFlag->WaitForSignal(timeoutMs);
|
return m_completionFlag->WaitForSignal(timeoutMs);
|
||||||
|
|
@ -454,7 +456,7 @@ C4JThread* C4JThread::getCurrentThread() {
|
||||||
#elif defined __PSVITA__
|
#elif defined __PSVITA__
|
||||||
SceUID currThreadID = sceKernelGetThreadId();
|
SceUID currThreadID = sceKernelGetThreadId();
|
||||||
#else
|
#else
|
||||||
DWORD currThreadID = GetCurrentThreadId();
|
std::uint32_t currThreadID = GetCurrentThreadId();
|
||||||
#endif //__PS3__
|
#endif //__PS3__
|
||||||
EnterCriticalSection(&ms_threadListCS);
|
EnterCriticalSection(&ms_threadListCS);
|
||||||
|
|
||||||
|
|
@ -543,7 +545,7 @@ void C4JThread::Event::Clear() {
|
||||||
#endif //__PS3__
|
#endif //__PS3__
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD C4JThread::Event::WaitForSignal(int timeoutMs) {
|
std::uint32_t C4JThread::Event::WaitForSignal(int timeoutMs) {
|
||||||
#ifdef __PS3__
|
#ifdef __PS3__
|
||||||
if (timeoutMs == INFINITE) timeoutMs = SYS_NO_TIMEOUT;
|
if (timeoutMs == INFINITE) timeoutMs = SYS_NO_TIMEOUT;
|
||||||
int timoutMicrosecs = timeoutMs * 1000;
|
int timoutMicrosecs = timeoutMs * 1000;
|
||||||
|
|
@ -685,8 +687,8 @@ void C4JThread::EventArray::ClearAll() {
|
||||||
for (int i = 0; i < m_size; i++) Clear(i);
|
for (int i = 0; i < m_size; i++) Clear(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD C4JThread::EventArray::WaitForSingle(int index, int timeoutMs) {
|
std::uint32_t C4JThread::EventArray::WaitForSingle(int index, int timeoutMs) {
|
||||||
DWORD retVal;
|
std::uint32_t retVal;
|
||||||
#ifdef __PS3__
|
#ifdef __PS3__
|
||||||
int timeoutMicrosecs;
|
int timeoutMicrosecs;
|
||||||
if (timeoutMs == INFINITE)
|
if (timeoutMs == INFINITE)
|
||||||
|
|
@ -777,8 +779,8 @@ DWORD C4JThread::EventArray::WaitForSingle(int index, int timeoutMs) {
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD C4JThread::EventArray::WaitForAll(int timeoutMs) {
|
std::uint32_t C4JThread::EventArray::WaitForAll(int timeoutMs) {
|
||||||
DWORD retVal;
|
std::uint32_t retVal;
|
||||||
#ifdef __PS3__
|
#ifdef __PS3__
|
||||||
if (timeoutMs == INFINITE) timeoutMs = SYS_NO_TIMEOUT;
|
if (timeoutMs == INFINITE) timeoutMs = SYS_NO_TIMEOUT;
|
||||||
int timoutMicrosecs = timeoutMs * 1000;
|
int timoutMicrosecs = timeoutMs * 1000;
|
||||||
|
|
@ -871,7 +873,7 @@ DWORD C4JThread::EventArray::WaitForAll(int timeoutMs) {
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD C4JThread::EventArray::WaitForAny(int timeoutMs) {
|
std::uint32_t C4JThread::EventArray::WaitForAny(int timeoutMs) {
|
||||||
#ifdef __PS3__
|
#ifdef __PS3__
|
||||||
if (timeoutMs == INFINITE) timeoutMs = SYS_NO_TIMEOUT;
|
if (timeoutMs == INFINITE) timeoutMs = SYS_NO_TIMEOUT;
|
||||||
int timoutMicrosecs = timeoutMs * 1000;
|
int timoutMicrosecs = timeoutMs * 1000;
|
||||||
|
|
@ -1015,7 +1017,7 @@ void C4JThread::EventQueue::threadPoll() {
|
||||||
if (m_threadInitFunc) m_threadInitFunc();
|
if (m_threadInitFunc) m_threadInitFunc();
|
||||||
|
|
||||||
while (ShutdownManager::ShouldRun(ShutdownManager::eEventQueueThreads)) {
|
while (ShutdownManager::ShouldRun(ShutdownManager::eEventQueueThreads)) {
|
||||||
DWORD err = m_startEvent->WaitForAny(INFINITE);
|
std::uint32_t err = m_startEvent->WaitForAny(INFINITE);
|
||||||
if (err == WAIT_OBJECT_0) {
|
if (err == WAIT_OBJECT_0) {
|
||||||
bool bListEmpty = true;
|
bool bListEmpty = true;
|
||||||
do {
|
do {
|
||||||
|
|
@ -1060,4 +1062,4 @@ void C4JThread::PopAffinity() {
|
||||||
assert(err == SCE_OK);
|
assert(err == SCE_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __ORBIS__
|
#endif // __ORBIS__
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ public:
|
||||||
~Event();
|
~Event();
|
||||||
void Set();
|
void Set();
|
||||||
void Clear();
|
void Clear();
|
||||||
DWORD WaitForSignal(int timeoutMs);
|
std::uint32_t WaitForSignal(int timeoutMs);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
EMode m_mode;
|
EMode m_mode;
|
||||||
|
|
@ -89,9 +89,9 @@ public:
|
||||||
void Clear(int index);
|
void Clear(int index);
|
||||||
void SetAll();
|
void SetAll();
|
||||||
void ClearAll();
|
void ClearAll();
|
||||||
DWORD WaitForAll(int timeoutMs);
|
std::uint32_t WaitForAll(int timeoutMs);
|
||||||
DWORD WaitForAny(int timeoutMs);
|
std::uint32_t WaitForAny(int timeoutMs);
|
||||||
DWORD WaitForSingle(int index, int timeoutMs);
|
std::uint32_t WaitForSingle(int index, int timeoutMs);
|
||||||
#ifdef __PS3__
|
#ifdef __PS3__
|
||||||
void Cancel();
|
void Cancel();
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -153,7 +153,7 @@ public:
|
||||||
bool hasStarted() { return m_hasStarted; }
|
bool hasStarted() { return m_hasStarted; }
|
||||||
void SetProcessor(int proc);
|
void SetProcessor(int proc);
|
||||||
void SetPriority(int priority);
|
void SetPriority(int priority);
|
||||||
DWORD WaitForCompletion(int timeoutMs);
|
std::uint32_t WaitForCompletion(int timeoutMs);
|
||||||
int GetExitCode();
|
int GetExitCode();
|
||||||
char* getName() { return m_threadName; }
|
char* getName() { return m_threadName; }
|
||||||
static void Sleep(int millisecs);
|
static void Sleep(int millisecs);
|
||||||
|
|
@ -210,7 +210,7 @@ private:
|
||||||
int m_priority;
|
int m_priority;
|
||||||
static SceInt32 entryPoint(SceSize argSize, void* pArgBlock);
|
static SceInt32 entryPoint(SceSize argSize, void* pArgBlock);
|
||||||
#else
|
#else
|
||||||
DWORD m_threadID;
|
std::uint32_t m_threadID;
|
||||||
HANDLE m_threadHandle;
|
HANDLE m_threadHandle;
|
||||||
Event* m_completionFlag;
|
Event* m_completionFlag;
|
||||||
static DWORD WINAPI entryPoint(LPVOID lpParam);
|
static DWORD WINAPI entryPoint(LPVOID lpParam);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue