ResourceSizeTable.product.rsizetable: Difference between revisions
ResourceSizeTable.product.rsizetable (view source)
Revision as of 22:36, 27 November 2019
, 4 years agono edit summary
imported>BravelyPeculiar No edit summary |
imported>Leoetlino No edit summary |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<onlyinclude> | <onlyinclude>{{Resloc|path=System/Resource/ResourceSizeTable.product.rsizetable}} | ||
{{Resloc|path=System/Resource/ResourceSizeTable.product.rsizetable}} | '''ResourceSizeTable.product.rsizetable''' is the file where the [[resource size table]] is stored.</onlyinclude> | ||
'''ResourceSizeTable.product.rsizetable''' is the file where the [[resource size table]] is stored. | |||
</onlyinclude> | |||
== Structure == | == Structure == | ||
Line 13: | Line 8: | ||
<syntaxhighlight lang="c++"> | <syntaxhighlight lang="c++"> | ||
struct RstbHeader { | struct RstbHeader { | ||
char magic[4]; // 'RSTB' | |||
u32 crc32TableSize; // number of entries - can be 0 to indicate there is no crc32 table | u32 crc32TableSize; // number of entries - can be 0 to indicate there is no crc32 table | ||
u32 nameTableSize; // number of entries - can be 0 to indicate there is no name table | u32 nameTableSize; // number of entries - can be 0 to indicate there is no name table | ||
Line 61: | Line 56: | ||
* VfxResourceMgr, when loading Effect/%s.esetlist files: must not be zero. | * VfxResourceMgr, when loading Effect/%s.esetlist files: must not be zero. | ||
* bfres loading code at 0x7100FE3978 (v1.5.0): unclear, but must not be zero. It appears to check whether the file size listed in the RSTB is larger than the heap size. | * bfres loading code at 0x7100FE3978 (v1.5.0): unclear, but must not be zero. It appears to check whether the file size listed in the RSTB is larger than the heap size. | ||
* res::ResourceMgrTask::getHeapSizeForResLoad (0x710120BDE0 in v1.5.0): called during resource load.< | * res::ResourceMgrTask::getHeapSizeForResLoad (0x710120BDE0 in v1.5.0): called during resource load. | ||
<source lang="c++"> | |||
constant = 0x128 + 0x40; | constant = 0x128 + 0x40; | ||
if (auto* entry_factory = dynamic_cast<res::EntryFactoryBase*>(factory)) | if (auto* entry_factory = dynamic_cast<res::EntryFactoryBase*>(factory)) | ||
Line 73: | Line 69: | ||
else | else | ||
out->readHeapSize = (unsigned int)(float)(loadDataAlignment + totalSize + sizeof(void*)); | out->readHeapSize = (unsigned int)(float)(loadDataAlignment + totalSize + sizeof(void*)); | ||
</ | </source> | ||
* 0x7100FE1630 (v1.5.0): unclear. If the file is loaded by the resource memory or loading thread, or if the file size listed in the RSTB is larger than a TempResourceLoader field, the game prints: "Texture archive size: %u MB" (translated from Japanese). | * 0x7100FE1630 (v1.5.0): unclear. If the file is loaded by the resource memory or loading thread, or if the file size listed in the RSTB is larger than a TempResourceLoader field, the game prints: "Texture archive size: %u MB" (translated from Japanese). | ||
== Editing == | |||
The resource size table must be edited when making game files larger than they originally were, in order to avoid crashes. | |||
=== Tools === | |||
{{tool table|category=Tools (RSTB)}} | |||
[[Category:Content (BotW)]] | [[Category:Content (BotW)]] | ||
[[Category:Content (BotW, product)]] | |||
[[Category:File formats]] | [[Category:File formats]] |