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:
@@ -58,7 +58,7 @@ bool CSocialManager::IsTitleAllowedToPostImages() { return false; }
|
||||
|
||||
bool CSocialManager::PostLinkToSocialNetwork(ESocialNetwork eSocialNetwork, DWORD dwUserIndex, bool bUsingKinect) { return false; }
|
||||
bool CSocialManager::PostImageToSocialNetwork(ESocialNetwork eSocialNetwork, DWORD dwUserIndex, bool bUsingKinect) { return false; }
|
||||
CSocialManager* CSocialManager::Instance() { return nullptr; }
|
||||
CSocialManager* CSocialManager::Instance() { return NULL; }
|
||||
void CSocialManager::SetSocialPostText(LPCWSTR Title, LPCWSTR Caption, LPCWSTR Desc) {};
|
||||
|
||||
DWORD XShowPartyUI(DWORD dwUserIndex) { return 0; }
|
||||
@@ -68,7 +68,7 @@ DWORD XContentGetThumbnail(DWORD dwUserIndex, const XCONTENT_DATA* pContentData,
|
||||
void XShowAchievementsUI(int i) {}
|
||||
DWORD XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE Mode) { return 0; }
|
||||
|
||||
#if !defined(_DURANGO) && !defined(_WIN64)
|
||||
#ifndef _DURANGO
|
||||
void PIXAddNamedCounter(int a, const char* b, ...) {}
|
||||
//#define PS3_USE_PIX_EVENTS
|
||||
//#define PS4_USE_PIX_EVENTS
|
||||
@@ -126,9 +126,7 @@ void PIXEndNamedEvent()
|
||||
#endif
|
||||
}
|
||||
void PIXSetMarkerDeprecated(int a, const char* b, ...) {}
|
||||
#endif
|
||||
|
||||
#if 0//__PSVITA__
|
||||
#else
|
||||
// 4J Stu - Removed this implementation in favour of a macro that will convert our string format
|
||||
// conversion at compile time rather than at runtime
|
||||
//void PIXBeginNamedEvent(int a, char *b, ...)
|
||||
@@ -161,7 +159,7 @@ void PIXSetMarkerDeprecated(int a, const char* b, ...) {}
|
||||
//}
|
||||
#endif
|
||||
|
||||
// void *D3DXBUFFER::GetBufferPointer() { return nullptr; }
|
||||
// void *D3DXBUFFER::GetBufferPointer() { return NULL; }
|
||||
// int D3DXBUFFER::GetBufferSize() { return 0; }
|
||||
// void D3DXBUFFER::Release() {}
|
||||
|
||||
@@ -255,16 +253,16 @@ IQNetPlayer* IQNet::GetLocalPlayerByUserIndex(DWORD dwUserIndex)
|
||||
!m_player[dwUserIndex].m_isRemote &&
|
||||
Win64_IsActivePlayer(&m_player[dwUserIndex], dwUserIndex))
|
||||
return &m_player[dwUserIndex];
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
if (dwUserIndex != 0)
|
||||
return nullptr;
|
||||
return NULL;
|
||||
for (DWORD i = 0; i < s_playerCount; i++)
|
||||
{
|
||||
if (!m_player[i].m_isRemote && Win64_IsActivePlayer(&m_player[i], i))
|
||||
return &m_player[i];
|
||||
}
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
static bool Win64_IsActivePlayer(IQNetPlayer * p, DWORD index)
|
||||
{
|
||||
@@ -291,7 +289,7 @@ IQNetPlayer* IQNet::GetPlayerBySmallId(BYTE SmallId)
|
||||
{
|
||||
if (m_player[i].m_smallId == SmallId && Win64_IsActivePlayer(&m_player[i], i)) return &m_player[i];
|
||||
}
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
IQNetPlayer* IQNet::GetPlayerByXuid(PlayerUID xuid)
|
||||
{
|
||||
@@ -303,7 +301,7 @@ IQNetPlayer* IQNet::GetPlayerByXuid(PlayerUID xuid)
|
||||
if (m_player[i].GetXuid() == xuid)
|
||||
return &m_player[i];
|
||||
}
|
||||
// Keep existing stub behavior: return host slot instead of nullptr on miss.
|
||||
// Keep existing stub behavior: return host slot instead of NULL on miss.
|
||||
return &m_player[0];
|
||||
}
|
||||
DWORD IQNet::GetPlayerCount()
|
||||
@@ -332,7 +330,7 @@ void IQNet::ClientJoinGame()
|
||||
|
||||
for (int i = 0; i < MINECRAFT_NET_MAX_PLAYERS; i++)
|
||||
{
|
||||
m_player[i].m_smallId = static_cast<BYTE>(i);
|
||||
m_player[i].m_smallId = (BYTE)i;
|
||||
m_player[i].m_isRemote = true;
|
||||
m_player[i].m_isHostPlayer = false;
|
||||
m_player[i].m_resolvedXuid = INVALID_XUID;
|
||||
@@ -347,7 +345,7 @@ void IQNet::EndGame()
|
||||
s_playerCount = 1;
|
||||
for (int i = 0; i < MINECRAFT_NET_MAX_PLAYERS; i++)
|
||||
{
|
||||
m_player[i].m_smallId = static_cast<BYTE>(i);
|
||||
m_player[i].m_smallId = (BYTE)i;
|
||||
m_player[i].m_isRemote = false;
|
||||
m_player[i].m_isHostPlayer = false;
|
||||
m_player[i].m_resolvedXuid = INVALID_XUID;
|
||||
@@ -455,11 +453,11 @@ HRESULT XMemCreateCompressionContext(
|
||||
)
|
||||
{
|
||||
/*
|
||||
COMPRESSOR_HANDLE Compressor = nullptr;
|
||||
COMPRESSOR_HANDLE Compressor = NULL;
|
||||
|
||||
HRESULT hr = CreateCompressor(
|
||||
COMPRESS_ALGORITHM_XPRESS_HUFF, // Compression Algorithm
|
||||
nullptr, // Optional allocation routine
|
||||
NULL, // Optional allocation routine
|
||||
&Compressor); // Handle
|
||||
|
||||
pContext = (XMEMDECOMPRESSION_CONTEXT *)Compressor;
|
||||
@@ -476,11 +474,11 @@ HRESULT XMemCreateDecompressionContext(
|
||||
)
|
||||
{
|
||||
/*
|
||||
DECOMPRESSOR_HANDLE Decompressor = nullptr;
|
||||
DECOMPRESSOR_HANDLE Decompressor = NULL;
|
||||
|
||||
HRESULT hr = CreateDecompressor(
|
||||
COMPRESS_ALGORITHM_XPRESS_HUFF, // Compression Algorithm
|
||||
nullptr, // Optional allocation routine
|
||||
NULL, // Optional allocation routine
|
||||
&Decompressor); // Handle
|
||||
|
||||
pContext = (XMEMDECOMPRESSION_CONTEXT *)Decompressor;
|
||||
@@ -530,7 +528,7 @@ void C_4JProfile::Initialise(DWORD dwTitleID,
|
||||
ZeroMemory(profileData[i], sizeof(byte) * iGameDefinedDataSizeX4 / 4);
|
||||
|
||||
// Set some sane initial values!
|
||||
GAME_SETTINGS* pGameSettings = static_cast<GAME_SETTINGS *>(profileData[i]);
|
||||
GAME_SETTINGS* pGameSettings = (GAME_SETTINGS*)profileData[i];
|
||||
pGameSettings->ucMenuSensitivity = 100; //eGameSetting_Sensitivity_InMenu
|
||||
pGameSettings->ucInterfaceOpacity = 80; //eGameSetting_Sensitivity_InMenu
|
||||
pGameSettings->usBitmaskValues |= 0x0200; //eGameSetting_DisplaySplitscreenGamertags - on
|
||||
@@ -647,8 +645,8 @@ bool C_4JProfile::LocaleIsUSorCanada(void) { return false; }
|
||||
HRESULT C_4JProfile::GetLiveConnectionStatus() { return S_OK; }
|
||||
bool C_4JProfile::IsSystemUIDisplayed() { return false; }
|
||||
void C_4JProfile::SetProfileReadErrorCallback(void (*Func)(LPVOID), LPVOID lpParam) {}
|
||||
int(*defaultOptionsCallback)(LPVOID, C_4JProfile::PROFILESETTINGS*, const int iPad) = nullptr;
|
||||
LPVOID lpProfileParam = nullptr;
|
||||
int(*defaultOptionsCallback)(LPVOID, C_4JProfile::PROFILESETTINGS*, const int iPad) = NULL;
|
||||
LPVOID lpProfileParam = NULL;
|
||||
int C_4JProfile::SetDefaultOptionsCallback(int(*Func)(LPVOID, PROFILESETTINGS*, const int iPad), LPVOID lpParam)
|
||||
{
|
||||
defaultOptionsCallback = Func;
|
||||
@@ -726,7 +724,7 @@ void C4JStorage::GetSaveCacheFileInfo(DWORD dwFile, XCONTENT_DATA & xCont
|
||||
void C4JStorage::GetSaveCacheFileInfo(DWORD dwFile, PBYTE * ppbImageData, DWORD * pdwImageBytes) {}
|
||||
C4JStorage::ESaveGameState C4JStorage::LoadSaveData(PSAVE_INFO pSaveInfo, int(*Func)(LPVOID lpParam, const bool, const bool), LPVOID lpParam) { return C4JStorage::ESaveGame_Idle; }
|
||||
C4JStorage::EDeleteGameStatus C4JStorage::DeleteSaveData(PSAVE_INFO pSaveInfo, int(*Func)(LPVOID lpParam, const bool), LPVOID lpParam) { return C4JStorage::EDeleteGame_Idle; }
|
||||
PSAVE_DETAILS C4JStorage::ReturnSavesInfo() { return nullptr; }
|
||||
PSAVE_DETAILS C4JStorage::ReturnSavesInfo() { return NULL; }
|
||||
|
||||
void C4JStorage::RegisterMarketplaceCountsCallback(int (*Func)(LPVOID lpParam, C4JStorage::DLC_TMS_DETAILS*, int), LPVOID lpParam) {}
|
||||
void C4JStorage::SetDLCPackageRoot(char* pszDLCRoot) {}
|
||||
@@ -748,7 +746,7 @@ void C4JStorage::StoreTMSPathName(WCHAR * pwchName) {}
|
||||
unsigned int C4JStorage::CRC(unsigned char* buf, int len) { return 0; }
|
||||
|
||||
struct PTMSPP_FILEDATA;
|
||||
C4JStorage::ETMSStatus C4JStorage::TMSPP_ReadFile(int iPad, C4JStorage::eGlobalStorage eStorageFacility, C4JStorage::eTMS_FILETYPEVAL eFileTypeVal, LPCSTR szFilename, int(*Func)(LPVOID, int, int, PTMSPP_FILEDATA, LPCSTR)/*=nullptr*/, LPVOID lpParam/*=nullptr*/, int iUserData/*=0*/) { return C4JStorage::ETMSStatus_Idle; }
|
||||
C4JStorage::ETMSStatus C4JStorage::TMSPP_ReadFile(int iPad, C4JStorage::eGlobalStorage eStorageFacility, C4JStorage::eTMS_FILETYPEVAL eFileTypeVal, LPCSTR szFilename, int(*Func)(LPVOID, int, int, PTMSPP_FILEDATA, LPCSTR)/*=NULL*/, LPVOID lpParam/*=NULL*/, int iUserData/*=0*/) { return C4JStorage::ETMSStatus_Idle; }
|
||||
#endif // _WINDOWS64
|
||||
|
||||
#endif // __PS3__
|
||||
|
||||
Reference in New Issue
Block a user