diff --git a/src/public/rtech/ipakfile.h b/src/public/rtech/ipakfile.h index e30c1475..a980a730 100644 --- a/src/public/rtech/ipakfile.h +++ b/src/public/rtech/ipakfile.h @@ -204,7 +204,7 @@ struct PakAssetBinding_s CAlignedMemAlloc* allocator; uint32_t headerSize; - uint32_t nativeClassSize; // Native class size, for 'material' it would be CMaterialGlue full size. + uint32_t structSize; // Native class size, for 'material' it would be CMaterialGlue full size. uint32_t headerAlignment; // the type of this asset bind diff --git a/src/rtech/pak/pakalloc.cpp b/src/rtech/pak/pakalloc.cpp index a7c4b9bd..9e1b3add 100644 --- a/src/rtech/pak/pakalloc.cpp +++ b/src/rtech/pak/pakalloc.cpp @@ -25,7 +25,7 @@ void Pak_AlignSlabHeaders(PakFile_s* const pak, PakSlabDescriptor_s* const desc) const size_t alignedSize = ALIGN_VALUE(headersSize, static_cast(binding.headerAlignment)); pak->memoryData.unkAssetTypeBindingSizes[i] = alignedSize; - headersSize = alignedSize + (desc->assetTypeCount[i] * binding.nativeClassSize); + headersSize = alignedSize + (desc->assetTypeCount[i] * binding.structSize); desc->slabSizeForType[SF_HEAD] = headersSize; diff --git a/src/rtech/pak/pakparse.cpp b/src/rtech/pak/pakparse.cpp index 2f18eee8..d5af3c79 100644 --- a/src/rtech/pak/pakparse.cpp +++ b/src/rtech/pak/pakparse.cpp @@ -556,7 +556,7 @@ static bool Pak_PrepareNextPageForPatching(PakLoadedInfo_s* const loadedInfo, Pa const int assetTypeIdx = pakAsset->HashTableIndexForAssetType(); pak->memoryData.patchDstPtr = reinterpret_cast(loadedInfo->slabBuffers[0]) + pak->memoryData.unkAssetTypeBindingSizes[assetTypeIdx]; - pak->memoryData.unkAssetTypeBindingSizes[assetTypeIdx] += g_pakGlobals->assetBindings[assetTypeIdx].nativeClassSize; + pak->memoryData.unkAssetTypeBindingSizes[assetTypeIdx] += g_pakGlobals->assetBindings[assetTypeIdx].structSize; return true; } @@ -656,7 +656,7 @@ static bool Pak_ProcessAssets(PakLoadedInfo_s* const loadedInfo) pak->memoryData.patchDstPtr = reinterpret_cast(loadedInfo->slabBuffers[0]) + pak->memoryData.unkAssetTypeBindingSizes[assetTypeIdx]; - pak->memoryData.unkAssetTypeBindingSizes[assetTypeIdx] += g_pakGlobals->assetBindings[assetTypeIdx].nativeClassSize; + pak->memoryData.unkAssetTypeBindingSizes[assetTypeIdx] += g_pakGlobals->assetBindings[assetTypeIdx].structSize; } else { @@ -756,7 +756,7 @@ static void Pak_StubInvalidAssetBinds(PakFile_s* const pak, PakSlabDescriptor_s* assetBinding->replaceAssetFunc = nullptr; assetBinding->allocator = AlignedMemAlloc(); assetBinding->headerSize = asset->headerSize; - assetBinding->nativeClassSize = asset->headerSize; + assetBinding->structSize = asset->headerSize; assetBinding->headerAlignment = pak->memoryData.pageHeaders[asset->headPtr.index].pageAlignment; assetBinding->type = PakAssetBinding_s::STUB; } diff --git a/src/rtech/pak/pakstate.cpp b/src/rtech/pak/pakstate.cpp index 157eb5d9..57a6c971 100644 --- a/src/rtech/pak/pakstate.cpp +++ b/src/rtech/pak/pakstate.cpp @@ -46,7 +46,7 @@ Pak_ListTypes_f */ static void Pak_ListTypes_f() { - Msg(eDLL_T::RTECH, "| ext | description | version | alignment | header size | native size |\n"); + Msg(eDLL_T::RTECH, "| ext | description | version | alignment | header size | struct size |\n"); Msg(eDLL_T::RTECH, "|------|---------------------------|---------|-----------|-------------|-------------|\n"); uint32_t numRegistered = 0; @@ -62,7 +62,7 @@ static void Pak_ListTypes_f() FourCCToString(assetExtension, type.extension); Msg(eDLL_T::RTECH, "| %-4s | %-25s | %7u | %9u | %11u | %11u |\n", - assetExtension, type.description, type.version, type.headerAlignment, type.headerSize, type.nativeClassSize); + assetExtension, type.description, type.version, type.headerAlignment, type.headerSize, type.structSize); numRegistered++; }