smeargle-gd/src/script.h

30 lines
561 B
C
Raw Permalink Normal View History

2023-11-27 21:38:00 +00:00
2023-11-28 00:39:00 +00:00
#ifndef _SMEARGLE_SCRIPT_H
#define _SMEARGLE_SCRIPT_H
2023-11-27 21:38:00 +00:00
#include <stdbool.h>
2023-11-28 08:25:03 +00:00
#include <libgen.h>
2023-11-27 21:38:00 +00:00
2023-11-28 00:39:00 +00:00
#include "font.h"
2023-11-30 05:01:38 +00:00
#include "node.h"
2023-11-28 00:39:00 +00:00
2023-11-27 21:38:00 +00:00
typedef struct {
2023-11-28 06:40:36 +00:00
char *name;
2023-11-27 21:38:00 +00:00
char *filename;
2023-11-28 00:39:00 +00:00
font_t font;
2023-11-27 21:38:00 +00:00
char *format;
unsigned int min_tiles_per_line;
unsigned int max_tiles_per_line;
bool leading_zeroes;
unsigned int tile_offset;
char *raw_filename;
char *dedupe_filename;
char *tilemap_filename;
bool little_endian;
2023-11-28 00:39:00 +00:00
} script_t;
2023-11-30 05:01:38 +00:00
script_t script_create(toml_table_t *table, const char *base_path, node_t *fonts);
2023-11-28 06:40:36 +00:00
void script_destroy(script_t script);
2023-11-28 00:39:00 +00:00
#endif