Advertisement
Guest User

Untitled

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