I guess you could say I'm a part of this by default.
I'm just gonna post my stuff in C# code... no point reformatting it.
Btw, please don't call the Resource Group "Pipelines" >.>
Really, "relocation table" or "resource group" is a much better name for it...
We have to use like terms.
PAT0 parsing and rebuilding is done.
The only thing that needs to be fully figured out is the secondary flags.
I need to update Bero's code so it works better.
Anway, SHP0:
unsafe struct SHP0
{
public BRESCommonHeader _header;
public bint _dataOffset;
public bint _stringListOffset; //List of vertex node strings
public bint _stringOffset;
public bint _unk1; //0
public bshort _numFrames;
public bshort _numEntries;
public bint _unk2; //0x00, 0x01
unsafe struct SHP0Entry
{
public bint _numEntries; //entries + 1 index part
public bint _stringOffset;
public bint _numIndices;
public bint _unk;
public bint _indiciesOffset;
I'm pretty sure the keyframes are I12 Keyframe Entries except with no frame scale.
public unsafe struct I12Header
{
public bushort _numFrames;
public bushort _unk;
public bfloat _frameScale; //This is the value that isn't present in SHP0
public unsafe struct I12Entry
{
public bfloat _index;
public bfloat _value;
public bfloat _tangent;
Also, REFF definitely controls REFT images. It's not SRT0 but REFF that makes some of the images go together like a GIF. (like animated fire or a spinning coin)
Havok Physics:
public unsafe struct PhysicsHeader
{
public const uint Tag1 = 0x57E0E057;
public const uint Tag2 = 0x10C0C010;
public uint _tag1; //0x57E0E057
public uint _tag2; //0x10C0C010
public bint _unk2; //0
public bint _unk3; //4
public byte _unk4; //4
public bshort _unk5; //1
public byte _unk6; //1
public bint _unk7; //3
public bint _unk8; //1
public bint _unk9; //0
public bint _unk10; //0
public buint _unk11; //Size/Offset
//Three sections of offsets:
//__classnames__
//__data__
//__types__
public OffsetSection ClassNames;
public OffsetSection Data;
public OffsetSection Types;
public String Name { get { return new String((sbyte*)Address + 0x28); } }
public VoidPtr ClassNamesData { get { return Address + *(buint*)(Address + 0x54); } }
public VoidPtr DataData { get { return Address + *(buint*)(Address + 0x84); } }
public VoidPtr TypesData { get { return Address + *(buint*)(Address + 0xB4); } }
}
public unsafe struct OffsetSection
{
public fixed byte name[0x10];
public bint _unk0; //-1
public buint _dataOffset; //Main header is the base
//Offsets to indices struct. _dataOffset is the base for everything.
public buint _dataOffset1;
public buint _dataOffset2;
public buint _dataOffset3;
public buint _dataOffset4;
public buint _dataOffset5;
public buint _dataOffset6;
//When offsets begin to repeat, stop reading
//Indices count is ((next data offset) - (current data offset)) / 2
//Indices are padded to 0x10 with 0xFF
public String Name { get { return new String((sbyte*)Address); } }
}
public unsafe struct IndexGroup
{
//Base is the offset sections's _dataOffset
//Still not sure exactly how these are used, but they're definitely a datalength or offset
public buint _dataOffset; //Not necessarily...
public buint _stringOffset; //Not necessarily...
Also, SCN0 is almost rebuildable. I finished STPM too.
SCN0 definitely needs more research, especially since it has a frame count.