Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.
This reverts commit a9be52c41a.
This commit is contained in:
@@ -98,8 +98,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,CXuiStringTable *pStringTable=nullptr);
|
||||
EKeyboardResult RequestKeyboard(UINT uiTitle, LPCWSTR pwchDefault, UINT uiDesc, DWORD dwPad, WCHAR *pwchResult, UINT uiResultSize,int( *Func)(LPVOID,const bool),LPVOID lpParam, EKeyboardMode eMode,CXuiStringTable *pStringTable=nullptr);
|
||||
EKeyboardResult RequestKeyboard(UINT uiTitle, UINT uiText, UINT uiDesc, DWORD dwPad, WCHAR *pwchResult, UINT uiResultSize,int( *Func)(LPVOID,const bool),LPVOID lpParam,EKeyboardMode eMode,CXuiStringTable *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,CXuiStringTable *pStringTable=NULL);
|
||||
|
||||
// Online check strings against offensive list - TCR 92
|
||||
// TCR # 092 CMTV Player Text String Verification
|
||||
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
// ACHIEVEMENTS & AWARDS
|
||||
|
||||
void RegisterAward(int iAwardNumber,int iGamerconfigID, eAwardType eType, bool bLeaderboardAffected=false,
|
||||
CXuiStringTable*pStringTable=nullptr, int iTitleStr=-1, int iTextStr=-1, int iAcceptStr=-1, char *pszThemeName=nullptr, unsigned int uiThemeSize=0L);
|
||||
CXuiStringTable*pStringTable=NULL, int iTitleStr=-1, int iTextStr=-1, int iAcceptStr=-1, char *pszThemeName=NULL, unsigned int uiThemeSize=0L);
|
||||
int GetAwardId(int iAwardNumber);
|
||||
eAwardType GetAwardType(int iAwardNumber);
|
||||
bool CanBeAwarded(int iQuadrant, int iAwardNumber);
|
||||
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
void Initialise(IDirect3DDevice9 *pDevice);
|
||||
void InitialiseContext();
|
||||
void Present();
|
||||
void Clear(int flags, D3DRECT *pRect = nullptr);
|
||||
void Clear(int flags, D3DRECT *pRect = NULL);
|
||||
void SetClearColour(D3DCOLOR colour);
|
||||
bool IsWidescreen();
|
||||
bool IsHiDef();
|
||||
|
||||
@@ -217,7 +217,7 @@ 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)=nullptr,LPVOID lpParam=nullptr, CXuiStringTable *pStringTable=nullptr, WCHAR *pwchFormatString=nullptr,DWORD dwFocusButton=0);
|
||||
int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)=NULL,LPVOID lpParam=NULL, CXuiStringTable *pStringTable=NULL, WCHAR *pwchFormatString=NULL,DWORD dwFocusButton=0);
|
||||
void CancelMessageBoxRequest();
|
||||
|
||||
C4JStorage::EMessageResult GetMessageBoxResult();
|
||||
@@ -239,7 +239,7 @@ public:
|
||||
unsigned int GetSaveSize();
|
||||
void GetSaveData(void *pvData,unsigned int *puiBytes);
|
||||
PVOID AllocateSaveData(unsigned int uiBytes);
|
||||
void SaveSaveData(unsigned int uiBytes,PBYTE pbThumbnail=nullptr,DWORD cbThumbnail=0,PBYTE pbTextData=nullptr, DWORD dwTextLen=0);
|
||||
void SaveSaveData(unsigned int uiBytes,PBYTE pbThumbnail=NULL,DWORD cbThumbnail=0,PBYTE pbTextData=NULL, DWORD dwTextLen=0);
|
||||
void CopySaveDataToNewSave(PBYTE pbThumbnail,DWORD cbThumbnail,WCHAR *wchNewName,int ( *Func)(LPVOID lpParam, bool), LPVOID lpParam);
|
||||
void SetSaveDeviceSelected(unsigned int uiPad,bool bSelected);
|
||||
bool GetSaveDeviceSelected(unsigned int iPad);
|
||||
@@ -271,27 +271,27 @@ 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=nullptr);
|
||||
DWORD UnmountInstalledDLC(LPCSTR szMountDrive=nullptr);
|
||||
DWORD MountInstalledDLC(int iPad,DWORD dwDLC,int( *Func)(LPVOID, int, DWORD,DWORD),LPVOID lpParam,LPCSTR szMountDrive=NULL);
|
||||
DWORD UnmountInstalledDLC(LPCSTR szMountDrive=NULL);
|
||||
|
||||
// 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)=nullptr,LPVOID lpParam=nullptr, int iAction=0);
|
||||
WCHAR *pwchFilename,BYTE **ppBuffer,DWORD *pdwBufferSize,int( *Func)(LPVOID, WCHAR *,int, bool, int)=NULL,LPVOID 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=nullptr);
|
||||
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)=nullptr,LPVOID lpParam=nullptr, 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)(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)=nullptr,LPVOID lpParam=nullptr, int iUserData=0);
|
||||
C4JStorage::ETMSStatus TMSPP_ReadFileList(int iPad,C4JStorage::eGlobalStorage eStorageFacility,CHAR *pchFilePath,int( *Func)(LPVOID,int,int,PTMSPP_FILE_LIST)=nullptr,LPVOID lpParam=nullptr, int iUserData=0);
|
||||
C4JStorage::ETMSStatus TMSPP_DeleteFile(int iPad,LPCSTR szFilePath,C4JStorage::eTMS_FILETYPEVAL eFileTypeVal,int( *Func)(LPVOID,int,int),LPVOID lpParam=nullptr, 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);
|
||||
bool TMSPP_InFileList(eGlobalStorage eStorageFacility, int iPad,const wstring &Filename);
|
||||
unsigned int CRC(unsigned char *buf, int len);
|
||||
|
||||
C4JStorage::ETMSStatus TMSPP_WriteFileWithProgress(int iPad,C4JStorage::eGlobalStorage eStorageFacility,C4JStorage::eTMS_FILETYPEVAL eFileTypeVal,C4JStorage::eTMS_UGCTYPE eUGCType,CHAR *pchFilePath,CHAR *pchBuffer,DWORD dwBufferSize,int( *Func)(LPVOID,int,int)=nullptr,LPVOID lpParam=nullptr, int iUserData=0,
|
||||
int( *CompletionFunc)(LPVOID,float fComplete)=nullptr,LPVOID lpCompletionParam=nullptr);
|
||||
C4JStorage::ETMSStatus TMSPP_WriteFileWithProgress(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,
|
||||
int( *CompletionFunc)(LPVOID,float fComplete)=NULL,LPVOID lpCompletionParam=NULL);
|
||||
void TMSPP_CancelWriteFileWithProgress(int iPad);
|
||||
|
||||
HRESULT TMSPP_SetTitleGroupID(LPCSTR szGroupID);
|
||||
|
||||
@@ -12,16 +12,16 @@
|
||||
#include "..\..\DLCTexturePack.h"
|
||||
|
||||
|
||||
IXAudio2* g_pXAudio2 = nullptr; // pointer to XAudio2 instance used by QNet and XACT
|
||||
IXAudio2MasteringVoice* g_pXAudio2MasteringVoice = nullptr; // pointer to XAudio2 mastering voice
|
||||
IXAudio2* g_pXAudio2 = NULL; // pointer to XAudio2 instance used by QNet and XACT
|
||||
IXAudio2MasteringVoice* g_pXAudio2MasteringVoice = NULL; // pointer to XAudio2 mastering voice
|
||||
|
||||
IXACT3Engine *SoundEngine::m_pXACT3Engine = nullptr;
|
||||
IXACT3WaveBank *SoundEngine::m_pWaveBank = nullptr;
|
||||
IXACT3WaveBank *SoundEngine::m_pWaveBank2 = nullptr;
|
||||
IXACT3WaveBank *SoundEngine::m_pStreamedWaveBank = nullptr;
|
||||
IXACT3WaveBank *SoundEngine::m_pStreamedWaveBankAdditional = nullptr;
|
||||
IXACT3SoundBank *SoundEngine::m_pSoundBank = nullptr;
|
||||
IXACT3SoundBank *SoundEngine::m_pSoundBank2 = nullptr;
|
||||
IXACT3Engine *SoundEngine::m_pXACT3Engine = NULL;
|
||||
IXACT3WaveBank *SoundEngine::m_pWaveBank = NULL;
|
||||
IXACT3WaveBank *SoundEngine::m_pWaveBank2 = NULL;
|
||||
IXACT3WaveBank *SoundEngine::m_pStreamedWaveBank = NULL;
|
||||
IXACT3WaveBank *SoundEngine::m_pStreamedWaveBankAdditional = NULL;
|
||||
IXACT3SoundBank *SoundEngine::m_pSoundBank = NULL;
|
||||
IXACT3SoundBank *SoundEngine::m_pSoundBank2 = NULL;
|
||||
CRITICAL_SECTION SoundEngine::m_CS;
|
||||
|
||||
X3DAUDIO_HANDLE SoundEngine::m_xact3dInstance;
|
||||
@@ -97,9 +97,9 @@ void SoundEngine::init(Options *pOptions)
|
||||
// 4J-PB - move this to the title update, since we've corrected it to allow sounds to be pitch varied when they weren't before
|
||||
HANDLE file;
|
||||
#ifdef _TU_BUILD
|
||||
file = CreateFile("UPDATE:\\res\\audio\\Minecraft.xgs", GENERIC_READ, 0, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
|
||||
file = CreateFile("UPDATE:\\res\\audio\\Minecraft.xgs", GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
#else
|
||||
file = CreateFile("GAME:\\res\\TitleUpdate\\audio\\Minecraft.xgs", GENERIC_READ, 0, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
|
||||
file = CreateFile("GAME:\\res\\TitleUpdate\\audio\\Minecraft.xgs", GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
#endif
|
||||
if( file == INVALID_HANDLE_VALUE )
|
||||
{
|
||||
@@ -107,11 +107,11 @@ void SoundEngine::init(Options *pOptions)
|
||||
assert(false);
|
||||
return;
|
||||
}
|
||||
DWORD dwFileSize = GetFileSize(file,nullptr);
|
||||
DWORD dwFileSize = GetFileSize(file,NULL);
|
||||
DWORD bytesRead = 0;
|
||||
DWORD memFlags = MAKE_XALLOC_ATTRIBUTES(0,FALSE,TRUE,FALSE,0,XALLOC_PHYSICAL_ALIGNMENT_DEFAULT,XALLOC_MEMPROTECT_READWRITE,FALSE,XALLOC_MEMTYPE_PHYSICAL);
|
||||
void *pvGlobalSettings = XMemAlloc(dwFileSize, memFlags);
|
||||
ReadFile(file,pvGlobalSettings,dwFileSize,&bytesRead,nullptr);
|
||||
ReadFile(file,pvGlobalSettings,dwFileSize,&bytesRead,NULL);
|
||||
CloseHandle(file);
|
||||
|
||||
XACT_RUNTIME_PARAMETERS EngineParameters = {0};
|
||||
@@ -161,7 +161,7 @@ void SoundEngine::init(Options *pOptions)
|
||||
|
||||
// Create resident wave bank - leave memory for this managed by xact so it can free it
|
||||
|
||||
file = CreateFile("GAME:\\res\\audio\\resident.xwb", GENERIC_READ, 0, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
|
||||
file = CreateFile("GAME:\\res\\audio\\resident.xwb", GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if( file == INVALID_HANDLE_VALUE )
|
||||
{
|
||||
app.FatalLoadError();
|
||||
@@ -169,9 +169,9 @@ void SoundEngine::init(Options *pOptions)
|
||||
return;
|
||||
}
|
||||
|
||||
dwFileSize = GetFileSize(file,nullptr);
|
||||
dwFileSize = GetFileSize(file,NULL);
|
||||
void *pvWaveBank = XMemAlloc(dwFileSize, memFlags);
|
||||
ReadFile(file,pvWaveBank,dwFileSize,&bytesRead,nullptr);
|
||||
ReadFile(file,pvWaveBank,dwFileSize,&bytesRead,NULL);
|
||||
CloseHandle(file);
|
||||
|
||||
if ( FAILED( hr = m_pXACT3Engine->CreateInMemoryWaveBank( pvWaveBank, dwFileSize, XACT_FLAG_ENGINE_CREATE_MANAGEDATA, memFlags, &m_pWaveBank ) ) )
|
||||
@@ -183,9 +183,9 @@ void SoundEngine::init(Options *pOptions)
|
||||
|
||||
// 4J-PB - add new sounds wavebank
|
||||
#ifdef _TU_BUILD
|
||||
file = CreateFile("UPDATE:\\res\\audio\\additional.xwb", GENERIC_READ, 0, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
|
||||
file = CreateFile("UPDATE:\\res\\audio\\additional.xwb", GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
#else
|
||||
file = CreateFile("GAME:\\res\\TitleUpdate\\audio\\additional.xwb", GENERIC_READ, 0, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
|
||||
file = CreateFile("GAME:\\res\\TitleUpdate\\audio\\additional.xwb", GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
#endif
|
||||
if( file == INVALID_HANDLE_VALUE )
|
||||
{
|
||||
@@ -194,9 +194,9 @@ void SoundEngine::init(Options *pOptions)
|
||||
return;
|
||||
}
|
||||
|
||||
dwFileSize = GetFileSize(file,nullptr);
|
||||
dwFileSize = GetFileSize(file,NULL);
|
||||
void *pvWaveBank2 = XMemAlloc(dwFileSize, memFlags);
|
||||
ReadFile(file,pvWaveBank2,dwFileSize,&bytesRead,nullptr);
|
||||
ReadFile(file,pvWaveBank2,dwFileSize,&bytesRead,NULL);
|
||||
CloseHandle(file);
|
||||
|
||||
if ( FAILED( hr = m_pXACT3Engine->CreateInMemoryWaveBank( pvWaveBank2, dwFileSize, XACT_FLAG_ENGINE_CREATE_MANAGEDATA, memFlags, &m_pWaveBank2 ) ) )
|
||||
@@ -208,7 +208,7 @@ void SoundEngine::init(Options *pOptions)
|
||||
|
||||
// Create streamed sound bank
|
||||
|
||||
file = CreateFile("GAME:\\res\\audio\\streamed.xwb", GENERIC_READ, 0, nullptr, OPEN_ALWAYS, FILE_FLAG_OVERLAPPED | FILE_FLAG_NO_BUFFERING, nullptr);
|
||||
file = CreateFile("GAME:\\res\\audio\\streamed.xwb", GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_FLAG_OVERLAPPED | FILE_FLAG_NO_BUFFERING, NULL);
|
||||
|
||||
if( file == INVALID_HANDLE_VALUE )
|
||||
{
|
||||
@@ -232,11 +232,11 @@ void SoundEngine::init(Options *pOptions)
|
||||
|
||||
// Create streamed sound bank
|
||||
|
||||
//file = CreateFile("GAME:\\res\\audio\\AdditionalMusic.xwb", GENERIC_READ, 0, nullptr, OPEN_ALWAYS, FILE_FLAG_OVERLAPPED | FILE_FLAG_NO_BUFFERING, nullptr);
|
||||
//file = CreateFile("GAME:\\res\\audio\\AdditionalMusic.xwb", GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_FLAG_OVERLAPPED | FILE_FLAG_NO_BUFFERING, NULL);
|
||||
#ifdef _TU_BUILD
|
||||
file = CreateFile("UPDATE:\\res\\audio\\AdditionalMusic.xwb", GENERIC_READ, 0, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
|
||||
file = CreateFile("UPDATE:\\res\\audio\\AdditionalMusic.xwb", GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
#else
|
||||
file = CreateFile("GAME:\\res\\TitleUpdate\\audio\\AdditionalMusic.xwb", GENERIC_READ, 0, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
|
||||
file = CreateFile("GAME:\\res\\TitleUpdate\\audio\\AdditionalMusic.xwb", GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
#endif
|
||||
if( file == INVALID_HANDLE_VALUE )
|
||||
{
|
||||
@@ -259,11 +259,11 @@ void SoundEngine::init(Options *pOptions)
|
||||
|
||||
// Create sound bank - leave memory for this managed by xact so it can free it
|
||||
// 4J-PB - updated for the TU
|
||||
//file = CreateFile("GAME:\\res\\audio\\minecraft.xsb", GENERIC_READ, 0, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
|
||||
//file = CreateFile("GAME:\\res\\audio\\minecraft.xsb", GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
#ifdef _TU_BUILD
|
||||
file = CreateFile("UPDATE:\\res\\audio\\minecraft.xsb", GENERIC_READ, 0, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
|
||||
file = CreateFile("UPDATE:\\res\\audio\\minecraft.xsb", GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
#else
|
||||
file = CreateFile("GAME:\\res\\TitleUpdate\\audio\\minecraft.xsb", GENERIC_READ, 0, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
|
||||
file = CreateFile("GAME:\\res\\TitleUpdate\\audio\\minecraft.xsb", GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
#endif
|
||||
if( file == INVALID_HANDLE_VALUE )
|
||||
{
|
||||
@@ -271,9 +271,9 @@ void SoundEngine::init(Options *pOptions)
|
||||
assert(false);
|
||||
return;
|
||||
}
|
||||
dwFileSize = GetFileSize(file,nullptr);
|
||||
dwFileSize = GetFileSize(file,NULL);
|
||||
void *pvSoundBank = XMemAlloc(dwFileSize, memFlags);
|
||||
ReadFile(file,pvSoundBank,dwFileSize,&bytesRead,nullptr);
|
||||
ReadFile(file,pvSoundBank,dwFileSize,&bytesRead,NULL);
|
||||
CloseHandle(file);
|
||||
|
||||
if ( FAILED( hr = m_pXACT3Engine->CreateSoundBank( pvSoundBank, dwFileSize, XACT_FLAG_ENGINE_CREATE_MANAGEDATA, memFlags, &m_pSoundBank ) ) )
|
||||
@@ -286,9 +286,9 @@ void SoundEngine::init(Options *pOptions)
|
||||
// Create sound bank2 - leave memory for this managed by xact so it can free it
|
||||
|
||||
#ifdef _TU_BUILD
|
||||
file = CreateFile("UPDATE:\\res\\audio\\additional.xsb", GENERIC_READ, 0, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
|
||||
file = CreateFile("UPDATE:\\res\\audio\\additional.xsb", GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
#else
|
||||
file = CreateFile("GAME:\\res\\TitleUpdate\\audio\\additional.xsb", GENERIC_READ, 0, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
|
||||
file = CreateFile("GAME:\\res\\TitleUpdate\\audio\\additional.xsb", GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
#endif
|
||||
if( file == INVALID_HANDLE_VALUE )
|
||||
{
|
||||
@@ -296,9 +296,9 @@ void SoundEngine::init(Options *pOptions)
|
||||
assert(false);
|
||||
return;
|
||||
}
|
||||
dwFileSize = GetFileSize(file,nullptr);
|
||||
dwFileSize = GetFileSize(file,NULL);
|
||||
void *pvSoundBank2 = XMemAlloc(dwFileSize, memFlags);
|
||||
ReadFile(file,pvSoundBank2,dwFileSize,&bytesRead,nullptr);
|
||||
ReadFile(file,pvSoundBank2,dwFileSize,&bytesRead,NULL);
|
||||
CloseHandle(file);
|
||||
|
||||
if ( FAILED( hr = m_pXACT3Engine->CreateSoundBank( pvSoundBank2, dwFileSize, XACT_FLAG_ENGINE_CREATE_MANAGEDATA, memFlags, &m_pSoundBank2 ) ) )
|
||||
@@ -324,7 +324,7 @@ void SoundEngine::CreateStreamingWavebank(const char *pchName, IXACT3WaveBank **
|
||||
// Create streamed sound bank
|
||||
HRESULT hr;
|
||||
|
||||
HANDLE file = CreateFile(pchName, GENERIC_READ, 0, nullptr, OPEN_ALWAYS, FILE_FLAG_OVERLAPPED | FILE_FLAG_NO_BUFFERING, nullptr);
|
||||
HANDLE file = CreateFile(pchName, GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_FLAG_OVERLAPPED | FILE_FLAG_NO_BUFFERING, NULL);
|
||||
|
||||
if( file == INVALID_HANDLE_VALUE )
|
||||
{
|
||||
@@ -350,7 +350,7 @@ void SoundEngine::CreateStreamingWavebank(const char *pchName, IXACT3WaveBank **
|
||||
void SoundEngine::CreateSoundbank(const char *pchName, IXACT3SoundBank **ppSoundBank)
|
||||
{
|
||||
HRESULT hr;
|
||||
HANDLE file = CreateFile(pchName, GENERIC_READ, 0, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
|
||||
HANDLE file = CreateFile(pchName, GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
|
||||
if( file == INVALID_HANDLE_VALUE )
|
||||
{
|
||||
@@ -358,11 +358,11 @@ void SoundEngine::CreateSoundbank(const char *pchName, IXACT3SoundBank **ppSound
|
||||
assert(false);
|
||||
return;
|
||||
}
|
||||
DWORD dwFileSize = GetFileSize(file,nullptr);
|
||||
DWORD dwFileSize = GetFileSize(file,NULL);
|
||||
DWORD bytesRead = 0;
|
||||
DWORD memFlags = MAKE_XALLOC_ATTRIBUTES(0,FALSE,TRUE,FALSE,0,XALLOC_PHYSICAL_ALIGNMENT_DEFAULT,XALLOC_MEMPROTECT_READWRITE,FALSE,XALLOC_MEMTYPE_PHYSICAL);
|
||||
void *pvSoundBank = XMemAlloc(dwFileSize, memFlags);
|
||||
ReadFile(file,pvSoundBank,dwFileSize,&bytesRead,nullptr);
|
||||
ReadFile(file,pvSoundBank,dwFileSize,&bytesRead,NULL);
|
||||
CloseHandle(file);
|
||||
|
||||
if ( FAILED( hr = m_pXACT3Engine->CreateSoundBank( pvSoundBank, dwFileSize, XACT_FLAG_ENGINE_CREATE_MANAGEDATA, memFlags, ppSoundBank ) ) )
|
||||
@@ -416,11 +416,11 @@ bool SoundEngine::isStreamingWavebankReady(IXACT3WaveBank *pWaveBank)
|
||||
|
||||
void SoundEngine::XACTNotificationCallback( const XACT_NOTIFICATION* pNotification )
|
||||
{
|
||||
if(pNotification->pvContext!= nullptr)
|
||||
if(pNotification->pvContext!= NULL)
|
||||
{
|
||||
if(pNotification->type==XACTNOTIFICATIONTYPE_WAVEBANKPREPARED)
|
||||
{
|
||||
SoundEngine *pSoundEngine=static_cast<SoundEngine *>(pNotification->pvContext);
|
||||
SoundEngine *pSoundEngine=(SoundEngine *)pNotification->pvContext;
|
||||
if(pNotification->waveBank.pWaveBank==pSoundEngine->m_pStreamedWaveBank)
|
||||
{
|
||||
pSoundEngine->m_bStreamingWaveBank1Ready=true;
|
||||
@@ -446,7 +446,7 @@ char *SoundEngine::ConvertSoundPathToName(const wstring& name, bool bConvertSpac
|
||||
{
|
||||
wchar_t c = name[i];
|
||||
if(c=='.') c='_';
|
||||
buf[i] = static_cast<char>(c);
|
||||
buf[i] = (char)c;
|
||||
}
|
||||
buf[name.length()] = 0;
|
||||
return buf;
|
||||
@@ -462,7 +462,7 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume, floa
|
||||
|
||||
bool bSoundbank1=(iSound<=eSoundType_STEP_SAND);
|
||||
|
||||
if( (m_pSoundBank == nullptr ) || (m_pSoundBank2 == nullptr))return;
|
||||
if( (m_pSoundBank == NULL ) || (m_pSoundBank2 == NULL))return;
|
||||
|
||||
if( currentSounds.size() > MAX_POLYPHONY )
|
||||
{
|
||||
@@ -541,7 +541,7 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume, floa
|
||||
|
||||
soundInfo *info = new soundInfo();
|
||||
info->idx = idx;
|
||||
info->eSoundID = static_cast<eSOUND_TYPE>(iSound);
|
||||
info->eSoundID = (eSOUND_TYPE)iSound;
|
||||
info->iSoundBank = bSoundbank1?0:1;
|
||||
info->x = x;
|
||||
info->y = y;
|
||||
@@ -570,7 +570,7 @@ void SoundEngine::playUI(int iSound, float, float)
|
||||
{
|
||||
bool bSoundBank1=(iSound<=eSoundType_STEP_SAND);
|
||||
|
||||
if( (m_pSoundBank == nullptr ) || (m_pSoundBank2 == nullptr)) return;
|
||||
if( (m_pSoundBank == NULL ) || (m_pSoundBank2 == NULL)) return;
|
||||
|
||||
if( currentSounds.size() > MAX_POLYPHONY )
|
||||
{
|
||||
@@ -578,7 +578,7 @@ void SoundEngine::playUI(int iSound, float, float)
|
||||
}
|
||||
wstring name = wchSoundNames[iSound];
|
||||
|
||||
char *xboxName = static_cast<char *>(ConvertSoundPathToName(name));
|
||||
char *xboxName = (char *)ConvertSoundPathToName(name);
|
||||
|
||||
XACTINDEX idx = m_pSoundBank->GetCueIndex(xboxName);
|
||||
|
||||
@@ -618,7 +618,7 @@ void SoundEngine::playUI(int iSound, float, float)
|
||||
|
||||
// Add sound info just so we can detect end of this sound
|
||||
soundInfo *info = new soundInfo();
|
||||
info->eSoundID = static_cast<eSOUND_TYPE>(0);
|
||||
info->eSoundID = (eSOUND_TYPE)0;
|
||||
info->iSoundBank = bSoundBank1?0:1;
|
||||
info->idx =idx;
|
||||
info->x = 0.0f;
|
||||
@@ -637,15 +637,15 @@ void SoundEngine::playUI(int iSound, float, float)
|
||||
|
||||
void SoundEngine::playStreaming(const wstring& name, float x, float y, float z, float vol, float pitch, bool bMusicDelay)
|
||||
{
|
||||
IXACT3SoundBank *pSoundBank=nullptr;
|
||||
IXACT3SoundBank *pSoundBank=NULL;
|
||||
|
||||
bool bSoundBank2=false;
|
||||
MemSect(34);
|
||||
if(m_MusicInfo.pCue!=nullptr)
|
||||
if(m_MusicInfo.pCue!=NULL)
|
||||
{
|
||||
m_MusicInfo.pCue->Stop(0);
|
||||
m_MusicInfo.pCue->Destroy();
|
||||
m_MusicInfo.pCue = nullptr;
|
||||
m_MusicInfo.pCue = NULL;
|
||||
}
|
||||
|
||||
m_MusicInfo.volume = 1.0f;//m_fMusicVolume;
|
||||
@@ -673,7 +673,7 @@ void SoundEngine::playStreaming(const wstring& name, float x, float y, float z,
|
||||
|
||||
for(unsigned int i=0;i<XUSER_MAX_COUNT;i++)
|
||||
{
|
||||
if(pMinecraft->localplayers[i]!=nullptr)
|
||||
if(pMinecraft->localplayers[i]!=NULL)
|
||||
{
|
||||
if(pMinecraft->localplayers[i]->dimension==LevelData::DIMENSION_END)
|
||||
{
|
||||
@@ -701,7 +701,7 @@ void SoundEngine::playStreaming(const wstring& name, float x, float y, float z,
|
||||
else
|
||||
{
|
||||
// get the dlc texture pack
|
||||
DLCTexturePack *pDLCTexPack=static_cast<DLCTexturePack *>(pTexPack);
|
||||
DLCTexturePack *pDLCTexPack=(DLCTexturePack *)pTexPack;
|
||||
pSoundBank=pDLCTexPack->m_pSoundBank;
|
||||
|
||||
// check we can play the sound
|
||||
@@ -743,7 +743,7 @@ void SoundEngine::playStreaming(const wstring& name, float x, float y, float z,
|
||||
{
|
||||
// printf("Sound prep failed\n");
|
||||
m_musicIDX = XACTINDEX_INVALID; // don't do anything in the tick
|
||||
m_MusicInfo.pCue=nullptr;
|
||||
m_MusicInfo.pCue=NULL;
|
||||
MemSect(0);
|
||||
return;
|
||||
}
|
||||
@@ -774,7 +774,7 @@ void SoundEngine::playStreaming(const wstring& name, float x, float y, float z,
|
||||
}
|
||||
void SoundEngine::playMusicTick()
|
||||
{
|
||||
if( (m_pSoundBank == nullptr ) || (m_pSoundBank2 == nullptr)) return;
|
||||
if( (m_pSoundBank == NULL ) || (m_pSoundBank2 == NULL)) return;
|
||||
|
||||
if( m_musicIDX == XACTINDEX_INVALID )
|
||||
{
|
||||
@@ -785,7 +785,7 @@ void SoundEngine::playMusicTick()
|
||||
// check to see if the sound has stopped playing
|
||||
DWORD state;
|
||||
HRESULT hr;
|
||||
if(m_MusicInfo.pCue!=nullptr)
|
||||
if(m_MusicInfo.pCue!=NULL)
|
||||
{
|
||||
if( FAILED( hr = m_MusicInfo.pCue->GetState(&state) ) )
|
||||
{
|
||||
@@ -804,14 +804,14 @@ void SoundEngine::playMusicTick()
|
||||
|
||||
if(GetIsPlayingStreamingGameMusic())
|
||||
{
|
||||
if(m_MusicInfo.pCue!=nullptr)
|
||||
if(m_MusicInfo.pCue!=NULL)
|
||||
{
|
||||
bool playerInEnd = false;
|
||||
bool playerInNether=false;
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
|
||||
{
|
||||
if(pMinecraft->localplayers[i]!=nullptr)
|
||||
if(pMinecraft->localplayers[i]!=NULL)
|
||||
{
|
||||
if(pMinecraft->localplayers[i]->dimension==LevelData::DIMENSION_END)
|
||||
{
|
||||
@@ -852,7 +852,7 @@ void SoundEngine::playMusicTick()
|
||||
return;
|
||||
}
|
||||
|
||||
if(m_MusicInfo.pCue!=nullptr)
|
||||
if(m_MusicInfo.pCue!=NULL)
|
||||
{
|
||||
update3DPosition(&m_MusicInfo, true);
|
||||
SetIsPlayingStreamingGameMusic(true);
|
||||
@@ -986,7 +986,7 @@ void SoundEngine::update3DPosition(SoundEngine::soundInfo *pInfo, bool bPlaceEmi
|
||||
|
||||
void SoundEngine::tick(shared_ptr<Mob> *players, float a)
|
||||
{
|
||||
if( m_pXACT3Engine == nullptr ) return;
|
||||
if( m_pXACT3Engine == NULL ) return;
|
||||
|
||||
// Creater listener array from the local players
|
||||
int listenerCount = 0;
|
||||
@@ -995,13 +995,13 @@ void SoundEngine::tick(shared_ptr<Mob> *players, float a)
|
||||
{
|
||||
for( int i = 0; i < 4; i++ )
|
||||
{
|
||||
if( players[i] != nullptr )
|
||||
if( players[i] != NULL )
|
||||
{
|
||||
float yRot = players[i]->yRotO + (players[i]->yRot - players[i]->yRotO) * a;
|
||||
|
||||
m_listeners[listenerCount].Position.x = static_cast<float>(players[i]->xo + (players[i]->x - players[i]->xo) * a);
|
||||
m_listeners[listenerCount].Position.y = static_cast<float>(players[i]->yo + (players[i]->y - players[i]->yo) * a);
|
||||
m_listeners[listenerCount].Position.z = -static_cast<float>(players[i]->zo + (players[i]->z - players[i]->zo) * a); // Flipped sign of z as x3daudio is expecting left handed coord system
|
||||
m_listeners[listenerCount].Position.x = (float) (players[i]->xo + (players[i]->x - players[i]->xo) * a);
|
||||
m_listeners[listenerCount].Position.y = (float) (players[i]->yo + (players[i]->y - players[i]->yo) * a);
|
||||
m_listeners[listenerCount].Position.z = -(float) (players[i]->zo + (players[i]->z - players[i]->zo) * a); // Flipped sign of z as x3daudio is expecting left handed coord system
|
||||
|
||||
float yCos = (float)cos(-yRot * Mth::RAD_TO_GRAD - PI);
|
||||
float ySin = (float)sin(-yRot * Mth::RAD_TO_GRAD - PI);
|
||||
|
||||
@@ -77,32 +77,31 @@ class SoundEngine : public ConsoleSoundEngine
|
||||
#endif
|
||||
public:
|
||||
SoundEngine();
|
||||
void destroy() override;
|
||||
void play(int iSound, float x, float y, float z, float volume, float pitch) override;
|
||||
void playStreaming(const wstring& name, float x, float y , float z, float volume, float pitch, bool bMusicDelay=true) override;
|
||||
void playUI(int iSound, float volume, float pitch) override;
|
||||
void playMusicTick() override;
|
||||
void updateMusicVolume(float fVal) override;
|
||||
void updateSystemMusicPlaying(bool isPlaying) override;
|
||||
void updateSoundEffectVolume(float fVal) override;
|
||||
void init(Options *) override;
|
||||
void tick(shared_ptr<Mob> *players, float a) override; // 4J - updated to take array of local players rather than single one
|
||||
void add(const wstring& name, File *file) override;
|
||||
void addMusic(const wstring& name, File *file) override;
|
||||
void addStreaming(const wstring& name, File *file) override;
|
||||
virtual void destroy();
|
||||
virtual void play(int iSound, float x, float y, float z, float volume, float pitch);
|
||||
virtual void playStreaming(const wstring& name, float x, float y , float z, float volume, float pitch, bool bMusicDelay=true);
|
||||
virtual void playUI(int iSound, float volume, float pitch);
|
||||
virtual void playMusicTick();
|
||||
virtual void updateMusicVolume(float fVal);
|
||||
virtual void updateSystemMusicPlaying(bool isPlaying);
|
||||
virtual void updateSoundEffectVolume(float fVal);
|
||||
virtual void init(Options *);
|
||||
virtual void tick(shared_ptr<Mob> *players, float a); // 4J - updated to take array of local players rather than single one
|
||||
virtual void add(const wstring& name, File *file);
|
||||
virtual void addMusic(const wstring& name, File *file);
|
||||
virtual void addStreaming(const wstring& name, File *file);
|
||||
#ifndef __PS3__
|
||||
static void setXACTEngine( IXACT3Engine *pXACT3Engine);
|
||||
void CreateStreamingWavebank(const char *pchName, IXACT3WaveBank **ppStreamedWaveBank);
|
||||
void CreateSoundbank(const char *pchName, IXACT3SoundBank **ppSoundBank);
|
||||
|
||||
#endif // __PS3__
|
||||
char *ConvertSoundPathToName(const wstring& name, bool bConvertSpaces=false) override;
|
||||
virtual char *ConvertSoundPathToName(const wstring& name, bool bConvertSpaces=false);
|
||||
bool isStreamingWavebankReady(); // 4J Added
|
||||
#ifdef _XBOX
|
||||
bool isStreamingWavebankReady(IXACT3WaveBank *pWaveBank);
|
||||
#endif
|
||||
int initAudioHardware(int iMinSpeakers) override
|
||||
{ return iMinSpeakers;}
|
||||
int initAudioHardware(int iMinSpeakers) { return iMinSpeakers;}
|
||||
|
||||
private:
|
||||
#ifndef __PS3__
|
||||
|
||||
@@ -53,8 +53,8 @@ XUI_Font::~XUI_Font()
|
||||
VOID XUI_Font::GetTextExtent( const WCHAR* strText, FLOAT* pWidth,
|
||||
FLOAT* pHeight, BOOL bFirstLineOnly ) const
|
||||
{
|
||||
assert( pWidth != nullptr );
|
||||
assert( pHeight != nullptr );
|
||||
assert( pWidth != NULL );
|
||||
assert( pHeight != NULL );
|
||||
|
||||
// Set default text extent in output parameters
|
||||
int iWidth = 0;
|
||||
@@ -146,8 +146,8 @@ VOID XUI_Font::Begin()
|
||||
//m_pFontTexture->GetLevelDesc( 0, &TextureDesc ); // Get the description
|
||||
|
||||
// Set render state
|
||||
assert(m_fontData->m_pFontTexture != nullptr || m_fontData->m_iFontTexture > 0);
|
||||
if(m_fontData->m_pFontTexture != nullptr)
|
||||
assert(m_fontData->m_pFontTexture != NULL || m_fontData->m_iFontTexture > 0);
|
||||
if(m_fontData->m_pFontTexture != NULL)
|
||||
{
|
||||
pD3dDevice->SetTexture( 0, m_fontData->m_pFontTexture );
|
||||
}
|
||||
@@ -236,7 +236,7 @@ VOID XUI_Font::DrawShadowText( FLOAT fOriginX, FLOAT fOriginY, DWORD dwColor, DW
|
||||
VOID XUI_Font::DrawText( FLOAT fOriginX, FLOAT fOriginY, DWORD dwColor,
|
||||
const WCHAR* strText, DWORD dwFlags, FLOAT fMaxPixelWidth, bool darken /*= false*/ )
|
||||
{
|
||||
if( nullptr == strText ) return;
|
||||
if( NULL == strText ) return;
|
||||
if( L'\0' == strText[0] ) return;
|
||||
|
||||
// 4J-PB - if we're in 480 widescreen mode, we need to ensure that the font characters are aligned on an even boundary if they are a 2x multiple
|
||||
@@ -244,21 +244,21 @@ VOID XUI_Font::DrawText( FLOAT fOriginX, FLOAT fOriginY, DWORD dwColor,
|
||||
{
|
||||
if(RenderManager.IsWidescreen())
|
||||
{
|
||||
int iScaleX=static_cast<int>(m_fXScaleFactor);
|
||||
int iScaleX=(int)m_fXScaleFactor;
|
||||
int iOriginX;
|
||||
if(iScaleX%2==0)
|
||||
{
|
||||
iOriginX=static_cast<int>(fOriginX);
|
||||
iOriginX=(int)fOriginX;
|
||||
if(iOriginX%2==1)
|
||||
{
|
||||
fOriginX+=1.0f;
|
||||
}
|
||||
}
|
||||
int iScaleY=static_cast<int>(m_fYScaleFactor);
|
||||
int iScaleY=(int)m_fYScaleFactor;
|
||||
int iOriginY;
|
||||
if(iScaleY%2==0)
|
||||
{
|
||||
iOriginY=static_cast<int>(fOriginY);
|
||||
iOriginY=(int)fOriginY;
|
||||
if(iOriginY%2==1)
|
||||
{
|
||||
fOriginY+=1.0f;
|
||||
@@ -268,7 +268,7 @@ VOID XUI_Font::DrawText( FLOAT fOriginX, FLOAT fOriginY, DWORD dwColor,
|
||||
else
|
||||
{
|
||||
// 480 SD mode - y needs to be on a pixel boundary when multiplied by 1.5, so if it's an odd number, subtract 1/3 from it
|
||||
int iOriginY=static_cast<int>(fOriginY);
|
||||
int iOriginY=(int)fOriginY;
|
||||
if(iOriginY%2==1)
|
||||
{
|
||||
fOriginY-=1.0f/3.0f;
|
||||
@@ -415,8 +415,8 @@ VOID XUI_Font::DrawText( FLOAT fOriginX, FLOAT fOriginY, DWORD dwColor,
|
||||
// Translate unprintable characters
|
||||
XUI_FontData::SChar sChar = m_fontData->getChar( letter );
|
||||
|
||||
FLOAT fOffset = m_fXScaleFactor * static_cast<FLOAT>(sChar.getOffset());
|
||||
FLOAT fAdvance = m_fXScaleFactor * static_cast<FLOAT>(sChar.getWAdvance());
|
||||
FLOAT fOffset = m_fXScaleFactor * ( FLOAT )sChar.getOffset();
|
||||
FLOAT fAdvance = m_fXScaleFactor * ( FLOAT )sChar.getWAdvance();
|
||||
// 4J Use the font max width otherwise scaling doesnt look right
|
||||
FLOAT fWidth = m_fXScaleFactor * (sChar.tu2() - sChar.tu1());//( FLOAT )pGlyph->wWidth;
|
||||
FLOAT fHeight = m_fYScaleFactor * m_fontData->getFontHeight();
|
||||
@@ -450,10 +450,10 @@ VOID XUI_Font::DrawText( FLOAT fOriginX, FLOAT fOriginY, DWORD dwColor,
|
||||
|
||||
// Add the vertices to draw this glyph
|
||||
|
||||
FLOAT tu1 = sChar.tu1() / static_cast<float>(m_fontData->getImageWidth());
|
||||
FLOAT tv1 = sChar.tv1() / static_cast<float>(m_fontData->getImageHeight());
|
||||
FLOAT tu2 = sChar.tu2() / static_cast<float>(m_fontData->getImageWidth());
|
||||
FLOAT tv2 = sChar.tv2() / static_cast<float>(m_fontData->getImageHeight());
|
||||
FLOAT tu1 = sChar.tu1() / (float)m_fontData->getImageWidth();
|
||||
FLOAT tv1 = sChar.tv1() / (float)m_fontData->getImageHeight();
|
||||
FLOAT tu2 = sChar.tu2() / (float)m_fontData->getImageWidth();
|
||||
FLOAT tv2 = sChar.tv2() / (float)m_fontData->getImageHeight();
|
||||
|
||||
Tesselator *t = Tesselator::getInstance();
|
||||
t->begin();
|
||||
|
||||
@@ -68,7 +68,7 @@ float XUI_FontData::SChar::getMinX()
|
||||
|
||||
float XUI_FontData::SChar::getMaxX()
|
||||
{
|
||||
return static_cast<float>(m_parent->m_fontData->getFontData()->m_uiGlyphWidth);
|
||||
return (float) m_parent->m_fontData->getFontData()->m_uiGlyphWidth;
|
||||
}
|
||||
|
||||
float XUI_FontData::SChar::getMinY()
|
||||
@@ -83,7 +83,7 @@ float XUI_FontData::SChar::getMaxY()
|
||||
|
||||
float XUI_FontData::SChar::getAdvance()
|
||||
{
|
||||
return static_cast<float>(m_parent->m_fontData->getWidth(m_glyphId));
|
||||
return (float) m_parent->m_fontData->getWidth(m_glyphId);
|
||||
}
|
||||
|
||||
int XUI_FontData::SChar::getGlyphId()
|
||||
@@ -157,11 +157,11 @@ XUI_FontData::SChar XUI_FontData::getChar(const wchar_t strChar)
|
||||
//--------------------------------------------------------------------------------------
|
||||
XUI_FontData::XUI_FontData()
|
||||
{
|
||||
m_pFontTexture = nullptr;
|
||||
m_pFontTexture = NULL;
|
||||
m_iFontTexture = -1;
|
||||
|
||||
m_dwNumGlyphs = 0L;
|
||||
m_Glyphs = nullptr;
|
||||
m_Glyphs = NULL;
|
||||
|
||||
m_cMaxGlyph = 0;
|
||||
|
||||
@@ -201,12 +201,12 @@ HRESULT XUI_FontData::Create( SFontData &sfontdata )
|
||||
|
||||
m_fontData = new CFontData( sfontdata, rawPixels.data );
|
||||
|
||||
if (rawPixels.data != nullptr) delete [] rawPixels.data;
|
||||
if (rawPixels.data != NULL) delete [] rawPixels.data;
|
||||
|
||||
#if 0
|
||||
{ // 4J-JEV: Load in FontData (ABC) file, and initialize member variables from it.
|
||||
|
||||
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(nullptr);
|
||||
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL);
|
||||
|
||||
//wsprintfW(szResourceLocator,L"section://%X,%s#%s",c_ModuleHandle,L"media", L"media/font/Mojangles_10.abc");
|
||||
wsprintfW(szResourceLocator,L"section://%X,%s#%s%s%s",c_ModuleHandle,L"media", L"media/font/",strFontFileName.c_str(),L".abc");
|
||||
@@ -349,7 +349,7 @@ HRESULT XUI_FontData::Create( int iFontTexture, const VOID* pFontData )
|
||||
//--------------------------------------------------------------------------------------
|
||||
VOID XUI_FontData::Destroy()
|
||||
{
|
||||
if(m_pFontTexture!=nullptr)
|
||||
if(m_pFontTexture!=NULL)
|
||||
{
|
||||
m_pFontTexture->Release();
|
||||
delete m_pFontTexture;
|
||||
@@ -357,7 +357,7 @@ VOID XUI_FontData::Destroy()
|
||||
|
||||
m_fontData->release();
|
||||
|
||||
m_pFontTexture = nullptr;
|
||||
m_pFontTexture = NULL;
|
||||
m_dwNumGlyphs = 0L;
|
||||
m_cMaxGlyph = 0;
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ VOID XUI_FontRenderer::Term()
|
||||
|
||||
HRESULT XUI_FontRenderer::GetCaps( DWORD * pdwCaps )
|
||||
{
|
||||
if( pdwCaps != nullptr )
|
||||
if( pdwCaps != NULL )
|
||||
{
|
||||
// setting this means XUI calls the DrawCharsToDevice method
|
||||
*pdwCaps = XUI_FONT_RENDERER_CAP_INTERNAL_GLYPH_CACHE | XUI_FONT_RENDERER_CAP_POINT_SIZE_RESPECTED | XUI_FONT_RENDERER_STYLE_DROPSHADOW;
|
||||
@@ -50,7 +50,7 @@ HRESULT XUI_FontRenderer::CreateFont( const TypefaceDescriptor * pTypefaceDescri
|
||||
//float fXuiSize = fPointSize * ( 16.0f / 16.0f );
|
||||
fXuiSize /= 4.0f;
|
||||
fXuiSize = floor( fXuiSize );
|
||||
int xuiSize = static_cast<int>(fXuiSize * 4.0f);
|
||||
int xuiSize = (int)(fXuiSize * 4.0f);
|
||||
if( xuiSize < 1 ) xuiSize = 8;
|
||||
|
||||
// 4J Stu - We have fonts based on multiples of 8 or 12
|
||||
@@ -60,8 +60,8 @@ HRESULT XUI_FontRenderer::CreateFont( const TypefaceDescriptor * pTypefaceDescri
|
||||
|
||||
//app.DebugPrintf("point size is: %f, xuiSize is: %d\n", fPointSize, xuiSize);
|
||||
|
||||
XUI_Font *font = nullptr;
|
||||
XUI_FontData *fontData = nullptr;
|
||||
XUI_Font *font = NULL;
|
||||
XUI_FontData *fontData = NULL;
|
||||
FLOAT scale = 1;
|
||||
|
||||
eFontData efontdata;
|
||||
@@ -77,17 +77,17 @@ HRESULT XUI_FontRenderer::CreateFont( const TypefaceDescriptor * pTypefaceDescri
|
||||
}
|
||||
|
||||
font = m_loadedFonts[efontdata][scale];
|
||||
if (font == nullptr)
|
||||
if (font == NULL)
|
||||
{
|
||||
fontData = m_loadedFontData[efontdata];
|
||||
if (fontData == nullptr)
|
||||
if (fontData == NULL)
|
||||
{
|
||||
SFontData *sfontdata;
|
||||
switch (efontdata)
|
||||
{
|
||||
case eFontData_Mojangles_7: sfontdata = &SFontData::Mojangles_7; break;
|
||||
case eFontData_Mojangles_11: sfontdata = &SFontData::Mojangles_11; break;
|
||||
default: sfontdata = nullptr; break;
|
||||
default: sfontdata = NULL; break;
|
||||
}
|
||||
|
||||
fontData = new XUI_FontData();
|
||||
@@ -101,14 +101,14 @@ HRESULT XUI_FontRenderer::CreateFont( const TypefaceDescriptor * pTypefaceDescri
|
||||
}
|
||||
font->IncRefCount();
|
||||
|
||||
*phFont = static_cast<HFONTOBJ>(font);
|
||||
*phFont = (HFONTOBJ)font;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
VOID XUI_FontRenderer::ReleaseFont( HFONTOBJ hFont )
|
||||
{
|
||||
XUI_Font *xuiFont = static_cast<XUI_Font *>(hFont);
|
||||
if (xuiFont != nullptr)
|
||||
XUI_Font *xuiFont = (XUI_Font*) hFont;
|
||||
if (xuiFont != NULL)
|
||||
{
|
||||
xuiFont->DecRefCount();
|
||||
if (xuiFont->refCount <= 0)
|
||||
@@ -125,7 +125,7 @@ HRESULT XUI_FontRenderer::GetFontMetrics( HFONTOBJ hFont, XUIFontMetrics *pFontM
|
||||
{
|
||||
if( hFont == 0 || pFontMetrics == 0 ) return E_INVALIDARG;
|
||||
|
||||
XUI_Font *font = static_cast<XUI_Font *>(hFont);
|
||||
XUI_Font *font = (XUI_Font *)hFont;
|
||||
|
||||
pFontMetrics->fLineHeight = (font->m_fontData->getFontYAdvance() + 1) * font->m_fYScaleFactor;
|
||||
pFontMetrics->fMaxAscent = font->m_fontData->getMaxAscent() * font->m_fYScaleFactor;
|
||||
@@ -142,7 +142,7 @@ HRESULT XUI_FontRenderer::GetCharMetrics( HFONTOBJ hFont, WCHAR wch, XUICharMetr
|
||||
{
|
||||
if (hFont == 0 || pCharMetrics == 0) return E_INVALIDARG;
|
||||
|
||||
XUI_Font *font = static_cast<XUI_Font *>(hFont);
|
||||
XUI_Font *font = (XUI_Font *)hFont;
|
||||
XUI_FontData::SChar sChar = font->m_fontData->getChar(wch);
|
||||
|
||||
pCharMetrics->fMinX = sChar.getMinX() * font->m_fYScaleFactor;
|
||||
@@ -156,7 +156,7 @@ HRESULT XUI_FontRenderer::GetCharMetrics( HFONTOBJ hFont, WCHAR wch, XUICharMetr
|
||||
|
||||
HRESULT XUI_FontRenderer::DrawCharToTexture( HFONTOBJ hFont, WCHAR wch, HXUIDC hDC, IXuiTexture * pTexture, UINT x, UINT y, UINT width, UINT height, UINT insetX, UINT insetY )
|
||||
{
|
||||
if( hFont==0 || pTexture==nullptr ) return E_INVALIDARG;
|
||||
if( hFont==0 || pTexture==NULL ) return E_INVALIDARG;
|
||||
return( S_OK );
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ HRESULT XUI_FontRenderer::DrawCharsToDevice( HFONTOBJ hFont, CharData * pCharDat
|
||||
DWORD SamplerStateA[5];
|
||||
XMVECTOR vconsts[20];
|
||||
XMVECTOR pconsts[20];
|
||||
XUI_Font *font = static_cast<XUI_Font *>(hFont);
|
||||
XUI_Font *font = (XUI_Font *)hFont;
|
||||
|
||||
// 4J-PB - if we're in 480 Widescreen mode, we need to ensure that the font characters are aligned on an even boundary if they are a 2x multiple
|
||||
if(!RenderManager.IsHiDef())
|
||||
@@ -184,19 +184,19 @@ HRESULT XUI_FontRenderer::DrawCharsToDevice( HFONTOBJ hFont, CharData * pCharDat
|
||||
if(iScaleX%2==0)
|
||||
{
|
||||
int iWorldX=pWorldViewProj->_41;
|
||||
pWorldViewProj->_41 = static_cast<float>(iWorldX & -2);
|
||||
pWorldViewProj->_41 = (float)(iWorldX & -2);
|
||||
}
|
||||
if(iScaleY%2==0)
|
||||
{
|
||||
int iWorldY=pWorldViewProj->_42;
|
||||
pWorldViewProj->_42 = static_cast<float>(iWorldY & -2);
|
||||
pWorldViewProj->_42 = (float)(iWorldY & -2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// make x an even number for 480 4:3
|
||||
int iWorldX=pWorldViewProj->_41;
|
||||
pWorldViewProj->_41 = static_cast<float>(iWorldX & -2);
|
||||
pWorldViewProj->_41 = (float)(iWorldX & -2);
|
||||
|
||||
// 480 SD mode - y needs to be on a pixel boundary when multiplied by 1.5, so if it's an odd number, subtract 1/3 from it
|
||||
int iWorldY=pWorldViewProj->_42;
|
||||
|
||||
@@ -10,25 +10,25 @@ LeaderboardManager *LeaderboardManager::m_instance = new XboxLeaderboardManager(
|
||||
|
||||
const XboxLeaderboardManager::LeaderboardDescriptor XboxLeaderboardManager::LEADERBOARD_DESCRIPTORS[XboxLeaderboardManager::NUM_LEADERBOARDS][4] = {
|
||||
{
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_TRAVELLING_PEACEFUL, 4, STATS_COLUMN_TRAVELLING_PEACEFUL_WALKED, STATS_COLUMN_TRAVELLING_PEACEFUL_FALLEN, STATS_COLUMN_TRAVELLING_PEACEFUL_MINECART, STATS_COLUMN_TRAVELLING_PEACEFUL_BOAT, nullptr, nullptr, nullptr,nullptr),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_TRAVELLING_EASY, 4, STATS_COLUMN_TRAVELLING_EASY_WALKED, STATS_COLUMN_TRAVELLING_EASY_FALLEN, STATS_COLUMN_TRAVELLING_EASY_MINECART, STATS_COLUMN_TRAVELLING_EASY_BOAT, nullptr, nullptr, nullptr,nullptr),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_TRAVELLING_NORMAL, 4, STATS_COLUMN_TRAVELLING_NORMAL_WALKED, STATS_COLUMN_TRAVELLING_NORMAL_FALLEN, STATS_COLUMN_TRAVELLING_NORMAL_MINECART, STATS_COLUMN_TRAVELLING_NORMAL_BOAT, nullptr, nullptr, nullptr,nullptr),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_TRAVELLING_HARD, 4, STATS_COLUMN_TRAVELLING_HARD_WALKED, STATS_COLUMN_TRAVELLING_HARD_FALLEN, STATS_COLUMN_TRAVELLING_HARD_MINECART, STATS_COLUMN_TRAVELLING_HARD_BOAT, nullptr, nullptr, nullptr,nullptr),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_TRAVELLING_PEACEFUL, 4, STATS_COLUMN_TRAVELLING_PEACEFUL_WALKED, STATS_COLUMN_TRAVELLING_PEACEFUL_FALLEN, STATS_COLUMN_TRAVELLING_PEACEFUL_MINECART, STATS_COLUMN_TRAVELLING_PEACEFUL_BOAT, NULL, NULL, NULL,NULL),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_TRAVELLING_EASY, 4, STATS_COLUMN_TRAVELLING_EASY_WALKED, STATS_COLUMN_TRAVELLING_EASY_FALLEN, STATS_COLUMN_TRAVELLING_EASY_MINECART, STATS_COLUMN_TRAVELLING_EASY_BOAT, NULL, NULL, NULL,NULL),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_TRAVELLING_NORMAL, 4, STATS_COLUMN_TRAVELLING_NORMAL_WALKED, STATS_COLUMN_TRAVELLING_NORMAL_FALLEN, STATS_COLUMN_TRAVELLING_NORMAL_MINECART, STATS_COLUMN_TRAVELLING_NORMAL_BOAT, NULL, NULL, NULL,NULL),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_TRAVELLING_HARD, 4, STATS_COLUMN_TRAVELLING_HARD_WALKED, STATS_COLUMN_TRAVELLING_HARD_FALLEN, STATS_COLUMN_TRAVELLING_HARD_MINECART, STATS_COLUMN_TRAVELLING_HARD_BOAT, NULL, NULL, NULL,NULL),
|
||||
}, {
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_MINING_BLOCKS_PEACEFUL, 7, STATS_COLUMN_MINING_BLOCKS_PEACEFUL_DIRT, STATS_COLUMN_MINING_BLOCKS_PEACEFUL_STONE, STATS_COLUMN_MINING_BLOCKS_PEACEFUL_SAND, STATS_COLUMN_MINING_BLOCKS_PEACEFUL_COBBLESTONE, STATS_COLUMN_MINING_BLOCKS_PEACEFUL_GRAVEL, STATS_COLUMN_MINING_BLOCKS_PEACEFUL_CLAY, STATS_COLUMN_MINING_BLOCKS_PEACEFUL_OBSIDIAN, nullptr ),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_MINING_BLOCKS_EASY, 7, STATS_COLUMN_MINING_BLOCKS_EASY_DIRT, STATS_COLUMN_MINING_BLOCKS_EASY_STONE, STATS_COLUMN_MINING_BLOCKS_EASY_SAND, STATS_COLUMN_MINING_BLOCKS_EASY_COBBLESTONE, STATS_COLUMN_MINING_BLOCKS_EASY_GRAVEL, STATS_COLUMN_MINING_BLOCKS_EASY_CLAY, STATS_COLUMN_MINING_BLOCKS_EASY_OBSIDIAN, nullptr ),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_MINING_BLOCKS_NORMAL, 7, STATS_COLUMN_MINING_BLOCKS_NORMAL_DIRT, STATS_COLUMN_MINING_BLOCKS_NORMAL_STONE, STATS_COLUMN_MINING_BLOCKS_NORMAL_SAND, STATS_COLUMN_MINING_BLOCKS_NORMAL_COBBLESTONE, STATS_COLUMN_MINING_BLOCKS_NORMAL_GRAVEL, STATS_COLUMN_MINING_BLOCKS_NORMAL_CLAY, STATS_COLUMN_MINING_BLOCKS_NORMAL_OBSIDIAN, nullptr ),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_MINING_BLOCKS_HARD, 7, STATS_COLUMN_MINING_BLOCKS_HARD_DIRT, STATS_COLUMN_MINING_BLOCKS_HARD_STONE, STATS_COLUMN_MINING_BLOCKS_HARD_SAND, STATS_COLUMN_MINING_BLOCKS_HARD_COBBLESTONE, STATS_COLUMN_MINING_BLOCKS_HARD_GRAVEL, STATS_COLUMN_MINING_BLOCKS_HARD_CLAY, STATS_COLUMN_MINING_BLOCKS_HARD_OBSIDIAN, nullptr ),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_MINING_BLOCKS_PEACEFUL, 7, STATS_COLUMN_MINING_BLOCKS_PEACEFUL_DIRT, STATS_COLUMN_MINING_BLOCKS_PEACEFUL_STONE, STATS_COLUMN_MINING_BLOCKS_PEACEFUL_SAND, STATS_COLUMN_MINING_BLOCKS_PEACEFUL_COBBLESTONE, STATS_COLUMN_MINING_BLOCKS_PEACEFUL_GRAVEL, STATS_COLUMN_MINING_BLOCKS_PEACEFUL_CLAY, STATS_COLUMN_MINING_BLOCKS_PEACEFUL_OBSIDIAN, NULL ),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_MINING_BLOCKS_EASY, 7, STATS_COLUMN_MINING_BLOCKS_EASY_DIRT, STATS_COLUMN_MINING_BLOCKS_EASY_STONE, STATS_COLUMN_MINING_BLOCKS_EASY_SAND, STATS_COLUMN_MINING_BLOCKS_EASY_COBBLESTONE, STATS_COLUMN_MINING_BLOCKS_EASY_GRAVEL, STATS_COLUMN_MINING_BLOCKS_EASY_CLAY, STATS_COLUMN_MINING_BLOCKS_EASY_OBSIDIAN, NULL ),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_MINING_BLOCKS_NORMAL, 7, STATS_COLUMN_MINING_BLOCKS_NORMAL_DIRT, STATS_COLUMN_MINING_BLOCKS_NORMAL_STONE, STATS_COLUMN_MINING_BLOCKS_NORMAL_SAND, STATS_COLUMN_MINING_BLOCKS_NORMAL_COBBLESTONE, STATS_COLUMN_MINING_BLOCKS_NORMAL_GRAVEL, STATS_COLUMN_MINING_BLOCKS_NORMAL_CLAY, STATS_COLUMN_MINING_BLOCKS_NORMAL_OBSIDIAN, NULL ),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_MINING_BLOCKS_HARD, 7, STATS_COLUMN_MINING_BLOCKS_HARD_DIRT, STATS_COLUMN_MINING_BLOCKS_HARD_STONE, STATS_COLUMN_MINING_BLOCKS_HARD_SAND, STATS_COLUMN_MINING_BLOCKS_HARD_COBBLESTONE, STATS_COLUMN_MINING_BLOCKS_HARD_GRAVEL, STATS_COLUMN_MINING_BLOCKS_HARD_CLAY, STATS_COLUMN_MINING_BLOCKS_HARD_OBSIDIAN, NULL ),
|
||||
}, {
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_FARMING_PEACEFUL, 6, STATS_COLUMN_FARMING_PEACEFUL_EGGS, STATS_COLUMN_FARMING_PEACEFUL_WHEAT, STATS_COLUMN_FARMING_PEACEFUL_MUSHROOMS,STATS_COLUMN_FARMING_PEACEFUL_SUGARCANE,STATS_COLUMN_FARMING_PEACEFUL_MILK, STATS_COLUMN_FARMING_PEACEFUL_PUMPKINS, nullptr, nullptr ),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_FARMING_EASY, 6, STATS_COLUMN_FARMING_EASY_EGGS, STATS_COLUMN_FARMING_PEACEFUL_WHEAT, STATS_COLUMN_FARMING_EASY_MUSHROOMS, STATS_COLUMN_FARMING_EASY_SUGARCANE, STATS_COLUMN_FARMING_EASY_MILK, STATS_COLUMN_FARMING_EASY_PUMPKINS, nullptr, nullptr ),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_FARMING_NORMAL, 6, STATS_COLUMN_FARMING_NORMAL_EGGS, STATS_COLUMN_FARMING_NORMAL_WHEAT, STATS_COLUMN_FARMING_NORMAL_MUSHROOMS, STATS_COLUMN_FARMING_NORMAL_SUGARCANE, STATS_COLUMN_FARMING_NORMAL_MILK, STATS_COLUMN_FARMING_NORMAL_PUMPKINS, nullptr, nullptr ),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_FARMING_HARD, 6, STATS_COLUMN_FARMING_HARD_EGGS, STATS_COLUMN_FARMING_HARD_WHEAT, STATS_COLUMN_FARMING_HARD_MUSHROOMS, STATS_COLUMN_FARMING_HARD_SUGARCANE, STATS_COLUMN_FARMING_HARD_MILK, STATS_COLUMN_FARMING_HARD_PUMPKINS, nullptr, nullptr ),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_FARMING_PEACEFUL, 6, STATS_COLUMN_FARMING_PEACEFUL_EGGS, STATS_COLUMN_FARMING_PEACEFUL_WHEAT, STATS_COLUMN_FARMING_PEACEFUL_MUSHROOMS,STATS_COLUMN_FARMING_PEACEFUL_SUGARCANE,STATS_COLUMN_FARMING_PEACEFUL_MILK, STATS_COLUMN_FARMING_PEACEFUL_PUMPKINS, NULL, NULL ),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_FARMING_EASY, 6, STATS_COLUMN_FARMING_EASY_EGGS, STATS_COLUMN_FARMING_PEACEFUL_WHEAT, STATS_COLUMN_FARMING_EASY_MUSHROOMS, STATS_COLUMN_FARMING_EASY_SUGARCANE, STATS_COLUMN_FARMING_EASY_MILK, STATS_COLUMN_FARMING_EASY_PUMPKINS, NULL, NULL ),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_FARMING_NORMAL, 6, STATS_COLUMN_FARMING_NORMAL_EGGS, STATS_COLUMN_FARMING_NORMAL_WHEAT, STATS_COLUMN_FARMING_NORMAL_MUSHROOMS, STATS_COLUMN_FARMING_NORMAL_SUGARCANE, STATS_COLUMN_FARMING_NORMAL_MILK, STATS_COLUMN_FARMING_NORMAL_PUMPKINS, NULL, NULL ),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_FARMING_HARD, 6, STATS_COLUMN_FARMING_HARD_EGGS, STATS_COLUMN_FARMING_HARD_WHEAT, STATS_COLUMN_FARMING_HARD_MUSHROOMS, STATS_COLUMN_FARMING_HARD_SUGARCANE, STATS_COLUMN_FARMING_HARD_MILK, STATS_COLUMN_FARMING_HARD_PUMPKINS, NULL, NULL ),
|
||||
}, {
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( nullptr, 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr ),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_KILLS_EASY, 7, STATS_COLUMN_KILLS_EASY_ZOMBIES, STATS_COLUMN_KILLS_EASY_SKELETONS, STATS_COLUMN_KILLS_EASY_CREEPERS, STATS_COLUMN_KILLS_EASY_SPIDERS, STATS_COLUMN_KILLS_EASY_SPIDERJOCKEYS, STATS_COLUMN_KILLS_EASY_ZOMBIEPIGMEN, STATS_COLUMN_KILLS_EASY_SLIME, nullptr ),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_KILLS_NORMAL, 7, STATS_COLUMN_KILLS_NORMAL_ZOMBIES, STATS_COLUMN_KILLS_NORMAL_SKELETONS, STATS_COLUMN_KILLS_NORMAL_CREEPERS, STATS_COLUMN_KILLS_NORMAL_SPIDERS, STATS_COLUMN_KILLS_NORMAL_SPIDERJOCKEYS, STATS_COLUMN_KILLS_NORMAL_ZOMBIEPIGMEN, STATS_COLUMN_KILLS_NORMAL_SLIME, nullptr ),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_KILLS_HARD, 7, STATS_COLUMN_KILLS_HARD_ZOMBIES, STATS_COLUMN_KILLS_HARD_SKELETONS, STATS_COLUMN_KILLS_HARD_CREEPERS, STATS_COLUMN_KILLS_HARD_SPIDERS, STATS_COLUMN_KILLS_HARD_SPIDERJOCKEYS, STATS_COLUMN_KILLS_HARD_ZOMBIEPIGMEN, STATS_COLUMN_KILLS_HARD_SLIME, nullptr ),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_KILLS_EASY, 7, STATS_COLUMN_KILLS_EASY_ZOMBIES, STATS_COLUMN_KILLS_EASY_SKELETONS, STATS_COLUMN_KILLS_EASY_CREEPERS, STATS_COLUMN_KILLS_EASY_SPIDERS, STATS_COLUMN_KILLS_EASY_SPIDERJOCKEYS, STATS_COLUMN_KILLS_EASY_ZOMBIEPIGMEN, STATS_COLUMN_KILLS_EASY_SLIME, NULL ),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_KILLS_NORMAL, 7, STATS_COLUMN_KILLS_NORMAL_ZOMBIES, STATS_COLUMN_KILLS_NORMAL_SKELETONS, STATS_COLUMN_KILLS_NORMAL_CREEPERS, STATS_COLUMN_KILLS_NORMAL_SPIDERS, STATS_COLUMN_KILLS_NORMAL_SPIDERJOCKEYS, STATS_COLUMN_KILLS_NORMAL_ZOMBIEPIGMEN, STATS_COLUMN_KILLS_NORMAL_SLIME, NULL ),
|
||||
XboxLeaderboardManager::LeaderboardDescriptor( STATS_VIEW_KILLS_HARD, 7, STATS_COLUMN_KILLS_HARD_ZOMBIES, STATS_COLUMN_KILLS_HARD_SKELETONS, STATS_COLUMN_KILLS_HARD_CREEPERS, STATS_COLUMN_KILLS_HARD_SPIDERS, STATS_COLUMN_KILLS_HARD_SPIDERJOCKEYS, STATS_COLUMN_KILLS_HARD_ZOMBIEPIGMEN, STATS_COLUMN_KILLS_HARD_SLIME, NULL ),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -37,9 +37,9 @@ XboxLeaderboardManager::XboxLeaderboardManager()
|
||||
m_eStatsState = eStatsState_Idle;
|
||||
m_statsRead = false;
|
||||
|
||||
m_hSession = nullptr;
|
||||
m_spec = nullptr;
|
||||
m_stats = nullptr;
|
||||
m_hSession = NULL;
|
||||
m_spec = NULL;
|
||||
m_stats = NULL;
|
||||
|
||||
m_isQNetSession = false;
|
||||
m_endingSession = false;
|
||||
@@ -53,11 +53,11 @@ void XboxLeaderboardManager::Tick()
|
||||
{
|
||||
|
||||
/*if( IsStatsReadComplete() )
|
||||
if( m_readCompleteCallback != nullptr )
|
||||
if( m_readCompleteCallback != NULL )
|
||||
m_readCompleteCallback(m_readCompleteUserdata);*/
|
||||
|
||||
if ( IsStatsReadComplete() )
|
||||
if (m_readListener != nullptr)
|
||||
if (m_readListener != NULL)
|
||||
{
|
||||
// 4J Stu - If the state is other than ready, then we don't have any stats to sort
|
||||
if(m_eFilterMode == LeaderboardManager::eFM_Friends && m_eStatsState == eStatsState_Ready) SortFriendStats();
|
||||
@@ -83,12 +83,12 @@ bool XboxLeaderboardManager::OpenSession()
|
||||
if (m_endingSession) return false;
|
||||
|
||||
//We've already got an open session
|
||||
if (m_hSession != nullptr) return true;
|
||||
if (m_hSession != NULL) return true;
|
||||
|
||||
int lockedProfile = ProfileManager.GetLockedProfile();
|
||||
if( lockedProfile == -1 )
|
||||
{
|
||||
m_hSession = nullptr;
|
||||
m_hSession = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -112,26 +112,26 @@ bool XboxLeaderboardManager::OpenSession()
|
||||
XSESSION_INFO sessionInfo;
|
||||
ULONGLONG sessionNonce;
|
||||
|
||||
DWORD ret = XSessionCreate(XSESSION_CREATE_USES_STATS | XSESSION_CREATE_HOST, lockedProfile, 8, 8, &sessionNonce, &sessionInfo, nullptr, &m_hSession);
|
||||
DWORD ret = XSessionCreate(XSESSION_CREATE_USES_STATS | XSESSION_CREATE_HOST, lockedProfile, 8, 8, &sessionNonce, &sessionInfo, NULL, &m_hSession);
|
||||
if( ret != ERROR_SUCCESS )
|
||||
{
|
||||
m_hSession = nullptr;
|
||||
m_hSession = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
DWORD userIndices[1] = { lockedProfile };
|
||||
BOOL privateSlots[1] = { FALSE };
|
||||
ret = XSessionJoinLocal(m_hSession, 1, userIndices, privateSlots, nullptr);
|
||||
ret = XSessionJoinLocal(m_hSession, 1, userIndices, privateSlots, NULL);
|
||||
if( ret != ERROR_SUCCESS )
|
||||
{
|
||||
m_hSession = nullptr;
|
||||
m_hSession = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
ret = XSessionStart(m_hSession, 0, nullptr);
|
||||
ret = XSessionStart(m_hSession, 0, NULL);
|
||||
if( ret != ERROR_SUCCESS )
|
||||
{
|
||||
m_hSession = nullptr;
|
||||
m_hSession = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ void XboxLeaderboardManager::CloseSession()
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_hSession == nullptr) return;
|
||||
if (m_hSession == NULL) return;
|
||||
|
||||
memset(&m_endSessionOverlapped, 0, sizeof(m_endSessionOverlapped));
|
||||
|
||||
@@ -166,15 +166,15 @@ void XboxLeaderboardManager::CloseSession()
|
||||
if (ret != ERROR_SUCCESS) DeleteSession();
|
||||
}
|
||||
|
||||
m_readListener = nullptr;
|
||||
m_readListener = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void XboxLeaderboardManager::DeleteSession()
|
||||
{
|
||||
XSessionDelete(m_hSession, nullptr);
|
||||
XSessionDelete(m_hSession, NULL);
|
||||
CloseHandle(m_hSession);
|
||||
m_hSession = nullptr;
|
||||
m_hSession = NULL;
|
||||
}
|
||||
|
||||
bool XboxLeaderboardManager::WriteStats(unsigned int viewCount, ViewIn views)
|
||||
@@ -190,9 +190,9 @@ bool XboxLeaderboardManager::WriteStats(unsigned int viewCount, ViewIn views)
|
||||
if(m_isQNetSession == true)
|
||||
{
|
||||
INetworkPlayer *player = g_NetworkManager.GetPlayerByXuid(m_myXUID);
|
||||
if(player != nullptr)
|
||||
if(player != NULL)
|
||||
{
|
||||
ret = static_cast<NetworkPlayerXbox *>(player)->GetQNetPlayer()->WriteStats(viewCount,views);
|
||||
ret = ((NetworkPlayerXbox *)player)->GetQNetPlayer()->WriteStats(viewCount,views);
|
||||
//printf("Wrote stats to QNet player\n");
|
||||
}
|
||||
else
|
||||
@@ -204,7 +204,7 @@ bool XboxLeaderboardManager::WriteStats(unsigned int viewCount, ViewIn views)
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = XSessionWriteStats(m_hSession, m_myXUID, viewCount, views, nullptr);
|
||||
ret = XSessionWriteStats(m_hSession, m_myXUID, viewCount, views, NULL);
|
||||
}
|
||||
if (ret != ERROR_SUCCESS) return false;
|
||||
return true;
|
||||
@@ -213,7 +213,7 @@ bool XboxLeaderboardManager::WriteStats(unsigned int viewCount, ViewIn views)
|
||||
void XboxLeaderboardManager::CancelOperation()
|
||||
{
|
||||
//Need to have a session open
|
||||
if( m_hSession == nullptr )
|
||||
if( m_hSession == NULL )
|
||||
if( !OpenSession() )
|
||||
return;
|
||||
|
||||
@@ -249,7 +249,7 @@ bool XboxLeaderboardManager::ReadStats_MyScore(LeaderboardReadListener *callback
|
||||
|
||||
//Allocate a buffer for the stats
|
||||
m_stats = (PXUSER_STATS_READ_RESULTS) new BYTE[m_numStats];
|
||||
if (m_stats == nullptr) return false;
|
||||
if (m_stats == NULL) return false;
|
||||
|
||||
memset(m_stats, 0, m_numStats);
|
||||
memset(&m_overlapped, 0, sizeof(m_overlapped));
|
||||
@@ -258,7 +258,7 @@ bool XboxLeaderboardManager::ReadStats_MyScore(LeaderboardReadListener *callback
|
||||
hEnumerator, // Enumeration handle
|
||||
m_stats, // Buffer
|
||||
m_numStats, // Size of buffer
|
||||
nullptr, // Number of rows returned; not used for async
|
||||
NULL, // Number of rows returned; not used for async
|
||||
&m_overlapped ); // Overlapped structure; not used for sync
|
||||
|
||||
if ( (ret!=ERROR_SUCCESS) && (ret!=ERROR_IO_PENDING) ) return false;
|
||||
@@ -280,12 +280,12 @@ bool XboxLeaderboardManager::ReadStats_Friends(LeaderboardReadListener *callback
|
||||
|
||||
getFriends(friendCount, &friends);
|
||||
|
||||
if(friendCount == 0 || friends == nullptr)
|
||||
if(friendCount == 0 || friends == NULL)
|
||||
{
|
||||
app.DebugPrintf("XboxLeaderboardManager::ReadStats_Friends - No friends found. Possibly you are offline?\n");
|
||||
return false;
|
||||
}
|
||||
assert(friendCount > 0 && friends != nullptr);
|
||||
assert(friendCount > 0 && friends != NULL);
|
||||
|
||||
m_numStats = 0;
|
||||
ret = XUserReadStats(
|
||||
@@ -295,8 +295,8 @@ bool XboxLeaderboardManager::ReadStats_Friends(LeaderboardReadListener *callback
|
||||
1, //specCount,
|
||||
m_spec,
|
||||
&m_numStats,
|
||||
nullptr,
|
||||
nullptr
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
|
||||
//Annoyingly, this returns ERROR_INSUFFICIENT_BUFFER when it is being asked to calculate the size of the buffer by passing zero resultsSize
|
||||
@@ -304,7 +304,7 @@ bool XboxLeaderboardManager::ReadStats_Friends(LeaderboardReadListener *callback
|
||||
|
||||
//Allocate a buffer for the stats
|
||||
m_stats = (PXUSER_STATS_READ_RESULTS) new BYTE[m_numStats];
|
||||
if (m_stats == nullptr) return false;
|
||||
if (m_stats == NULL) return false;
|
||||
|
||||
memset(m_stats, 0, m_numStats);
|
||||
memset(&m_overlapped, 0, sizeof(m_overlapped));
|
||||
@@ -346,7 +346,7 @@ bool XboxLeaderboardManager::ReadStats_TopRank(LeaderboardReadListener *callback
|
||||
|
||||
//Allocate a buffer for the stats
|
||||
m_stats = (PXUSER_STATS_READ_RESULTS) new BYTE[m_numStats];
|
||||
if (m_stats == nullptr) return false;
|
||||
if (m_stats == NULL) return false;
|
||||
|
||||
memset(m_stats, 0, m_numStats);
|
||||
memset(&m_overlapped, 0, sizeof(m_overlapped));
|
||||
@@ -355,7 +355,7 @@ bool XboxLeaderboardManager::ReadStats_TopRank(LeaderboardReadListener *callback
|
||||
hEnumerator, // Enumeration handle
|
||||
m_stats, // Buffer
|
||||
m_numStats, // Size of buffer
|
||||
nullptr, // Number of rows returned; not used for async
|
||||
NULL, // Number of rows returned; not used for async
|
||||
&m_overlapped ); // Overlapped structure; not used for sync
|
||||
|
||||
if( (ret!=ERROR_SUCCESS) && (ret!=ERROR_IO_PENDING) ) return false;
|
||||
@@ -367,7 +367,7 @@ bool XboxLeaderboardManager::ReadStats_TopRank(LeaderboardReadListener *callback
|
||||
bool XboxLeaderboardManager::readStats(int difficulty, EStatsType type)
|
||||
{
|
||||
//Need to have a session open
|
||||
if (m_hSession==nullptr) if(!OpenSession()) return false;
|
||||
if (m_hSession==NULL) if(!OpenSession()) return false;
|
||||
|
||||
m_eStatsState = eStatsState_Failed;
|
||||
m_statsRead = false;
|
||||
@@ -376,17 +376,17 @@ bool XboxLeaderboardManager::readStats(int difficulty, EStatsType type)
|
||||
|
||||
//Setup the spec structure for the read request
|
||||
m_spec = new XUSER_STATS_SPEC[1];
|
||||
m_spec[0].dwViewId = LEADERBOARD_DESCRIPTORS[static_cast<int>(type)][difficulty].m_viewId;
|
||||
m_spec[0].dwNumColumnIds = LEADERBOARD_DESCRIPTORS[static_cast<int>(type)][difficulty].m_columnCount;
|
||||
m_spec[0].dwViewId = LEADERBOARD_DESCRIPTORS[(int)type][difficulty].m_viewId;
|
||||
m_spec[0].dwNumColumnIds = LEADERBOARD_DESCRIPTORS[(int)type][difficulty].m_columnCount;
|
||||
for (unsigned int i=0; i<m_spec[0].dwNumColumnIds; ++i)
|
||||
m_spec[0].rgwColumnIds[i] = LEADERBOARD_DESCRIPTORS[static_cast<int>(type)][difficulty].m_columnIds[i];
|
||||
m_spec[0].rgwColumnIds[i] = LEADERBOARD_DESCRIPTORS[(int)type][difficulty].m_columnIds[i];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void XboxLeaderboardManager::FlushStats()
|
||||
{
|
||||
if( m_hSession == nullptr || m_isQNetSession ) return;
|
||||
if( m_hSession == NULL || m_isQNetSession ) return;
|
||||
memset(&m_flushStatsOverlapped, 0, sizeof(m_flushStatsOverlapped));
|
||||
XSessionFlushStats(m_hSession, &m_flushStatsOverlapped);
|
||||
}
|
||||
@@ -403,7 +403,7 @@ bool XboxLeaderboardManager::IsStatsReadComplete()
|
||||
if( m_stats )
|
||||
{
|
||||
delete [] m_stats;
|
||||
m_stats = nullptr;
|
||||
m_stats = NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -415,7 +415,7 @@ bool XboxLeaderboardManager::IsStatsReadComplete()
|
||||
if( m_stats )
|
||||
{
|
||||
delete [] m_stats;
|
||||
m_stats = nullptr;
|
||||
m_stats = NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -431,7 +431,7 @@ bool XboxLeaderboardManager::IsStatsReadComplete()
|
||||
|
||||
int XboxLeaderboardManager::FriendSortFunction(const void* a, const void* b)
|
||||
{
|
||||
return static_cast<int>(((XUSER_STATS_ROW *)a)->dwRank) - static_cast<int>(((XUSER_STATS_ROW *)b)->dwRank);
|
||||
return ((int)((XUSER_STATS_ROW*)a)->dwRank) - ((int)((XUSER_STATS_ROW*)b)->dwRank);
|
||||
}
|
||||
|
||||
void XboxLeaderboardManager::SortFriendStats()
|
||||
@@ -465,10 +465,10 @@ void XboxLeaderboardManager::SortFriendStats()
|
||||
#if 0
|
||||
void XboxLeaderboardManager::SetStatsRetrieved(bool success)
|
||||
{
|
||||
if( m_stats != nullptr )
|
||||
if( m_stats != NULL )
|
||||
{
|
||||
delete [] m_stats;
|
||||
m_stats = nullptr;
|
||||
m_stats = NULL;
|
||||
}
|
||||
|
||||
m_statsRead = success;
|
||||
@@ -496,7 +496,7 @@ bool XboxLeaderboardManager::getFriends(unsigned int &friendsCount, PlayerUID**
|
||||
xonlineFriends,
|
||||
resultsSize,
|
||||
&numFriends,
|
||||
nullptr
|
||||
NULL
|
||||
);
|
||||
|
||||
if (ret!=ERROR_SUCCESS) friendsCount = 0;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
NetworkPlayerXbox::NetworkPlayerXbox(IQNetPlayer *qnetPlayer)
|
||||
{
|
||||
m_qnetPlayer = qnetPlayer;
|
||||
m_pSocket = nullptr;
|
||||
m_pSocket = NULL;
|
||||
}
|
||||
|
||||
unsigned char NetworkPlayerXbox::GetSmallId()
|
||||
@@ -17,7 +17,7 @@ void NetworkPlayerXbox::SendData(INetworkPlayer *player, const void *pvData, int
|
||||
DWORD flags;
|
||||
flags = QNET_SENDDATA_RELIABLE | QNET_SENDDATA_SEQUENTIAL;
|
||||
if( lowPriority ) flags |= QNET_SENDDATA_LOW_PRIORITY | QNET_SENDDATA_SECONDARY;
|
||||
m_qnetPlayer->SendData(static_cast<NetworkPlayerXbox *>(player)->m_qnetPlayer, pvData, dataSize, flags);
|
||||
m_qnetPlayer->SendData(((NetworkPlayerXbox *)player)->m_qnetPlayer, pvData, dataSize, flags);
|
||||
}
|
||||
|
||||
int NetworkPlayerXbox::GetOutstandingAckCount()
|
||||
@@ -27,21 +27,21 @@ int NetworkPlayerXbox::GetOutstandingAckCount()
|
||||
|
||||
bool NetworkPlayerXbox::IsSameSystem(INetworkPlayer *player)
|
||||
{
|
||||
return ( m_qnetPlayer->IsSameSystem(static_cast<NetworkPlayerXbox *>(player)->m_qnetPlayer) == TRUE );
|
||||
return ( m_qnetPlayer->IsSameSystem(((NetworkPlayerXbox *)player)->m_qnetPlayer) == TRUE );
|
||||
}
|
||||
|
||||
int NetworkPlayerXbox::GetSendQueueSizeBytes( INetworkPlayer *player, bool lowPriority )
|
||||
{
|
||||
DWORD flags = QNET_GETSENDQUEUESIZE_BYTES;
|
||||
if( lowPriority ) flags |= QNET_GETSENDQUEUESIZE_SECONDARY_TYPE;
|
||||
return m_qnetPlayer->GetSendQueueSize(player ? static_cast<NetworkPlayerXbox *>(player)->m_qnetPlayer : nullptr , flags);
|
||||
return m_qnetPlayer->GetSendQueueSize(player ? ((NetworkPlayerXbox *)player)->m_qnetPlayer : NULL , flags);
|
||||
}
|
||||
|
||||
int NetworkPlayerXbox::GetSendQueueSizeMessages( INetworkPlayer *player, bool lowPriority )
|
||||
{
|
||||
DWORD flags = QNET_GETSENDQUEUESIZE_MESSAGES;
|
||||
if( lowPriority ) flags |= QNET_GETSENDQUEUESIZE_SECONDARY_TYPE;
|
||||
return m_qnetPlayer->GetSendQueueSize(player ? static_cast<NetworkPlayerXbox *>(player)->m_qnetPlayer : nullptr , flags);
|
||||
return m_qnetPlayer->GetSendQueueSize(player ? ((NetworkPlayerXbox *)player)->m_qnetPlayer : NULL , flags);
|
||||
}
|
||||
|
||||
int NetworkPlayerXbox::GetCurrentRtt()
|
||||
@@ -137,6 +137,6 @@ int NetworkPlayerXbox::GetTimeSinceLastChunkPacket_ms()
|
||||
return INT_MAX;
|
||||
}
|
||||
|
||||
const int64_t currentTime = System::currentTimeMillis();
|
||||
return static_cast<int>(currentTime - m_lastChunkPacketTime);
|
||||
int64_t currentTime = System::currentTimeMillis();
|
||||
return (int)( currentTime - m_lastChunkPacketTime );
|
||||
}
|
||||
@@ -109,7 +109,7 @@ VOID CPlatformNetworkManagerXbox::NotifyPlayerJoined(
|
||||
bool createFakeSocket = false;
|
||||
bool localPlayer = false;
|
||||
|
||||
NetworkPlayerXbox *networkPlayer = static_cast<NetworkPlayerXbox *>(addNetworkPlayer(pQNetPlayer));
|
||||
NetworkPlayerXbox *networkPlayer = (NetworkPlayerXbox *)addNetworkPlayer(pQNetPlayer);
|
||||
|
||||
if( pQNetPlayer->IsLocal() )
|
||||
{
|
||||
@@ -187,7 +187,7 @@ VOID CPlatformNetworkManagerXbox::NotifyPlayerJoined(
|
||||
|
||||
for( int idx = 0; idx < XUSER_MAX_COUNT; ++idx)
|
||||
{
|
||||
if(playerChangedCallback[idx] != nullptr)
|
||||
if(playerChangedCallback[idx] != NULL)
|
||||
playerChangedCallback[idx]( playerChangedCallbackParam[idx], networkPlayer, false );
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ VOID CPlatformNetworkManagerXbox::NotifyPlayerJoined(
|
||||
int localPlayerCount = 0;
|
||||
for(unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx)
|
||||
{
|
||||
if( m_pIQNet->GetLocalPlayerByUserIndex(idx) != nullptr ) ++localPlayerCount;
|
||||
if( m_pIQNet->GetLocalPlayerByUserIndex(idx) != NULL ) ++localPlayerCount;
|
||||
}
|
||||
|
||||
float appTime = app.getAppTime();
|
||||
@@ -221,7 +221,7 @@ VOID CPlatformNetworkManagerXbox::NotifyPlayerLeaving(
|
||||
|
||||
// Get our wrapper object associated with this player.
|
||||
Socket *socket = networkPlayer->GetSocket();
|
||||
if( socket != nullptr )
|
||||
if( socket != NULL )
|
||||
{
|
||||
// If we are in game then remove this player from the game as well.
|
||||
// We may get here either from the player requesting to exit the game,
|
||||
@@ -237,14 +237,14 @@ VOID CPlatformNetworkManagerXbox::NotifyPlayerLeaving(
|
||||
// We need this as long as the game server still needs to communicate with the player
|
||||
//delete socket;
|
||||
|
||||
networkPlayer->SetSocket( nullptr );
|
||||
networkPlayer->SetSocket( NULL );
|
||||
}
|
||||
|
||||
if( m_pIQNet->IsHost() && !m_bHostChanged )
|
||||
{
|
||||
if( isSystemPrimaryPlayer(pQNetPlayer) )
|
||||
{
|
||||
IQNetPlayer *pNewQNetPrimaryPlayer = nullptr;
|
||||
IQNetPlayer *pNewQNetPrimaryPlayer = NULL;
|
||||
for(unsigned int i = 0; i < m_pIQNet->GetPlayerCount(); ++i )
|
||||
{
|
||||
IQNetPlayer *pQNetPlayer2 = m_pIQNet->GetPlayerByIndex( i );
|
||||
@@ -261,7 +261,7 @@ VOID CPlatformNetworkManagerXbox::NotifyPlayerLeaving(
|
||||
m_machineQNetPrimaryPlayers.erase( it );
|
||||
}
|
||||
|
||||
if( pNewQNetPrimaryPlayer != nullptr )
|
||||
if( pNewQNetPrimaryPlayer != NULL )
|
||||
m_machineQNetPrimaryPlayers.push_back( pNewQNetPrimaryPlayer );
|
||||
}
|
||||
|
||||
@@ -274,7 +274,7 @@ VOID CPlatformNetworkManagerXbox::NotifyPlayerLeaving(
|
||||
|
||||
for( int idx = 0; idx < XUSER_MAX_COUNT; ++idx)
|
||||
{
|
||||
if(playerChangedCallback[idx] != nullptr)
|
||||
if(playerChangedCallback[idx] != NULL)
|
||||
playerChangedCallback[idx]( playerChangedCallbackParam[idx], networkPlayer, true );
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ VOID CPlatformNetworkManagerXbox::NotifyPlayerLeaving(
|
||||
int localPlayerCount = 0;
|
||||
for(unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx)
|
||||
{
|
||||
if( m_pIQNet->GetLocalPlayerByUserIndex(idx) != nullptr ) ++localPlayerCount;
|
||||
if( m_pIQNet->GetLocalPlayerByUserIndex(idx) != NULL ) ++localPlayerCount;
|
||||
}
|
||||
|
||||
float appTime = app.getAppTime();
|
||||
@@ -349,7 +349,7 @@ VOID CPlatformNetworkManagerXbox::NotifyDataReceived(
|
||||
INetworkPlayer *pPlayerFrom = getNetworkPlayer(pQNetPlayerFrom);
|
||||
Socket *socket = pPlayerFrom->GetSocket();
|
||||
|
||||
if(socket != nullptr)
|
||||
if(socket != NULL)
|
||||
socket->pushDataToQueue(pbData, dwDataSize, false);
|
||||
}
|
||||
else
|
||||
@@ -358,7 +358,7 @@ VOID CPlatformNetworkManagerXbox::NotifyDataReceived(
|
||||
INetworkPlayer *pPlayerTo = getNetworkPlayer(apQNetPlayersTo[dwPlayer]);
|
||||
Socket *socket = pPlayerTo->GetSocket();
|
||||
//app.DebugPrintf( "Pushing data into read queue for user \"%ls\"\n", apPlayersTo[dwPlayer]->GetGamertag());
|
||||
if(socket != nullptr)
|
||||
if(socket != NULL)
|
||||
socket->pushDataToQueue(pbData, dwDataSize);
|
||||
}
|
||||
}
|
||||
@@ -380,7 +380,7 @@ VOID CPlatformNetworkManagerXbox::NotifyReadinessChanged(
|
||||
__in BOOL bReady
|
||||
)
|
||||
{
|
||||
app.DebugPrintf( "Player 0x%p readiness is now %i.\n", pQNetPlayer, static_cast<int>(bReady) );
|
||||
app.DebugPrintf( "Player 0x%p readiness is now %i.\n", pQNetPlayer, (int) bReady );
|
||||
}
|
||||
|
||||
|
||||
@@ -432,7 +432,7 @@ bool CPlatformNetworkManagerXbox::Initialise(CGameNetworkManager *pGameNetworkMa
|
||||
g_pPlatformNetworkManager = this;
|
||||
for( int i = 0; i < XUSER_MAX_COUNT; i++ )
|
||||
{
|
||||
playerChangedCallback[ i ] = nullptr;
|
||||
playerChangedCallback[ i ] = NULL;
|
||||
}
|
||||
|
||||
HRESULT hr;
|
||||
@@ -440,7 +440,7 @@ bool CPlatformNetworkManagerXbox::Initialise(CGameNetworkManager *pGameNetworkMa
|
||||
DWORD dwResult;
|
||||
|
||||
// Start up XNet with default settings.
|
||||
iResult = XNetStartup( nullptr );
|
||||
iResult = XNetStartup( NULL );
|
||||
if( iResult != 0 )
|
||||
{
|
||||
app.DebugPrintf( "Starting up XNet failed (err = %i)!\n", iResult );
|
||||
@@ -457,7 +457,7 @@ bool CPlatformNetworkManagerXbox::Initialise(CGameNetworkManager *pGameNetworkMa
|
||||
}
|
||||
|
||||
// Create the QNet object.
|
||||
hr = QNetCreateUsingXAudio2( QNET_SESSIONTYPE_LIVE_STANDARD, this, nullptr, g_pXAudio2, &m_pIQNet );
|
||||
hr = QNetCreateUsingXAudio2( QNET_SESSIONTYPE_LIVE_STANDARD, this, NULL, g_pXAudio2, &m_pIQNet );
|
||||
if( FAILED( hr ) )
|
||||
{
|
||||
app.DebugPrintf( "Creating QNet object failed (err = 0x%08x)!\n", hr );
|
||||
@@ -489,8 +489,8 @@ bool CPlatformNetworkManagerXbox::Initialise(CGameNetworkManager *pGameNetworkMa
|
||||
m_bSearchPending = false;
|
||||
|
||||
m_bIsOfflineGame = false;
|
||||
m_pSearchParam = nullptr;
|
||||
m_SessionsUpdatedCallback = nullptr;
|
||||
m_pSearchParam = NULL;
|
||||
m_SessionsUpdatedCallback = NULL;
|
||||
|
||||
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
|
||||
{
|
||||
@@ -498,10 +498,10 @@ bool CPlatformNetworkManagerXbox::Initialise(CGameNetworkManager *pGameNetworkMa
|
||||
m_lastSearchStartTime[i] = 0;
|
||||
|
||||
// The results that will be filled in with the current search
|
||||
m_pSearchResults[i] = nullptr;
|
||||
m_pQoSResult[i] = nullptr;
|
||||
m_pCurrentSearchResults[i] = nullptr;
|
||||
m_pCurrentQoSResult[i] = nullptr;
|
||||
m_pSearchResults[i] = NULL;
|
||||
m_pQoSResult[i] = NULL;
|
||||
m_pCurrentSearchResults[i] = NULL;
|
||||
m_pCurrentQoSResult[i] = NULL;
|
||||
m_currentSearchResultsCount[i] = 0;
|
||||
}
|
||||
|
||||
@@ -629,11 +629,11 @@ bool CPlatformNetworkManagerXbox::RemoveLocalPlayerByUserIndex( int userIndex )
|
||||
IQNetPlayer *pQNetPlayer = m_pIQNet->GetLocalPlayerByUserIndex(userIndex);
|
||||
INetworkPlayer *pNetworkPlayer = getNetworkPlayer(pQNetPlayer);
|
||||
|
||||
if(pNetworkPlayer != nullptr)
|
||||
if(pNetworkPlayer != NULL)
|
||||
{
|
||||
Socket *socket = pNetworkPlayer->GetSocket();
|
||||
|
||||
if( socket != nullptr )
|
||||
if( socket != NULL )
|
||||
{
|
||||
// We can't remove the player from qnet until we have stopped using it to communicate
|
||||
C4JThread* thread = new C4JThread(&CPlatformNetworkManagerXbox::RemovePlayerOnSocketClosedThreadProc, pNetworkPlayer, "RemovePlayerOnSocketClosed");
|
||||
@@ -701,11 +701,11 @@ bool CPlatformNetworkManagerXbox::LeaveGame(bool bMigrateHost)
|
||||
IQNetPlayer *pQNetPlayer = m_pIQNet->GetLocalPlayerByUserIndex(g_NetworkManager.GetPrimaryPad());
|
||||
INetworkPlayer *pNetworkPlayer = getNetworkPlayer(pQNetPlayer);
|
||||
|
||||
if(pNetworkPlayer != nullptr)
|
||||
if(pNetworkPlayer != NULL)
|
||||
{
|
||||
Socket *socket = pNetworkPlayer->GetSocket();
|
||||
|
||||
if( socket != nullptr )
|
||||
if( socket != NULL )
|
||||
{
|
||||
//printf("Waiting for socket closed event\n");
|
||||
DWORD result = socket->m_socketClosedEvent->WaitForSignal(INFINITE);
|
||||
@@ -717,13 +717,13 @@ bool CPlatformNetworkManagerXbox::LeaveGame(bool bMigrateHost)
|
||||
// 4J Stu - Clear our reference to this socket
|
||||
pQNetPlayer = m_pIQNet->GetLocalPlayerByUserIndex(g_NetworkManager.GetPrimaryPad());
|
||||
pNetworkPlayer = getNetworkPlayer(pQNetPlayer);
|
||||
if(pNetworkPlayer) pNetworkPlayer->SetSocket( nullptr );
|
||||
if(pNetworkPlayer) pNetworkPlayer->SetSocket( NULL );
|
||||
}
|
||||
delete socket;
|
||||
}
|
||||
else
|
||||
{
|
||||
//printf("Socket is already nullptr\n");
|
||||
//printf("Socket is already NULL\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -795,7 +795,7 @@ void CPlatformNetworkManagerXbox::_HostGame(int usersMask, unsigned char publicS
|
||||
publicSlots, // dwPublicSlots
|
||||
privateSlots, // dwPrivateSlots
|
||||
0, // cProperties
|
||||
nullptr, // pProperties
|
||||
NULL, // pProperties
|
||||
ARRAYSIZE( aXUserContexts ), // cContexts
|
||||
aXUserContexts ); // pContexts
|
||||
|
||||
@@ -899,8 +899,8 @@ void CPlatformNetworkManagerXbox::UnRegisterPlayerChangedCallback(int iPad, void
|
||||
{
|
||||
if(playerChangedCallbackParam[iPad] == callbackParam)
|
||||
{
|
||||
playerChangedCallback[iPad] = nullptr;
|
||||
playerChangedCallbackParam[iPad] = nullptr;
|
||||
playerChangedCallback[iPad] = NULL;
|
||||
playerChangedCallbackParam[iPad] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -927,14 +927,14 @@ bool CPlatformNetworkManagerXbox::_RunNetworkGame()
|
||||
return true;
|
||||
}
|
||||
|
||||
void CPlatformNetworkManagerXbox::UpdateAndSetGameSessionData(INetworkPlayer *pNetworkPlayerLeaving /*= nullptr*/)
|
||||
void CPlatformNetworkManagerXbox::UpdateAndSetGameSessionData(INetworkPlayer *pNetworkPlayerLeaving /*= NULL*/)
|
||||
{
|
||||
DWORD playerCount = m_pIQNet->GetPlayerCount();
|
||||
|
||||
if( this->m_bLeavingGame )
|
||||
return;
|
||||
|
||||
if( GetHostPlayer() == nullptr )
|
||||
if( GetHostPlayer() == NULL )
|
||||
return;
|
||||
|
||||
for(unsigned int i = 0; i < MINECRAFT_NET_MAX_PLAYERS; ++i)
|
||||
@@ -946,7 +946,7 @@ void CPlatformNetworkManagerXbox::UpdateAndSetGameSessionData(INetworkPlayer *pN
|
||||
// We can call this from NotifyPlayerLeaving but at that point the player is still considered in the session
|
||||
if( pNetworkPlayer != pNetworkPlayerLeaving )
|
||||
{
|
||||
m_hostGameSessionData.players[i] = static_cast<NetworkPlayerXbox *>(pNetworkPlayer)->GetUID();
|
||||
m_hostGameSessionData.players[i] = ((NetworkPlayerXbox *)pNetworkPlayer)->GetUID();
|
||||
|
||||
char *temp;
|
||||
temp = (char *)wstringtofilename( pNetworkPlayer->GetOnlineName() );
|
||||
@@ -954,18 +954,18 @@ void CPlatformNetworkManagerXbox::UpdateAndSetGameSessionData(INetworkPlayer *pN
|
||||
}
|
||||
else
|
||||
{
|
||||
m_hostGameSessionData.players[i] = nullptr;
|
||||
m_hostGameSessionData.players[i] = NULL;
|
||||
memset(m_hostGameSessionData.szPlayers[i],0,XUSER_NAME_SIZE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_hostGameSessionData.players[i] = nullptr;
|
||||
m_hostGameSessionData.players[i] = NULL;
|
||||
memset(m_hostGameSessionData.szPlayers[i],0,XUSER_NAME_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
m_hostGameSessionData.hostPlayerUID = static_cast<NetworkPlayerXbox *>(GetHostPlayer())->GetQNetPlayer()->GetXuid();
|
||||
m_hostGameSessionData.hostPlayerUID = ((NetworkPlayerXbox *)GetHostPlayer())->GetQNetPlayer()->GetXuid();
|
||||
m_hostGameSessionData.m_uiGameHostSettings = app.GetGameHostOption(eGameHostOption_All);
|
||||
|
||||
HRESULT hr = S_OK;
|
||||
@@ -978,18 +978,18 @@ void CPlatformNetworkManagerXbox::UpdateAndSetGameSessionData(INetworkPlayer *pN
|
||||
|
||||
int CPlatformNetworkManagerXbox::RemovePlayerOnSocketClosedThreadProc( void* lpParam )
|
||||
{
|
||||
INetworkPlayer *pNetworkPlayer = static_cast<INetworkPlayer *>(lpParam);
|
||||
INetworkPlayer *pNetworkPlayer = (INetworkPlayer *)lpParam;
|
||||
|
||||
Socket *socket = pNetworkPlayer->GetSocket();
|
||||
|
||||
if( socket != nullptr )
|
||||
if( socket != NULL )
|
||||
{
|
||||
//printf("Waiting for socket closed event\n");
|
||||
socket->m_socketClosedEvent->WaitForSignal(INFINITE);
|
||||
|
||||
//printf("Socket closed event has fired\n");
|
||||
// 4J Stu - Clear our reference to this socket
|
||||
pNetworkPlayer->SetSocket( nullptr );
|
||||
pNetworkPlayer->SetSocket( NULL );
|
||||
delete socket;
|
||||
}
|
||||
|
||||
@@ -1066,7 +1066,7 @@ void CPlatformNetworkManagerXbox::SystemFlagReset()
|
||||
void CPlatformNetworkManagerXbox::SystemFlagSet(INetworkPlayer *pNetworkPlayer, int index)
|
||||
{
|
||||
if( ( index < 0 ) || ( index >= m_flagIndexSize ) ) return;
|
||||
if( pNetworkPlayer == nullptr ) return;
|
||||
if( pNetworkPlayer == NULL ) return;
|
||||
|
||||
for( unsigned int i = 0; i < m_playerFlags.size(); i++ )
|
||||
{
|
||||
@@ -1082,7 +1082,7 @@ void CPlatformNetworkManagerXbox::SystemFlagSet(INetworkPlayer *pNetworkPlayer,
|
||||
bool CPlatformNetworkManagerXbox::SystemFlagGet(INetworkPlayer *pNetworkPlayer, int index)
|
||||
{
|
||||
if( ( index < 0 ) || ( index >= m_flagIndexSize ) ) return false;
|
||||
if( pNetworkPlayer == nullptr )
|
||||
if( pNetworkPlayer == NULL )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1099,8 +1099,8 @@ bool CPlatformNetworkManagerXbox::SystemFlagGet(INetworkPlayer *pNetworkPlayer,
|
||||
|
||||
wstring CPlatformNetworkManagerXbox::GatherStats()
|
||||
{
|
||||
return L"Queue messages: " + std::to_wstring(static_cast<NetworkPlayerXbox *>(GetHostPlayer())->GetQNetPlayer()->GetSendQueueSize( nullptr, QNET_GETSENDQUEUESIZE_MESSAGES ) )
|
||||
+ L" Queue bytes: " + std::to_wstring( static_cast<NetworkPlayerXbox *>(GetHostPlayer())->GetQNetPlayer()->GetSendQueueSize( nullptr, QNET_GETSENDQUEUESIZE_BYTES ) );
|
||||
return L"Queue messages: " + std::to_wstring(((NetworkPlayerXbox *)GetHostPlayer())->GetQNetPlayer()->GetSendQueueSize( NULL, QNET_GETSENDQUEUESIZE_MESSAGES ) )
|
||||
+ L" Queue bytes: " + std::to_wstring( ((NetworkPlayerXbox *)GetHostPlayer())->GetQNetPlayer()->GetSendQueueSize( NULL, QNET_GETSENDQUEUESIZE_BYTES ) );
|
||||
}
|
||||
|
||||
wstring CPlatformNetworkManagerXbox::GatherRTTStats()
|
||||
@@ -1111,7 +1111,7 @@ wstring CPlatformNetworkManagerXbox::GatherRTTStats()
|
||||
|
||||
for(unsigned int i = 0; i < GetPlayerCount(); ++i)
|
||||
{
|
||||
IQNetPlayer *pQNetPlayer = static_cast<NetworkPlayerXbox *>(GetPlayerByIndex(i))->GetQNetPlayer();
|
||||
IQNetPlayer *pQNetPlayer = ((NetworkPlayerXbox *)GetPlayerByIndex( i ))->GetQNetPlayer();
|
||||
|
||||
if(!pQNetPlayer->IsLocal())
|
||||
{
|
||||
@@ -1132,23 +1132,23 @@ void CPlatformNetworkManagerXbox::TickSearch()
|
||||
m_currentSearchResultsCount[m_lastSearchPad] = m_searchResultsCount[m_lastSearchPad];
|
||||
|
||||
// Store the current search results so that we don't delete them too early
|
||||
if( m_pCurrentSearchResults[m_lastSearchPad] != nullptr )
|
||||
if( m_pCurrentSearchResults[m_lastSearchPad] != NULL )
|
||||
{
|
||||
delete m_pCurrentSearchResults[m_lastSearchPad];
|
||||
m_pCurrentSearchResults[m_lastSearchPad] = nullptr;
|
||||
m_pCurrentSearchResults[m_lastSearchPad] = NULL;
|
||||
}
|
||||
m_pCurrentSearchResults[m_lastSearchPad] = m_pSearchResults[m_lastSearchPad];
|
||||
m_pSearchResults[m_lastSearchPad] = nullptr;
|
||||
m_pSearchResults[m_lastSearchPad] = NULL;
|
||||
|
||||
if( m_pCurrentQoSResult[m_lastSearchPad] != nullptr )
|
||||
if( m_pCurrentQoSResult[m_lastSearchPad] != NULL )
|
||||
{
|
||||
XNetQosRelease(m_pCurrentQoSResult[m_lastSearchPad]);
|
||||
m_pCurrentQoSResult[m_lastSearchPad] = nullptr;
|
||||
m_pCurrentQoSResult[m_lastSearchPad] = NULL;
|
||||
}
|
||||
m_pCurrentQoSResult[m_lastSearchPad] = m_pQoSResult[m_lastSearchPad];
|
||||
m_pQoSResult[m_lastSearchPad] = nullptr;
|
||||
m_pQoSResult[m_lastSearchPad] = NULL;
|
||||
|
||||
if( m_SessionsUpdatedCallback != nullptr ) m_SessionsUpdatedCallback(m_pSearchParam);
|
||||
if( m_SessionsUpdatedCallback != NULL ) m_SessionsUpdatedCallback(m_pSearchParam);
|
||||
m_bSearchResultsReady = false;
|
||||
m_bSearchPending = false;
|
||||
}
|
||||
@@ -1156,7 +1156,7 @@ void CPlatformNetworkManagerXbox::TickSearch()
|
||||
else
|
||||
{
|
||||
// Don't start searches unless we have registered a callback
|
||||
if( m_SessionsUpdatedCallback != nullptr && (m_lastSearchStartTime[g_NetworkManager.GetPrimaryPad()] + MINECRAFT_XSESSION_SEARCH_DELAY_MILLISECONDS) < GetTickCount() )
|
||||
if( m_SessionsUpdatedCallback != NULL && (m_lastSearchStartTime[g_NetworkManager.GetPrimaryPad()] + MINECRAFT_XSESSION_SEARCH_DELAY_MILLISECONDS) < GetTickCount() )
|
||||
{
|
||||
SearchForGames();
|
||||
}
|
||||
@@ -1180,15 +1180,15 @@ void CPlatformNetworkManagerXbox::SearchForGames()
|
||||
}
|
||||
friendsSessions[m_lastSearchPad].clear();
|
||||
|
||||
if( m_pSearchResults[m_lastSearchPad] != nullptr )
|
||||
if( m_pSearchResults[m_lastSearchPad] != NULL )
|
||||
{
|
||||
delete m_pSearchResults[m_lastSearchPad];
|
||||
m_pSearchResults[m_lastSearchPad] = nullptr;
|
||||
m_pSearchResults[m_lastSearchPad] = NULL;
|
||||
}
|
||||
if( m_pQoSResult[m_lastSearchPad] != nullptr )
|
||||
if( m_pQoSResult[m_lastSearchPad] != NULL )
|
||||
{
|
||||
XNetQosRelease(m_pQoSResult[m_lastSearchPad]);
|
||||
m_pQoSResult[m_lastSearchPad] = nullptr;
|
||||
m_pQoSResult[m_lastSearchPad] = NULL;
|
||||
}
|
||||
|
||||
bool bMultiplayerAllowed = g_NetworkManager.IsSignedInLive( g_NetworkManager.GetPrimaryPad() ) && g_NetworkManager.AllowedToPlayMultiplayer( g_NetworkManager.GetPrimaryPad() );
|
||||
@@ -1250,7 +1250,7 @@ void CPlatformNetworkManagerXbox::SearchForGames()
|
||||
buffer,
|
||||
bufferSize,
|
||||
&itemsReturned,
|
||||
nullptr
|
||||
NULL
|
||||
);
|
||||
|
||||
DWORD flagPlayingOnline = XONLINE_FRIENDSTATE_FLAG_ONLINE; // | XONLINE_FRIENDSTATE_FLAG_PLAYING;
|
||||
@@ -1317,8 +1317,8 @@ void CPlatformNetworkManagerXbox::SearchForGames()
|
||||
sessionIDList,
|
||||
g_NetworkManager.GetPrimaryPad(),
|
||||
&cbResults, // Pass in the address of the size variable
|
||||
nullptr,
|
||||
nullptr // This example uses the synchronous model
|
||||
NULL,
|
||||
NULL // This example uses the synchronous model
|
||||
);
|
||||
|
||||
XOVERLAPPED *pOverlapped = new XOVERLAPPED();
|
||||
@@ -1386,7 +1386,7 @@ void CPlatformNetworkManagerXbox::SearchForGames()
|
||||
|
||||
int CPlatformNetworkManagerXbox::SearchForGamesThreadProc( void* lpParameter )
|
||||
{
|
||||
SearchForGamesData *threadData = static_cast<SearchForGamesData *>(lpParameter);
|
||||
SearchForGamesData *threadData = (SearchForGamesData *)lpParameter;
|
||||
|
||||
DWORD sessionIDCount = threadData->sessionIDCount;
|
||||
|
||||
@@ -1423,7 +1423,7 @@ int CPlatformNetworkManagerXbox::SearchForGamesThreadProc( void* lpParameter )
|
||||
}
|
||||
// Create an event object that is autoreset with an initial state of "not signaled".
|
||||
// Pass this event handle to the QoSLookup to receive notification of each QoS lookup.
|
||||
HANDLE QoSLookupHandle = CreateEvent(nullptr, false, false, nullptr);
|
||||
HANDLE QoSLookupHandle = CreateEvent(NULL, false, false, NULL);
|
||||
|
||||
*threadData->ppQos = new XNQOS();
|
||||
|
||||
@@ -1433,8 +1433,8 @@ int CPlatformNetworkManagerXbox::SearchForGamesThreadProc( void* lpParameter )
|
||||
QoSxnkid, // Array of pointers to XNKID structures that contain session IDs for the remote Xbox 360 consoles
|
||||
QoSxnkey, // Array of pointers to XNKEY structures that contain key-exchange keys for the remote Xbox 360 consoles
|
||||
0, // Number of security gateways to probe
|
||||
nullptr, // Pointer to an array of IN_ADDR structures that contain the IP addresses of the security gateways
|
||||
nullptr, // Pointer to an array of service IDs for the security gateway
|
||||
NULL, // Pointer to an array of IN_ADDR structures that contain the IP addresses of the security gateways
|
||||
NULL, // Pointer to an array of service IDs for the security gateway
|
||||
8, // Number of desired probe replies to receive
|
||||
0, // Maximum upstream bandwidth that the outgoing QoS probe packets can consume
|
||||
0, // Flags
|
||||
@@ -1489,11 +1489,11 @@ vector<FriendSessionInfo *> *CPlatformNetworkManagerXbox::GetSessionList(int iPa
|
||||
pSearchResult = &m_pCurrentSearchResults[iPad]->pResults[dwResult];
|
||||
|
||||
// No room for us, so ignore it
|
||||
// 4J Stu - pSearchResult should never be nullptr, but just in case...
|
||||
if(pSearchResult == nullptr || pSearchResult->dwOpenPublicSlots < localPlayers) continue;
|
||||
// 4J Stu - pSearchResult should never be NULL, but just in case...
|
||||
if(pSearchResult == NULL || pSearchResult->dwOpenPublicSlots < localPlayers) continue;
|
||||
|
||||
bool foundSession = false;
|
||||
FriendSessionInfo *sessionInfo = nullptr;
|
||||
FriendSessionInfo *sessionInfo = NULL;
|
||||
auto itFriendSession = friendsSessions[iPad].begin();
|
||||
for(itFriendSession = friendsSessions[iPad].begin(); itFriendSession < friendsSessions[iPad].end(); ++itFriendSession)
|
||||
{
|
||||
@@ -1595,7 +1595,7 @@ bool CPlatformNetworkManagerXbox::GetGameSessionInfo(int iPad, SessionID session
|
||||
if(memcmp( &pSearchResult->info.sessionID, &sessionId, sizeof(SessionID) ) != 0) continue;
|
||||
|
||||
bool foundSession = false;
|
||||
FriendSessionInfo *sessionInfo = nullptr;
|
||||
FriendSessionInfo *sessionInfo = NULL;
|
||||
auto = itFriendSession, friendsSessions[iPad].begin();
|
||||
for(itFriendSession = friendsSessions[iPad].begin(); itFriendSession < friendsSessions[iPad].end(); ++itFriendSession)
|
||||
{
|
||||
@@ -1637,7 +1637,7 @@ bool CPlatformNetworkManagerXbox::GetGameSessionInfo(int iPad, SessionID session
|
||||
sessionInfo->data.isJoinable)
|
||||
{
|
||||
foundSessionInfo->data = sessionInfo->data;
|
||||
if(foundSessionInfo->displayLabel != nullptr) delete [] foundSessionInfo->displayLabel;
|
||||
if(foundSessionInfo->displayLabel != NULL) delete [] foundSessionInfo->displayLabel;
|
||||
foundSessionInfo->displayLabel = new wchar_t[100];
|
||||
memcpy(foundSessionInfo->displayLabel, sessionInfo->displayLabel, 100 * sizeof(wchar_t) );
|
||||
foundSessionInfo->displayLabelLength = sessionInfo->displayLabelLength;
|
||||
@@ -1672,7 +1672,7 @@ void CPlatformNetworkManagerXbox::ForceFriendsSessionRefresh()
|
||||
m_searchResultsCount[i] = 0;
|
||||
m_lastSearchStartTime[i] = 0;
|
||||
delete m_pSearchResults[i];
|
||||
m_pSearchResults[i] = nullptr;
|
||||
m_pSearchResults[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1699,7 +1699,7 @@ void CPlatformNetworkManagerXbox::removeNetworkPlayer(IQNetPlayer *pQNetPlayer)
|
||||
|
||||
INetworkPlayer *CPlatformNetworkManagerXbox::getNetworkPlayer(IQNetPlayer *pQNetPlayer)
|
||||
{
|
||||
return pQNetPlayer ? (INetworkPlayer *)(pQNetPlayer->GetCustomDataValue()) : nullptr;
|
||||
return pQNetPlayer ? (INetworkPlayer *)(pQNetPlayer->GetCustomDataValue()) : NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ private:
|
||||
GameSessionData m_hostGameSessionData;
|
||||
CGameNetworkManager *m_pGameNetworkManager;
|
||||
public:
|
||||
virtual void UpdateAndSetGameSessionData(INetworkPlayer *pNetworkPlayerLeaving = nullptr);
|
||||
virtual void UpdateAndSetGameSessionData(INetworkPlayer *pNetworkPlayerLeaving = NULL);
|
||||
|
||||
private:
|
||||
// TODO 4J Stu - Do we need to be able to have more than one of these?
|
||||
|
||||
@@ -11,7 +11,7 @@ bool MinecraftDynamicConfigurations::s_bUpdatedConfigs[MinecraftDynamicConfigura
|
||||
MinecraftDynamicConfigurations::EDynamic_Configs MinecraftDynamicConfigurations::s_eCurrentConfig = MinecraftDynamicConfigurations::eDynamic_Config_Max;
|
||||
size_t MinecraftDynamicConfigurations::s_currentConfigSize = 0;
|
||||
size_t MinecraftDynamicConfigurations::s_dataWrittenSize = 0;
|
||||
byte *MinecraftDynamicConfigurations::s_dataWritten = nullptr;
|
||||
byte *MinecraftDynamicConfigurations::s_dataWritten = NULL;
|
||||
|
||||
void MinecraftDynamicConfigurations::Tick()
|
||||
{
|
||||
@@ -43,7 +43,7 @@ void MinecraftDynamicConfigurations::UpdateNextConfiguration()
|
||||
{
|
||||
if(!s_bUpdatedConfigs[i])
|
||||
{
|
||||
update = static_cast<EDynamic_Configs>(i);
|
||||
update = (EDynamic_Configs)i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -57,7 +57,7 @@ void MinecraftDynamicConfigurations::UpdateConfiguration(EDynamic_Configs id)
|
||||
{
|
||||
app.DebugPrintf("DynamicConfig: Attempting to update dynamic configuration %d\n", id);
|
||||
|
||||
HRESULT hr = Sentient::SenDynamicConfigGetSize( id, &s_currentConfigSize, &MinecraftDynamicConfigurations::GetSizeCompletedCallback, nullptr);
|
||||
HRESULT hr = Sentient::SenDynamicConfigGetSize( id, &s_currentConfigSize, &MinecraftDynamicConfigurations::GetSizeCompletedCallback, NULL);
|
||||
|
||||
switch(hr)
|
||||
{
|
||||
@@ -76,7 +76,7 @@ void MinecraftDynamicConfigurations::UpdateConfiguration(EDynamic_Configs id)
|
||||
break;
|
||||
case E_POINTER:
|
||||
app.DebugPrintf("DynamicConfig: Failed to get size for config as pointer is invalid\n");
|
||||
//The out_size pointer is nullptr.
|
||||
//The out_size pointer is NULL.
|
||||
break;
|
||||
}
|
||||
if(FAILED(hr) )
|
||||
@@ -97,7 +97,7 @@ void MinecraftDynamicConfigurations::GetSizeCompletedCallback(HRESULT taskResult
|
||||
&s_dataWrittenSize,
|
||||
s_dataWritten,
|
||||
&MinecraftDynamicConfigurations::GetDataCompletedCallback,
|
||||
nullptr
|
||||
NULL
|
||||
);
|
||||
|
||||
switch(hr)
|
||||
@@ -115,8 +115,8 @@ void MinecraftDynamicConfigurations::GetSizeCompletedCallback(HRESULT taskResult
|
||||
//Sentient is not initialized. You must call SentientInitialize before you call this function.
|
||||
break;
|
||||
case E_POINTER:
|
||||
app.DebugPrintf("DynamicConfig: Failed to get bytes for config as pointer is nullptr\n");
|
||||
//The out_size pointer is nullptr.
|
||||
app.DebugPrintf("DynamicConfig: Failed to get bytes for config as pointer is NULL\n");
|
||||
//The out_size pointer is NULL.
|
||||
break;
|
||||
}
|
||||
if(FAILED(hr) )
|
||||
@@ -160,7 +160,7 @@ void MinecraftDynamicConfigurations::GetDataCompletedCallback(HRESULT taskResu
|
||||
}
|
||||
|
||||
delete [] s_dataWritten;
|
||||
s_dataWritten = nullptr;
|
||||
s_dataWritten = NULL;
|
||||
|
||||
s_bUpdatedConfigs[s_eCurrentConfig] = true;
|
||||
UpdateNextConfiguration();
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace Sentient
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.
|
||||
/// E_POINTER: out_avatarInfoList is nullptr.
|
||||
/// E_POINTER: out_avatarInfoList is NULL.
|
||||
/// E_FAIL: Failed to spawn server call.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
///
|
||||
@@ -149,7 +149,7 @@ namespace Sentient
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.
|
||||
/// E_POINTER: out_avatarInfo is nullptr.
|
||||
/// E_POINTER: out_avatarInfo is NULL.
|
||||
/// E_FAIL: Failed to spawn server call.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
///
|
||||
@@ -192,7 +192,7 @@ namespace Sentient
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// E_INVALIDARG: avatarInfo.resourceID or avatarInfo.[fe]male.metadata is invalid.
|
||||
/// E_POINTER: out_data is nullptr.
|
||||
/// E_POINTER: out_data is NULL.
|
||||
/// E_FAIL: Failed to spawn server call.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
///
|
||||
@@ -235,7 +235,7 @@ namespace Sentient
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// E_INVALIDARG: avatarInfo.resourceID or avatarInfo.[fe]male.assets is invalid.
|
||||
/// E_POINTER: out_data is nullptr.
|
||||
/// E_POINTER: out_data is NULL.
|
||||
/// E_FAIL: Failed to spawn server call.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
///
|
||||
@@ -278,7 +278,7 @@ namespace Sentient
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// E_INVALIDARG: avatarInfo.resourceID or avatarInfo.[fe]male.icon is invalid.
|
||||
/// E_POINTER: out_data is nullptr.
|
||||
/// E_POINTER: out_data is NULL.
|
||||
/// E_FAIL: Failed to spawn server call.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
///
|
||||
@@ -316,7 +316,7 @@ namespace Sentient
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// E_INVALIDARG: avatarInfo.resourceID or avatarInfo.xml is invalid.
|
||||
/// E_POINTER: out_avatarExtraInfo is nullptr.
|
||||
/// E_POINTER: out_avatarExtraInfo is NULL.
|
||||
/// E_FAIL: Failed to spawn server call.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
///
|
||||
@@ -352,14 +352,14 @@ namespace Sentient
|
||||
// First method, filling a fixed-size buffer:
|
||||
//
|
||||
// wchar_t buffer[1234];
|
||||
// SenAvatarXMLGetTitle( xml, loc, _countof(buffer), nullptr, buffer );
|
||||
// SenAvatarXMLGetTitle( xml, loc, _countof(buffer), NULL, buffer );
|
||||
//
|
||||
// Second method, filling a dynamically-allocated buffer:
|
||||
//
|
||||
// size_t bufferLength;
|
||||
// SenAvatarXMLGetTitle( xml, loc, 0, &bufferLength, nullptr );
|
||||
// SenAvatarXMLGetTitle( xml, loc, 0, &bufferLength, NULL );
|
||||
// wchar_t buffer = new wchar_t[bufferLength];
|
||||
// SenAvatarXMLGetTitle( xml, loc, bufferLength, nullptr, buffer );
|
||||
// SenAvatarXMLGetTitle( xml, loc, bufferLength, NULL, buffer );
|
||||
//
|
||||
// Note that bufferLength is in wchars, and includes the terminating nul.
|
||||
// The actual length of the _string_ is (*out_bufferLength - 1).
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace Sentient
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.
|
||||
/// E_POINTER: out_boxArtInfoList is nullptr.
|
||||
/// E_POINTER: out_boxArtInfoList is NULL.
|
||||
/// E_FAIL: Failed to spawn server call.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
///
|
||||
@@ -160,7 +160,7 @@ namespace Sentient
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// E_INVALIDARG: boxArtInfo.resourceID or boxArtInfo.image is invalid.
|
||||
/// E_POINTER: out_data is nullptr.
|
||||
/// E_POINTER: out_data is NULL.
|
||||
/// E_FAIL: Failed to spawn server call.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
///
|
||||
@@ -198,7 +198,7 @@ namespace Sentient
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// E_INVALIDARG: boxArtInfo.resourceID or boxArtInfo.xml is invalid.
|
||||
/// E_POINTER: out_boxArtExtraInfo is nullptr.
|
||||
/// E_POINTER: out_boxArtExtraInfo is NULL.
|
||||
/// E_FAIL: Failed to spawn server call.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
///
|
||||
@@ -236,7 +236,7 @@ namespace Sentient
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// E_INVALIDARG: boxArtInfo.resourceID or boxArtInfo.xml is invalid.
|
||||
/// E_POINTER: out_data is nullptr.
|
||||
/// E_POINTER: out_data is NULL.
|
||||
/// E_FAIL: Failed to spawn server call.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
///
|
||||
@@ -263,7 +263,7 @@ namespace Sentient
|
||||
///
|
||||
/// @param[in] culture
|
||||
/// This is the result of a call to SenCultureFind() or SenCultureGet*().
|
||||
/// You may also pass nullptr to use the culture set with SenCultureSetCurrent().
|
||||
/// You may also pass NULL to use the culture set with SenCultureSetCurrent().
|
||||
///
|
||||
/// @param[in] bufferLength
|
||||
/// Note that bufferLength is in wchars, and needs to _include_ space for the terminating nul.
|
||||
@@ -271,16 +271,16 @@ namespace Sentient
|
||||
/// @param[out] out_bufferLength
|
||||
/// Used to return the actual number of wchars written to the buffer, including the terminating nul.
|
||||
/// The actual length of the _string_ is (*out_bufferLength - 1).
|
||||
/// Pass @a out_bufferLength = nullptr if you don't care about the actual size.
|
||||
/// Pass @a out_bufferLength = NULL if you don't care about the actual size.
|
||||
///
|
||||
/// @param[out] out_buffer
|
||||
/// The buffer to fill in with the string.
|
||||
/// It is assumed that this is preallocated to at least @a bufferLength wchars.
|
||||
/// Pass @a out_buffer = nullptr if you are only interested in finding out the necessary buffer size.
|
||||
/// Pass @a out_buffer = NULL if you are only interested in finding out the necessary buffer size.
|
||||
///
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// E_UNEXPECTED: passed a nullptr culture without a default culture being set first.
|
||||
/// E_UNEXPECTED: passed a NULL culture without a default culture being set first.
|
||||
/// E_INVALIDARG: senXML does not contain parsed XML data.
|
||||
/// E_FAIL: Failed to locate text.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
@@ -291,14 +291,14 @@ namespace Sentient
|
||||
/// First method, filling a fixed-size buffer:
|
||||
///
|
||||
/// wchar_t buffer[1234];
|
||||
/// SenBoxArtXMLGetTitle( xml, culture, _countof(buffer), nullptr, buffer );
|
||||
/// SenBoxArtXMLGetTitle( xml, culture, _countof(buffer), NULL, buffer );
|
||||
///
|
||||
/// Second method, filling a dynamically-allocated buffer:
|
||||
///
|
||||
/// size_t bufferLength;
|
||||
/// SenBoxArtXMLGetTitle( xml, culture, 0, &bufferLength, nullptr );
|
||||
/// SenBoxArtXMLGetTitle( xml, culture, 0, &bufferLength, NULL );
|
||||
/// wchar_t buffer = new wchar_t[bufferLength];
|
||||
/// SenBoxArtXMLGetTitle( xml, culture, bufferLength, nullptr, buffer );
|
||||
/// SenBoxArtXMLGetTitle( xml, culture, bufferLength, NULL, buffer );
|
||||
///
|
||||
/// @related SenBoxArtDownloadXML()
|
||||
/// @related SenXMLParse()
|
||||
@@ -319,7 +319,7 @@ namespace Sentient
|
||||
///
|
||||
/// @param[in] culture
|
||||
/// This is the result of a call to SenCultureFind() or SenCultureGet*().
|
||||
/// You may also pass nullptr to use the culture set with SenCultureSetCurrent().
|
||||
/// You may also pass NULL to use the culture set with SenCultureSetCurrent().
|
||||
///
|
||||
/// @param[in] bufferLength
|
||||
/// Note that bufferLength is in wchars, and needs to _include_ space for the terminating nul.
|
||||
@@ -327,16 +327,16 @@ namespace Sentient
|
||||
/// @param[out] out_bufferLength
|
||||
/// Used to return the actual number of wchars written to the buffer, including the terminating nul.
|
||||
/// The actual length of the _string_ is (*out_bufferLength - 1).
|
||||
/// Pass @a out_bufferLength = nullptr if you don't care about the actual size.
|
||||
/// Pass @a out_bufferLength = NULL if you don't care about the actual size.
|
||||
///
|
||||
/// @param[out] out_buffer
|
||||
/// The buffer to fill in with the string.
|
||||
/// It is assumed that this is preallocated to at least @a bufferLength wchars.
|
||||
/// Pass @a out_buffer = nullptr if you are only interested in finding out the necessary buffer size.
|
||||
/// Pass @a out_buffer = NULL if you are only interested in finding out the necessary buffer size.
|
||||
///
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// E_UNEXPECTED: passed a nullptr culture without a default culture being set first.
|
||||
/// E_UNEXPECTED: passed a NULL culture without a default culture being set first.
|
||||
/// E_INVALIDARG: senXML does not contain parsed XML data.
|
||||
/// E_FAIL: Failed to locate text.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
@@ -347,14 +347,14 @@ namespace Sentient
|
||||
/// First method, filling a fixed-size buffer:
|
||||
///
|
||||
/// wchar_t buffer[1234];
|
||||
/// SenBoxArtXMLGetDescription( xml, culture, _countof(buffer), nullptr, buffer );
|
||||
/// SenBoxArtXMLGetDescription( xml, culture, _countof(buffer), NULL, buffer );
|
||||
///
|
||||
/// Second method, filling a dynamically-allocated buffer:
|
||||
///
|
||||
/// size_t bufferLength;
|
||||
/// SenBoxArtXMLGetDescription( xml, culture, 0, &bufferLength, nullptr );
|
||||
/// SenBoxArtXMLGetDescription( xml, culture, 0, &bufferLength, NULL );
|
||||
/// wchar_t buffer = new wchar_t[bufferLength];
|
||||
/// SenBoxArtXMLGetDescription( xml, culture, bufferLength, nullptr, buffer );
|
||||
/// SenBoxArtXMLGetDescription( xml, culture, bufferLength, NULL, buffer );
|
||||
///
|
||||
/// @related SenBoxArtDownloadXML()
|
||||
/// @related SenXMLParse()
|
||||
@@ -390,7 +390,7 @@ namespace Sentient
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// E_INVALIDARG: boxArtInfo.resourceID or boxArtInfo.image is invalid.
|
||||
/// E_POINTER: out_data is nullptr.
|
||||
/// E_POINTER: out_data is NULL.
|
||||
/// E_FAIL: Failed to spawn server call.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
///
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Sentient
|
||||
///
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// E_POINTER: out_configInfo is nullptr.
|
||||
/// E_POINTER: out_configInfo is NULL.
|
||||
/// E_FAIL: Failed to spawn server call.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
///
|
||||
@@ -95,7 +95,7 @@ namespace Sentient
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// E_INVALIDARG: configInfo.resourceID or configInfo.config is invalid.
|
||||
/// E_POINTER: out_data is nullptr.
|
||||
/// E_POINTER: out_data is NULL.
|
||||
/// E_FAIL: Failed to spawn server call.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
///
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
3. Many functions are designed for asynchronous use, and will internally create a task that
|
||||
will only finish after feedback from the server.
|
||||
a. These functions can be either blocking or asynchronous. If the callback pointer is nullptr
|
||||
a. These functions can be either blocking or asynchronous. If the callback pointer is NULL
|
||||
then it is a blocking call.
|
||||
b. If the call is asynchronous, then it will always return instantly, and will return S_OK
|
||||
if a task has been created.
|
||||
|
||||
@@ -25,8 +25,8 @@ namespace Sentient
|
||||
///
|
||||
/// @param[in] culture
|
||||
/// This is the result of a call to SenCultureFind() or SenCultureGet*().
|
||||
/// You may also pass nullptr to use the culture set with SenCultureSetCurrent().
|
||||
/// May be nullptr for default culture.
|
||||
/// You may also pass NULL to use the culture set with SenCultureSetCurrent().
|
||||
/// May be NULL for default culture.
|
||||
///
|
||||
/// @param[in] maxResults
|
||||
/// Used to indicate the number of items to be returned by @a out_feedInfo.
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Sentient
|
||||
///
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// E_POINTER: size is nullptr.
|
||||
/// E_POINTER: size is NULL.
|
||||
/// E_FAIL: Failed to spawn server call.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
///
|
||||
@@ -66,7 +66,7 @@ namespace Sentient
|
||||
///
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// E_POINTER: size is nullptr.
|
||||
/// E_POINTER: size is NULL.
|
||||
/// E_FAIL: Failed to spawn server call.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
///
|
||||
@@ -109,7 +109,7 @@ namespace Sentient
|
||||
///
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// E_POINTER: out_data is nullptr.
|
||||
/// E_POINTER: out_data is NULL.
|
||||
/// E_FAIL: Failed to spawn server call.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
///
|
||||
@@ -149,7 +149,7 @@ namespace Sentient
|
||||
///
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// E_POINTER: out_data is nullptr.
|
||||
/// E_POINTER: out_data is NULL.
|
||||
/// E_FAIL: Failed to spawn server call.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
///
|
||||
|
||||
@@ -215,7 +215,7 @@ namespace Sentient
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.
|
||||
/// E_POINTER: out_userFameVIPArray is nullptr.
|
||||
/// E_POINTER: out_userFameVIPArray is NULL.
|
||||
/// SENTIENT_E_TOO_MANY_CALLS: This call has been rejected to avoid excessive server load. Try again later.
|
||||
/// E_FAIL: Failed to spawn server call.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
@@ -243,7 +243,7 @@ namespace Sentient
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.
|
||||
/// E_POINTER: out_fameVIPData is nullptr.
|
||||
/// E_POINTER: out_fameVIPData is NULL.
|
||||
/// SENTIENT_S_OPERATION_IN_PROGRESS: The call could not be completed immediately and out_fameVIPData has not been filled in.
|
||||
/// S_OK: The operation completed successfully.
|
||||
///
|
||||
@@ -304,8 +304,8 @@ namespace Sentient
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.
|
||||
/// E_POINTER: out_entryArray or out_leaderboardResults is nullptr.
|
||||
/// E_INVALIDARG: userCallback is nullptr and out_senHandle is non-nullptr. Task handles are not supported for synchronous requests.
|
||||
/// E_POINTER: out_entryArray or out_leaderboardResults is NULL.
|
||||
/// E_INVALIDARG: userCallback is NULL and out_senHandle is non-NULL. Task handles are not supported for synchronous requests.
|
||||
/// SENTIENT_E_TOO_MANY_CALLS: This call has been rejected to avoid excessive server load. Try again later.
|
||||
/// E_FAIL: Failed to spawn server call.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
@@ -331,7 +331,7 @@ namespace Sentient
|
||||
///
|
||||
/// @return SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.
|
||||
/// E_POINTER: out_awardData is nullptr.
|
||||
/// E_POINTER: out_awardData is NULL.
|
||||
/// SENTIENT_S_OPERATION_IN_PROGRESS: The call could not be completed immediately and out_awardData has not been filled in.
|
||||
/// S_FALSE: The operation completed successfully but there were no awards to report. out_awardData has not been filled in.
|
||||
/// S_OK: The operation completed successfully and there was a valid award to report. out_awardData contains information about the award.
|
||||
@@ -351,7 +351,7 @@ namespace Sentient
|
||||
///
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// E_POINTER: out_timeRemaining is nullptr.
|
||||
/// E_POINTER: out_timeRemaining is NULL.
|
||||
/// SENTIENT_S_OPERATION_IN_PROGRESS: The call could not be completed immediately and out_timeRemaining has not been filled in.
|
||||
/// E_FAIL: Internal failure. Check log for output.
|
||||
/// S_OK: Call completed successfully and out_timeRemaining has been filled in.
|
||||
@@ -373,7 +373,7 @@ namespace Sentient
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.
|
||||
/// E_POINTER: out_timeRemaining is nullptr.
|
||||
/// E_POINTER: out_timeRemaining is NULL.
|
||||
/// SENTIENT_S_OPERATION_IN_PROGRESS: The call could not be completed immediately and out_timeRemaining has not been filled in.
|
||||
/// S_FALSE: The VIP level of the supplied user does not expire. out_timeRemaining has not been filled in.
|
||||
/// E_FAIL: Internal failure. Check log for output.
|
||||
@@ -400,7 +400,7 @@ namespace Sentient
|
||||
///
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// E_POINTER: out_name is nullptr.
|
||||
/// E_POINTER: out_name is NULL.
|
||||
/// E_INVALIDARG: vipLevel is outside the range of known VIP levels.
|
||||
/// SENTIENT_S_OPERATION_IN_PROGRESS: The call could not be completed immediately and out_name has not been filled in.
|
||||
/// S_OK: The operation completed successfully.
|
||||
@@ -423,7 +423,7 @@ namespace Sentient
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.
|
||||
/// E_POINTER: out_count is nullptr.
|
||||
/// E_POINTER: out_count is NULL.
|
||||
/// SENTIENT_S_OPERATION_IN_PROGRESS: The call could not be completed immediately and out_count has not been filled in.
|
||||
/// E_FAIL: Internal failure. Check log for output.
|
||||
/// S_OK: The operation completed successfully.
|
||||
@@ -456,7 +456,7 @@ namespace Sentient
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.
|
||||
/// E_POINTER: out_dataCount or out_displayData is nullptr.
|
||||
/// E_POINTER: out_dataCount or out_displayData is NULL.
|
||||
/// E_INVALIDARG: startIndex is greater than the total number of items available.
|
||||
/// SENTIENT_S_OPERATION_IN_PROGRESS: The call could not be completed immediately and output parameters have not been filled in.
|
||||
/// E_FAIL: Internal failure. Check log for output.
|
||||
@@ -553,8 +553,8 @@ namespace Sentient
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.
|
||||
/// E_INVALIDARG: Either userCallback is nullptr and out_senHandle is non-nullptr, or participantCount is less than 2.
|
||||
/// E_POINTER: participants is nullptr.
|
||||
/// E_INVALIDARG: Either userCallback is NULL and out_senHandle is non-NULL, or participantCount is less than 2.
|
||||
/// E_POINTER: participants is NULL.
|
||||
/// E_FAIL: Failed to spawn server call.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
///
|
||||
|
||||
@@ -45,10 +45,10 @@ namespace Sentient
|
||||
enum SenResourceID : INT32
|
||||
{
|
||||
/// This is used to indicate a failed search, an invalid resource structure, or sometimes to substitute for a default.
|
||||
SenResourceID_Invalid = static_cast<INT32>(SenResourceType_Invalid) << 24,
|
||||
SenResourceID_Invalid = (INT32)SenResourceType_Invalid << 24,
|
||||
|
||||
/// This is the first VIP reward costume and there is one for each title.
|
||||
SenResourceID_Superstar_0 = static_cast<INT32>(SenResourceType_Avatar) << 24,
|
||||
SenResourceID_Superstar_0 = (INT32)SenResourceType_Avatar << 24,
|
||||
/// This is the second VIP reward costume and there is one for each title.
|
||||
SenResourceID_Superstar_1,
|
||||
/// This is the third VIP reward costume and there is one for each title.
|
||||
@@ -59,15 +59,15 @@ namespace Sentient
|
||||
SenResourceID_Superstar_4,
|
||||
|
||||
/// This is used for the cross-sell screen and contains things such as an image, offerID, strings, etc.
|
||||
SenResourceID_BoxArt_0 = static_cast<INT32>(SenResourceType_BoxArt) << 24,
|
||||
SenResourceID_BoxArt_0 = (INT32)SenResourceType_BoxArt << 24,
|
||||
|
||||
/// This is used for game-private config files, and is only the base of the range.
|
||||
/// Titles may use the entire 24-bit space for various custom config files.
|
||||
SenResourceID_Config_0 = static_cast<INT32>(SenResourceType_Config) << 24,
|
||||
SenResourceID_Config_0 = (INT32)SenResourceType_Config << 24,
|
||||
|
||||
/// This is used for server-supplied help files/text.
|
||||
/// At the moment, this is not supported.
|
||||
SenResourceID_Help_0 = static_cast<INT32>(SenResourceType_Help) << 24,
|
||||
SenResourceID_Help_0 = (INT32)SenResourceType_Help << 24,
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace Sentient
|
||||
// metadata for a lot of UGCs at once.
|
||||
// Note: if a level has been uploaded with main data before, and the creator
|
||||
// wants to just modify the metadata, they can upload the metadata with the
|
||||
// maindatablobs being nullptr.
|
||||
// maindatablobs being NULL.
|
||||
// NOTE: for large items, use the SenUGCUploadMainData method with the SenUGCProgressInfo
|
||||
// signature so you can get the running progress and a cancellation token
|
||||
// to abort the upload (allowing UI for the user, etc)
|
||||
@@ -159,7 +159,7 @@ namespace Sentient
|
||||
// be used to abort the upload. This is useful for large uploads where
|
||||
// you may want to allow the user to cancel.
|
||||
// NOTE: This call is asynchronous ONLY and will error for synchronous
|
||||
// attempts with a nullptr param for userCallback.
|
||||
// attempts with a NULL param for userCallback.
|
||||
// There are multiple data blobs supported (the exact number is defined in
|
||||
// SenUGCMainData_NrBlobs) on subsequent calls. Slot zero is to be used by a
|
||||
// game to store a preview thumbnail, which can then be downloaded without
|
||||
@@ -172,7 +172,7 @@ namespace Sentient
|
||||
// metadata for a lot of UGCs at once.
|
||||
// NOTE: if a level has been uploaded with main data before, and the creator
|
||||
// wants to just modify the metadata, they can upload the metadata with the
|
||||
// main data blob being nullptr.
|
||||
// main data blob being NULL.
|
||||
// NOTE: If a creator uploads a data blob again, it will overwrite the previous
|
||||
// stored blob with the new one.
|
||||
//************************************
|
||||
@@ -848,8 +848,8 @@ namespace Sentient
|
||||
///
|
||||
/// @param[in] culture
|
||||
/// This is the result of a call to SenCultureFind() or SenCultureGet*().
|
||||
/// You may also pass nullptr to use the culture set with SenCultureSetCurrent().
|
||||
/// May be nullptr for default culture.
|
||||
/// You may also pass NULL to use the culture set with SenCultureSetCurrent().
|
||||
/// May be NULL for default culture.
|
||||
///
|
||||
/// @param[in] maxResults
|
||||
/// Used to indicate the number of items to be returned by @a out_feedInfo.
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace Sentient
|
||||
///
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// E_POINTER: out_isInRole is nullptr.
|
||||
/// E_POINTER: out_isInRole is NULL.
|
||||
/// E_FAIL: Failed to spawn server call.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
///
|
||||
@@ -91,7 +91,7 @@ namespace Sentient
|
||||
///
|
||||
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
|
||||
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
|
||||
/// E_POINTER: out_isInRole is nullptr.
|
||||
/// E_POINTER: out_isInRole is NULL.
|
||||
/// E_FAIL: Failed to spawn server call.
|
||||
/// S_OK: Server call spawned successfully.
|
||||
///
|
||||
|
||||
@@ -20,7 +20,7 @@ CTelemetryManager *TelemetryManager = new CSentientManager();
|
||||
HRESULT CSentientManager::Init()
|
||||
{
|
||||
Sentient::SenSysTitleID sentitleID;
|
||||
sentitleID = static_cast<Sentient::SenSysTitleID>(TITLEID_MINECRAFT);
|
||||
sentitleID = (Sentient::SenSysTitleID)TITLEID_MINECRAFT;
|
||||
|
||||
HRESULT hr = SentientInitialize( sentitleID );
|
||||
|
||||
@@ -52,7 +52,7 @@ HRESULT CSentientManager::Tick()
|
||||
m_lastHeartbeat = currentTime;
|
||||
for(DWORD i = 0; i < XUSER_MAX_COUNT; ++i)
|
||||
{
|
||||
if(Minecraft::GetInstance()->localplayers[i] != nullptr)
|
||||
if(Minecraft::GetInstance()->localplayers[i] != NULL)
|
||||
{
|
||||
SenStatHeartBeat(i, m_lastHeartbeat - m_initialiseTime);
|
||||
}
|
||||
@@ -63,7 +63,7 @@ HRESULT CSentientManager::Tick()
|
||||
{
|
||||
for(DWORD i = 0; i < XUSER_MAX_COUNT; ++i)
|
||||
{
|
||||
if(Minecraft::GetInstance()->localplayers[i] != nullptr && m_fLevelStartTime[i] - currentTime > 60)
|
||||
if(Minecraft::GetInstance()->localplayers[i] != NULL && m_fLevelStartTime[i] - currentTime > 60)
|
||||
{
|
||||
Flush();
|
||||
}
|
||||
@@ -123,7 +123,7 @@ HRESULT CSentientManager::Flush()
|
||||
|
||||
BOOL CSentientManager::RecordPlayerSessionStart(DWORD dwUserId)
|
||||
{
|
||||
return SenStatPlayerSessionStart( dwUserId, GetSecondsSinceInitialize(), GetMode(dwUserId), GetSubMode(dwUserId), GetLevelId(dwUserId), GetSubLevelId(dwUserId), GetTitleBuildId(), 0, 0, 0, static_cast<INT>(app.getDeploymentType()) );
|
||||
return SenStatPlayerSessionStart( dwUserId, GetSecondsSinceInitialize(), GetMode(dwUserId), GetSubMode(dwUserId), GetLevelId(dwUserId), GetSubLevelId(dwUserId), GetTitleBuildId(), 0, 0, 0, (INT)app.getDeploymentType() );
|
||||
}
|
||||
|
||||
BOOL CSentientManager::RecordPlayerSessionExit(DWORD dwUserId, int _)
|
||||
@@ -149,13 +149,13 @@ BOOL CSentientManager::RecordLevelStart(DWORD dwUserId, ESen_FriendOrMatch frien
|
||||
BOOL CSentientManager::RecordLevelExit(DWORD dwUserId, ESen_LevelExitStatus levelExitStatus)
|
||||
{
|
||||
float levelDuration = app.getAppTime() - m_fLevelStartTime[dwUserId];
|
||||
return SenStatLevelExit( dwUserId, GetSecondsSinceInitialize(), GetMode(dwUserId), GetSubMode(dwUserId), GetLevelId(dwUserId), GetSubLevelId(dwUserId), GetLevelInstanceID(), GetMultiplayerInstanceID(), levelExitStatus, GetLevelExitProgressStat1(), GetLevelExitProgressStat2(), static_cast<INT>(levelDuration) );
|
||||
return SenStatLevelExit( dwUserId, GetSecondsSinceInitialize(), GetMode(dwUserId), GetSubMode(dwUserId), GetLevelId(dwUserId), GetSubLevelId(dwUserId), GetLevelInstanceID(), GetMultiplayerInstanceID(), levelExitStatus, GetLevelExitProgressStat1(), GetLevelExitProgressStat2(), (INT)levelDuration );
|
||||
}
|
||||
|
||||
BOOL CSentientManager::RecordLevelSaveOrCheckpoint(DWORD dwUserId, INT saveOrCheckPointID, INT saveSizeInBytes)
|
||||
{
|
||||
float levelDuration = app.getAppTime() - m_fLevelStartTime[dwUserId];
|
||||
return SenStatLevelSaveOrCheckpoint( dwUserId, GetSecondsSinceInitialize(), GetMode(dwUserId), GetSubMode(dwUserId), GetLevelId(dwUserId), GetSubLevelId(dwUserId), GetLevelInstanceID(), GetMultiplayerInstanceID(), GetLevelExitProgressStat1(), GetLevelExitProgressStat2(), static_cast<INT>(levelDuration), saveOrCheckPointID, saveSizeInBytes );
|
||||
return SenStatLevelSaveOrCheckpoint( dwUserId, GetSecondsSinceInitialize(), GetMode(dwUserId), GetSubMode(dwUserId), GetLevelId(dwUserId), GetSubLevelId(dwUserId), GetLevelInstanceID(), GetMultiplayerInstanceID(), GetLevelExitProgressStat1(), GetLevelExitProgressStat2(), (INT)levelDuration, saveOrCheckPointID, saveSizeInBytes );
|
||||
}
|
||||
|
||||
BOOL CSentientManager::RecordLevelResume(DWORD dwUserId, ESen_FriendOrMatch friendsOrMatch, ESen_CompeteOrCoop competeOrCoop, int difficulty, DWORD numberOfLocalPlayers, DWORD numberOfOnlinePlayers, INT saveOrCheckPointID)
|
||||
@@ -240,7 +240,7 @@ This should be tracked independently of saved games (restoring a save should not
|
||||
*/
|
||||
INT CSentientManager::GetSecondsSinceInitialize()
|
||||
{
|
||||
return static_cast<INT>(app.getAppTime() - m_initialiseTime);
|
||||
return (INT)(app.getAppTime() - m_initialiseTime);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -257,21 +257,21 @@ INT CSentientManager::GetMode(DWORD dwUserId)
|
||||
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
|
||||
if( pMinecraft->localplayers[dwUserId] != nullptr && pMinecraft->localplayers[dwUserId]->level != nullptr && pMinecraft->localplayers[dwUserId]->level->getLevelData() != nullptr )
|
||||
if( pMinecraft->localplayers[dwUserId] != NULL && pMinecraft->localplayers[dwUserId]->level != NULL && pMinecraft->localplayers[dwUserId]->level->getLevelData() != NULL )
|
||||
{
|
||||
GameType *gameType = pMinecraft->localplayers[dwUserId]->level->getLevelData()->getGameType();
|
||||
|
||||
if (gameType->isSurvival())
|
||||
{
|
||||
mode = static_cast<INT>(eTelem_ModeId_Survival);
|
||||
mode = (INT)eTelem_ModeId_Survival;
|
||||
}
|
||||
else if (gameType->isCreative())
|
||||
{
|
||||
mode = static_cast<INT>(eTelem_ModeId_Creative);
|
||||
mode = (INT)eTelem_ModeId_Creative;
|
||||
}
|
||||
else
|
||||
{
|
||||
mode = static_cast<INT>(eTelem_ModeId_Undefined);
|
||||
mode = (INT)eTelem_ModeId_Undefined;
|
||||
}
|
||||
}
|
||||
return mode;
|
||||
@@ -290,11 +290,11 @@ INT CSentientManager::GetSubMode(DWORD dwUserId)
|
||||
|
||||
if(Minecraft::GetInstance()->isTutorial())
|
||||
{
|
||||
subMode = static_cast<INT>(eTelem_SubModeId_Tutorial);
|
||||
subMode = (INT)eTelem_SubModeId_Tutorial;
|
||||
}
|
||||
else
|
||||
{
|
||||
subMode = static_cast<INT>(eTelem_SubModeId_Normal);
|
||||
subMode = (INT)eTelem_SubModeId_Normal;
|
||||
}
|
||||
|
||||
return subMode;
|
||||
@@ -312,7 +312,7 @@ INT CSentientManager::GetLevelId(DWORD dwUserId)
|
||||
{
|
||||
INT levelId = (INT)eTelem_LevelId_Undefined;
|
||||
|
||||
levelId = static_cast<INT>(eTelem_LevelId_PlayerGeneratedLevel);
|
||||
levelId = (INT)eTelem_LevelId_PlayerGeneratedLevel;
|
||||
|
||||
return levelId;
|
||||
}
|
||||
@@ -329,18 +329,18 @@ INT CSentientManager::GetSubLevelId(DWORD dwUserId)
|
||||
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
|
||||
if(pMinecraft->localplayers[dwUserId] != nullptr)
|
||||
if(pMinecraft->localplayers[dwUserId] != NULL)
|
||||
{
|
||||
switch(pMinecraft->localplayers[dwUserId]->dimension)
|
||||
{
|
||||
case 0:
|
||||
subLevelId = static_cast<INT>(eTelem_SubLevelId_Overworld);
|
||||
subLevelId = (INT)eTelem_SubLevelId_Overworld;
|
||||
break;
|
||||
case -1:
|
||||
subLevelId = static_cast<INT>(eTelem_SubLevelId_Nether);
|
||||
subLevelId = (INT)eTelem_SubLevelId_Nether;
|
||||
break;
|
||||
case 1:
|
||||
subLevelId = static_cast<INT>(eTelem_SubLevelId_End);
|
||||
subLevelId = (INT)eTelem_SubLevelId_End;
|
||||
break;
|
||||
};
|
||||
}
|
||||
@@ -364,7 +364,7 @@ Helps differentiate level attempts when a play plays the same mode/level - espec
|
||||
*/
|
||||
INT CSentientManager::GetLevelInstanceID()
|
||||
{
|
||||
return static_cast<INT>(m_levelInstanceID);
|
||||
return (INT)m_levelInstanceID;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -403,19 +403,19 @@ INT CSentientManager::GetSingleOrMultiplayer()
|
||||
|
||||
if(app.GetLocalPlayerCount() == 1 && g_NetworkManager.GetOnlinePlayerCount() == 0)
|
||||
{
|
||||
singleOrMultiplayer = static_cast<INT>(eSen_SingleOrMultiplayer_Single_Player);
|
||||
singleOrMultiplayer = (INT)eSen_SingleOrMultiplayer_Single_Player;
|
||||
}
|
||||
else if(app.GetLocalPlayerCount() > 1 && g_NetworkManager.GetOnlinePlayerCount() == 0)
|
||||
{
|
||||
singleOrMultiplayer = static_cast<INT>(eSen_SingleOrMultiplayer_Multiplayer_Local);
|
||||
singleOrMultiplayer = (INT)eSen_SingleOrMultiplayer_Multiplayer_Local;
|
||||
}
|
||||
else if(app.GetLocalPlayerCount() == 1 && g_NetworkManager.GetOnlinePlayerCount() > 0)
|
||||
{
|
||||
singleOrMultiplayer = static_cast<INT>(eSen_SingleOrMultiplayer_Multiplayer_Live);
|
||||
singleOrMultiplayer = (INT)eSen_SingleOrMultiplayer_Multiplayer_Live;
|
||||
}
|
||||
else if(app.GetLocalPlayerCount() > 1 && g_NetworkManager.GetOnlinePlayerCount() > 0)
|
||||
{
|
||||
singleOrMultiplayer = static_cast<INT>(eSen_SingleOrMultiplayer_Multiplayer_Both_Local_and_Live);
|
||||
singleOrMultiplayer = (INT)eSen_SingleOrMultiplayer_Multiplayer_Both_Local_and_Live;
|
||||
}
|
||||
|
||||
return singleOrMultiplayer;
|
||||
@@ -432,16 +432,16 @@ INT CSentientManager::GetDifficultyLevel(INT diff)
|
||||
switch(diff)
|
||||
{
|
||||
case 0:
|
||||
difficultyLevel = static_cast<INT>(eSen_DifficultyLevel_Easiest);
|
||||
difficultyLevel = (INT)eSen_DifficultyLevel_Easiest;
|
||||
break;
|
||||
case 1:
|
||||
difficultyLevel = static_cast<INT>(eSen_DifficultyLevel_Easier);
|
||||
difficultyLevel = (INT)eSen_DifficultyLevel_Easier;
|
||||
break;
|
||||
case 2:
|
||||
difficultyLevel = static_cast<INT>(eSen_DifficultyLevel_Normal);
|
||||
difficultyLevel = (INT)eSen_DifficultyLevel_Normal;
|
||||
break;
|
||||
case 3:
|
||||
difficultyLevel = static_cast<INT>(eSen_DifficultyLevel_Harder);
|
||||
difficultyLevel = (INT)eSen_DifficultyLevel_Harder;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -461,11 +461,11 @@ INT CSentientManager::GetLicense()
|
||||
|
||||
if(ProfileManager.IsFullVersion())
|
||||
{
|
||||
license = static_cast<INT>(eSen_License_Full_Purchased_Title);
|
||||
license = (INT)eSen_License_Full_Purchased_Title;
|
||||
}
|
||||
else
|
||||
{
|
||||
license = static_cast<INT>(eSen_License_Trial_or_Demo);
|
||||
license = (INT)eSen_License_Trial_or_Demo;
|
||||
}
|
||||
return license;
|
||||
}
|
||||
@@ -500,15 +500,15 @@ INT CSentientManager::GetAudioSettings(DWORD dwUserId)
|
||||
|
||||
if(volume == 0)
|
||||
{
|
||||
audioSettings = static_cast<INT>(eSen_AudioSettings_Off);
|
||||
audioSettings = (INT)eSen_AudioSettings_Off;
|
||||
}
|
||||
else if(volume == DEFAULT_VOLUME_LEVEL)
|
||||
{
|
||||
audioSettings = static_cast<INT>(eSen_AudioSettings_On_Default);
|
||||
audioSettings = (INT)eSen_AudioSettings_On_Default;
|
||||
}
|
||||
else
|
||||
{
|
||||
audioSettings = static_cast<INT>(eSen_AudioSettings_On_CustomSetting);
|
||||
audioSettings = (INT)eSen_AudioSettings_On_CustomSetting;
|
||||
}
|
||||
}
|
||||
return audioSettings;
|
||||
|
||||
@@ -37,8 +37,8 @@ BOOL SenStatPlayerSessionStart ( DWORD dwUserID, INT SecondsSinceI
|
||||
st.dwNumProperties = 10;
|
||||
st.arrProperties = (CHAR*)&LocalStruct;
|
||||
st.dwNumValues = 0;
|
||||
st.arrValues = nullptr;
|
||||
st.arrValueFlags = nullptr;
|
||||
st.arrValues = NULL;
|
||||
st.arrValueFlags = NULL;
|
||||
|
||||
#ifdef SEN_LOGTELEMETRY
|
||||
// if we're in debug build with logging then log the stat to a file for testing
|
||||
@@ -67,8 +67,8 @@ BOOL SenStatPlayerSessionExit ( DWORD dwUserID, INT SecondsSinceI
|
||||
st.dwNumProperties = 5;
|
||||
st.arrProperties = (CHAR*)&LocalStruct;
|
||||
st.dwNumValues = 0;
|
||||
st.arrValues = nullptr;
|
||||
st.arrValueFlags = nullptr;
|
||||
st.arrValues = NULL;
|
||||
st.arrValueFlags = NULL;
|
||||
|
||||
#ifdef SEN_LOGTELEMETRY
|
||||
// if we're in debug build with logging then log the stat to a file for testing
|
||||
@@ -93,8 +93,8 @@ BOOL SenStatHeartBeat ( DWORD dwUserID, INT SecondsSinceI
|
||||
st.dwNumProperties = 1;
|
||||
st.arrProperties = (CHAR*)&LocalStruct;
|
||||
st.dwNumValues = 0;
|
||||
st.arrValues = nullptr;
|
||||
st.arrValueFlags = nullptr;
|
||||
st.arrValues = NULL;
|
||||
st.arrValueFlags = NULL;
|
||||
|
||||
#ifdef SEN_LOGTELEMETRY
|
||||
// if we're in debug build with logging then log the stat to a file for testing
|
||||
@@ -136,8 +136,8 @@ BOOL SenStatLevelStart ( DWORD dwUserID, INT SecondsSinceI
|
||||
st.dwNumProperties = 18;
|
||||
st.arrProperties = (CHAR*)&LocalStruct;
|
||||
st.dwNumValues = 0;
|
||||
st.arrValues = nullptr;
|
||||
st.arrValueFlags = nullptr;
|
||||
st.arrValues = NULL;
|
||||
st.arrValueFlags = NULL;
|
||||
|
||||
#ifdef SEN_LOGTELEMETRY
|
||||
// if we're in debug build with logging then log the stat to a file for testing
|
||||
@@ -172,8 +172,8 @@ BOOL SenStatLevelExit ( DWORD dwUserID, INT SecondsSinceI
|
||||
st.dwNumProperties = 11;
|
||||
st.arrProperties = (CHAR*)&LocalStruct;
|
||||
st.dwNumValues = 0;
|
||||
st.arrValues = nullptr;
|
||||
st.arrValueFlags = nullptr;
|
||||
st.arrValues = NULL;
|
||||
st.arrValueFlags = NULL;
|
||||
|
||||
#ifdef SEN_LOGTELEMETRY
|
||||
// if we're in debug build with logging then log the stat to a file for testing
|
||||
@@ -209,8 +209,8 @@ BOOL SenStatLevelSaveOrCheckpoint ( DWORD dwUserID, INT SecondsSinceI
|
||||
st.dwNumProperties = 12;
|
||||
st.arrProperties = (CHAR*)&LocalStruct;
|
||||
st.dwNumValues = 0;
|
||||
st.arrValues = nullptr;
|
||||
st.arrValueFlags = nullptr;
|
||||
st.arrValues = NULL;
|
||||
st.arrValueFlags = NULL;
|
||||
|
||||
#ifdef SEN_LOGTELEMETRY
|
||||
// if we're in debug build with logging then log the stat to a file for testing
|
||||
@@ -253,8 +253,8 @@ BOOL SenStatLevelResume ( DWORD dwUserID, INT SecondsSinceI
|
||||
st.dwNumProperties = 19;
|
||||
st.arrProperties = (CHAR*)&LocalStruct;
|
||||
st.dwNumValues = 0;
|
||||
st.arrValues = nullptr;
|
||||
st.arrValueFlags = nullptr;
|
||||
st.arrValues = NULL;
|
||||
st.arrValueFlags = NULL;
|
||||
|
||||
#ifdef SEN_LOGTELEMETRY
|
||||
// if we're in debug build with logging then log the stat to a file for testing
|
||||
@@ -285,8 +285,8 @@ BOOL SenStatPauseOrInactive ( DWORD dwUserID, INT SecondsSinceI
|
||||
st.dwNumProperties = 7;
|
||||
st.arrProperties = (CHAR*)&LocalStruct;
|
||||
st.dwNumValues = 0;
|
||||
st.arrValues = nullptr;
|
||||
st.arrValueFlags = nullptr;
|
||||
st.arrValues = NULL;
|
||||
st.arrValueFlags = NULL;
|
||||
|
||||
#ifdef SEN_LOGTELEMETRY
|
||||
// if we're in debug build with logging then log the stat to a file for testing
|
||||
@@ -317,8 +317,8 @@ BOOL SenStatUnpauseOrActive ( DWORD dwUserID, INT SecondsSinceI
|
||||
st.dwNumProperties = 7;
|
||||
st.arrProperties = (CHAR*)&LocalStruct;
|
||||
st.dwNumValues = 0;
|
||||
st.arrValues = nullptr;
|
||||
st.arrValueFlags = nullptr;
|
||||
st.arrValues = NULL;
|
||||
st.arrValueFlags = NULL;
|
||||
|
||||
#ifdef SEN_LOGTELEMETRY
|
||||
// if we're in debug build with logging then log the stat to a file for testing
|
||||
@@ -351,8 +351,8 @@ BOOL SenStatMenuShown ( DWORD dwUserID, INT SecondsSinceI
|
||||
st.dwNumProperties = 9;
|
||||
st.arrProperties = (CHAR*)&LocalStruct;
|
||||
st.dwNumValues = 0;
|
||||
st.arrValues = nullptr;
|
||||
st.arrValueFlags = nullptr;
|
||||
st.arrValues = NULL;
|
||||
st.arrValueFlags = NULL;
|
||||
|
||||
#ifdef SEN_LOGTELEMETRY
|
||||
// if we're in debug build with logging then log the stat to a file for testing
|
||||
@@ -385,8 +385,8 @@ BOOL SenStatAchievementUnlocked ( DWORD dwUserID, INT SecondsSinceI
|
||||
st.dwNumProperties = 9;
|
||||
st.arrProperties = (CHAR*)&LocalStruct;
|
||||
st.dwNumValues = 0;
|
||||
st.arrValues = nullptr;
|
||||
st.arrValueFlags = nullptr;
|
||||
st.arrValues = NULL;
|
||||
st.arrValueFlags = NULL;
|
||||
|
||||
#ifdef SEN_LOGTELEMETRY
|
||||
// if we're in debug build with logging then log the stat to a file for testing
|
||||
@@ -419,8 +419,8 @@ BOOL SenStatMediaShareUpload ( DWORD dwUserID, INT SecondsSinceI
|
||||
st.dwNumProperties = 9;
|
||||
st.arrProperties = (CHAR*)&LocalStruct;
|
||||
st.dwNumValues = 0;
|
||||
st.arrValues = nullptr;
|
||||
st.arrValueFlags = nullptr;
|
||||
st.arrValues = NULL;
|
||||
st.arrValueFlags = NULL;
|
||||
|
||||
#ifdef SEN_LOGTELEMETRY
|
||||
// if we're in debug build with logging then log the stat to a file for testing
|
||||
@@ -453,8 +453,8 @@ BOOL SenStatUpsellPresented ( DWORD dwUserID, INT SecondsSinceI
|
||||
st.dwNumProperties = 9;
|
||||
st.arrProperties = (CHAR*)&LocalStruct;
|
||||
st.dwNumValues = 0;
|
||||
st.arrValues = nullptr;
|
||||
st.arrValueFlags = nullptr;
|
||||
st.arrValues = NULL;
|
||||
st.arrValueFlags = NULL;
|
||||
|
||||
#ifdef SEN_LOGTELEMETRY
|
||||
// if we're in debug build with logging then log the stat to a file for testing
|
||||
@@ -488,8 +488,8 @@ BOOL SenStatUpsellResponded ( DWORD dwUserID, INT SecondsSinceI
|
||||
st.dwNumProperties = 10;
|
||||
st.arrProperties = (CHAR*)&LocalStruct;
|
||||
st.dwNumValues = 0;
|
||||
st.arrValues = nullptr;
|
||||
st.arrValueFlags = nullptr;
|
||||
st.arrValues = NULL;
|
||||
st.arrValueFlags = NULL;
|
||||
|
||||
#ifdef SEN_LOGTELEMETRY
|
||||
// if we're in debug build with logging then log the stat to a file for testing
|
||||
@@ -607,8 +607,8 @@ BOOL SenStatSkinChanged ( DWORD dwUserID, INT SecondsSinceI
|
||||
st.dwNumProperties = 8;
|
||||
st.arrProperties = (CHAR*)&LocalStruct;
|
||||
st.dwNumValues = 0;
|
||||
st.arrValues = nullptr;
|
||||
st.arrValueFlags = nullptr;
|
||||
st.arrValues = NULL;
|
||||
st.arrValueFlags = NULL;
|
||||
|
||||
#ifdef SEN_LOGTELEMETRY
|
||||
// if we're in debug build with logging then log the stat to a file for testing
|
||||
@@ -639,8 +639,8 @@ BOOL SenStatBanLevel ( DWORD dwUserID, INT SecondsSinceI
|
||||
st.dwNumProperties = 7;
|
||||
st.arrProperties = (CHAR*)&LocalStruct;
|
||||
st.dwNumValues = 0;
|
||||
st.arrValues = nullptr;
|
||||
st.arrValueFlags = nullptr;
|
||||
st.arrValues = NULL;
|
||||
st.arrValueFlags = NULL;
|
||||
|
||||
#ifdef SEN_LOGTELEMETRY
|
||||
// if we're in debug build with logging then log the stat to a file for testing
|
||||
@@ -671,8 +671,8 @@ BOOL SenStatUnBanLevel ( DWORD dwUserID, INT SecondsSinceI
|
||||
st.dwNumProperties = 7;
|
||||
st.arrProperties = (CHAR*)&LocalStruct;
|
||||
st.dwNumValues = 0;
|
||||
st.arrValues = nullptr;
|
||||
st.arrValueFlags = nullptr;
|
||||
st.arrValues = NULL;
|
||||
st.arrValueFlags = NULL;
|
||||
|
||||
#ifdef SEN_LOGTELEMETRY
|
||||
// if we're in debug build with logging then log the stat to a file for testing
|
||||
@@ -705,8 +705,8 @@ BOOL SenStatTexturePackChanged ( DWORD dwUserID, INT SecondsSinceI
|
||||
st.dwNumProperties = 9;
|
||||
st.arrProperties = (CHAR*)&LocalStruct;
|
||||
st.dwNumValues = 0;
|
||||
st.arrValues = nullptr;
|
||||
st.arrValueFlags = nullptr;
|
||||
st.arrValues = NULL;
|
||||
st.arrValueFlags = NULL;
|
||||
|
||||
#ifdef SEN_LOGTELEMETRY
|
||||
// if we're in debug build with logging then log the stat to a file for testing
|
||||
|
||||
@@ -67,14 +67,14 @@ CSocialManager::CSocialManager()
|
||||
|
||||
// WESTY : Not sure if we even need to get social access key!
|
||||
/*
|
||||
m_pAccessKeyText = nullptr;
|
||||
m_pAccessKeyText = NULL;
|
||||
m_dwAccessKeyTextSize = 0;
|
||||
*/
|
||||
|
||||
m_pMainImageBuffer = nullptr;
|
||||
m_pMainImageBuffer = NULL;
|
||||
m_dwMainImageBufferSize = 0;
|
||||
|
||||
m_PostPreviewImage.pBytes = nullptr;
|
||||
m_PostPreviewImage.pBytes = NULL;
|
||||
m_dwCurrRequestUser = -1;
|
||||
|
||||
ZeroMemory(m_wchTitleA,sizeof(WCHAR)*MAX_SOCIALPOST_CAPTION);
|
||||
@@ -304,14 +304,14 @@ bool CSocialManager::AreAllUsersAllowedToPostImages()
|
||||
void CSocialManager::DestroyMainPostImage()
|
||||
{
|
||||
delete [] m_PostImageParams.pFullImage;
|
||||
m_PostImageParams.pFullImage=nullptr;
|
||||
m_PostImageParams.pFullImage=NULL;
|
||||
m_dwMainImageBufferSize=0;
|
||||
}
|
||||
|
||||
void CSocialManager::DestroyPreviewPostImage()
|
||||
{
|
||||
XPhysicalFree( (void *)m_PostPreviewImage.pBytes );
|
||||
m_PostPreviewImage.pBytes = nullptr;
|
||||
m_PostPreviewImage.pBytes = NULL;
|
||||
}
|
||||
|
||||
void CSocialManager::SetSocialPostText(LPCWSTR pwchTitle, LPCWSTR pwchCaption, LPCWSTR pwchDesc)
|
||||
@@ -459,7 +459,7 @@ bool CSocialManager::PostImageToSocialNetwork( ESocialNetwork eSocialNetwork, DW
|
||||
|
||||
bool bResult = false;
|
||||
|
||||
PBYTE pbData=nullptr;
|
||||
PBYTE pbData=NULL;
|
||||
DWORD dwDataSize;
|
||||
|
||||
app.GetScreenshot(dwUserIndex,&pbData,&dwDataSize);
|
||||
@@ -536,10 +536,10 @@ bool CSocialManager::GetSocialNetworkAccessKey( ESocialNetwork eSocialNetwork, D
|
||||
DWORD dwResult;
|
||||
|
||||
// Ensure that we free any previously used access key buffer.
|
||||
if ( m_pAccessKeyText != nullptr )
|
||||
if ( m_pAccessKeyText != NULL )
|
||||
{
|
||||
delete [] m_pAccessKeyText;
|
||||
m_pAccessKeyText = nullptr;
|
||||
m_pAccessKeyText = NULL;
|
||||
}
|
||||
|
||||
// Get social network ID and permissions.
|
||||
@@ -554,39 +554,39 @@ bool CSocialManager::GetSocialNetworkAccessKey( ESocialNetwork eSocialNetwork, D
|
||||
{
|
||||
if ( bUsingKinect )
|
||||
{
|
||||
dwResult = XShowNuiSocialGetUserToken( dwUserTrackingIndex, dwUserIndex, dwSocialNetworkID, pRequiredPermissions, m_pAccessKeyText, &( m_dwAccessKeyTextSize ), nullptr );
|
||||
dwResult = XShowNuiSocialGetUserToken( dwUserTrackingIndex, dwUserIndex, dwSocialNetworkID, pRequiredPermissions, m_pAccessKeyText, &( m_dwAccessKeyTextSize ), NULL );
|
||||
|
||||
// If buffer for key text was not large enough, reallocate buffer that is large enough and try again.
|
||||
if ( dwResult == ERROR_INSUFFICIENT_BUFFER )
|
||||
{
|
||||
delete [] m_pAccessKeyText;
|
||||
m_pAccessKeyText = new wchar_t[ m_dwAccessKeyTextSize ];
|
||||
dwResult = XShowNuiSocialGetUserToken( dwUserTrackingIndex, dwUserIndex, dwSocialNetworkID, pRequiredPermissions, m_pAccessKeyText, &( m_dwAccessKeyTextSize ), nullptr );
|
||||
dwResult = XShowNuiSocialGetUserToken( dwUserTrackingIndex, dwUserIndex, dwSocialNetworkID, pRequiredPermissions, m_pAccessKeyText, &( m_dwAccessKeyTextSize ), NULL );
|
||||
}
|
||||
}
|
||||
else // using standard controller interface.
|
||||
{
|
||||
dwResult = XShowSocialGetUserToken( dwUserIndex, dwSocialNetworkID, pRequiredPermissions, m_pAccessKeyText, &( m_dwAccessKeyTextSize ), nullptr );
|
||||
dwResult = XShowSocialGetUserToken( dwUserIndex, dwSocialNetworkID, pRequiredPermissions, m_pAccessKeyText, &( m_dwAccessKeyTextSize ), NULL );
|
||||
|
||||
// If buffer for key text was not large enough, reallocate buffer that is large enough and try again.
|
||||
if ( dwResult == ERROR_INSUFFICIENT_BUFFER )
|
||||
{
|
||||
delete [] m_pAccessKeyText;
|
||||
m_pAccessKeyText = new wchar_t[ m_dwAccessKeyTextSize ];
|
||||
dwResult = XShowSocialGetUserToken( dwUserIndex, dwSocialNetworkID, pRequiredPermissions, m_pAccessKeyText, &( m_dwAccessKeyTextSize ), nullptr );
|
||||
dwResult = XShowSocialGetUserToken( dwUserIndex, dwSocialNetworkID, pRequiredPermissions, m_pAccessKeyText, &( m_dwAccessKeyTextSize ), NULL );
|
||||
}
|
||||
}
|
||||
}
|
||||
else // we are trying to obtain cached user access key.
|
||||
{
|
||||
dwResult = XSocialGetUserToken( dwUserIndex, dwSocialNetworkID, pRequiredPermissions, m_pAccessKeyText, &( m_dwAccessKeyTextSize ), nullptr );
|
||||
dwResult = XSocialGetUserToken( dwUserIndex, dwSocialNetworkID, pRequiredPermissions, m_pAccessKeyText, &( m_dwAccessKeyTextSize ), NULL );
|
||||
|
||||
// If buffer for key text was not large enough, reallocate buffer that is large enough and try again.
|
||||
if ( dwResult == ERROR_INSUFFICIENT_BUFFER )
|
||||
{
|
||||
delete [] m_pAccessKeyText;
|
||||
m_pAccessKeyText = new wchar_t[ m_dwAccessKeyTextSize ];
|
||||
dwResult = XSocialGetUserToken( dwUserIndex, dwSocialNetworkID, pRequiredPermissions, m_pAccessKeyText, &( m_dwAccessKeyTextSize ), nullptr );
|
||||
dwResult = XSocialGetUserToken( dwUserIndex, dwSocialNetworkID, pRequiredPermissions, m_pAccessKeyText, &( m_dwAccessKeyTextSize ), NULL );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ XMLParser::XMLParser()
|
||||
{
|
||||
m_pWritePtr = m_pWriteBuf;
|
||||
m_pReadPtr = m_pReadBuf;
|
||||
m_pISAXCallback = nullptr;
|
||||
m_pISAXCallback = NULL;
|
||||
m_hFile = INVALID_HANDLE_VALUE;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ VOID XMLParser::FillBuffer()
|
||||
|
||||
m_pReadPtr = m_pReadBuf;
|
||||
|
||||
if( m_hFile == nullptr )
|
||||
if( m_hFile == NULL )
|
||||
{
|
||||
if( m_uInXMLBufferCharsLeft > XML_READ_BUFFER_SIZE )
|
||||
NChars = XML_READ_BUFFER_SIZE;
|
||||
@@ -62,15 +62,15 @@ VOID XMLParser::FillBuffer()
|
||||
}
|
||||
else
|
||||
{
|
||||
if( !ReadFile( m_hFile, m_pReadBuf, XML_READ_BUFFER_SIZE, &NChars, nullptr ))
|
||||
if( !ReadFile( m_hFile, m_pReadBuf, XML_READ_BUFFER_SIZE, &NChars, NULL ))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
m_dwCharsConsumed += NChars;
|
||||
int64_t iProgress = m_dwCharsTotal ? (( static_cast<int64_t>(m_dwCharsConsumed) * 1000 ) / static_cast<int64_t>(m_dwCharsTotal)) : 0;
|
||||
m_pISAXCallback->SetParseProgress( static_cast<DWORD>(iProgress) );
|
||||
int64_t iProgress = m_dwCharsTotal ? (( (int64_t)m_dwCharsConsumed * 1000 ) / (int64_t)m_dwCharsTotal) : 0;
|
||||
m_pISAXCallback->SetParseProgress( (DWORD)iProgress );
|
||||
|
||||
m_pReadBuf[ NChars ] = '\0';
|
||||
m_pReadBuf[ NChars + 1] = '\0';
|
||||
@@ -192,29 +192,30 @@ HRESULT XMLParser::ConvertEscape()
|
||||
// must be an entity reference
|
||||
|
||||
WCHAR *pEntityRefVal = m_pWritePtr;
|
||||
UINT EntityRefLen;
|
||||
|
||||
SkipNextAdvance();
|
||||
if( FAILED( hr = AdvanceName() ) )
|
||||
return hr;
|
||||
|
||||
const UINT entityRefLen = static_cast<UINT>(m_pWritePtr - pEntityRefVal);
|
||||
EntityRefLen = (UINT)( m_pWritePtr - pEntityRefVal );
|
||||
m_pWritePtr = pEntityRefVal;
|
||||
|
||||
if ( entityRefLen == 0 )
|
||||
if ( EntityRefLen == 0 )
|
||||
{
|
||||
Error( E_INVALID_XML_SYNTAX, "Expecting entity name after &" );
|
||||
return E_INVALID_XML_SYNTAX;
|
||||
}
|
||||
|
||||
if( !wcsncmp( pEntityRefVal, L"lt", entityRefLen ) )
|
||||
if( !wcsncmp( pEntityRefVal, L"lt", EntityRefLen ) )
|
||||
wVal = '<';
|
||||
else if( !wcsncmp( pEntityRefVal, L"gt", entityRefLen ) )
|
||||
else if( !wcsncmp( pEntityRefVal, L"gt", EntityRefLen ) )
|
||||
wVal = '>';
|
||||
else if( !wcsncmp( pEntityRefVal, L"amp", entityRefLen ) )
|
||||
else if( !wcsncmp( pEntityRefVal, L"amp", EntityRefLen ) )
|
||||
wVal = '&';
|
||||
else if( !wcsncmp( pEntityRefVal, L"apos", entityRefLen ) )
|
||||
else if( !wcsncmp( pEntityRefVal, L"apos", EntityRefLen ) )
|
||||
wVal = '\'';
|
||||
else if( !wcsncmp( pEntityRefVal, L"quot", entityRefLen ) )
|
||||
else if( !wcsncmp( pEntityRefVal, L"quot", EntityRefLen ) )
|
||||
wVal = '"';
|
||||
else
|
||||
{
|
||||
@@ -358,7 +359,7 @@ HRESULT XMLParser::AdvanceCharacter( BOOL bOkToFail )
|
||||
// Read more from the file
|
||||
FillBuffer();
|
||||
|
||||
// We are at EOF if it is still nullptr
|
||||
// We are at EOF if it is still NULL
|
||||
if ( ( m_pReadPtr[0] == '\0' ) && ( m_pReadPtr[1] == '\0' ) )
|
||||
{
|
||||
if( !bOkToFail )
|
||||
@@ -497,7 +498,7 @@ HRESULT XMLParser::AdvanceElement()
|
||||
return hr;
|
||||
|
||||
if( FAILED( m_pISAXCallback->ElementEnd( pEntityRefVal,
|
||||
static_cast<UINT>(m_pWritePtr - pEntityRefVal) ) ) )
|
||||
(UINT) ( m_pWritePtr - pEntityRefVal ) ) ) )
|
||||
return E_ABORT;
|
||||
|
||||
if( FAILED( hr = ConsumeSpace() ) )
|
||||
@@ -540,7 +541,7 @@ HRESULT XMLParser::AdvanceElement()
|
||||
if( FAILED( hr = AdvanceName() ) )
|
||||
return hr;
|
||||
|
||||
EntityRefLen = static_cast<UINT>(m_pWritePtr - pEntityRefVal);
|
||||
EntityRefLen = (UINT)( m_pWritePtr - pEntityRefVal );
|
||||
|
||||
if( FAILED( hr = ConsumeSpace() ) )
|
||||
return hr;
|
||||
@@ -564,7 +565,8 @@ HRESULT XMLParser::AdvanceElement()
|
||||
// Attribute name
|
||||
if( FAILED( hr = AdvanceName() ) )
|
||||
return hr;
|
||||
Attributes[ NumAttrs ].NameLen = static_cast<UINT>(m_pWritePtr - Attributes[NumAttrs].strName);
|
||||
|
||||
Attributes[ NumAttrs ].NameLen = (UINT)( m_pWritePtr - Attributes[ NumAttrs ].strName );
|
||||
|
||||
if( FAILED( hr = ConsumeSpace() ) )
|
||||
return hr;
|
||||
@@ -586,8 +588,9 @@ HRESULT XMLParser::AdvanceElement()
|
||||
if( FAILED( hr = AdvanceAttrVal() ) )
|
||||
return hr;
|
||||
|
||||
Attributes[ NumAttrs ].ValueLen = static_cast<UINT>(m_pWritePtr -
|
||||
Attributes[NumAttrs].strValue);
|
||||
Attributes[ NumAttrs ].ValueLen = (UINT)( m_pWritePtr -
|
||||
Attributes[ NumAttrs ].strValue );
|
||||
|
||||
++NumAttrs;
|
||||
|
||||
if( FAILED( hr = ConsumeSpace() ) )
|
||||
@@ -660,13 +663,13 @@ HRESULT XMLParser::AdvanceCDATA()
|
||||
|
||||
if( m_pWritePtr - m_pWriteBuf >= XML_WRITE_BUFFER_SIZE )
|
||||
{
|
||||
if( FAILED( m_pISAXCallback->CDATAData( m_pWriteBuf, static_cast<UINT>(m_pWritePtr - m_pWriteBuf), TRUE ) ) )
|
||||
if( FAILED( m_pISAXCallback->CDATAData( m_pWriteBuf, (UINT)( m_pWritePtr - m_pWriteBuf ), TRUE ) ) )
|
||||
return E_ABORT;
|
||||
m_pWritePtr = m_pWriteBuf;
|
||||
}
|
||||
}
|
||||
|
||||
if( FAILED( m_pISAXCallback->CDATAData( m_pWriteBuf, static_cast<UINT>(m_pWritePtr - m_pWriteBuf), FALSE ) ) )
|
||||
if( FAILED( m_pISAXCallback->CDATAData( m_pWriteBuf, (UINT)( m_pWritePtr - m_pWriteBuf ), FALSE ) ) )
|
||||
return E_ABORT;
|
||||
|
||||
m_pWritePtr = m_pWriteBuf;
|
||||
@@ -779,9 +782,9 @@ HRESULT XMLParser::MainParseLoop()
|
||||
{
|
||||
if( FAILED( AdvanceCharacter( TRUE ) ) )
|
||||
{
|
||||
if ( ( static_cast<UINT>(m_pWritePtr - m_pWriteBuf) != 0 ) && ( !bWhiteSpaceOnly ) )
|
||||
if ( ( (UINT) ( m_pWritePtr - m_pWriteBuf ) != 0 ) && ( !bWhiteSpaceOnly ) )
|
||||
{
|
||||
if( FAILED( m_pISAXCallback->ElementContent( m_pWriteBuf, static_cast<UINT>(m_pWritePtr - m_pWriteBuf), FALSE ) ) )
|
||||
if( FAILED( m_pISAXCallback->ElementContent( m_pWriteBuf, (UINT)( m_pWritePtr - m_pWriteBuf ), FALSE ) ) )
|
||||
return E_ABORT;
|
||||
|
||||
bWhiteSpaceOnly = TRUE;
|
||||
@@ -795,9 +798,9 @@ HRESULT XMLParser::MainParseLoop()
|
||||
|
||||
if( m_Ch == '<' )
|
||||
{
|
||||
if( ( static_cast<UINT>(m_pWritePtr - m_pWriteBuf) != 0 ) && ( !bWhiteSpaceOnly ) )
|
||||
if( ( (UINT) ( m_pWritePtr - m_pWriteBuf ) != 0 ) && ( !bWhiteSpaceOnly ) )
|
||||
{
|
||||
if( FAILED( m_pISAXCallback->ElementContent( m_pWriteBuf, static_cast<UINT>(m_pWritePtr - m_pWriteBuf), FALSE ) ) )
|
||||
if( FAILED( m_pISAXCallback->ElementContent( m_pWriteBuf, (UINT)( m_pWritePtr - m_pWriteBuf ), FALSE ) ) )
|
||||
return E_ABORT;
|
||||
|
||||
bWhiteSpaceOnly = TRUE;
|
||||
@@ -835,7 +838,7 @@ HRESULT XMLParser::MainParseLoop()
|
||||
if( !bWhiteSpaceOnly )
|
||||
{
|
||||
if( FAILED( m_pISAXCallback->ElementContent( m_pWriteBuf,
|
||||
static_cast<UINT>(m_pWritePtr - m_pWriteBuf),
|
||||
( UINT ) ( m_pWritePtr - m_pWriteBuf ),
|
||||
TRUE ) ) )
|
||||
{
|
||||
return E_ABORT;
|
||||
@@ -858,7 +861,7 @@ HRESULT XMLParser::ParseXMLFile( CONST CHAR *strFilename )
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
if( m_pISAXCallback == nullptr )
|
||||
if( m_pISAXCallback == NULL )
|
||||
return E_NOINTERFACE;
|
||||
|
||||
m_pISAXCallback->m_LineNum = 1;
|
||||
@@ -869,12 +872,11 @@ HRESULT XMLParser::ParseXMLFile( CONST CHAR *strFilename )
|
||||
m_pReadPtr = m_pReadBuf;
|
||||
|
||||
m_pReadBuf[ 0 ] = '\0';
|
||||
|
||||
m_pReadBuf[ 1 ] = '\0';
|
||||
|
||||
m_pInXMLBuffer = nullptr;
|
||||
m_pInXMLBuffer = NULL;
|
||||
m_uInXMLBufferCharsLeft = 0;
|
||||
m_hFile = CreateFile( strFilename, GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, nullptr);
|
||||
m_hFile = CreateFile( strFilename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, NULL );
|
||||
|
||||
if( m_hFile == INVALID_HANDLE_VALUE )
|
||||
{
|
||||
@@ -886,7 +888,7 @@ HRESULT XMLParser::ParseXMLFile( CONST CHAR *strFilename )
|
||||
{
|
||||
LARGE_INTEGER iFileSize;
|
||||
GetFileSizeEx( m_hFile, &iFileSize );
|
||||
m_dwCharsTotal = static_cast<DWORD>(iFileSize.QuadPart);
|
||||
m_dwCharsTotal = (DWORD)iFileSize.QuadPart;
|
||||
m_dwCharsConsumed = 0;
|
||||
hr = MainParseLoop();
|
||||
}
|
||||
@@ -897,7 +899,7 @@ HRESULT XMLParser::ParseXMLFile( CONST CHAR *strFilename )
|
||||
m_hFile = INVALID_HANDLE_VALUE;
|
||||
|
||||
// we no longer own strFilename, so un-set it
|
||||
m_pISAXCallback->m_strFilename = nullptr;
|
||||
m_pISAXCallback->m_strFilename = NULL;
|
||||
|
||||
return hr;
|
||||
}
|
||||
@@ -910,7 +912,7 @@ HRESULT XMLParser::ParseXMLBuffer( CONST CHAR *strBuffer, UINT uBufferSize )
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
if( m_pISAXCallback == nullptr)
|
||||
if( m_pISAXCallback == NULL )
|
||||
return E_NOINTERFACE;
|
||||
|
||||
m_pISAXCallback->m_LineNum = 1;
|
||||
@@ -923,7 +925,7 @@ HRESULT XMLParser::ParseXMLBuffer( CONST CHAR *strBuffer, UINT uBufferSize )
|
||||
m_pReadBuf[ 0 ] = '\0';
|
||||
m_pReadBuf[ 1 ] = '\0';
|
||||
|
||||
m_hFile = nullptr;
|
||||
m_hFile = NULL;
|
||||
m_pInXMLBuffer = strBuffer;
|
||||
m_uInXMLBufferCharsLeft = uBufferSize;
|
||||
m_dwCharsTotal = uBufferSize;
|
||||
@@ -932,7 +934,7 @@ HRESULT XMLParser::ParseXMLBuffer( CONST CHAR *strBuffer, UINT uBufferSize )
|
||||
hr = MainParseLoop();
|
||||
|
||||
// we no longer own strFilename, so un-set it
|
||||
m_pISAXCallback->m_strFilename = nullptr;
|
||||
m_pISAXCallback->m_strFilename = NULL;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ private:
|
||||
DWORD m_dwCharsTotal;
|
||||
DWORD m_dwCharsConsumed;
|
||||
|
||||
BYTE m_pReadBuf[ XML_READ_BUFFER_SIZE + 2 ]; // room for a trailing nullptr
|
||||
BYTE m_pReadBuf[ XML_READ_BUFFER_SIZE + 2 ]; // room for a trailing NULL
|
||||
WCHAR m_pWriteBuf[ XML_WRITE_BUFFER_SIZE ];
|
||||
|
||||
BYTE* m_pReadPtr;
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
{
|
||||
ZeroMemory(wTemp,sizeof(WCHAR)*35);
|
||||
wcsncpy_s( wTemp, pAttributes[i].strValue, pAttributes[i].ValueLen);
|
||||
xuid=_wcstoui64(wTemp,nullptr,10);
|
||||
xuid=_wcstoui64(wTemp,NULL,10);
|
||||
}
|
||||
}
|
||||
else if (_wcsicmp(wAttName,L"cape")==0)
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
#ifdef _XBOX
|
||||
iValue=_wtoi(wValue);
|
||||
#else
|
||||
iValue=wcstol(wValue, nullptr, 10);
|
||||
iValue=wcstol(wValue, NULL, 10);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
{
|
||||
ZeroMemory(wTemp,sizeof(WCHAR)*35);
|
||||
wcsncpy_s( wTemp, pAttributes[i].strValue, pAttributes[i].ValueLen);
|
||||
uiSortIndex=wcstoul(wTemp,nullptr,16);
|
||||
uiSortIndex=wcstoul(wTemp,NULL,16);
|
||||
}
|
||||
}
|
||||
else if (_wcsicmp(wAttName,L"Banner")==0)
|
||||
@@ -236,7 +236,7 @@ public:
|
||||
{
|
||||
ZeroMemory(wTemp,sizeof(WCHAR)*35);
|
||||
wcsncpy_s( wTemp, pAttributes[i].strValue, pAttributes[i].ValueLen);
|
||||
ullFull=_wcstoui64(wTemp,nullptr,16);
|
||||
ullFull=_wcstoui64(wTemp,NULL,16);
|
||||
}
|
||||
}
|
||||
else if (_wcsicmp(wAttName,L"Trial")==0)
|
||||
@@ -245,7 +245,7 @@ public:
|
||||
{
|
||||
ZeroMemory(wTemp,sizeof(WCHAR)*35);
|
||||
wcsncpy_s( wTemp, pAttributes[i].strValue, pAttributes[i].ValueLen);
|
||||
ullTrial=_wcstoui64(wTemp,nullptr,16);
|
||||
ullTrial=_wcstoui64(wTemp,NULL,16);
|
||||
}
|
||||
}
|
||||
else if (_wcsicmp(wAttName,L"FirstSkin")==0)
|
||||
@@ -286,7 +286,7 @@ public:
|
||||
#ifdef _XBOX
|
||||
iConfig=_wtoi(wConfig);
|
||||
#else
|
||||
iConfig=wcstol(wConfig, nullptr, 10);
|
||||
iConfig=wcstol(wConfig, NULL, 10);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -284,10 +284,10 @@ CConsoleMinecraftApp::CConsoleMinecraftApp() : CMinecraftApp()
|
||||
m_bRead_TMS_XUIDS_XML=false;
|
||||
m_bRead_TMS_Config_XML=false;
|
||||
m_bRead_TMS_DLCINFO_XML=false;
|
||||
m_pXuidsFileBuffer=nullptr;
|
||||
m_pXuidsFileBuffer=NULL;
|
||||
m_dwXuidsFileSize=0;
|
||||
ZeroMemory(m_ScreenshotBuffer,sizeof(LPD3DXBUFFER)*XUSER_MAX_COUNT);
|
||||
m_ThumbnailBuffer=nullptr;
|
||||
m_ThumbnailBuffer=NULL;
|
||||
#ifdef _DEBUG_MENUS_ENABLED
|
||||
debugOverlayCreated = false;
|
||||
#endif
|
||||
@@ -301,12 +301,12 @@ CConsoleMinecraftApp::CConsoleMinecraftApp() : CMinecraftApp()
|
||||
m_bContainerMenuDisplayed[i]=false;
|
||||
m_bIgnoreAutosaveMenuDisplayed[i]=false;
|
||||
m_bIgnorePlayerJoinMenuDisplayed[i]=false;
|
||||
m_hCurrentScene[i]=nullptr;
|
||||
m_hFirstScene[i]=nullptr;
|
||||
m_hCurrentScene[i]=NULL;
|
||||
m_hFirstScene[i]=NULL;
|
||||
}
|
||||
|
||||
m_titleDeploymentType = XTITLE_DEPLOYMENT_DOWNLOAD;
|
||||
DWORD dwResult = XTitleGetDeploymentType(&m_titleDeploymentType, nullptr);
|
||||
DWORD dwResult = XTitleGetDeploymentType(&m_titleDeploymentType, NULL);
|
||||
if( dwResult == ERROR_SUCCESS )
|
||||
{
|
||||
switch( m_titleDeploymentType )
|
||||
@@ -658,7 +658,7 @@ void CConsoleMinecraftApp::GetPreviewImage(int iPad,XSOCIAL_PREVIEWIMAGE *previe
|
||||
preview->pBytes = (BYTE *)XPhysicalAlloc(sizeBytes, MAXULONG_PTR, 0, PAGE_READWRITE | PAGE_WRITECOMBINE );
|
||||
memcpy( (void *)preview->pBytes, (void *)m_PreviewBuffer[iPad].pBytes, sizeBytes );
|
||||
XPhysicalFree((LPVOID)m_PreviewBuffer[iPad].pBytes);
|
||||
m_PreviewBuffer[iPad].pBytes = nullptr;
|
||||
m_PreviewBuffer[iPad].pBytes = NULL;
|
||||
}
|
||||
|
||||
void CConsoleMinecraftApp::CaptureScreenshot(int iPad)
|
||||
@@ -678,7 +678,7 @@ HRESULT CConsoleMinecraftApp::LoadXuiResources()
|
||||
HRESULT hr;
|
||||
|
||||
// load from the .xzp file
|
||||
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(nullptr);
|
||||
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL);
|
||||
|
||||
|
||||
//#ifdef _CONTENT_PACKAGE
|
||||
@@ -894,7 +894,7 @@ HRESULT CConsoleMinecraftApp::LoadXuiResources()
|
||||
// int iStringC=0;
|
||||
// LPCWSTR lpTempString;
|
||||
//
|
||||
// while((lpTempString=StringTable.Lookup(iStringC))!=nullptr)
|
||||
// while((lpTempString=StringTable.Lookup(iStringC))!=NULL)
|
||||
// {
|
||||
// DebugPrintf("STRING %d = ",iStringC);
|
||||
// OutputDebugStringW(lpTempString);
|
||||
@@ -914,17 +914,17 @@ HRESULT CConsoleMinecraftApp::LoadXuiResources()
|
||||
wsprintfW(szResourceLocator,L"section://%X,%s#%s",c_ModuleHandle,L"media", L"media/");
|
||||
if(RenderManager.IsHiDef())
|
||||
{
|
||||
hr=LoadFirstScene( szResourceLocator, L"xuiscene_base.xur", nullptr, &mainBaseScene );
|
||||
hr=LoadFirstScene( szResourceLocator, L"xuiscene_base.xur", NULL, &mainBaseScene );
|
||||
}
|
||||
else
|
||||
{
|
||||
if(RenderManager.IsWidescreen())
|
||||
{
|
||||
hr=LoadFirstScene( szResourceLocator, L"xuiscene_base.xur", nullptr, &mainBaseScene );
|
||||
hr=LoadFirstScene( szResourceLocator, L"xuiscene_base.xur", NULL, &mainBaseScene );
|
||||
}
|
||||
else
|
||||
{
|
||||
hr=LoadFirstScene( szResourceLocator, L"xuiscene_base_480.xur", nullptr, &mainBaseScene );
|
||||
hr=LoadFirstScene( szResourceLocator, L"xuiscene_base_480.xur", NULL, &mainBaseScene );
|
||||
}
|
||||
}
|
||||
if( FAILED(hr) ) app.FatalLoadError();
|
||||
@@ -989,7 +989,7 @@ HRESULT CConsoleMinecraftApp::RegisterFont(eFont eFontLanguage,eFont eFontFallba
|
||||
HRESULT hr=S_OK;
|
||||
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
|
||||
WCHAR szResourceLocator[ LOCATOR_SIZE ];
|
||||
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(nullptr);
|
||||
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL);
|
||||
|
||||
wsprintfW(szResourceLocator,L"section://%X,%s#%s",c_ModuleHandle,L"media", wchTypefaceLocatorA[eFontLanguage]);
|
||||
// 4J Stu - Check that the font file actually exists
|
||||
@@ -1003,7 +1003,7 @@ HRESULT CConsoleMinecraftApp::RegisterFont(eFont eFontLanguage,eFont eFontFallba
|
||||
{
|
||||
if(eFontFallback!=eFont_None)
|
||||
{
|
||||
hr = RegisterDefaultTypeface( wchTypefaceA[eFontLanguage],szResourceLocator,nullptr,0.0f,wchTypefaceA[eFontFallback]);
|
||||
hr = RegisterDefaultTypeface( wchTypefaceA[eFontLanguage],szResourceLocator,NULL,0.0f,wchTypefaceA[eFontFallback]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1410,7 +1410,7 @@ void CConsoleMinecraftApp::OverrideFontRenderer(bool set, bool immediate)
|
||||
}
|
||||
else
|
||||
{
|
||||
XuiFontSetRenderer( nullptr );
|
||||
XuiFontSetRenderer( NULL );
|
||||
}
|
||||
m_bFontRendererOverridden = set;
|
||||
|
||||
@@ -1451,7 +1451,7 @@ void CConsoleMinecraftApp::CaptureSaveThumbnail()
|
||||
void CConsoleMinecraftApp::GetSaveThumbnail(PBYTE *pbData,DWORD *pdwSize)
|
||||
{
|
||||
// on a save caused by a create world, the thumbnail capture won't have happened
|
||||
if(m_ThumbnailBuffer!=nullptr)
|
||||
if(m_ThumbnailBuffer!=NULL)
|
||||
{
|
||||
if( pbData )
|
||||
{
|
||||
@@ -1460,28 +1460,28 @@ void CConsoleMinecraftApp::GetSaveThumbnail(PBYTE *pbData,DWORD *pdwSize)
|
||||
memcpy(*pbData,m_ThumbnailBuffer->GetBufferPointer(),*pdwSize);
|
||||
}
|
||||
m_ThumbnailBuffer->Release();
|
||||
m_ThumbnailBuffer=nullptr;
|
||||
m_ThumbnailBuffer=NULL;
|
||||
}
|
||||
}
|
||||
void CConsoleMinecraftApp::ReleaseSaveThumbnail()
|
||||
{
|
||||
if(m_ThumbnailBuffer!=nullptr)
|
||||
if(m_ThumbnailBuffer!=NULL)
|
||||
{
|
||||
m_ThumbnailBuffer->Release();
|
||||
m_ThumbnailBuffer=nullptr;
|
||||
m_ThumbnailBuffer=NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void CConsoleMinecraftApp::GetScreenshot(int iPad,PBYTE *pbData,DWORD *pdwSize)
|
||||
{
|
||||
// on a save caused by a create world, the thumbnail capture won't have happened
|
||||
if(m_ScreenshotBuffer[iPad]!=nullptr)
|
||||
if(m_ScreenshotBuffer[iPad]!=NULL)
|
||||
{
|
||||
*pbData= new BYTE [m_ScreenshotBuffer[iPad]->GetBufferSize()];
|
||||
*pdwSize=m_ScreenshotBuffer[iPad]->GetBufferSize();
|
||||
memcpy(*pbData,m_ScreenshotBuffer[iPad]->GetBufferPointer(),*pdwSize);
|
||||
m_ScreenshotBuffer[iPad]->Release();
|
||||
m_ScreenshotBuffer[iPad]=nullptr;
|
||||
m_ScreenshotBuffer[iPad]=NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1492,13 +1492,13 @@ void CConsoleMinecraftApp::EnableDebugOverlay(bool enable,int iPad)
|
||||
|
||||
if(enable && !debugOverlayCreated)
|
||||
{
|
||||
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(nullptr);
|
||||
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL);
|
||||
|
||||
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
|
||||
WCHAR szResourceLocator[ LOCATOR_SIZE ];
|
||||
|
||||
wsprintfW(szResourceLocator,L"section://%X,%s#%s",c_ModuleHandle,L"media", L"media/");
|
||||
hr = XuiSceneCreate(szResourceLocator, L"xuiscene_debugoverlay.xur", nullptr, &m_hDebugOverlay);
|
||||
hr = XuiSceneCreate(szResourceLocator, L"xuiscene_debugoverlay.xur", NULL, &m_hDebugOverlay);
|
||||
debugContainerScene.AddChild(m_hDebugOverlay);
|
||||
debugContainerScene.SetShow(false);
|
||||
|
||||
@@ -1644,7 +1644,7 @@ WCHAR *CConsoleMinecraftApp::GetSceneName(EUIScene eScene,bool bAppendToName,boo
|
||||
return m_SceneName;
|
||||
}
|
||||
|
||||
HRESULT CConsoleMinecraftApp::NavigateToScene(int iPad,EUIScene eScene, void *initData /* = nullptr */, bool forceUsePad /*= false*/, BOOL bStayVisible /* = FALSE */, HXUIOBJ *phResultingScene /*= nullptr*/ )
|
||||
HRESULT CConsoleMinecraftApp::NavigateToScene(int iPad,EUIScene eScene, void *initData /* = NULL */, bool forceUsePad /*= false*/, BOOL bStayVisible /* = FALSE */, HXUIOBJ *phResultingScene /*= NULL*/ )
|
||||
{
|
||||
ASSERT(m_bDefaultTypefaceRegistered);
|
||||
ASSERT(m_bSkinLoaded);
|
||||
@@ -1690,7 +1690,7 @@ HRESULT CConsoleMinecraftApp::NavigateToScene(int iPad,EUIScene eScene, void *in
|
||||
}
|
||||
|
||||
// load from the .xzp file
|
||||
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(nullptr);
|
||||
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL);
|
||||
|
||||
HXUIOBJ hScene;
|
||||
HRESULT hr;
|
||||
@@ -1701,7 +1701,7 @@ HRESULT CConsoleMinecraftApp::NavigateToScene(int iPad,EUIScene eScene, void *in
|
||||
|
||||
// If the init data is null, put the player pad in there
|
||||
|
||||
if(initData==nullptr)
|
||||
if(initData==NULL)
|
||||
{
|
||||
initData = &iPad;
|
||||
}
|
||||
@@ -1843,7 +1843,7 @@ HRESULT CConsoleMinecraftApp::NavigateToScene(int iPad,EUIScene eScene, void *in
|
||||
m_bPauseMenuDisplayed[iPad] = true;
|
||||
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
if(pMinecraft != nullptr && pMinecraft->localgameModes[iPad] != nullptr )
|
||||
if(pMinecraft != NULL && pMinecraft->localgameModes[iPad] != NULL )
|
||||
{
|
||||
TutorialMode *gameMode = (TutorialMode *)pMinecraft->localgameModes[iPad];
|
||||
|
||||
@@ -1883,7 +1883,7 @@ HRESULT CConsoleMinecraftApp::NavigateToScene(int iPad,EUIScene eScene, void *in
|
||||
break;
|
||||
}
|
||||
|
||||
if(phResultingScene!=nullptr)
|
||||
if(phResultingScene!=NULL)
|
||||
{
|
||||
*phResultingScene=hScene;
|
||||
}
|
||||
@@ -1997,7 +1997,7 @@ HRESULT CConsoleMinecraftApp::CloseXuiScenes(int iPad, bool forceUsePad /*= fals
|
||||
}
|
||||
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
if(pMinecraft != nullptr && pMinecraft->localgameModes[iPad] != nullptr )
|
||||
if(pMinecraft != NULL && pMinecraft->localgameModes[iPad] != NULL )
|
||||
{
|
||||
TutorialMode *gameMode = (TutorialMode *)pMinecraft->localgameModes[iPad];
|
||||
|
||||
@@ -2132,7 +2132,7 @@ HRESULT CConsoleMinecraftApp::RemoveBackScene(int iPad)
|
||||
}
|
||||
}
|
||||
|
||||
XuiSceneSetBackScene(hBack, nullptr);
|
||||
XuiSceneSetBackScene(hBack, NULL);
|
||||
XuiDestroyObject( hBack );
|
||||
}
|
||||
}
|
||||
@@ -2163,7 +2163,7 @@ HRESULT CConsoleMinecraftApp::NavigateToHomeMenu()
|
||||
// unload any texture pack audio
|
||||
// if there is audio in use, clear out the audio, and unmount the pack
|
||||
TexturePack *pTexPack=Minecraft::GetInstance()->skins->getSelected();
|
||||
DLCTexturePack *pDLCTexPack=nullptr;
|
||||
DLCTexturePack *pDLCTexPack=NULL;
|
||||
|
||||
if(pTexPack->hasAudio())
|
||||
{
|
||||
@@ -2179,11 +2179,11 @@ HRESULT CConsoleMinecraftApp::NavigateToHomeMenu()
|
||||
// need to stop the streaming audio - by playing streaming audio from the default texture pack now
|
||||
pMinecraft->soundEngine->playStreaming(L"", 0, 0, 0, 0, 0);
|
||||
|
||||
if(pDLCTexPack->m_pStreamedWaveBank!=nullptr)
|
||||
if(pDLCTexPack->m_pStreamedWaveBank!=NULL)
|
||||
{
|
||||
pDLCTexPack->m_pStreamedWaveBank->Destroy();
|
||||
}
|
||||
if(pDLCTexPack->m_pSoundBank!=nullptr)
|
||||
if(pDLCTexPack->m_pSoundBank!=NULL)
|
||||
{
|
||||
pDLCTexPack->m_pSoundBank->Destroy();
|
||||
}
|
||||
@@ -2193,7 +2193,7 @@ HRESULT CConsoleMinecraftApp::NavigateToHomeMenu()
|
||||
|
||||
g_NetworkManager.ForceFriendsSessionRefresh();
|
||||
|
||||
hr = NavigateToScene(XUSER_INDEX_ANY,eUIScene_MainMenu,nullptr);
|
||||
hr = NavigateToScene(XUSER_INDEX_ANY,eUIScene_MainMenu,NULL);
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -2217,7 +2217,7 @@ void CConsoleMinecraftApp::SetChatTextDisplayed(int iPad, bool bVal)
|
||||
|
||||
void CConsoleMinecraftApp::ReloadChatScene(int iPad, bool bJoining /*= false*/, bool bForce /*= false*/)
|
||||
{
|
||||
if(m_hFirstChatScene[iPad] == nullptr || m_hCurrentChatScene[iPad] == nullptr) return;
|
||||
if(m_hFirstChatScene[iPad] == NULL || m_hCurrentChatScene[iPad] == NULL) return;
|
||||
|
||||
// Re-create the chat scene so it is the correct size. It starts without any visible lines.
|
||||
BOOL chatSceneVisible = FALSE;
|
||||
@@ -2236,7 +2236,7 @@ void CConsoleMinecraftApp::ReloadChatScene(int iPad, bool bJoining /*= false*/,
|
||||
{
|
||||
if( m_hFirstChatScene[iPad] != m_hCurrentChatScene[iPad] ) XuiSceneNavigateBack(m_hCurrentChatScene[iPad], m_hFirstChatScene[iPad],iPad);
|
||||
m_hCurrentChatScene[iPad] = m_hFirstChatScene[iPad];
|
||||
app.NavigateToScene(iPad,eUIComponent_Chat,nullptr,true);
|
||||
app.NavigateToScene(iPad,eUIComponent_Chat,NULL,true);
|
||||
|
||||
XuiElementSetShow( m_hCurrentChatScene[iPad], chatSceneVisible);
|
||||
}
|
||||
@@ -2298,7 +2298,7 @@ void CConsoleMinecraftApp::ReloadChatScene(int iPad, bool bJoining /*= false*/,
|
||||
|
||||
void CConsoleMinecraftApp::ReloadHudScene(int iPad, bool bJoining /*= false*/, bool bForce /*= false*/)
|
||||
{
|
||||
if(m_hFirstHudScene[iPad] == nullptr || m_hCurrentHudScene[iPad] == nullptr) return;
|
||||
if(m_hFirstHudScene[iPad] == NULL || m_hCurrentHudScene[iPad] == NULL) return;
|
||||
|
||||
// Re-create the hud scene so it is the correct size. It starts without any visible lines.
|
||||
BOOL hudSceneVisible = FALSE;
|
||||
@@ -2317,7 +2317,7 @@ void CConsoleMinecraftApp::ReloadHudScene(int iPad, bool bJoining /*= false*/, b
|
||||
{
|
||||
if( m_hFirstHudScene[iPad] != m_hCurrentHudScene[iPad] ) XuiSceneNavigateBack(m_hCurrentHudScene[iPad], m_hFirstHudScene[iPad],iPad);
|
||||
m_hCurrentHudScene[iPad] = m_hFirstHudScene[iPad];
|
||||
app.NavigateToScene(iPad,eUIScene_HUD,nullptr,true);
|
||||
app.NavigateToScene(iPad,eUIScene_HUD,NULL,true);
|
||||
|
||||
XuiElementSetShow( m_hCurrentHudScene[iPad], hudSceneVisible);
|
||||
}
|
||||
@@ -2333,7 +2333,7 @@ void CConsoleMinecraftApp::AdjustSplitscreenScene(HXUIOBJ hScene,D3DXVECTOR3 *pv
|
||||
XuiElementGetPosition(hScene,pvOriginalPosition);
|
||||
vec=*pvOriginalPosition;
|
||||
|
||||
if( pMinecraft->localplayers[iPad] != nullptr )
|
||||
if( pMinecraft->localplayers[iPad] != NULL )
|
||||
{
|
||||
switch( pMinecraft->localplayers[iPad]->m_iScreenSection)
|
||||
{
|
||||
@@ -2382,7 +2382,7 @@ void CConsoleMinecraftApp::AdjustSplitscreenScene(HXUIOBJ hScene,D3DXVECTOR3 *pv
|
||||
|
||||
vec=*pvOriginalPosition;
|
||||
|
||||
if( pMinecraft->localplayers[iPad] != nullptr )
|
||||
if( pMinecraft->localplayers[iPad] != NULL )
|
||||
{
|
||||
switch( pMinecraft->localplayers[iPad]->m_iScreenSection)
|
||||
{
|
||||
@@ -2449,7 +2449,7 @@ HRESULT CConsoleMinecraftApp::AdjustSplitscreenScene_PlayerChanged(HXUIOBJ hScen
|
||||
// 4J Stu - Return S_FALSE to inidicate that the scene has been closed
|
||||
return S_FALSE;
|
||||
}
|
||||
else if ( pMinecraft->localplayers[iPad] != nullptr )
|
||||
else if ( pMinecraft->localplayers[iPad] != NULL )
|
||||
{
|
||||
// we need to reposition the scenes since the players will have moved around
|
||||
|
||||
@@ -2510,7 +2510,7 @@ HRESULT CConsoleMinecraftApp::AdjustSplitscreenScene_PlayerChanged(HXUIOBJ hScen
|
||||
// 4J Stu - Return S_FALSE to inidicate that the scene has been closed
|
||||
return S_FALSE;
|
||||
}
|
||||
else if ( pMinecraft->localplayers[iPad] != nullptr )
|
||||
else if ( pMinecraft->localplayers[iPad] != NULL )
|
||||
{
|
||||
// we need to reposition the scenes since the players will have moved around
|
||||
|
||||
@@ -2560,7 +2560,7 @@ HRESULT CConsoleMinecraftApp::AdjustSplitscreenScene_PlayerChanged(HXUIOBJ hScen
|
||||
|
||||
void CConsoleMinecraftApp::StoreLaunchData()
|
||||
{
|
||||
LD_DEMO* pDemoData = nullptr;
|
||||
LD_DEMO* pDemoData = NULL;
|
||||
|
||||
|
||||
DWORD dwStatus = XGetLaunchDataSize( &m_dwLaunchDataSize );
|
||||
@@ -2578,7 +2578,7 @@ void CConsoleMinecraftApp::StoreLaunchData()
|
||||
|
||||
void CConsoleMinecraftApp::ExitGame()
|
||||
{
|
||||
if(m_pLaunchData!=nullptr)
|
||||
if(m_pLaunchData!=NULL)
|
||||
{
|
||||
LD_DEMO* pDemoData = (LD_DEMO*)( m_pLaunchData );
|
||||
XSetLaunchData( pDemoData, m_dwLaunchDataSize );
|
||||
@@ -2605,7 +2605,7 @@ void CConsoleMinecraftApp::FatalLoadError(void)
|
||||
|
||||
memset(&MessageBoxOverlap, 0, sizeof(MessageBoxOverlap));
|
||||
|
||||
//HANDLE messageBoxThread = CreateThread(nullptr, 0, &CMinecraftApp::ShowFatalLoadMessageBoxThreadProc, &MessageBoxOverlap, 0, nullptr);
|
||||
//HANDLE messageBoxThread = CreateThread(NULL, 0, &CMinecraftApp::ShowFatalLoadMessageBoxThreadProc, &MessageBoxOverlap, 0, NULL);
|
||||
//
|
||||
//WaitForSingleObjectEx(messageBoxThread, // handle to object
|
||||
// 20000, // time-out interval
|
||||
@@ -2775,7 +2775,7 @@ int CConsoleMinecraftApp::LoadLocalTMSFile(WCHAR *wchTMSFile)
|
||||
if(iTMSFileIndex!=-1)
|
||||
{
|
||||
// can we find the tms file in our xzp?
|
||||
if(TMSFileA[iTMSFileIndex].pbData==nullptr) // if we haven't already loaded it
|
||||
if(TMSFileA[iTMSFileIndex].pbData==NULL) // if we haven't already loaded it
|
||||
{
|
||||
swprintf(szResourceLocator, LOCATOR_SIZE, L"%ls#TMSFiles/%ls",m_wchTMSXZP, wchTMSFile);
|
||||
|
||||
@@ -2793,10 +2793,10 @@ void CConsoleMinecraftApp::FreeLocalTMSFiles(eTMSFileType eType)
|
||||
{
|
||||
if((eType==eTMSFileType_All) ||(eType==TMSFileA[i].eTMSType))
|
||||
{
|
||||
if(TMSFileA[i].pbData!=nullptr)
|
||||
if(TMSFileA[i].pbData!=NULL)
|
||||
{
|
||||
XuiFree(TMSFileA[i].pbData);
|
||||
TMSFileA[i].pbData=nullptr;
|
||||
TMSFileA[i].pbData=NULL;
|
||||
TMSFileA[i].uiSize=0;
|
||||
}
|
||||
}
|
||||
@@ -2807,148 +2807,148 @@ void CConsoleMinecraftApp::FreeLocalTMSFiles(eTMSFileType eType)
|
||||
TMS_FILE CConsoleMinecraftApp::TMSFileA[TMS_COUNT] =
|
||||
{
|
||||
// skin packs
|
||||
{ L"SP1", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0 , 0},
|
||||
{ L"SP2", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0 , 0},
|
||||
{ L"SP3", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0 , 0},
|
||||
{ L"SP4", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0 , 0},
|
||||
{ L"SP5", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0 , 0},
|
||||
{ L"SP6", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0 , 0},
|
||||
{ L"SPF", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0 , 0},
|
||||
{ L"SPB", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0 , 0},
|
||||
{ L"SPC", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0 , 0},
|
||||
{ L"SPZ", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0 , 0},
|
||||
{ L"SPM", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0 , 0},
|
||||
{ L"SPI", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0 , 0},
|
||||
{ L"SPG", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0 , 0},
|
||||
{ L"SP1", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
|
||||
{ L"SP2", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
|
||||
{ L"SP3", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
|
||||
{ L"SP4", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
|
||||
{ L"SP5", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
|
||||
{ L"SP6", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
|
||||
{ L"SPF", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
|
||||
{ L"SPB", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
|
||||
{ L"SPC", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
|
||||
{ L"SPZ", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
|
||||
{ L"SPM", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
|
||||
{ L"SPI", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
|
||||
{ L"SPG", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
|
||||
|
||||
//themes
|
||||
{ L"ThSt", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0 , 0},
|
||||
{ L"ThIr", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0 , 0},
|
||||
{ L"ThGo", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0 , 0},
|
||||
{ L"ThDi", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0 , 0},
|
||||
{ L"ThAw", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0 , 0},
|
||||
{ L"ThSt", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
|
||||
{ L"ThIr", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
|
||||
{ L"ThGo", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
|
||||
{ L"ThDi", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
|
||||
{ L"ThAw", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
|
||||
|
||||
//gamerpics
|
||||
{ L"GPAn", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, nullptr, 0, 0},
|
||||
{ L"GPCo", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, nullptr, 0, 0},
|
||||
{ L"GPEn", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, nullptr, 0, 0},
|
||||
{ L"GPFo", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, nullptr, 0, 0},
|
||||
{ L"GPTo", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, nullptr, 0, 0},
|
||||
{ L"GPBA", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, nullptr, 0, 0},
|
||||
{ L"GPFa", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, nullptr, 0, 0},
|
||||
{ L"GPME", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, nullptr, 0, 0},
|
||||
{ L"GPMF", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, nullptr, 0, 0},
|
||||
{ L"GPMM", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, nullptr, 0, 0},
|
||||
{ L"GPSE", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, nullptr, 0, 0},
|
||||
{ L"GPAn", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
|
||||
{ L"GPCo", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
|
||||
{ L"GPEn", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
|
||||
{ L"GPFo", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
|
||||
{ L"GPTo", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
|
||||
{ L"GPBA", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
|
||||
{ L"GPFa", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
|
||||
{ L"GPME", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
|
||||
{ L"GPMF", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
|
||||
{ L"GPMM", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
|
||||
{ L"GPSE", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
|
||||
|
||||
{ L"GPOr", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, nullptr, 0, 0},
|
||||
{ L"GPMi", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, nullptr, 0, 0},
|
||||
{ L"GPMB", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, nullptr, 0, 0},
|
||||
{ L"GPBr", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, nullptr, 0, 0},
|
||||
{ L"GPOr", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
|
||||
{ L"GPMi", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
|
||||
{ L"GPMB", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
|
||||
{ L"GPBr", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
|
||||
|
||||
{ L"GPM1", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0},
|
||||
{ L"GPM2", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0},
|
||||
{ L"GPM3", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0},
|
||||
{ L"GPM1", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0},
|
||||
{ L"GPM2", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0},
|
||||
{ L"GPM3", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0},
|
||||
|
||||
//avatar items
|
||||
{ L"AH_0001", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AH_0002", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AH_0003", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AH_0004", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AH_0005", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AH_0006", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AH_0007", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AH_0008", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AH_0009", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AH_0010", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AH_0011", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AH_0012", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AH_0013", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AH_0001", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AH_0002", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AH_0003", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AH_0004", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AH_0005", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AH_0006", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AH_0007", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AH_0008", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AH_0009", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AH_0010", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AH_0011", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AH_0012", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AH_0013", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
|
||||
{ L"AT_0001", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0002", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0003", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0004", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0005", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0006", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0007", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0008", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0009", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0010", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0011", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0012", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0013", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0014", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0015", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0016", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0017", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0018", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0019", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0020", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0021", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0022", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0023", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0024", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0025", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0026", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AT_0001", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0002", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0003", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0004", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0005", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0006", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0007", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0008", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0009", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0010", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0011", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0012", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0013", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0014", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0015", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0016", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0017", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0018", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0019", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0020", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0021", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0022", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0023", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0024", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0025", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AT_0026", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
|
||||
{ L"AP_0001", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0002", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0003", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0004", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0005", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0006", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0007", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0009", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0010", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0011", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0012", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0013", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0014", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0015", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0016", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0017", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0018", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0001", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0002", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0003", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0004", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0005", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0006", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0007", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0009", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0010", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0011", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0012", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0013", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0014", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0015", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0016", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0017", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0018", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
|
||||
{ L"AP_0019", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0020", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0021", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0022", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0023", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0024", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0025", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0026", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0027", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0028", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0029", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0030", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0031", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0032", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0033", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"AP_0019", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0020", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0021", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0022", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0023", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0024", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0025", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0026", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0027", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0028", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0029", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0030", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0031", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0032", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"AP_0033", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
|
||||
{ L"AA_0001", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0 , 0 },
|
||||
{ L"AA_0001", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0 },
|
||||
|
||||
// Mash-up Packs
|
||||
{ L"MPMA", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"MPMA", eFileExtensionType_DAT, eTMSFileType_TexturePack, nullptr, 0, 1024 },
|
||||
{ L"MPSR", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"MPSR", eFileExtensionType_DAT, eTMSFileType_TexturePack, nullptr, 0, 1025 },
|
||||
{ L"MPHA", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"MPHA", eFileExtensionType_DAT, eTMSFileType_TexturePack, nullptr, 0, 1026 },
|
||||
{ L"MPMA", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"MPMA", eFileExtensionType_DAT, eTMSFileType_TexturePack, NULL, 0, 1024 },
|
||||
{ L"MPSR", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"MPSR", eFileExtensionType_DAT, eTMSFileType_TexturePack, NULL, 0, 1025 },
|
||||
{ L"MPHA", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"MPHA", eFileExtensionType_DAT, eTMSFileType_TexturePack, NULL, 0, 1026 },
|
||||
|
||||
// Texture Packs
|
||||
{ L"TP01", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"TP01", eFileExtensionType_DAT, eTMSFileType_TexturePack, nullptr, 0, 2049 },
|
||||
{ L"TP02", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"TP02", eFileExtensionType_DAT, eTMSFileType_TexturePack, nullptr, 0, 2053 },
|
||||
{ L"TP04", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"TP04", eFileExtensionType_DAT, eTMSFileType_TexturePack, nullptr, 0, 2051 },
|
||||
{ L"TP05", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"TP05", eFileExtensionType_DAT, eTMSFileType_TexturePack, nullptr, 0, 2054 },
|
||||
{ L"TP06", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"TP06", eFileExtensionType_DAT, eTMSFileType_TexturePack, nullptr, 0, 2050 },
|
||||
{ L"TP07", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, nullptr, 0, 0 },
|
||||
{ L"TP07", eFileExtensionType_DAT, eTMSFileType_TexturePack, nullptr, 0, 2055 },
|
||||
{ L"TP01", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"TP01", eFileExtensionType_DAT, eTMSFileType_TexturePack, NULL, 0, 2049 },
|
||||
{ L"TP02", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"TP02", eFileExtensionType_DAT, eTMSFileType_TexturePack, NULL, 0, 2053 },
|
||||
{ L"TP04", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"TP04", eFileExtensionType_DAT, eTMSFileType_TexturePack, NULL, 0, 2051 },
|
||||
{ L"TP05", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"TP05", eFileExtensionType_DAT, eTMSFileType_TexturePack, NULL, 0, 2054 },
|
||||
{ L"TP06", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"TP06", eFileExtensionType_DAT, eTMSFileType_TexturePack, NULL, 0, 2050 },
|
||||
{ L"TP07", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
|
||||
{ L"TP07", eFileExtensionType_DAT, eTMSFileType_TexturePack, NULL, 0, 2055 },
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
void ReadBannedList(int iPad, eTMSAction action=static_cast<eTMSAction>(0), bool bCallback=false);
|
||||
void ReadBannedList(int iPad, eTMSAction action=(eTMSAction)0, bool bCallback=false);
|
||||
// void ReadXuidsFileFromTMS(int iPad,eTMSAction NextAction,bool bCallback);
|
||||
// void ReadDLCFileFromTMS(int iPad,eTMSAction NextAction, bool bCallback);
|
||||
|
||||
@@ -133,12 +133,12 @@ public:
|
||||
|
||||
WCHAR *GetSceneName(EUIScene eScene, bool bAppendToName,bool bSplitscreenScene);
|
||||
|
||||
virtual HRESULT NavigateToScene(int iPad,EUIScene eScene, void *initData = nullptr, bool forceUsePad = false, BOOL bStayVisible=FALSE, HXUIOBJ *phResultingScene=nullptr);
|
||||
virtual HRESULT NavigateToScene(int iPad,EUIScene eScene, void *initData = NULL, bool forceUsePad = false, BOOL bStayVisible=FALSE, HXUIOBJ *phResultingScene=NULL);
|
||||
virtual HRESULT NavigateBack(int iPad, bool forceUsePad = false,EUIScene eScene = eUIScene_COUNT);
|
||||
virtual HRESULT TutorialSceneNavigateBack(int iPad, bool forceUsePad = false);
|
||||
virtual HRESULT CloseXuiScenes(int iPad, bool forceUsePad = false);
|
||||
virtual HRESULT CloseAllPlayersXuiScenes();
|
||||
virtual HRESULT CloseXuiScenesAndNavigateToScene(int iPad,EUIScene eScene, void *initData=nullptr, bool forceUsePad = false);
|
||||
virtual HRESULT CloseXuiScenesAndNavigateToScene(int iPad,EUIScene eScene, void *initData=NULL, bool forceUsePad = false);
|
||||
virtual HRESULT RemoveBackScene(int iPad);
|
||||
virtual HRESULT NavigateToHomeMenu();
|
||||
D3DXVECTOR3 GetElementScreenPosition(HXUIOBJ hObj);
|
||||
|
||||
@@ -285,7 +285,7 @@ HRESULT InitD3D( IDirect3DDevice9 **ppDevice,
|
||||
return pD3D->CreateDevice(
|
||||
0,
|
||||
D3DDEVTYPE_HAL,
|
||||
nullptr,
|
||||
NULL,
|
||||
D3DCREATE_HARDWARE_VERTEXPROCESSING|D3DCREATE_BUFFER_2_FRAMES,
|
||||
pd3dPP,
|
||||
ppDevice );
|
||||
@@ -399,7 +399,7 @@ int __cdecl main()
|
||||
}
|
||||
|
||||
// Create an XAudio2 mastering voice (utilized by XHV2 when voice data is mixed to main speakers)
|
||||
hr = g_pXAudio2->CreateMasteringVoice(&g_pXAudio2MasteringVoice, XAUDIO2_DEFAULT_CHANNELS, XAUDIO2_DEFAULT_SAMPLERATE, 0, 0, nullptr);
|
||||
hr = g_pXAudio2->CreateMasteringVoice(&g_pXAudio2MasteringVoice, XAUDIO2_DEFAULT_CHANNELS, XAUDIO2_DEFAULT_SAMPLERATE, 0, 0, NULL);
|
||||
if ( FAILED( hr ) )
|
||||
{
|
||||
app.DebugPrintf( "Creating XAudio2 mastering voice failed (err = 0x%08x)!\n", hr );
|
||||
@@ -671,7 +671,7 @@ int __cdecl main()
|
||||
else
|
||||
{
|
||||
MemSect(28);
|
||||
pMinecraft->soundEngine->tick(nullptr, 0.0f);
|
||||
pMinecraft->soundEngine->tick(NULL, 0.0f);
|
||||
MemSect(0);
|
||||
pMinecraft->textures->tick(true,false);
|
||||
IntCache::Reset();
|
||||
|
||||
@@ -170,7 +170,7 @@ void ConsoleUIController::HandleDLCInstalled(int iPad)
|
||||
CustomMessage_DLCInstalled( &xuiMsg );
|
||||
|
||||
// The DLC message should only happen in the main menus, so it should go to the default xui scenes
|
||||
bool bNotInGame=(Minecraft::GetInstance()->level==nullptr);
|
||||
bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
|
||||
|
||||
if(bNotInGame)
|
||||
{
|
||||
@@ -188,7 +188,7 @@ void ConsoleUIController::HandleTMSDLCFileRetrieved(int iPad)
|
||||
XUIMessage xuiMsg;
|
||||
CustomMessage_TMS_DLCFileRetrieved( &xuiMsg );
|
||||
|
||||
bool bNotInGame=(Minecraft::GetInstance()->level==nullptr);
|
||||
bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
|
||||
|
||||
if(bNotInGame)
|
||||
{
|
||||
@@ -204,7 +204,7 @@ void ConsoleUIController::HandleTMSBanFileRetrieved(int iPad)
|
||||
{
|
||||
XUIMessage xuiMsg;
|
||||
CustomMessage_TMS_BanFileRetrieved( &xuiMsg );
|
||||
bool bNotInGame=(Minecraft::GetInstance()->level==nullptr);
|
||||
bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
|
||||
|
||||
if(bNotInGame)
|
||||
{
|
||||
@@ -319,7 +319,7 @@ C4JStorage::EMessageResult ConsoleUIController::RequestMessageBox(UINT uiTitle,
|
||||
return StorageManager.RequestMessageBox(uiTitle, uiText, uiOptionA, uiOptionC, dwPad, Func, lpParam, pStringTable, pwchFormatString, dwFocusButton);
|
||||
}
|
||||
|
||||
C4JStorage::EMessageResult ConsoleUIController::RequestUGCMessageBox(UINT title/* = -1 */, UINT message/* = -1 */, int iPad/* = -1*/, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)/* = nullptr*/, LPVOID lpParam/* = nullptr*/)
|
||||
C4JStorage::EMessageResult ConsoleUIController::RequestUGCMessageBox(UINT title/* = -1 */, UINT message/* = -1 */, int iPad/* = -1*/, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)/* = NULL*/, LPVOID lpParam/* = NULL*/)
|
||||
{
|
||||
// Default title / messages
|
||||
if (title == -1)
|
||||
@@ -337,5 +337,5 @@ C4JStorage::EMessageResult ConsoleUIController::RequestUGCMessageBox(UINT title/
|
||||
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
return ui.RequestMessageBox(title, message, uiIDA, 1, iPad, Func, lpParam, app.GetStringTable(), nullptr, 0, false);
|
||||
return ui.RequestMessageBox(title, message, uiIDA, 1, iPad, Func, lpParam, app.GetStringTable(), NULL, 0, false);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ public:
|
||||
virtual void StartReloadSkinThread();
|
||||
virtual bool IsReloadingSkin();
|
||||
virtual void CleanUpSkinReload();
|
||||
virtual bool NavigateToScene(int iPad, EUIScene scene, void *initData = nullptr, EUILayer layer = eUILayer_Scene, EUIGroup group = eUIGroup_PAD);
|
||||
virtual bool NavigateToScene(int iPad, EUIScene scene, void *initData = NULL, EUILayer layer = eUILayer_Scene, EUIGroup group = eUIGroup_PAD);
|
||||
virtual bool NavigateBack(int iPad, bool forceUsePad = false, EUIScene eScene = eUIScene_COUNT, EUILayer eLayer = eUILayer_COUNT);
|
||||
virtual void NavigateToHomeMenu();
|
||||
virtual void CloseUIScenes(int iPad, bool forceIPad = false);
|
||||
@@ -71,9 +71,9 @@ public:
|
||||
virtual void SetWinUserIndex(unsigned int iPad);
|
||||
|
||||
virtual C4JStorage::EMessageResult RequestMessageBox(UINT uiTitle, UINT uiText, UINT *uiOptionA,UINT uiOptionC, DWORD dwPad=XUSER_INDEX_ANY,
|
||||
int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)=nullptr,LPVOID lpParam=nullptr, CXuiStringTable *pStringTable=nullptr, WCHAR *pwchFormatString=nullptr,DWORD dwFocusButton=0, bool bIsError = true);
|
||||
int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)=NULL,LPVOID lpParam=NULL, CXuiStringTable *pStringTable=NULL, WCHAR *pwchFormatString=NULL,DWORD dwFocusButton=0, bool bIsError = true);
|
||||
|
||||
C4JStorage::EMessageResult RequestUGCMessageBox(UINT title = -1, UINT message = -1, int iPad = -1, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult) = nullptr, LPVOID lpParam = nullptr);
|
||||
C4JStorage::EMessageResult RequestUGCMessageBox(UINT title = -1, UINT message = -1, int iPad = -1, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult) = NULL, LPVOID lpParam = NULL);
|
||||
};
|
||||
|
||||
extern ConsoleUIController ui;
|
||||
Reference in New Issue
Block a user