MREA (File Format): Difference between revisions

From Retro Modding Wiki
Jump to navigation Jump to search
imported>Antidote
(Created page with "The '''.MREA file format''' is used to define areas in Metroid Prime and Donkey Kong Country Returns. MREA files are broken up into many sections, and each section serves a sp...")
 
imported>Antidote
No edit summary
Line 30: Line 30:
|0x3C
|0x3C
|4
|4
|'''SCLY Count''' ''Note: Not in Metroid Prime 1''
|'''SCLY Count''' ''Note: Not present in Metroid Prime 1''
|-
|-
|0x40
|0x40
|4
|4
|'''Section Count'''
|'''Section Count'''
|}
{|class="wikitable"
!Version
!Game
|-
|-
|0x44
|15
|4
|'''Metroid Prime 1'''
|'''Compress Block Count''' ''Note: Not in Metroid Prime 1''
|-
|25
|'''Metroid Prime 2'''
|-
|30
|'''Metroid Prime 3'''
|-
|32
|'''Donkey Kong Country Returns'''
|}
 
 
 
==Metroid Prime Section Numbers==
 
Immediately following the header each section in an MREA is given it's own number, the following is the order in which they appear:
 
{|class="wikitable"
!Description
|-
|'''Materials'''
|-
|'''SCLY'''
|-
|'''SCGN''' ''Note: Not present in Metroid Prime 1''
|-
|'''Collision'''
|-
|{{unknown|Unknown}}
|-
|'''Lights'''
|-
|'''VISI'''
|-
|'''PATH'''
|-
|'''AROT'''
|-
|-
|0x48
|'''PTLA''' ''Note: Not present in Metroid Prime 1''
|4
|'''Section Number Count (N)''' ''Note: Only in Metroid Prime 3 and Donkey Kong''
|-
|-
|0x60
|'''EGMC''' ''Note: Not present in Metroid Prime 1''
|(N*4)
|}
|'''Section Sizes'''
 
==Metroid Prime 3 & Donkey Kong Header==
 
Metroid Prime 3 and Donkey Kong Country Returns share the same header, also Metroid Prime 2 contains the Compressed Block Count present in this header as well.
 
{| class="wikitable"
!Offset
!Size
!Description
|-
|-
|colspan=3|End Of header
|0x0
|4
|'''Compressed Block Count''' ''Note: Present in Metroid Prime 2''
|0x4
|'''Section Number Count''' ''Note: see below''
|}
|}

Revision as of 03:48, 26 January 2015

The .MREA file format is used to define areas in Metroid Prime and Donkey Kong Country Returns. MREA files are broken up into many sections, and each section serves a specific purpose. However for the sake of brevity this article will only cover each revision of the MREA header.

Universal Header

This header is shared between Metroid Prime and Donkey Kong Country, and is fairly straight forward.

Offset Size Description
0x0 4 Magic Number 0xDEADBEEF
0x4 4 File Version See below
0x8 48 Transformation Matrix The position of the area in world-space
0x38 4 Mesh Count
0x3C 4 SCLY Count Note: Not present in Metroid Prime 1
0x40 4 Section Count
Version Game
15 Metroid Prime 1
25 Metroid Prime 2
30 Metroid Prime 3
32 Donkey Kong Country Returns


Metroid Prime Section Numbers

Immediately following the header each section in an MREA is given it's own number, the following is the order in which they appear:

Description
Materials
SCLY
SCGN Note: Not present in Metroid Prime 1
Collision
Unknown
Lights
VISI
PATH
AROT
PTLA Note: Not present in Metroid Prime 1
EGMC Note: Not present in Metroid Prime 1

Metroid Prime 3 & Donkey Kong Header

Metroid Prime 3 and Donkey Kong Country Returns share the same header, also Metroid Prime 2 contains the Compressed Block Count present in this header as well.

Offset Size Description
0x0 4 Compressed Block Count Note: Present in Metroid Prime 2 0x4 Section Number Count Note: see below