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:
Loki Rautio
2026-03-07 21:12:22 -06:00
parent a9be52c41a
commit 087b7e7abf
1373 changed files with 19449 additions and 19903 deletions

View File

@@ -24,14 +24,14 @@ DLCPack::DLCPack(const wstring &name,DWORD dwLicenseMask)
m_isCorrupt = false;
m_packId = 0;
m_packVersion = 0;
m_parentPack = nullptr;
m_parentPack = NULL;
m_dlcMountIndex = -1;
#ifdef _XBOX
m_dlcDeviceID = XCONTENTDEVICE_ANY;
#endif
// This pointer is for all the data used for this pack, so deleting it invalidates ALL of it's children.
m_data = nullptr;
m_data = NULL;
}
#ifdef _XBOX_ONE
@@ -44,11 +44,11 @@ DLCPack::DLCPack(const wstring &name,const wstring &productID,DWORD dwLicenseMas
m_isCorrupt = false;
m_packId = 0;
m_packVersion = 0;
m_parentPack = nullptr;
m_parentPack = NULL;
m_dlcMountIndex = -1;
// This pointer is for all the data used for this pack, so deleting it invalidates ALL of it's children.
m_data = nullptr;
m_data = NULL;
}
#endif
@@ -76,7 +76,7 @@ DLCPack::~DLCPack()
wprintf(L"Deleting data for DLC pack %ls\n", m_packName.c_str());
#endif
// For the same reason, don't delete data pointer for any child pack as it just points to a region within the parent pack that has already been freed
if( m_parentPack == nullptr )
if( m_parentPack == NULL )
{
delete [] m_data;
}
@@ -85,7 +85,7 @@ DLCPack::~DLCPack()
DWORD DLCPack::GetDLCMountIndex()
{
if(m_parentPack != nullptr)
if(m_parentPack != NULL)
{
return m_parentPack->GetDLCMountIndex();
}
@@ -94,7 +94,7 @@ DWORD DLCPack::GetDLCMountIndex()
XCONTENTDEVICEID DLCPack::GetDLCDeviceID()
{
if(m_parentPack != nullptr )
if(m_parentPack != NULL )
{
return m_parentPack->GetDLCDeviceID();
}
@@ -156,7 +156,7 @@ void DLCPack::addParameter(DLCManager::EDLCParameterType type, const wstring &va
m_dataPath = value;
break;
default:
m_parameters[static_cast<int>(type)] = value;
m_parameters[(int)type] = value;
break;
}
}
@@ -187,7 +187,7 @@ bool DLCPack::getParameterAsUInt(DLCManager::EDLCParameterType type, unsigned in
DLCFile *DLCPack::addFile(DLCManager::EDLCType type, const wstring &path)
{
DLCFile *newFile = nullptr;
DLCFile *newFile = NULL;
switch(type)
{
@@ -243,7 +243,7 @@ DLCFile *DLCPack::addFile(DLCManager::EDLCType type, const wstring &path)
break;
};
if( newFile != nullptr )
if( newFile != NULL )
{
m_files[newFile->getType()].push_back(newFile);
}
@@ -252,7 +252,7 @@ DLCFile *DLCPack::addFile(DLCManager::EDLCType type, const wstring &path)
}
// MGH - added this comp func, as the embedded func in find_if was confusing the PS3 compiler
static const wstring *g_pathCmpString = nullptr;
static const wstring *g_pathCmpString = NULL;
static bool pathCmp(DLCFile *val)
{
return (g_pathCmpString->compare(val->getPath()) == 0);
@@ -263,7 +263,7 @@ bool DLCPack::doesPackContainFile(DLCManager::EDLCType type, const wstring &path
bool hasFile = false;
if(type == DLCManager::e_DLCType_All)
{
for(DLCManager::EDLCType currentType = static_cast<DLCManager::EDLCType>(0); currentType < DLCManager::e_DLCType_Max; currentType = static_cast<DLCManager::EDLCType>(currentType + 1))
for(DLCManager::EDLCType currentType = (DLCManager::EDLCType)0; currentType < DLCManager::e_DLCType_Max; currentType = (DLCManager::EDLCType)(currentType + 1))
{
hasFile = doesPackContainFile(currentType,path);
if(hasFile) break;
@@ -284,13 +284,13 @@ bool DLCPack::doesPackContainFile(DLCManager::EDLCType type, const wstring &path
DLCFile *DLCPack::getFile(DLCManager::EDLCType type, DWORD index)
{
DLCFile *file = nullptr;
DLCFile *file = NULL;
if(type == DLCManager::e_DLCType_All)
{
for(DLCManager::EDLCType currentType = static_cast<DLCManager::EDLCType>(0); currentType < DLCManager::e_DLCType_Max; currentType = static_cast<DLCManager::EDLCType>(currentType + 1))
for(DLCManager::EDLCType currentType = (DLCManager::EDLCType)0; currentType < DLCManager::e_DLCType_Max; currentType = (DLCManager::EDLCType)(currentType + 1))
{
file = getFile(currentType,index);
if(file != nullptr) break;
if(file != NULL) break;
}
}
else
@@ -306,13 +306,13 @@ DLCFile *DLCPack::getFile(DLCManager::EDLCType type, DWORD index)
DLCFile *DLCPack::getFile(DLCManager::EDLCType type, const wstring &path)
{
DLCFile *file = nullptr;
DLCFile *file = NULL;
if(type == DLCManager::e_DLCType_All)
{
for(DLCManager::EDLCType currentType = static_cast<DLCManager::EDLCType>(0); currentType < DLCManager::e_DLCType_Max; currentType = static_cast<DLCManager::EDLCType>(currentType + 1))
for(DLCManager::EDLCType currentType = (DLCManager::EDLCType)0; currentType < DLCManager::e_DLCType_Max; currentType = (DLCManager::EDLCType)(currentType + 1))
{
file = getFile(currentType,path);
if(file != nullptr) break;
if(file != NULL) break;
}
}
else
@@ -323,7 +323,7 @@ DLCFile *DLCPack::getFile(DLCManager::EDLCType type, const wstring &path)
if(it == m_files[type].end())
{
// Not found
file = nullptr;
file = NULL;
}
else
{
@@ -346,11 +346,11 @@ DWORD DLCPack::getDLCItemsCount(DLCManager::EDLCType type /*= DLCManager::e_DLCT
case DLCManager::e_DLCType_All:
for(int i = 0; i < DLCManager::e_DLCType_Max; ++i)
{
count += getDLCItemsCount(static_cast<DLCManager::EDLCType>(i));
count += getDLCItemsCount((DLCManager::EDLCType)i);
}
break;
default:
count = static_cast<DWORD>(m_files[(int)type].size());
count = (DWORD)m_files[(int)type].size();
break;
};
return count;
@@ -420,12 +420,12 @@ void DLCPack::UpdateLanguage()
{
// find the language file
DLCManager::e_DLCType_LocalisationData;
DLCFile *file = nullptr;
DLCFile *file = NULL;
if(m_files[DLCManager::e_DLCType_LocalisationData].size() > 0)
{
file = m_files[DLCManager::e_DLCType_LocalisationData][0];
DLCLocalisationFile *localisationFile = static_cast<DLCLocalisationFile *>(getFile(DLCManager::e_DLCType_LocalisationData, L"languages.loc"));
DLCLocalisationFile *localisationFile = (DLCLocalisationFile *)getFile(DLCManager::e_DLCType_LocalisationData, L"languages.loc");
StringTable *strTable = localisationFile->getStringTable();
strTable->ReloadStringTable();
}