Advertisement
sewer56lol

Sonic Heroes .cl 010 Editor Template

Feb 16th, 2018
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.30 KB | None | 0 0
  1. struct HEADER
  2. {
  3.     SetBackColor(0x808080);
  4.     uint    FileSize;
  5.     SetBackColor(0x8080ff);
  6.     uint    QuadTreeSectionOffset;
  7.     uint    TriangleSectionOffset;
  8.     uint    VertexSectionOffset;
  9.     SetBackColor(0x80ff80);
  10.     float   QuadTreeCenterX;
  11.     float   QuadTreeCenterY;
  12.     float   QuadTreeCenterZ;
  13.     float   QuadTreeLength;
  14.     SetBackColor(0x808000);
  15.     uint16  QuadtreeBasepower;
  16.     SetBackColor(0xff8080);
  17.     uint16  NumberOfTriangles;
  18.     uint16  NumberOfVertices;
  19.     uint16  NumberOfQuadTrees;
  20.     SetBackColor(0xffffff);
  21. }
  22.  
  23. // Declare/Exec struct.
  24. Header;
  25.  
  26. local int FirstSectionLength = Header.QuadTreeSectionOffset - 0x28;
  27. local int FirstSectionEntries = FirstSectionLength / 2;
  28.  
  29. SetBackColor(0x80ffff);
  30. struct TRIANGLEREFERENCESECTION
  31. {
  32.     uint16 TriangleIndex;
  33. }
  34. QUADTREETRIANGLES[FirstSectionEntries];
  35. SetBackColor(0xffffff);
  36.  
  37. SetBackColor(0x80ff80);
  38. struct NODESECTION
  39. {
  40.     uint16 NodeIndex;
  41.     uint16 NodeParent;
  42.     uint16 NodeChild;
  43.     uint16 RightNodeNeighbour;
  44.     uint16 LeftNodeNeighbour;
  45.     uint16 BottomNodeNeighbour;
  46.     uint16 TopNodeNeighbour;
  47.     uint16 NumberOfTriangles;
  48.     uint32 OffsetTriangleList;
  49.     uint16 PositioningOffsetValueLR;
  50.     uint16 PositioningOffsetValueTB;
  51.     byte  NodeDepthLevel;
  52.     byte  Null;
  53.     uint16 Null;
  54.     uint32 Null;
  55. }
  56. NodeSection[Header.NumberOfQuadTrees];
  57. SetBackColor(0xffffff);
  58. SetBackColor(0x8080ff);
  59. struct TRIANGLESECTION
  60. {
  61.     uint16 VertexIndex1;
  62.     uint16 VertexIndex2;
  63.     uint16 VertexIndex3;
  64.     uint16 AdjacentTriangleIndex1;
  65.     uint16 AdjacentTriangleIndex2;
  66.     uint16 AdjacentTriangleIndex3;
  67.     float VertexNormalizedUnitVectorX;
  68.     float VertexNormalizedUnitVectorY;
  69.     float VertexNormalizedUnitVectorZ;
  70.  
  71.     // See https://github.com/sewer56lol/HeroesCollisionModifier | Readme.md
  72.     struct COLLISIONFLAGS
  73.     {
  74.         ubyte TriangleCollisionFlags;
  75.         ubyte ForwardMovementPushback;
  76.         ubyte VerticalMovementPushback;
  77.         ubyte SidewaysMovementPushback;
  78.     } CollisionFlagsPrimary, CollisionFlagsSecondary;
  79. }
  80. TriangleSection[Header.NumberOfTriangles];
  81.  
  82. SetBackColor(0xc0c0c0);
  83. struct VERTEXSECTION
  84. {
  85.     float XPosition;
  86.     float YPosition;
  87.     float ZPosition;
  88. } VertexSection[Header.NumberOfVertices];
  89.  
  90. SetBackColor(0xffffff);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement