VelouriasMoon / TotkRSTB

A simple CMD tool for editing RSTB/RESTBL files for TOTK.
12 stars 2 forks source link

v1 Header Support? #8

Open Timtodile opened 11 months ago

Timtodile commented 11 months ago

While I understand the purpose of this tool is to help mod Tears of the Kingdom, Nintendo Switch Sports also uses RSTB but has a different header. I think it would be great if this tool had v1 header support (The one NSS uses). TotkRSTB is compatible with other ModuleSystem games that use the v2 header such as Mario Wonder, but since NSS has the v1 header it is incompatible. From what I've heard, the v1 header is:

struct ResRsizetablePathEntry {
  char path[0x100];
  u32  size;
};
struct ResRsizetableHashEntry {
  u32 path_crc32b;
  u32 size;
};
struct ResRsizetableV1 {
  u32 magic;
  u32 hash_entry_count;
  u32 path_entry_count;

  ResRsizetableHashEntry hash_entry_array[hash_entry_count];
  ResRsizetablePathEntry path_entry_array[path_entry_count];
};

I'm going to be honest, I'm not sure what this means myself, it's just what I've been told. Sorry if this is janky or anything, I'm not really a coding guy. :C

Timtodile commented 11 months ago

mb i accidentally closed this 💀