LEB: Difference between revisions

Jump to navigation Jump to search
403 bytes removed ,  3 years ago
Updated actor section
(Updated actor section)
Line 86: Line 86:


====Actor Section====
====Actor Section====
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, usually blocks of 0x90 bytes, but sometimes longer. The names section is empty. The data block for each actor is formatted as follows. Some properties are related to measurements along certain axes; since this is a top-down game we will call the vertical axis Z (i.e. the axis toward the camera), and X and Y will be as normal for a 2D game.
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, a block with a minimum size of 0x90 bytes, but can be longer. The names section is empty. The data block for each actor is formatted as follows. Some properties are related to measurements along the three axes; since Link's Awakening is a top-down game we will call the vertical axis Z (i.e. the axis perpendicular to the plane of the floor), and X and Y will be as normal for a 2D game.
{| class="wikitable"
{| class="wikitable"
|+
|+
Line 114: Line 114:
|-
|-
|0x14
|0x14
|u32
|float[3]
|'''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
|'''Co-ordinates''' as [X, Z, Y]. One in-game "tile" is 1.5 units.  
|-
The co-ordinate system spans entire maps and is not specific to each room. [0, 0, 0] is the very top left corner of the map, at the elevation of the main floor plane of the map.
|0x18
 
|u32
Each room is 10x8 tiles, so they span 15 units along the X axis and 12 along the Y axis.
|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
|0x20
|u32
|float[3]
|Most likely rotation about the X axis. This is primarily only used with lighting actors.
|'''Rotation''' about the [X, Z, Y] axes respectively, in degrees.
|-
|0x24
|u32
|Rotation about the Z (vertical) axis. The scaling of this value is uncertain, but 0xC2B40000 is 90° clockwise, 0x43340000 is 180°, and 0x42B40000 is 270° clockwise (90° counterclockwise).
|-
|0x28
|u32
|Most likely rotation about the Y axis. This is primarily only used with lighting actors.
|-
|-
|0x2C
|0x2C
|u32
|float[3]
|'''X-axis scaling'''. 0x3F800000 is the normal scale.
|'''Scaling''' along the [X, Z, Y] axes respectively. Note that scaling doesn't seem to affect collision for every actor and only scales the model in some cases.
|-
|0x30
|u32
|'''Z-axis scaling'''. 0x3F800000 is the normal scale.
|-
|0x34
|u32
|'''Y-axis scaling'''. 0x3F800000 is the normal scale.
|-
|-
|0x38
|0x38
Line 189: Line 168:
'''xx bb kk ee''' 00 00 '''yy zz''' 00 00 00 00
'''xx bb kk ee''' 00 00 '''yy zz''' 00 00 00 00


'''x''' indicates the number of actors in section 1.
'''x''' indicates the number of entries in section 1.


'''y''' indicates the number of actors in section 2.
'''y''' indicates the number of entries in section 2.


'''z''' indicates the number of actors in section 3.
'''z''' indicates the number of entries in section 3.


'''b''' appears to be 01 if the enemy appears from the +enemies tile in a chamber dungeon and 00 otherwise.
'''b''' appears to be 01 if the enemy appears from the +enemies tile in a chamber dungeon and 00 otherwise.
39

edits

Navigation menu