#include <levels.h>
Data Fields | |
| uint32_t | unk_u32_00 |
| float | scale |
| uint16_t | modelId |
| int16_t | unk_16_00 |
| uint16_t | rotFlags |
| uint16_t | unk_u16_05 |
| int16_t | z |
| Multiply with approx 5.12f for real float z position. | |
| int8_t | unk_8_06 |
| Is this bbox minx? | |
| int8_t | unk_8_07 |
| Is this bbox maxx? | |
| int8_t | unk_8_08 |
| Is this bbox minz? | |
| int8_t | unk_8_09 |
| Is this bbox maxz? | |
| int8_t | unk_8_10 |
| Is this bbox miny? | |
| int8_t | unk_8_11 |
| Is this bbox maxy? | |
| uint8_t | posFlags |
| Contains flags whether the x or y position is negative. | |
| uint8_t | x |
| Multiply by the level it's grid multiplier to get the real float x. | |
| uint8_t | y |
| Multiply by the level it's grid multiplier to get the real float y. | |
| uint8_t | unk_u8_15 |
| Always set to 0b10000001 ? (signed -127, unsigned 129). | |
These are basic static models that make up most of the levels, their position is calculated with the level it's grid multiplier for the x and y axis. For the z axis we have to multiply the given value with a constant (approx 5.12f). The z axis rotation is in steps of 90 degrees.
TODO on T2FS_FILE_PC_SEEDS_OF_EVIL_MP it's different
https://ultra64.ca/files/documentation/online-manuals/man/pro-man/pro24/index24.1.html
Entry from T2FSArray.
| uint32_t s_T2FSDataTiledObject::unk_u32_00 |
| float s_T2FSDataTiledObject::scale |
| uint16_t s_T2FSDataTiledObject::modelId |
| int16_t s_T2FSDataTiledObject::unk_16_00 |
| uint16_t s_T2FSDataTiledObject::rotFlags |
At least the first 2 bits indicate z axis rotation, mask the first two bits and multiply that value by 90 degrees to get the wanted angle.
| uint16_t s_T2FSDataTiledObject::unk_u16_05 |
| int16_t s_T2FSDataTiledObject::z |
Multiply with approx 5.12f for real float z position.
This multiplier value has been tweaked by looking at tunnel segments inside South Park and Seeds of Evil levels, so it probably isn't perfect but for now LGTM.
| int8_t s_T2FSDataTiledObject::unk_8_06 |
Is this bbox minx?
| int8_t s_T2FSDataTiledObject::unk_8_07 |
Is this bbox maxx?
| int8_t s_T2FSDataTiledObject::unk_8_08 |
Is this bbox minz?
| int8_t s_T2FSDataTiledObject::unk_8_09 |
Is this bbox maxz?
| int8_t s_T2FSDataTiledObject::unk_8_10 |
Is this bbox miny?
| int8_t s_T2FSDataTiledObject::unk_8_11 |
Is this bbox maxy?
| uint8_t s_T2FSDataTiledObject::posFlags |
Contains flags whether the x or y position is negative.
| uint8_t s_T2FSDataTiledObject::x |
Multiply by the level it's grid multiplier to get the real float x.
| uint8_t s_T2FSDataTiledObject::y |
Multiply by the level it's grid multiplier to get the real float y.
| uint8_t s_T2FSDataTiledObject::unk_u8_15 |
Always set to 0b10000001 ? (signed -127, unsigned 129).