MAPU (File Format): Difference between revisions

From Retro Modding Wiki
Jump to navigation Jump to search
imported>Antidote
(Created page with "The '''MAPU format''' is used to build the game's Universe Map, which is separated into several "Worlds", the format is extremely simple and is one of the few formats where we...")
 
>Aruki
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The '''MAPU format''' is used to build the game's Universe Map, which is separated into several "Worlds", the format is extremely simple and is one of the few formats where we know absolutely everything about it.
The '''MAPU format''' is used to build the game's universe map, which is split up by world. There are no format differences between Metroid Prime 1 and 2.


__TOC__
__TOC__
Line 5: Line 5:
== Format ==
== Format ==


The MAPU format is broken in to 2, the header, and the world descriptors. The world descriptors are further broken up into Area, each world has it's own transform matrix, and each area has a transform matrix that you multiply with the world matrix. However due to the way geometry works, the number of areas in the actual world may differ from the amount stored here, several rooms may share the same hexagon model for instance.
The MAPU format is broken into 2 parts: the header, and the world descriptors. Each world descriptor determines how that world's hexagon map is laid out. The number of areas in the world usually differs from the amount of hexagons present on the Universe Map.


=== Header ===
=== Header ===
Line 14: Line 14:
! Type
! Type
! Description
! Description
! Notes
|-
|-
| u32
| u32
| '''Magic'''; Always 0xABCDEF01
| '''Magic'''
| Always 0xABCDEF01
|-
|-
| u32
| u32
| '''Version'''; Always 1
| '''Version'''
| Always 1
|-
| [[MAPA (File Format)|MAPA]]
| '''Hexagon MAPA ID'''
| This is the MAPA file that contains the hexagon model
|-
|-
| u32
| u32
| '''MAPA ID'''; The hexagon model
| '''World count (WC)'''
|
|-
|-
| u32
| [[#World|Worlds[WC]]]
| '''World Count (WC)'''
| '''World array'''
|
|}
|}


=== World ===
=== World ===


Each world defines it's name, it's [[MLVL (File Format)|MLVL]], 3x4 Transformation Matrix, Areas, and it's color.
For each world, its internal name and [[MLVL (File Format)|MLVL file]] are listed. Following that is a list of 3x4 transformation matrices defining the location of each hexagon; then finally, the color of the world's hexagons.


{| class="wikitable"
{| class="wikitable"
! Type
! Type
! Description
! Description
! Notes
|-
|-
| string
| string
| '''Name'''; The internal name of the world e.g "Ruins"
| '''Name'''
| This is the internal name of the world; for example, "Ruins"
|-
|-
| u32
| u32
| '''[[MLVL (File Format)|MLVL]] ID'''; The World metafile.
| '''World [[MLVL (File Format)|MLVL]] ID'''
|-
|-
| CTransform4f
| CTransform4f
| '''World Transform'''; The worlds position in the map
| '''World transform'''
| The world map's transform within the universe map
|-
|-
| u32
| u32
| '''Area Count (AC)'''; The number of areas in this world
| '''Hexagon count (HC)'''
|-
|-
| CTransform4f[AC]
| CTransform4f[HC]
| '''Area Transforms'''; The areas location relative to the worlds transform
| '''Hexagon transforms'''
| This is the hexagon's transform within the world map; it's multiplied an additional time by the world transform
|-
|-
| Color4f
| CColor
| '''World Color'''; Used to color each room correctly
| '''World hexagon color'''
|
|}
|}
[[Category:File Formats]]
[[Category:Metroid Prime]]
[[Category:Metroid Prime 2: Echoes]]

Latest revision as of 07:33, 27 July 2016

The MAPU format is used to build the game's universe map, which is split up by world. There are no format differences between Metroid Prime 1 and 2.

Format

The MAPU format is broken into 2 parts: the header, and the world descriptors. Each world descriptor determines how that world's hexagon map is laid out. The number of areas in the world usually differs from the amount of hexagons present on the Universe Map.

Header

The header is extremely simple following this format:

Type Description Notes
u32 Magic Always 0xABCDEF01
u32 Version Always 1
MAPA Hexagon MAPA ID This is the MAPA file that contains the hexagon model
u32 World count (WC)
Worlds[WC] World array

World

For each world, its internal name and MLVL file are listed. Following that is a list of 3x4 transformation matrices defining the location of each hexagon; then finally, the color of the world's hexagons.

Type Description Notes
string Name This is the internal name of the world; for example, "Ruins"
u32 World MLVL ID
CTransform4f World transform The world map's transform within the universe map
u32 Hexagon count (HC)
CTransform4f[HC] Hexagon transforms This is the hexagon's transform within the world map; it's multiplied an additional time by the world transform
CColor World hexagon color