386
edits
m (→Zone data) |
No edit summary |
||
Line 1: | Line 1: | ||
Map files are stored in directory id_low = 0xd710, id_high = 0x9305 in the [[Master file table]]. They contain the gameplay relevant details of a map. This includes heights, collision data, event triggers, and so on. They do *not* include graphics (tile sets, tile maps, palettes, etc.), those are stored elsewhere (''TODO'': Where?). | Map files are stored in directory id_low = 0xd710, id_high = 0x9305 in the [[Master file table]]. They contain the gameplay relevant details of a map. This includes heights, collision data, event triggers, and so on. They do *not* include graphics (tile sets, tile maps, palettes, etc.), those are stored elsewhere (''TODO'': Where?). | ||
Most (all?) maps are stored LZ77 (<code>swi 0x11</code>) compressed. When loading a map, the game checks if the map file starts with the ASCII characters "HP" (hex: <code>0x48, 0x50</code>). If it does, then the map file is not compressed, and used by the game as-is. If it does not start with these characters, the game will LZ77 decompress it to EWRAM (in Boktai 1: to 0x0202a400). | = Compression = | ||
Most (all?) maps are stored LZ77 (<code>swi 0x11</code>) compressed. When loading a map, the game checks if the map file starts with the ASCII characters "HP" (hex: <code>0x48, 0x50</code>). If it does, then the map file is not compressed, and used by the game as-is. If it does not start with these characters, the game will LZ77 decompress it to EWRAM (in Boktai 1: to 0x0202a400). Note that the first 4 bytes after decompression ''must be discarded'' (they will contain the uncompressed length of the file). | |||
= File format = | = File format = |