Skip to content

Instantly share code, notes, and snippets.

@Tachiorz

Tachiorz/tpk.bt Secret

Last active May 14, 2019 12:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tachiorz/2dec939df1352e6c3ae917b905095103 to your computer and use it in GitHub Desktop.
Save Tachiorz/2dec939df1352e6c3ae917b905095103 to your computer and use it in GitHub Desktop.
//--------------------------------------
//--- 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>;
@kerveroszero
Copy link

Oh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment