Jump to content

Collision map file: Difference between revisions

Paths
(Unknown block 1)
(Paths)
Line 16: Line 16:
| u32 || Offset from start of file to [[#Zones]]
| u32 || Offset from start of file to [[#Zones]]
|-
|-
| u32 || Offset from start of file to [[#Unknown block 1]] (maybe related to enemy patrolling?)
| u32 || Offset from start of file to [[#Paths]]
|-
|-
| u32 || Offset from start of file to [[#Unknown block 2]] (maybe related to enemy patrolling?)
| u32 || Offset from start of file to [[#Unknown block 2]] (maybe related to enemy patrolling?)
Line 24: Line 24:
| || Zones
| || Zones
|-
|-
| || Unknown block 1
| || Paths
|-
|-
| || Unknown block 2
| || Unknown block 2
Line 97: Line 97:
= Unknown block 1 =
= Unknown block 1 =
<syntaxhighlight lang="c">
<syntaxhighlight lang="c">
struct UnknownBlock1 {
struct PathData {
   /* offset 0x00 */ u32 itemCount;
   /* offset 0x00 */ u32 pathCount;
   /* offset 0x04 */ UnknownBlockItem items[itemCount];
   /* offset 0x04 */ Path paths[pathCount];


   UnknownBlockData data[];
   PathNode nodes[];
};
};


struct UnknownBlock1Item {
struct Path {
   /* offset 0x00 */ u16 dataCount;
   /* offset 0x00 */ u16 nodeCount;


   // Byte offset from start of UnknownBlock1 to data
   // Byte offset from start of PathData to first node
   /* offset 0x02 */ u16 dataOffset;
   /* offset 0x02 */ u16 nodeOffset;
};
};


struct UnknownBlock1Data {
struct PathNode {
   u16 a, b, c, d;
   /* offset 0x00 */ u16 x; // 1 tile = 0x100
  /* offset 0x02 */ u16 y;
  /* offset 0x03 */ u8 delay; // In frames
  /* offset 0x04 */ u8 unknown_0x04;
  /* offset 0x06 */ u16 unknown_0x06;
};
};
</syntaxhighlight>
</syntaxhighlight>