LEB: Difference between revisions

Jump to navigation Jump to search
2,222 bytes added ,  3 years ago
More info
mNo edit summary
(More info)
Line 4: Line 4:


==Format==
==Format==
'''LEB''' files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section.
'''LEB''' files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for '''LEB''' files, with the exception of Lv7EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:


The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.
<code>3d01 1700 0400 0000 ffff ffff 0000 0000</code>
 
<code>2000 0000 ffff ffff ffff ffff ffff ffff</code>
 
<code>ffff ffff ffff ffff 4000 0000 ffff ffff</code>
 
<code>ffff ffff 5000 0000 ffff ffff 3000 0000</code>
 
<code>ffff ffff ffff ffff ffff ffff ffff ffff</code>
 
<code>ffff ffff ffff ffff ffff ffff ffff ffff</code>
 
<code>ffff ffff</code>
 
=== Entries Section ===
There are 6 entries in most LEB files.
{| class="wikitable"
|+
!Node Index
!Name Offset
!Next entry offset
|-
|0xFFF0
|Offset of <code>version</code>in the names section
|0xFFFFFFFF
|-
|0xFFF0
|Offset of <code>information</code>in the names section
|0xFFFFFFFF
|-
|0x0
|Offset of <code>point</code>in the names section
|0xFFFFFFFF
|-
|0x1
|Offset of <code>rail</code>in the names section
|0xFFFFFFFF
|-
|0x2
|Offset of <code>actor</code>in the names section
|0x10
|-
|0x3
|Offset of <code>grid</code>in the names section
|0xFFFFFFFF
|}
The Name Hashes of each should not be touched. The purpose of the DataOffsets is still unknown.
 
=== Data Section ===
Much of the data section is still unknown.
 
Early in the section is a list of entry-like data, 16 bytes for each actor, which look like:


All labels in the names section are separated by null bytes. Of note, there are 2 null bytes separating the first and second actor labels, instead of 1.
<code>F0 FF 00 00 00 00 00 00 FF FF FF FF xx xx xx xx</code>


Where the last 4 bytes store the offset of each actor's data block in the actor data section.


The data section contains, among other things, blocks of 0x98 bytes, one for each actor in the room. Preceding this is a u64 which specifies the number of bytes the actor data section takes.
==== Actor Data Block ====
This section starts is preceded by a u64 which specifies the number of bytes the actor data section takes. The section contains blocks of 0x98 bytes, one for each actor in the room, in the following format:
{| class="wikitable"
{| class="wikitable"
|+
|+
Line 75: Line 128:
|Unknown.
|Unknown.
|}
|}
==== Notes on Parameters for Specific Actors ====
'''ObjCaveRock:''' (and other blocks?), the first four parameters correspond to whether you can push them in a certain direction, ordered as RIGHT, LEFT, DOWN, UP. 0x0 is not pushable in that direction, 0x1 is pushable.
=== Names Section ===
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between <code>point</code> and <code>rail</code> at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).
[[Category:File formats]]
[[Category:File formats]]
39

edits

Navigation menu