IW5 Fixups

This commit is contained in:
Jan
2021-07-23 16:28:59 +02:00
parent 02b0f11c29
commit 88710cb3bf
27 changed files with 566 additions and 269 deletions

View File

@ -40,7 +40,7 @@ void AssetDumperRawFile::DumpRaw(AssetDumpingContext& context, XAssetInfo<RawFil
throw std::runtime_error("Initializing inflate failed");
}
zs.next_in = reinterpret_cast<const Bytef*>(rawFile->data.compressedBuffer);
zs.next_in = reinterpret_cast<const Bytef*>(rawFile->buffer);
zs.avail_in = rawFile->compressedLen;
Bytef buffer[0x1000];
@ -65,6 +65,6 @@ void AssetDumperRawFile::DumpRaw(AssetDumpingContext& context, XAssetInfo<RawFil
}
else if (rawFile->len > 0)
{
stream.write(rawFile->data.buffer, rawFile->len);
stream.write(rawFile->buffer, rawFile->len);
}
}

View File

@ -85,18 +85,6 @@ void InfoStringFromStructConverter::FillFromBaseField(const cspField_t& field)
break;
}
case CSPFT_PHYS_COLLMAP:
{
const auto* physCollMap = *reinterpret_cast<PhysCollmap**>(reinterpret_cast<uintptr_t>(m_structure) + field.
iOffset);
if (physCollMap)
m_info_string.SetValueForKey(std::string(field.szName), std::string(AssetName(physCollMap->name)));
else
m_info_string.SetValueForKey(std::string(field.szName), "");
break;
}
case CSPFT_SOUND:
{
const auto* sndAlias = reinterpret_cast<SndAliasCustom*>(reinterpret_cast<uintptr_t>(m_structure) + field.