Replace all windows types

This commit is contained in:
murdle
2026-03-01 20:06:25 +02:00
parent fd7d6b7a35
commit 5b984ad854
790 changed files with 11101 additions and 9193 deletions

View File

@@ -12,7 +12,7 @@ DLCAudioFile::DLCAudioFile(const wstring &path) : DLCFile(DLCManager::e_DLCType_
m_dwBytes = 0;
}
void DLCAudioFile::addData(PBYTE pbData, DWORD dwBytes)
void DLCAudioFile::addData(uint8_t* pbData, unsigned long dwBytes)
{
m_pbData = pbData;
m_dwBytes = dwBytes;
@@ -20,13 +20,13 @@ void DLCAudioFile::addData(PBYTE pbData, DWORD dwBytes)
processDLCDataFile(pbData,dwBytes);
}
PBYTE DLCAudioFile::getData(DWORD &dwBytes)
uint8_t* DLCAudioFile::getData(unsigned long &dwBytes)
{
dwBytes = m_dwBytes;
return m_pbData;
}
WCHAR *DLCAudioFile::wchTypeNamesA[]=
wchar_t *DLCAudioFile::wchTypeNamesA[]=
{
L"CUENAME",
L"CREDIT",
@@ -36,7 +36,7 @@ DLCAudioFile::EAudioParameterType DLCAudioFile::getParameterType(const wstring &
{
EAudioParameterType type = e_AudioParamType_Invalid;
for(DWORD i = 0; i < e_AudioParamType_Max; ++i)
for(unsigned long i = 0; i < e_AudioParamType_Max; ++i)
{
if(paramName.compare(wchTypeNamesA[i]) == 0)
{
@@ -120,7 +120,7 @@ void DLCAudioFile::addParameter(EAudioType type, EAudioParameterType ptype, cons
}
}
bool DLCAudioFile::processDLCDataFile(PBYTE pbData, DWORD dwLength)
bool DLCAudioFile::processDLCDataFile(uint8_t* pbData, unsigned long dwLength)
{
unordered_map<int, EAudioParameterType> parameterMapping;
unsigned int uiCurrentByte=0;
@@ -145,26 +145,26 @@ 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((WCHAR *)pParams->wchData);
wstring parameterName((wchar_t *)pParams->wchData);
EAudioParameterType type = getParameterType(parameterName);
if( type != e_AudioParamType_Invalid )
{
parameterMapping[pParams->dwType] = type;
}
uiCurrentByte+= sizeof(C4JStorage::DLC_FILE_PARAM)+(pParams->dwWchCount*sizeof(WCHAR));
uiCurrentByte+= sizeof(C4JStorage::DLC_FILE_PARAM)+(pParams->dwWchCount*sizeof(wchar_t));
pParams = (C4JStorage::DLC_FILE_PARAM *)&pbData[uiCurrentByte];
}
unsigned int uiFileCount=*(unsigned int *)&pbData[uiCurrentByte];
uiCurrentByte+=sizeof(int);
C4JStorage::DLC_FILE_DETAILS *pFile = (C4JStorage::DLC_FILE_DETAILS *)&pbData[uiCurrentByte];
DWORD dwTemp=uiCurrentByte;
unsigned long dwTemp=uiCurrentByte;
for(unsigned int i=0;i<uiFileCount;i++)
{
dwTemp+=sizeof(C4JStorage::DLC_FILE_DETAILS)+pFile->dwWchCount*sizeof(WCHAR);
dwTemp+=sizeof(C4JStorage::DLC_FILE_DETAILS)+pFile->dwWchCount*sizeof(wchar_t);
pFile = (C4JStorage::DLC_FILE_DETAILS *)&pbData[dwTemp];
}
PBYTE pbTemp=((PBYTE )pFile);
uint8_t* pbTemp=((uint8_t* )pFile);
pFile = (C4JStorage::DLC_FILE_DETAILS *)&pbData[uiCurrentByte];
for(unsigned int i=0;i<uiFileCount;i++)
@@ -182,14 +182,14 @@ bool DLCAudioFile::processDLCDataFile(PBYTE pbData, DWORD dwLength)
if(it != parameterMapping.end() )
{
addParameter(type,(EAudioParameterType)pParams->dwType,(WCHAR *)pParams->wchData);
addParameter(type,(EAudioParameterType)pParams->dwType,(wchar_t *)pParams->wchData);
}
pbTemp+=sizeof(C4JStorage::DLC_FILE_PARAM)+(sizeof(WCHAR)*pParams->dwWchCount);
pbTemp+=sizeof(C4JStorage::DLC_FILE_PARAM)+(sizeof(wchar_t)*pParams->dwWchCount);
pParams = (C4JStorage::DLC_FILE_PARAM *)pbTemp;
}
// Move the pointer to the start of the next files data;
pbTemp+=pFile->uiFileSize;
uiCurrentByte+=sizeof(C4JStorage::DLC_FILE_DETAILS)+pFile->dwWchCount*sizeof(WCHAR);
uiCurrentByte+=sizeof(C4JStorage::DLC_FILE_DETAILS)+pFile->dwWchCount*sizeof(wchar_t);
pFile=(C4JStorage::DLC_FILE_DETAILS *)&pbData[uiCurrentByte];