mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
RTech: rename member variable
This variable actually represents the structure size, which is the header + the rest of the data in the structure of the asset.
This commit is contained in:
parent
b288d072db
commit
51931b59db
@ -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
|
||||
|
@ -25,7 +25,7 @@ void Pak_AlignSlabHeaders(PakFile_s* const pak, PakSlabDescriptor_s* const desc)
|
||||
const size_t alignedSize = ALIGN_VALUE(headersSize, static_cast<size_t>(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;
|
||||
|
||||
|
@ -556,7 +556,7 @@ static bool Pak_PrepareNextPageForPatching(PakLoadedInfo_s* const loadedInfo, Pa
|
||||
const int assetTypeIdx = pakAsset->HashTableIndexForAssetType();
|
||||
|
||||
pak->memoryData.patchDstPtr = reinterpret_cast<char*>(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<char*>(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;
|
||||
}
|
||||
|
@ -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++;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user