Map matrix: Difference between revisions

From ProjectPokemon Wiki
Jump to navigation Jump to search
(Created page with 'The map_matrix contains the data that associates the graphically generated maps to the map values. ==File location== Pokemon DPPt- root/fielddata/mapmatrix/map_matrix.narc Pok...')
 
mNo edit summary
Line 33: Line 33:
|}
|}


* Length determined by 0x04
<nowiki>* Length determined by 0x04</nowiki>


** Length of data is Height X Width
<nowiki>** Length of data is Height X Width</nowiki>


==Data In Use==
==Data In Use==

Revision as of 20:40, 4 December 2009

The map_matrix contains the data that associates the graphically generated maps to the map values.

File location

Pokemon DPPt- root/fielddata/mapmatrix/map_matrix.narc

Pokemon HGSS- root/a/0/4/1

Data Structure

Data Offset Size Description
0x00 Uint8 Width of Global Map
0x01 Uint8 Height of Global Map
0x04 Uint8 Number of Characters of Map Prefix
0x05 Char* Map Prefix Name
Next UInt16** Data

* Length determined by 0x04

** Length of data is Height X Width

Data In Use

Let Height = 3, Width = 3, Data = ABCDEFGHI, Map Prefix = ExMap (so prefix length is 5)

[[A B C]
 [D E F]
 [G H I]]

This illustrates that the value at B goes with the map named ExMap00_01c because B is (0,1) in the above matrix. The map names are declared within the proper land_data[_release] files.

The value of B is the map value, that is, the value of the index of the map (where 411 is Twinleaf Town in DPPt and 60 is New Bark Town in HGSS).