Collision map file: Difference between revisions
Appearance
NavMesh changes in Boktai 2/3 |
→Changes in Boktai 2/3: typo |
||
Line 211: | Line 211: | ||
The navigation mesh format is slightly different in Boktai 2/3. The core concepts remain the same, but the navigation mesh is now subdivided into independent "islands", where each island is unreachable from all other islands. For example, a map with 1 room would have 1 island, while a complicated indoor map with multiple rooms would have one island per room. NavRect and NavPortal numbering starts from 0 inside of every island. | The navigation mesh format is slightly different in Boktai 2/3. The core concepts remain the same, but the navigation mesh is now subdivided into independent "islands", where each island is unreachable from all other islands. For example, a map with 1 room would have 1 island, while a complicated indoor map with multiple rooms would have one island per room. NavRect and NavPortal numbering starts from 0 inside of every island. | ||
This implies that the distanceMap array in each | This implies that the distanceMap array in each island must not contain any 0xffff (unreachable) entries. | ||
<syntaxhighlight lang="c"> | <syntaxhighlight lang="c"> | ||
struct NavMesh_V2 { | struct NavMesh_V2 { | ||
/* offset 0x00 */ countIslands; | /* offset 0x00 */ u32 countIslands; | ||
// Byte offsets from start of this struct to each island | // Byte offsets from start of this struct to each island | ||
/* offset 0x04 */ islandOffsets[countIslands]; | /* offset 0x04 */ u32 islandOffsets[countIslands]; | ||
NavIsland islands[]; | NavIsland islands[]; |