11#define HEADPACK_INCLUDE_GUARD "RESEMB_H"
13#define HEADPACK_FNAME_MAX 255
15#define HEADPACK_STATE_IN_FMT_ARG 1
16#define HEADPACK_STATE_OUT_FMT_ARG 2
18#define HEADPACK_DEFS_MAX 255
19#define HEADPACK_HEADERS_MAX 255
21#define HEADPACK_TYPE_MAX 8
24#define PATH_TYPE_BIN 0
26#define PATH_TYPE_TXT 1
28typedef int (*headpack_writer)(
const char*, FILE* );
29typedef int (*headpack_indexer)(
const char*[], int, FILE* );
33 headpack_writer writer;
34 headpack_indexer indexer;
35 char type[HEADPACK_TYPE_MAX];
39 char prefix, headpack_writer writer, headpack_indexer indexer,
42int headpack_register_h(
char* h );
68 unsigned char* buffer_in,
int buffer_in_sz,
const char* res_path,
69 int id, FILE* header,
int in_fmt,
int out_fmt );
71struct HEADPACK_DEF* headpack_get_def(
const char* filename );
74 FILE* header,
int paths_in_sz,
const char* paths_in[],
75 int in_fmt,
int out_fmt );
77int headpack_main(
int argc,
char* argv[] );
81int g_headpack_defs_sz = 0;
82char* g_headpack_headers[HEADPACK_HEADERS_MAX];
83int g_headpack_headers_sz = 0;
86extern int g_headpack_defs_sz;
87extern char* g_headpack_headers[];
88extern int g_headpack_headers_sz;
int path_bin_or_txt(const char *path)
Determine if a path points to a bitmap or tilemap.
int encode_binary_buffer(unsigned char *buffer_in, int buffer_in_sz, const char *res_path, int id, FILE *header, int in_fmt, int out_fmt)
Write the contents of the given buffer into the provided header as a hex-encoded constant to be compi...
int path_to_define(const char *path, FILE *header)
Given a file path, strip the directory and extension and write the resulting basename to the provided...
Definition: headpack.h:31