Advertisement
Guest User

hkxP@ckedB1inary - Loomy WIP

a guest
Apr 19th, 2016
472
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.23 KB | None | 0 0
  1. //--------------------------------------
  2. //--- 010 Edit0r v6.0.3 B1nary Template
  3. //
  4. // File: Hav0k hkxB1naryP@cked (QD - B2S / HR) - BigEndian (PS3)
  5. // Author: Loomy (With Big Thanks to hkxPack java Authors research <3 )
  6. // Revision:
  7. // Purpose: hk_2011.1.0-r1 (Around 2012 // first or Second Havok VISION bundle)
  8. //--------------------------------------
  9.  
  10. ///**** CHANGEto 0 or Offset of hkHdr WaaW 57E057E0
  11.  
  12. FSeek(54324);
  13.  
  14. BigEndian();
  15.  
  16. struct hkHdrFlags
  17. {
  18. //ubyte[4] LayoutRules
  19. ubyte uk;// no.# Flags ? = 4
  20. ubyte uk1;
  21. ubyte Endianness; // 01 = BE 00 = LE (Bool)
  22. ubyte Platform; // ?? 01 = PS3 (Couldbe wrong, or swap with one of above flag)
  23.  
  24. };
  25. int32 classNameOffsetBegin( int32 &num )
  26. {
  27.  
  28. return num ;
  29.  
  30. };
  31. string getString()
  32. {
  33. local string s;
  34.  
  35. return s;
  36. };
  37. local int32 clsNmOff2;
  38. local int32 dataOffset;
  39. local int64 dataffset2;
  40. typedef struct
  41. {
  42. //local int64 previousOffset = FTell();
  43. dataffset2 = FTell() + 48;
  44. char sectionHdr[16];
  45. int32 magicFF;
  46. int32 anotherOffset; // ???
  47.  
  48. }classTypes <read=getSectionTypes>;
  49. typedef struct
  50. {
  51. FSeek(dataffset2);
  52. char sectionHdr[16];
  53. int32 magicFF;
  54. int32 SameAsTypesOffset; // ???
  55. int32 idk1;
  56. int32 idk2;
  57. int32 idk3;
  58. int32 idk4;
  59. int32 idk5;
  60. int32 idk6;
  61.  
  62. }dataSection <read=getSectionData>;
  63. typedef struct
  64. {
  65. char sectionHdr[16];
  66. int32 magicFF;
  67. int32 dataOffset_;
  68. dataOffset = dataOffset_;
  69. int32 data1Offset;
  70. int32 data2Offset;
  71. int32 data3Offset;
  72. int32 data4Offset;
  73. int32 data5Offset;
  74. int32 dataEndOffset;
  75.  
  76. }classNames <read=getSection>;
  77.  
  78. typedef struct
  79. {
  80. char Magic[8];
  81. /// This is a user settable tag.
  82. int32 m_userTag;
  83.  
  84. /// Binary file version. Currently 9
  85. int32 m_fileVersion;
  86.  
  87. /// The structure layout rules used by this file.
  88. //ubyte m_layoutRules[4];
  89. hkHdrFlags Flags; // ubyte[4]
  90.  
  91. /// Number of packfilesections following this header.
  92. int32 m_numSections;
  93.  
  94. /// Where the content's data structure is (section and offset within that section).
  95. int32 m_contentsSectionIndex;
  96. int32 m_contentsSectionOffset;
  97.  
  98. /// Where the content's class name is (section and offset within that section).
  99. int32 m_contentsClassNameSectionIndex;
  100. //*** Start of File + 0x8 Header + offset = classname section, incl Hdr, Int32 mystery, up to magic "FF"
  101. int32 m_contentsClassNameSectionOffset;
  102.  
  103. /// Future expansion
  104. char m_contentsVersion[16];
  105. int32 misc;
  106. int32 magicFFFFF;
  107.  
  108. }Header <read=getSectionHdr>;
  109.  
  110.  
  111.  
  112. string getSection( classNames &cls )
  113. {
  114.  
  115. return cls.sectionHdr;
  116.  
  117. }
  118. string getSectionTypes( classTypes &cls )
  119. {
  120.  
  121. return cls.sectionHdr;
  122.  
  123. }
  124. string getSectionHdr( Header &cls )
  125. {
  126.  
  127. return cls.m_contentsVersion;
  128.  
  129. }
  130. string getSectionData( dataSection &cls )
  131. {
  132.  
  133. return cls.sectionHdr;
  134.  
  135. }
  136.  
  137. struct old
  138. {
  139. Header header;
  140.  
  141. };
  142.  
  143.  
  144. Header hkHeader;
  145.  
  146. classNames hkClassNames;
  147. classTypes hkClassTypes;
  148. dataSection hkData;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement