MREA (Metroid Prime 2): Difference between revisions
no edit summary
>Aruki |
>Aruki No edit summary |
||
Line 15: | Line 15: | ||
{| class="wikitable" | {| class="wikitable" | ||
! Offset | ! Offset | ||
! | ! Type | ||
! Count | |||
! Name | |||
! Description | ! Description | ||
|- | |- | ||
| 0x0 | | 0x0 | ||
| | | u32 | ||
| '''Magic''' | | 1 | ||
| '''Magic''' | |||
| Always <code>0xDEADBEEF</code>. | |||
|- | |- | ||
| 0x4 | | 0x4 | ||
| | | u32 | ||
| '''Version''' | | 1 | ||
| '''Version''' | |||
| See [[MREA (File Format)|hub article]] for a list of possible version numbers. | |||
|- | |- | ||
| 0x8 | | 0x8 | ||
| | | float | ||
| '''Transform | | 12 | ||
| '''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 | ||
| ''' | | 1 | ||
| '''World Model Count''' | |||
| Number of world models in this area. | |||
|- | |- | ||
| 0x3C | | 0x3C | ||
| | | u32 | ||
| ''' | | 1 | ||
| '''Script Layer Count''' | |||
| Number of script layers in this area. | |||
|- | |- | ||
| 0x40 | | 0x40 | ||
| | | u32 | ||
| '''Section | | 1 | ||
| '''Data Section Count''' | |||
| Number of data sections in the file. | |||
|- | |- | ||
| 0x44 | | 0x44 | ||
| | | u32 | ||
| '''Geometry | | 1 | ||
| '''Geometry Section''' | |||
| Section index for world geometry data. Always 0; starts on materials. | |||
|- | |- | ||
| 0x48 | | 0x48 | ||
| | | u32 | ||
| ''' | | 1 | ||
| '''Script Layers Section''' | |||
| Section index for script layer data. | |||
|- | |- | ||
| 0x4C | | 0x4C | ||
| | | u32 | ||
| ''' | | 1 | ||
| '''Generated Script Objects Section''' | |||
| Section index for generated script object data. | |||
|- | |- | ||
| 0x50 | | 0x50 | ||
| | | u32 | ||
| '''Collision | | 1 | ||
| '''Collision Section''' | |||
| Section index for collision data. | |||
|- | |- | ||
| 0x54 | | 0x54 | ||
| | | u32 | ||
| '''Unknown | | 1 | ||
| '''Unknown Section 1''' | |||
| Section index for first unknown section. | |||
|- | |- | ||
| 0x58 | | 0x58 | ||
| | | u32 | ||
| '''Lights | | 1 | ||
| '''Lights Section''' | |||
| Section index for light data. | |||
|- | |- | ||
| 0x5C | | 0x5C | ||
| | | u32 | ||
| ''' | | 1 | ||
| '''Visibility Tree Section''' | |||
| Section index for visibility tree data. | |||
|- | |- | ||
| 0x60 | | 0x60 | ||
| | | u32 | ||
| ''' | | 1 | ||
| '''Path Section''' | |||
| Section index for path data. | |||
|- | |- | ||
| 0x64 | | 0x64 | ||
| | | u32 | ||
| ''' | | 1 | ||
| '''Unknown Section 2''' | |||
| Section index for second unknown section. | |||
|- | |- | ||
| 0x68 | | 0x68 | ||
| | | u32 | ||
| ''' | | 1 | ||
| '''Portal Area Section''' | |||
| Section index for portal area data. | |||
|- | |- | ||
| 0x6C | | 0x6C | ||
| | | u32 | ||
| ''' | | 1 | ||
| '''Object-To-Static-Geometry Mapping Section''' | |||
| Section index for object-to-static-geometry mapping data. | |||
|- | |- | ||
| 0x70 | | 0x70 | ||
| | | u32 | ||
| '''Compressed | | 1 | ||
| '''Compressed Block Count''' | |||
| Number of compressed data blocks in the file. | |||
|- | |- | ||
| 0x74 | | 0x74 | ||
| | | u32 | ||
| 3 | |||
| '''Padding''' | | '''Padding''' | ||
| Padding bytes that align the file with the next multiple-of-32 offset. | |||
|- | |- | ||
| 0x80 | | 0x80 | ||
| | | u32 | ||
| '''Section | | ''Data Section Count'' | ||
| '''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|Pad to 32 bytes before compressed block definitions begins}} | ||
|} | |} | ||
Line 112: | Line 154: | ||
{| class="wikitable" | {| class="wikitable" | ||
! Offset | ! Offset | ||
! | ! Type | ||
! | ! Count | ||
! Name | |||
! Notes | ! Notes | ||
|- | |- | ||
| 0x0 | | 0x0 | ||
| | | u32 | ||
| '''Buffer | | 1 | ||
| '''Buffer Size''' | |||
| This is always 0x120 bytes larger than the uncompressed size on compressed bytes, and the same value as the uncompressed size on uncompressed blocks | | This is always 0x120 bytes larger than the uncompressed size on compressed bytes, and the same value as the uncompressed size on uncompressed blocks | ||
|- | |- | ||
| 0x4 | | 0x4 | ||
| | | u32 | ||
| '''Uncompressed | | 1 | ||
| '''Uncompressed Size''' | |||
| | | | ||
|- | |- | ||
| 0x8 | | 0x8 | ||
| | | u32 | ||
| '''Compressed | | 1 | ||
| '''Compressed Size''' | |||
| This is 0 on uncompressed blocks. | | This is 0 on uncompressed blocks. | ||
|- | |- | ||
| 0xC | | 0xC | ||
| | | u32 | ||
| '''Section | | 1 | ||
| The number of regular sections contained in this block. | | '''Data Section Count''' | ||
| The number of regular data sections contained in this block. | |||
|- | |- | ||
| 0x10 | | 0x10 |