Asset extractor for the Rhythm Heaven Groove (Demo Version). Encoder is WIP.
The name stands for bread and how "pain of the ass" this was, name was suggested by Saraistupid
The C API is declared in pita.h (auto-generated by cbindgen).
#include "pita.h"
#include <stdio.h>
int main(void) {
// Read a .tex file (zstd-compressed BC7 block-linear texture)
// Optional companion .spr provides GOB parameters for large textures
uint8_t *tex_data = ...; size_t tex_len = ...;
uint8_t *dds = NULL;
size_t dds_len = 0;
int width, height, format;
int ret = pita_tex_decode(tex_data, tex_len, NULL, 0,
&dds, &dds_len, &width, &height, &format);
if (ret != 0) {
fprintf(stderr, "Error: %s\n", pita_error_string(ret));
return 1;
}
fwrite(dds, 1, dds_len, stdout);
pita_tex_free(dds, dds_len);
return 0;
}Return 0 on success, negative on error. Use pita_error_string(code) for descriptions.
- vincells - dumping the assets from memory used for testing
- ScanMountGoat/tegra_swizzle - block-linear deswizzle reference