Skip to content

Titoot/pita

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pita

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

C/C++ API

The C API is declared in pita.h (auto-generated by cbindgen).

Decode a texture

#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;
}

Error codes

Return 0 on success, negative on error. Use pita_error_string(code) for descriptions.

Credits

About

Asset extractor for the Rhythm Heaven Groove (Demo Version)

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors