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

@@ -8,7 +8,7 @@
DLCAudioFile::DLCAudioFile(const wstring &path) : DLCFile(DLCManager::e_DLCType_Audio,path)
{
m_pbData = nullptr;
m_pbData = NULL;
m_dwBytes = 0;
}
@@ -40,7 +40,7 @@ DLCAudioFile::EAudioParameterType DLCAudioFile::getParameterType(const wstring &
{
if(paramName.compare(wchTypeNamesA[i]) == 0)
{
type = static_cast<EAudioParameterType>(i);
type = (EAudioParameterType)i;
break;
}
}
@@ -87,7 +87,7 @@ void DLCAudioFile::addParameter(EAudioType type, EAudioParameterType ptype, cons
{
i++;
}
size_t iLast=creditValue.find_last_of(L" ", i);
int iLast=(int)creditValue.find_last_of(L" ",i);
switch(XGetLanguage())
{
case XC_LANGUAGE_JAPANESE:
@@ -96,7 +96,7 @@ void DLCAudioFile::addParameter(EAudioType type, EAudioParameterType ptype, cons
iLast = maximumChars;
break;
default:
iLast=creditValue.find_last_of(L" ", i);
iLast=(int)creditValue.find_last_of(L" ",i);
break;
}
@@ -133,7 +133,7 @@ bool DLCAudioFile::processDLCDataFile(PBYTE pbData, DWORD dwLength)
if(uiVersion < CURRENT_AUDIO_VERSION_NUM)
{
if(pbData!=nullptr) delete [] pbData;
if(pbData!=NULL) delete [] pbData;
app.DebugPrintf("DLC version of %d is too old to be read\n", uiVersion);
return false;
}
@@ -145,7 +145,7 @@ bool DLCAudioFile::processDLCDataFile(PBYTE pbData, DWORD dwLength)
for(unsigned int i=0;i<uiParameterTypeCount;i++)
{
// Map DLC strings to application strings, then store the DLC index mapping to application index
wstring parameterName(static_cast<WCHAR *>(pParams->wchData));
wstring parameterName((WCHAR *)pParams->wchData);
EAudioParameterType type = getParameterType(parameterName);
if( type != e_AudioParamType_Invalid )
{
@@ -169,7 +169,7 @@ bool DLCAudioFile::processDLCDataFile(PBYTE pbData, DWORD dwLength)
for(unsigned int i=0;i<uiFileCount;i++)
{
EAudioType type = static_cast<EAudioType>(pFile->dwType);
EAudioType type = (EAudioType)pFile->dwType;
// Params
unsigned int uiParameterCount=*(unsigned int *)pbTemp;
pbTemp+=sizeof(int);
@@ -182,7 +182,7 @@ bool DLCAudioFile::processDLCDataFile(PBYTE pbData, DWORD dwLength)
if(it != parameterMapping.end() )
{
addParameter(type,static_cast<EAudioParameterType>(pParams->dwType),(WCHAR *)pParams->wchData);
addParameter(type,(EAudioParameterType)pParams->dwType,(WCHAR *)pParams->wchData);
}
pbTemp+=sizeof(C4JStorage::DLC_FILE_PARAM)+(sizeof(WCHAR)*pParams->dwWchCount);
pParams = (C4JStorage::DLC_FILE_PARAM *)pbTemp;
@@ -198,7 +198,7 @@ bool DLCAudioFile::processDLCDataFile(PBYTE pbData, DWORD dwLength)
return true;
}
int DLCAudioFile::GetCountofType(EAudioType eType)
int DLCAudioFile::GetCountofType(DLCAudioFile::EAudioType eType)
{
return m_parameters[eType].size();
}