Guest User

GTA5 XDR format

a guest
Dec 2nd, 2013
576
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.44 KB | None | 0 0
  1. //--------------------------------------
  2. //--- 010 Editor v5.0 Binary Template
  3. //
  4. // File:
  5. // Author:
  6. // Revision:
  7. // Purpose:
  8. //--------------------------------------
  9.  
  10. int GetOffset(uint32 offset)
  11. {
  12. if (offset == 0)
  13. return 0;
  14. else
  15. return offset & 0x0fffffff;
  16. }
  17.  
  18. void CSeek(uint32 offset)
  19. {
  20. FSeek(offset&0xFFFFFFF+0x10);
  21. }
  22.  
  23. void GSeek(uint32 offset)
  24. {
  25. FSeek(offset&0xFFFFFFF+0x2010);
  26. }
  27.  
  28. BigEndian();
  29. struct{
  30. uint32 RSC7;
  31. uint32 RSC7version;
  32. uint32 RSC7system_flag;
  33. uint32 RSC7graphics_flag;
  34. local int CPUBLOCKSTART=0x10;
  35. struct{
  36. struct {
  37. uint32 VTable;
  38.  
  39. uint32 BlockMapAddress;
  40. uint32 ShaderGroup;
  41. uint32 SkeletonData;
  42. struct{
  43. float x;
  44. float y;
  45. float z;
  46. float w;
  47. }Vectors[3]<optimize=false>;;
  48. long modelCollection;
  49. long lodCollections[3];
  50. struct{
  51. float x;
  52. float y;
  53. float z;
  54. float w;
  55. }maxVector<optimize=false>;;
  56. uint32 unk1;
  57. uint32 neg[3];
  58. float unk2;
  59. uint32 unks[5];
  60.  
  61.  
  62. FSeek(0x10+(modelCollection&0xFFFFFFF));
  63. struct
  64. {
  65. uint32 modelCollectionPointer;
  66. uint16 count;
  67. uint16 count2;
  68. } modelCollection;
  69. FSeek(0x10+(modelCollection.modelCollectionPointer&0xFFFFFFF));
  70. uint32 models[modelCollection.count];
  71. local uint16 i;
  72. for(i=0; i<modelCollection.count; i++)
  73. {
  74. FSeek(0x10+(models[i]&0xFFFFFFF));
  75. struct
  76. {
  77. uint32 VTable;
  78. uint32 GeometryCollectionOffset;
  79. uint16 size1;
  80. uint16 size2;
  81. uint32 VectorCollectionOffset;
  82. uint32 MaterialCollectionOffset;
  83. FSeek(0x10 + (GeometryCollectionOffset&0xFFFFFFF));
  84. uint32 GeometryOffsetArray[4];
  85. for(i=0; i<4; i++)
  86. {
  87. FSeek((GeometryOffsetArray[i]&0xFFFFFFF) + 0x10);
  88. struct
  89. {
  90. uint32 VTable;
  91. uint32 null1;
  92. uint32 null2;
  93. uint32 VBOffset;
  94. uint32 null3;
  95. uint32 null4;
  96. uint32 null5;
  97. uint32 IBOffset;
  98. uint32 null6;
  99. uint32 null7;
  100. uint32 null8;
  101. uint32 indexCount;
  102. uint32 faceCount;
  103. uint16 vertCount;
  104. uint16 unkn_primitiveType;
  105. struct
  106. {
  107. FSeek((VBOffset&0xFFFFFFF) + 0x10);
  108. uint32 VTable;
  109. uint16 stride;
  110. uint16 unknown1;
  111. uint32 dataOffset;
  112. uint32 vertCount;
  113. uint32 dataOffset;
  114. uint32 null1;
  115. uint32 cpuOffset1;
  116. uint32 cpuOffset2;
  117.  
  118. FSeek((dataOffset&0xFFFFFFF) + 0x2010);
  119. struct
  120. {
  121. float x, y, z;
  122. if(stride == 28)
  123. float w;
  124. uint32 color;
  125. float tu, tv;
  126. } verts[vertCount]<optimize=false>;
  127. } VBO;
  128. }geometry;
  129. }
  130.  
  131. } model;
  132. }
  133.  
  134. local int ok=0;
  135.  
  136. }CPUBlock;
  137. FSeek(0x2000+CPUBLOCKSTART);
  138. struct{
  139.  
  140.  
  141. }GPUBlock;
  142. }xdr;
  143.  
  144.  
  145. }RSC7_Container;
Advertisement
Add Comment
Please, Sign In to add comment