Compare commits
No commits in common. "10ac5c088f10a2aece4b7974ef7174a66d231ce2" and "91e34655413e4bdc1e26ccc8e0206e26ca5b629f" have entirely different histories.
10ac5c088f
...
91e3465541
|
@ -1,18 +0,0 @@
|
|||
name="Example"
|
||||
|
||||
[font]
|
||||
"Melissa 8"="melissa8.toml"
|
||||
|
||||
[[script]]
|
||||
name="example"
|
||||
filename="example.txt"
|
||||
font="Melissa 8"
|
||||
min_tiles_per_line=0
|
||||
max_tiles_per_line=0
|
||||
tilemap_format="thingy"
|
||||
leading_zeroes=false
|
||||
tile_offset=0
|
||||
raw_filename="example_raw.png"
|
||||
dedupe_filename="example_ded.png"
|
||||
tilemap_filename="example.tbl"
|
||||
little_endian=false
|
|
@ -1,6 +0,0 @@
|
|||
Potion
|
||||
Hi Potion
|
||||
Phoenix Tail
|
||||
X-Potion
|
||||
Huh?!
|
||||
Oh my god, are you serious?!
|
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB |
|
@ -1,93 +0,0 @@
|
|||
name="Melissa 8"
|
||||
filename="melissa8.png"
|
||||
bits_per_pixel=2
|
||||
width=8
|
||||
height=8
|
||||
palette=[
|
||||
'008080',
|
||||
'282828',
|
||||
'f8f8f8',
|
||||
'a8a8a8'
|
||||
]
|
||||
[map]
|
||||
"a"=[1, 5]
|
||||
"b"=[2, 5]
|
||||
"c"=[3, 5]
|
||||
"d"=[4, 5]
|
||||
"e"=[5, 5]
|
||||
"f"=[6, 5]
|
||||
"g"=[7, 5]
|
||||
"h"=[8, 5]
|
||||
"i"=[9, 4]
|
||||
"j"=[10, 3]
|
||||
"k"=[11, 5]
|
||||
"l"=[12, 4]
|
||||
"m"=[13, 8]
|
||||
"n"=[14, 5]
|
||||
"o"=[15, 5]
|
||||
"p"=[16, 5]
|
||||
"q"=[17, 5]
|
||||
"r"=[18, 5]
|
||||
"s"=[19, 5]
|
||||
"t"=[20, 5]
|
||||
"u"=[21, 5]
|
||||
"v"=[22, 6]
|
||||
"w"=[23, 7]
|
||||
"x"=[24, 6]
|
||||
"y"=[25, 6]
|
||||
"z"=[26, 5]
|
||||
"A"=[33, 6]
|
||||
"B"=[34, 6]
|
||||
"C"=[35, 6]
|
||||
"D"=[36, 6]
|
||||
"E"=[37, 5]
|
||||
"F"=[38, 5]
|
||||
"G"=[39, 6]
|
||||
"H"=[40, 6]
|
||||
"I"=[41, 4]
|
||||
"J"=[42, 4]
|
||||
"K"=[43, 6]
|
||||
"L"=[44, 6]
|
||||
"M"=[45, 6]
|
||||
"N"=[46, 6]
|
||||
"O"=[47, 6]
|
||||
"P"=[48, 6]
|
||||
"Q"=[49, 6]
|
||||
"R"=[50, 6]
|
||||
"S"=[51, 5]
|
||||
"T"=[52, 6]
|
||||
"U"=[53, 6]
|
||||
"V"=[54, 6]
|
||||
"W"=[55, 7]
|
||||
"X"=[56, 6]
|
||||
"Y"=[57, 6]
|
||||
"Z"=[58, 6]
|
||||
"0"=[81, 5]
|
||||
"1"=[82, 4]
|
||||
"2"=[83, 5]
|
||||
"3"=[84, 5]
|
||||
"4"=[85, 5]
|
||||
"5"=[86, 5]
|
||||
"6"=[87, 5]
|
||||
"7"=[88, 5]
|
||||
"8"=[89, 5]
|
||||
"9"=[90, 5]
|
||||
":"=[97, 2]
|
||||
","=[98, 3]
|
||||
";"=[99, 3]
|
||||
"-"=[100, 5]
|
||||
"/"=[101, 4]
|
||||
"("=[102, 4]
|
||||
")"=[103, 4]
|
||||
"."=[104, 2]
|
||||
"'"=[105, 3]
|
||||
'"'=[106, 5]
|
||||
"%"=[107, 4]
|
||||
"!"=[108, 3]
|
||||
"?"=[109, 6]
|
||||
"~"=[110, 7]
|
||||
"*"=[111, 4]
|
||||
"+"=[112, 6]
|
||||
"="=[113, 5]
|
||||
"#"=[114, 6]
|
||||
" "=[115, 4]
|
|
@ -10,7 +10,7 @@ font_t font_create(char *font_name, char *filename) {
|
|||
char errbuf[200];
|
||||
map_t *map;
|
||||
|
||||
printf(" Processing %s...\n", font_name);
|
||||
printf("Processing %s...\n", font_name);
|
||||
|
||||
fp = fopen(filename, "r");
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <toml.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "script.h"
|
||||
|
||||
#define ERRBUFSZ 200
|
||||
|
||||
|
@ -38,11 +37,5 @@ int main(int argc, char **argv) {
|
|||
error("missing key: name", "");
|
||||
}
|
||||
|
||||
printf("Processing game %s...\n", name.u.s);
|
||||
toml_array_t *scripts = toml_array_in(conf, "script");
|
||||
|
||||
for (int i = 0; ; i++) {
|
||||
toml_table_t *toml_script = toml_table_at(scripts, i);
|
||||
script_t script = script_create(toml_script);
|
||||
}
|
||||
printf("Preparing to process %s...\n", name.u.s);
|
||||
}
|
||||
|
|
|
@ -11,11 +11,9 @@ script_t script_create(toml_table_t *table) {
|
|||
#define TOML_GET_KEY(var, key, func) toml_datum_t (var) = func(table, (key));\
|
||||
if (!(var).ok) {\
|
||||
char str[200];\
|
||||
snprintf(str, 200, "key '%s' missing", (key)); \
|
||||
error(str, ""); \
|
||||
snprintf(str, 200, "key '%s' missing from", (key)); \
|
||||
error(str, filename.u.s); \
|
||||
}
|
||||
TOML_GET_KEY(name, "name", toml_string_in)
|
||||
printf(" Processing script %s...\n", name.u.s);
|
||||
TOML_GET_KEY(filename, "filename", toml_string_in)
|
||||
TOML_GET_KEY(font_name, "font", toml_string_in)
|
||||
TOML_GET_KEY(min_tiles, "min_tiles_per_line", toml_int_in)
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include "font.h"
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
char *filename;
|
||||
font_t font;
|
||||
char *format;
|
||||
|
@ -21,7 +20,4 @@ typedef struct {
|
|||
bool little_endian;
|
||||
} script_t;
|
||||
|
||||
script_t script_create(toml_table_t *table);
|
||||
void script_destroy(script_t script);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue