Havok: Difference between revisions
Jump to navigation
Jump to search
→Havok File Specification: Added section descriptions
imported>Zephenryus (→Havok File Specification: Added section header details) |
imported>Zephenryus (→Havok File Specification: Added section descriptions) |
||
Line 223: | Line 223: | ||
=== Section Headers === | === Section Headers === | ||
[[File:Havok-class-header-delimits.png|thumb|<code>FF</code> bytes indicate section header boundaries]] | [[File:Havok-class-header-delimits.png|thumb|<code>FF</code> bytes indicate section header boundaries]] | ||
Each section has a 64-byte header which includes the section name, absolute offset to the section start and six relative offsets to segments within the section. All three section headers follow the file header and are delimited by 16 <code> | Each section has a 64-byte header which includes the section name, absolute offset to the section start and six relative offsets to segments within the section. All three section headers follow the file header and are delimited by 16 delimiter bytes (<code>0xFF</code>). | ||
{| class="wikitable" | {| class="wikitable" | ||
|+Section Header Specification | |+Section Header Specification | ||
Line 273: | Line 273: | ||
==== Section Name ==== | ==== Section Name ==== | ||
There are only three section names: <code>__classnames__</code>, <code>__types__</code> and <code>__data__</code>. The section name is a null-terminated string with a delimiter byte | There are only three section names: <code>__classnames__</code>, <code>__types__</code> and <code>__data__</code>. The section name is a null-terminated string with a delimiter byte (<code>0xFF</code>) in byte 20. | ||
==== Absolute Offset ==== | ==== Absolute Offset ==== | ||
Line 295: | Line 295: | ||
* <code>0x3c20</code> | * <code>0x3c20</code> | ||
* <code>0x3c20</code> | * <code>0x3c20</code> | ||
== Class Names Section == | |||
[[File:Havok-class-names.png|thumb|Class names binary data]] | |||
The classnames section header includes the absolute offset to the class names data and a single unique relative offset to the end of the section. The section is made up of an array of hash ids and a null-terminated string class name. | |||
=== Class Name === | |||
Class names are read until the end of the section or a delimiter byte (<code>0xFF</code>) is is reached. | |||
{| class="wikitable" | |||
|+Class Name Specification | |||
!Offset (h) | |||
!Size | |||
!Type | |||
!Description | |||
|- | |||
|0x00 | |||
|4 | |||
|Unsigned Int | |||
|An integer associated with the class type | |||
|- | |||
|0x05 | |||
|1 | |||
|Byte | |||
|Unknown (always <code>0x09</code>)<ref>It is assumed to be a delimiter between the id and the class name string. However, <code>0x09</code> is also the tab character and could imply something to the engine.</ref> | |||
|- | |||
|0x06 | |||
|n | |||
|String | |||
|Class name (null-terminated string) | |||
|} | |||
== Types Section == | |||
The types section is unused in ''Breath of the Wild''. The absolute offset points to the beginning of the data section with all null (<code>0x00</code>) relative offsets. | |||
== Data Section == | |||
{{Expand section}} | |||
The bulk of the file is devoted to the data section which is divided into smaller segments dependent on the file type. | |||
<references /> | <references /> | ||
[[Category:File formats]] | [[Category:File formats]] |