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