- Joined
- Nov 17, 2010
- Messages
- 34
- Reaction score
- 21
might extend this into the structure for sd01 if they are familiar
i have unpack and pack working now so the next step is making a tool to edit the files in the archive.
i have unpack and pack working now so the next step is making a tool to edit the files in the archive.
Code:
//------------------------------------------------
//--- 010 Editor v11.0.1 Binary Template
//
// File: Lobby_info.txt
// Authors: Reza
// Version: 69
// Purpose: IDK
// Category: SUCK ITT
// File Mask: whut?
// ID Bytes: noidea
// History: lets go
//------------------------------------------------
//original concept
/*
byte[4] tag = SD01
int version = 3
int count = 11
int usedcount = elementsize(3*4) * last index used of count
loop count {
int index
int unk0
int value
}
int count
string [count];
*/
typedef struct
{
local string _val <hidden=true>;
_val = ReadLine(FTell(), 2000);
char value[Strlen(_val)+1];
}uString <read=ReadStrang>;
string ReadStrang(uString &in)
{
return in._val;
}
local int lindex =0;
typedef struct
{
int size;
byte value[size];
}uData <read=ReadData>;
string ReadData(uData &in)
{
string out;
SPrintf(out,"%d", in.size) ;
return out;
}
//Header
typedef struct
{
char TAG[4];
int version;
int count;
} _Header <read=readHead>;
string readHead(_Header &in)
{
string out;
SPrintf(out,"%s", in.TAG) ;
return out;
}
//FileValue
typedef struct
{
int ID;
int UNK0;
int Value;
} _Val ;
typedef struct ( int count)
{
int UsedSize; //mod4 ==0
local int curpos <hidden=true>;
curpos = FTell();
byte data[UsedSize]<optimize=false>;
FSeek(curpos);
_Val Values[count]<optimize=false>;
} _Values <read=readFileValues>;
string readFileValues(_Values &in)
{
string out;
SPrintf(out,"Values") ;
return out;
}
//USE THE poop
_Header Header;
_Values Value(Header.count);
int strcnt;
uString Values[strcnt]<optimize=false>;
byte unkterminator[2];//not sure