LEB: Difference between revisions

From ZeldaMods (Link's Awakening)
Jump to navigation Jump to search
(Created page)
 
(formatting)
Line 3: Line 3:
This format is still in the process of being reverse engineered and so this page is currently incomplete.
This format is still in the process of being reverse engineered and so this page is currently incomplete.


== 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.


Line 17: Line 17:
|0x0
|0x0
|u64
|u64
|Actor key. This value must match the hex value of the corresponding actor label in the names section.
|'''Actor key'''. This value must match the hex value of the corresponding actor label in the names section.
|-
|-
|0x8
|0x8
|u32(?)
|u32(?)
|Names section offset. This stores the offset in the names section for the start of the label that corresponds to this actor.
|'''Names section offset'''. This stores the offset in the names section for the start of the label that corresponds to this actor.
|-
|-
|0xC
|0xC
|u16
|u16
|[[Actors|Actor ID]]
|[[Actors|'''Actor ID''']]
|-
|-
|0xE
|0xE
Line 33: Line 33:
|0x10
|0x10
|u32(?)
|u32(?)
|Room ID. The actor loads when entering the specified room and unloads when leaving it.
|'''Room ID'''. The actor loads when entering the specified room and unloads when leaving it.
|-
|-
|0x14
|0x14
|u32
|u32
|X coordinate. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0
|'''X coordinate'''. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0
|-
|-
|0x18
|0x18
Line 45: Line 45:
|0x1C
|0x1C
|u32
|u32
|Y coordinate. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0
|'''Y coordinate'''. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0
|-
|-
|0x20 and beyond
|0x20 and beyond

Revision as of 01:36, 3 June 2021

LEB is a custom format used to store room data in Link's Awakening.

This format is still in the process of being reverse engineered and so this page is currently incomplete.

Format

LEB files are in a FixedHash format, with the data for actors stored in the data section and the 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.

The data section contains, among other things, blocks of 0x98 bytes, one for each actor in the room. These store most of the information for the actors and are in the following format:

Offset Type Description
0x0 u64 Actor key. This value must match the hex value of the corresponding actor label in the names section.
0x8 u32(?) Names section offset. This stores the offset in the names section for the start of the label that corresponds to this actor.
0xC u16 Actor ID
0xE u16 Padding?
0x10 u32(?) Room ID. The actor loads when entering the specified room and unloads when leaving it.
0x14 u32 X coordinate. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0
0x18 u32 Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?
0x1C u32 Y coordinate. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0
0x20 and beyond So far unknown.