MAPU (File Format): Difference between revisions

From Retro Modding Wiki
Jump to navigation Jump to search
imported>Antidote
No edit summary
imported>Antidote
No edit summary
Line 57: Line 57:
| '''World Color'''; Used to color each room correctly
| '''World Color'''; Used to color each room correctly
|}
|}
[[Category:File Formats]]
[[Category:Metroid Prime]]
[[Category:Metroid Prime 2: Echoes]]

Revision as of 22:40, 3 March 2015

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.

Format

The MAPU format is broken in to 2 part, the header, and the world descriptors. Each world has it's own transform matrix, and a list of area transforms you multiply with the world's 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.

Header

The header is extremely simple following this format:

Type Description
u32 Magic; Always 0xABCDEF01
u32 Version; Always 1
u32 MAPA ID; The hexagon model
u32 World Count (WC)
Worlds[WC] The worlds in the game

World

Each world defines it's name, it's MLVL, 3x4 Transformation Matrix, Areas, and it's color.

Type Description
string Name; The internal name of the world e.g "Ruins"
u32 MLVL ID; The World metafile.
CTransform4f World Transform; The worlds position in the map
u32 Area Count (AC); The number of areas in this world
CTransform4f[AC] Area Transforms; The areas location relative to the worlds transform
Color4f World Color; Used to color each room correctly