MREA (Metroid Prime 3): Difference between revisions
Jump to navigation
Jump to search
→Header
>Aruki |
>Aruki (→Header) |
||
Line 18: | Line 18: | ||
! Offset | ! Offset | ||
! Type | ! Type | ||
! | ! Count | ||
! | ! Name | ||
! Notes | |||
|- | |- | ||
| 0x0 | | 0x0 | ||
| u32 | | u32 | ||
| | | 1 | ||
| '''Magic | | '''Magic''' | ||
| Always <code>0xDEADBEEF</code>. | |||
|- | |- | ||
| 0x4 | | 0x4 | ||
| u32 | | u32 | ||
| | | 1 | ||
| '''Version''' | | '''Version''' | ||
| See [[MREA (File Format)|hub article]] for a list of possible version numbers. | |||
|- | |- | ||
| 0x8 | | 0x8 | ||
| float | | float | ||
| | | 12 | ||
| '''Transform | | '''Area Transform''' | ||
| Matrix that represents the area's transform from the origin. Most area data is pre-transformed, so this matrix is only used occasionally. | |||
|- | |- | ||
| 0x38 | | 0x38 | ||
| u32 | | u32 | ||
| | | 1 | ||
| ''' | | '''World Model Count''' | ||
| Number of world models in this area. | |||
|- | |- | ||
| 0x3C | | 0x3C | ||
| u32 | | u32 | ||
| | | 1 | ||
| '''Layer | | '''Script Layer Count''' | ||
| Number of script layers in this area. | |||
|- | |- | ||
| 0x40 | | 0x40 | ||
| u32 | | u32 | ||
| | | 1 | ||
| '''Section | | '''Data Section Count''' | ||
| Number of data sections in the file. | |||
|- | |- | ||
| 0x44 | | 0x44 | ||
| u32 | | u32 | ||
| | | 1 | ||
| '''Compressed | | '''Compressed Block Count''' | ||
| Number of compressed data blocks in the file. | |||
|- | |- | ||
| 0x48 | | 0x48 | ||
| u32 | | u32 | ||
| | | 1 | ||
| '''Section | | '''Section Number Count''' | ||
| Number of section numbers at the end of the header. | |||
|- | |- | ||
| 0x4C | | 0x4C | ||
| | | u8 | ||
| 0x14 | | 0x14 | ||
| '''Padding''' | | '''Padding''' | ||
| Padding bytes that align the file with the next multiple-of-32 offset. | |||
|- | |- | ||
| 0x60 | | 0x60 | ||
| u32 | | u32 | ||
| | | ''Data Section Count'' | ||
| '''Section | | '''Data Section Sizes''' | ||
| Array containing the size of each data section in the file. Every size is always a multiple of 32. | |||
|- | |- | ||
| colspan= | | colspan=5 {{unknown|End of main header data; pad to 32 bytes before compressed section definitions}} | ||
|} | |} | ||
Line 117: | Line 128: | ||
==== Section Numbers ==== | ==== Section Numbers ==== | ||
The section numbers portion of the header indicates the section index of each major data chunk. Some of these chunks contain multiple sections; in that case the number will point to the first section of the chunk. Each number is a short 8-byte struct: | The section numbers portion of the header indicates the section index of each major data chunk. Some of these chunks contain multiple sections; in that case the number will point to the first section of the chunk. <code>WOBJ</code> can be listed multiple times, but its section index is always 0. Every other section number always appears in every MREA file once (none are optional). Each number is a short 8-byte struct: | ||
{| class="wikitable" | {| class="wikitable" |