Cross-platform C SDK logo
EspañolEnglish
Cross-platform C SDK

Resource packs

❮ Back
Next ❯

#Header

#include <core/respack.h>


#Functions

voidrespack_destroy (...)
const char_t*respack_text (...)
const byte_t*respack_file (...)

Resource packs are generated at compile time and used at run time by the applications. More information in Resources.

❮ Back
Next ❯

#respack_destroy ()

Destroy a resource package.

void
respack_destroy(ResPack **pack);
pack

Resource Package. Will be set to NULL after destruction.


#respack_text ()

Get a text from a resource package.

const char_t*
respack_text(const ResPack *pack,
             const ResId id);
pack

Resource package.

id

Resource identifier.

Return

UTF8 C string terminated in null character '\0'.


#respack_file ()

Get a pointer to the contents of a file, included in a resource package.

const byte_t*
respack_file(const ResPack *pack,
             const ResId id,
             uint32_t *size);
pack

Resource package.

id

Resource identifier.

size

Get the file size in bytes.

Return

Pointer to file content (raw bytes).

❮ Back
Next ❯