Cavestory/pxm

The .pxm file format is used to store maps. It has tile data, as well as map width and length. The exact tile is found by using the map tileset. The tileset is not stored in the .pxm.

The tiles are read from left to right, top to bottom. There are 16 tiles per row. If the .pxm read 0x11 (17), it is referring to the tile at row 2, columb 1. If it read 0x10 (16), it is referring to row 1, columb 16.

The first 4 bytes are the file header, and they are always 50 58 4D 10 (PXMɫ)

The next 2 bytes are the map width, in tiles

The last 2 bytes are the map height Every other byte relates to a tile.