-
-
Save Tachiorz/2dec939df1352e6c3ae917b905095103 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//-------------------------------------- | |
//--- 010 Editor v6.0.2 Binary Template | |
// | |
// File: | |
// Author: tachiorz | |
// Revision: | |
// Purpose: tpk | |
//-------------------------------------- | |
local long archive_start = 0; | |
struct Archive | |
{ | |
archive_start = FTell(); | |
char idString[14]; | |
byte ver1; | |
byte ver2; | |
uint64 unk; | |
uint dirChunkSignature; | |
uint dirEntryCount; | |
struct { | |
uint64 offset; | |
uint64 size; | |
} list[dirEntryCount] <optimize=false>; | |
int size; | |
char unk1[size]; // read by thing.Archive.decode(size) | |
FSeek(archive_start + list[0].offset + 16); | |
local int i = 0; | |
for (i = 0; i < dirEntryCount; ++i) | |
{ | |
struct { | |
char type; | |
// 1 : int ? | |
// 2 : float | |
// 3 : korean string | |
// 4,5 : blob | |
// 6 : 4 floats | |
// 7 : object | |
// 8 : 4x3 float matrix | |
// 12 : mixed ? | |
if(type == 3) // 3 - string | |
{ | |
ubyte len; | |
if (len != 255) | |
{ | |
char buf[len]; | |
} | |
else | |
{ | |
int dlen; | |
char buf[dlen]; | |
} | |
} | |
else if(type == 7) | |
{ | |
short classname_idx; | |
int size; | |
if(size == -1) | |
{ | |
byte key_type; | |
byte value_type; | |
int count; | |
char buf[list[i].size-13]; | |
} | |
else | |
{ | |
char buf[list[i].size-7]; | |
} | |
} | |
else | |
{ | |
char buf[list[i].size-1]; | |
} | |
} object <optimize=false>; | |
} | |
}; | |
Archive a[5600] <optimize=false>; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oh