Difference between revisions of "FF8/FileFormat MAP"
my_wiki>Aali |
my_wiki>Aali |
||
Line 5: | Line 5: | ||
== Tile format == | == Tile format == | ||
=== Type 1 (Paletted images?) === | === Type 1 (Paletted images?) === | ||
− | Two signed 16-bit integers, X and Y relative to center (0, 0) | + | Two signed 16-bit integers, X and Y relative to center (0, 0)<br /> |
− | Another 16-bit value, probably a fixed-point representation of the Z coordinate (divide by 4096 to get a floating point value) | + | Another 16-bit value, probably a fixed-point representation of the Z coordinate (divide by 4096 to get a floating point value)<br /> |
− | 4 bits, which 128x256 texture to use, if you consider the MIM to be one big image, just multiply this value by 128 and add it to the source X coordinate | + | 4 bits, which 128x256 texture to use, if you consider the MIM to be one big image, just multiply this value by 128 and add it to the source X coordinate<br /> |
− | 4 unknown bits, may be related to blending/effects | + | 4 unknown bits, may be related to blending/effects<br /> |
− | Unknown byte, always 0 (?) | + | Unknown byte, always 0 (?)<br /> |
− | 6 unknown bits | + | 6 unknown bits<br /> |
− | 4 bits specifying which palette to use, add 8 to this number to get the right palette from the MIM | + | 4 bits specifying which palette to use, add 8 to this number to get the right palette from the MIM<br /> |
− | 6 unknown bits | + | 6 unknown bits<br /> |
− | Two bytes, source X and Y coordinates to sample the tile from | + | Two bytes, source X and Y coordinates to sample the tile from<br /> |
− | Unknown byte | + | Unknown byte<br /> |
− | 1 byte specifying which blend mode to use for this tile, 1 is additive blending, 4 seems to be the default (no blending). | + | 1 byte specifying which blend mode to use for this tile, 1 is additive blending, 4 seems to be the default (no blending).<br /> |
− | 2 unknown bytes, the last one may be related to background animation. | + | 2 unknown bytes, the last one may be related to background animation.<br /> |
=== Type 2 (Non-paletted images?) === | === Type 2 (Non-paletted images?) === | ||
− | X and Y, same as above | + | X and Y, same as above<br /> |
− | Source coordinates, both 16-bit this time | + | Source coordinates, both 16-bit this time<br /> |
− | Possible Z coordinate | + | Possible Z coordinate<br /> |
− | 4 bits, which 128x256 texture to use, same as above | + | 4 bits, which 128x256 texture to use, same as above<br /> |
− | 4 unknown bits | + | 4 unknown bits<br /> |
− | 5 bytes, all unknown | + | 5 bytes, all unknown<br /> |
Revision as of 05:14, 25 July 2009
Contents
MAP Files
MAP files contain data about the tiles used to draw the field background. Every 16 bytes of the file is one 16x16 tile, ending with the special signature 0x7FFF followed by 12 zero bytes.
Tile format
Type 1 (Paletted images?)
Two signed 16-bit integers, X and Y relative to center (0, 0)
Another 16-bit value, probably a fixed-point representation of the Z coordinate (divide by 4096 to get a floating point value)
4 bits, which 128x256 texture to use, if you consider the MIM to be one big image, just multiply this value by 128 and add it to the source X coordinate
4 unknown bits, may be related to blending/effects
Unknown byte, always 0 (?)
6 unknown bits
4 bits specifying which palette to use, add 8 to this number to get the right palette from the MIM
6 unknown bits
Two bytes, source X and Y coordinates to sample the tile from
Unknown byte
1 byte specifying which blend mode to use for this tile, 1 is additive blending, 4 seems to be the default (no blending).
2 unknown bytes, the last one may be related to background animation.
Type 2 (Non-paletted images?)
X and Y, same as above
Source coordinates, both 16-bit this time
Possible Z coordinate
4 bits, which 128x256 texture to use, same as above
4 unknown bits
5 bytes, all unknown