Advertisement
Guest User

Untitled

a guest
Aug 28th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.06 KB | None | 0 0
  1. //--------------------------------------
  2. //--- 010 Editor v5.0.2 Binary Template
  3. //
  4. // File: .aimesh_ngrid Template
  5. // Author: Pupix <manolea.robert@gmail.com>
  6. // Revision: 1.0
  7. // Purpose: Read .aimesh_ngrid files from League of Legends
  8. //--------------------------------------
  9.  
  10. //--------------------------------------
  11. //** STRUCTS
  12. //--------------------------------------
  13.  
  14. struct POSITION {
  15. float X;
  16. float Y;
  17. float Z;
  18. };
  19.  
  20. struct HEADER {
  21. byte MajorVersion;
  22. short MinorVersion;
  23.  
  24. if (MajorVersion > 0) {
  25.  
  26. POSITION MinGridPos;
  27. POSITION MaxGridPos;
  28. float CellSize;
  29. uint XCellCount;
  30. uint YCellCount;
  31.  
  32. } else {
  33.  
  34. // In this version CellCount are actually
  35. // the last 2 shorts before file end padding
  36. // AFAIK only very old SR has it
  37. local uint XCellCount = 294;
  38. local uint YCellCount = 295;
  39. }
  40. };
  41.  
  42. struct CELL3 {
  43. float height;
  44. uint32 Unk1;
  45. float Arrival;
  46. byte Open;
  47. float Heuristic;
  48. uint32 Actors;
  49. short X;
  50. short Z;
  51. float Unk2;
  52. float Unk3;
  53. uint32 Unk4;
  54. uint32 SessionIDRelated;
  55. float Ref;
  56. short ArrivalDirection;
  57. short Flags;
  58. short RefNodes[2];
  59. byte unk5[3];
  60. };
  61.  
  62. struct CELL5 {
  63. float Height;
  64. uint32 Unk1;
  65. float Arrival;
  66. byte Open;
  67. float Heuristic;
  68. uint32 Actors;
  69. short X;
  70. short Z;
  71. float Unk2;
  72. float Unk3;
  73. uint32 Unk4;
  74. uint32 SessionIDRelated;
  75. float Ref;
  76. short ArrivalDirection;
  77. short Flags;
  78. short RefNodes[2];
  79. byte unk5[3];
  80. };
  81.  
  82. struct CELL7 {
  83. float Height;
  84. ushort Unk1;
  85. float MinHeight;
  86. ushort Unk2;
  87. float Heuristic;
  88. uint32 Actors;
  89. short X;
  90. short Z;
  91. float Unk3;
  92. float Unk4;
  93. uint32 SessionIDRelated;
  94. float Ref;
  95. short ArrivalDirection;
  96. short Flags;
  97. short RefNodes[2];
  98. };
  99.  
  100. struct FLOAT_MAP {
  101. uint XCount;
  102. uint YCount;
  103. float Unk1;
  104. float Unk2;
  105.  
  106. float Unk3[XCount * YCount];
  107. float Unk4[810899];
  108.  
  109. short Unk5;
  110. short Unk6;
  111. };
  112.  
  113. //--------------------------------------
  114. //** PARSING
  115. //--------------------------------------
  116.  
  117. HEADER header;
  118.  
  119. local int CellCounter = header.XCellCount * header.YCellCount;
  120.  
  121. switch (header.MajorVersion) {
  122. case 3:
  123. CELL3 NavigationGrid[CellCounter];
  124. break;
  125. case 5:
  126. CELL5 NavigationGrid[CellCounter];
  127. break;
  128. case 7:
  129. CELL7 NavigationGrid[CellCounter];
  130. break;
  131. default:
  132.  
  133. };
  134.  
  135. // Unknowns
  136. switch (header.MajorVersion) {
  137. case 5:
  138. ushort Unk1[CellCounter];
  139. byte Unk2[528];
  140. break;
  141. case 7:
  142. ushort Unk1[CellCounter];
  143. ushort Unk2[CellCounter];
  144. ushort Unk3[CellCounter];
  145. byte Unk4[1056];
  146. break;
  147. default:
  148.  
  149. };
  150.  
  151. // More unknowns
  152. FLOAT_MAP unk;
  153.  
  154.  
  155.  
  156. /*
  157. FLAGS
  158. CELL_IS_BRUSH = 0x1,
  159. CELL_WALL = 0x2,
  160. CELL_ALWAYS_VISIBLE = 0x100,
  161. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement