MREA (Metroid Prime 2): Difference between revisions

Jump to navigation Jump to search
no edit summary
>Aruki
>Aruki
No edit summary
Line 15: Line 15:
{| class="wikitable"
{| class="wikitable"
! Offset
! Offset
! Size
! Type
! Count
! Name
! Description
! Description
|-
|-
| 0x0
| 0x0
| 4
| u32
| '''Magic'''; always 0xDEADBEEF
| 1
| '''Magic'''
| Always <code>0xDEADBEEF</code>.
|-
|-
| 0x4
| 0x4
| 4
| u32
| '''Version'''; see [[MREA (File Format)|hub article]]
| 1
| '''Version'''
| See [[MREA (File Format)|hub article]] for a list of possible version numbers.
|-
|-
| 0x8
| 0x8
| 4 &times; 12
| float
| '''Transform matrix'''
| 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
| 4
| u32
| '''Mesh count'''
| 1
| '''World Model Count'''
| Number of world models in this area.
|-
|-
| 0x3C
| 0x3C
| 4
| u32
| '''SCLY layer count'''
| 1
| '''Script Layer Count'''
| Number of script layers in this area.
|-
|-
| 0x40
| 0x40
| 4
| u32
| '''Section count''' (SC)
| 1
| '''Data Section Count'''
| Number of data sections in the file.
|-
|-
| 0x44
| 0x44
| 4
| u32
| '''Geometry section number''' (starts on materials)
| 1
| '''Geometry Section'''
| Section index for world geometry data. Always 0; starts on materials.
|-
|-
| 0x48
| 0x48
| 4
| u32
| '''SCLY section number'''
| 1
| '''Script Layers Section'''
| Section index for script layer data.
|-
|-
| 0x4C
| 0x4C
| 4
| u32
| '''SCGN section number'''
| 1
| '''Generated Script Objects Section'''
| Section index for generated script object data.
|-
|-
| 0x50
| 0x50
| 4
| u32
| '''Collision section number'''
| 1
| '''Collision Section'''
| Section index for collision data.
|-
|-
| 0x54
| 0x54
| 4
| u32
| '''Unknown section number'''
| 1
| '''Unknown Section 1'''
| Section index for first unknown section.
|-
|-
| 0x58
| 0x58
| 4
| u32
| '''Lights section number'''
| 1
| '''Lights Section'''
| Section index for light data.
|-
|-
| 0x5C
| 0x5C
| 4
| u32
| '''VISI section number'''
| 1
| '''Visibility Tree Section'''
| Section index for visibility tree data.
|-
|-
| 0x60
| 0x60
| 4
| u32
| '''PATH section number'''
| 1
| '''Path Section'''
| Section index for path data.
|-
|-
| 0x64
| 0x64
| 4
| u32
| '''FFFFFFFF section number'''
| 1
| '''Unknown Section 2'''
| Section index for second unknown section.
|-
|-
| 0x68
| 0x68
| 4
| u32
| '''PTLA section number'''
| 1
| '''Portal Area Section'''
| Section index for portal area data.
|-
|-
| 0x6C
| 0x6C
| 4
| u32
| '''EGMC section number'''
| 1
| '''Object-To-Static-Geometry Mapping Section'''
| Section index for object-to-static-geometry mapping data.
|-
|-
| 0x70
| 0x70
| 4
| u32
| '''Compressed block count'''
| 1
| '''Compressed Block Count'''
| Number of compressed data blocks in the file.
|-
|-
| 0x74
| 0x74
| 0xC
| u32
| 3
| '''Padding'''
| '''Padding'''
| Padding bytes that align the file with the next multiple-of-32 offset.
|-
|-
| 0x80
| 0x80
| 4 &times; SC
| u32
| '''Section sizes'''
| ''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=3 {{unknown|Pad to 32 bytes before compressed cluster definitions begins}}
| colspan=5 {{unknown|Pad to 32 bytes before compressed block definitions begins}}
|}
|}


Line 112: Line 154:
{| class="wikitable"
{| class="wikitable"
! Offset
! Offset
! Size
! Type
! Description
! Count
! Name
! Notes
! Notes
|-
|-
| 0x0
| 0x0
| 4
| u32
| '''Buffer size'''
| 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
| 4
| u32
| '''Uncompressed size'''
| 1
| '''Uncompressed Size'''
|  
|  
|-
|-
| 0x8
| 0x8
| 4
| u32
| '''Compressed size'''
| 1
| '''Compressed Size'''
| This is 0 on uncompressed blocks.
| This is 0 on uncompressed blocks.
|-
|-
| 0xC
| 0xC
| 4
| u32
| '''Section count'''
| 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
Anonymous user

Navigation menu