LEB: Difference between revisions

Jump to navigation Jump to search
1,331 bytes added ,  3 years ago
Fleshed out info on data section structure
(Fleshed out info on data section structure)
Line 55: Line 55:


===Data Section===
===Data Section===
Much of the data section is still unknown.
The data section contains nine subsections. Only some of these have a known purpose so far.


Early in the section is a list of entry-like data, 16 bytes for each actor, which look like:
==== Section 1 ====
Appears to always consist of 0x2C bytes.
{| class="wikitable"
|+
!Offset
!Type
!Description
|-
|0x0
|u64
|Always 0x4
|-
|0x8-0xF
|
|Unknown
|-
|0x10
|u64
|Always 0x3
|-
|0x18
|
|Unknown
|-
|0x20
|
|Remaining bytes from here are always <code>3D 01 01 00 00 00 00 FF FF FF FF FF</code>. Probably a termination marker.
|}
 
==== Section 2 ====
Unknown purpose. Always ends in <code>3D 01 01 00 00 00 00 FF FF FF FF FF</code>.
 
==== Section 3 ====
Unknown purpose. Always ends in <code>3D 01 01 00 00 00 00 FF FF FF FF FF</code>.
 
===== Actor Entries Section =====
This section is preceded by a u64 which specifies the length of the section in bytes.
 
This section holds a list of entry-like data, 16 bytes for each actor, which look like:


<code>F0 FF 00 00 00 00 00 00 FF FF FF FF xx xx xx xx</code>
<code>F0 FF 00 00 00 00 00 00 FF FF FF FF xx xx xx xx</code>
Line 63: Line 101:
Where the last 4 bytes store the offset of each actor's data block in the actor data section.
Where the last 4 bytes store the offset of each actor's data block in the actor data section.


====Actor Data Block====
==== Actor Entry Offsets Section ====
Similar to the regular FixedHash entry offsets section, but corresponding to the previous section (Actor Entries)
 
====Actor Data Section====
This section starts is preceded by a u64 which specifies the number of bytes the actor data section takes. The section contains blocks of data for each actor in the room. Usually these are 0x98 bytes but for some actors are longer, and in the following format:
This section starts is preceded by a u64 which specifies the number of bytes the actor data section takes. The section contains blocks of data for each actor in the room. Usually these are 0x98 bytes but for some actors are longer, and in the following format:
{| class="wikitable"
{| class="wikitable"
Line 111: Line 152:
|Unknown.
|Unknown.
|-
|-
|0x40-0x7F
|0x40
|u32[16]
|u32[N]
|'''Parameters'''. This section contains multiple u32's, which appear to be grouped into pairs of [parameter, parameter type].
|'''Parameters'''. This section contains multiple u32's, which appear to be grouped into pairs of [parameter, parameter type]. For most actors, there are 8 parameters (and so this section is 64 bytes long).
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).


Line 124: Line 165:
Most actors have "blank " parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.
Most actors have "blank " parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.
|-
|-
|0x80-0x97
|0x40 + N*0x8
|
|
|Unknown.
|Unknown.
|}
|}


====Notes on Parameters for Specific Actors====
=====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.
'''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.
==== Section 7 ====
Unknown purpose. Usually short (16 bytes), but sometimes longer.
==== Section 8 ====
Another section filled with entry-like data. The purpose of it is still unknown.
==== Section 9 ====
Preceded by a u32 specifying the length of this section. Contains a few strings in plain ASCII, usually <code>data</code> and <code>info</code>. The purpose of this is unknown.


===Names Section===
===Names Section===
39

edits

Navigation menu