From 879fb2adefadbc5f38711cd8f01bcc4cee053e3d Mon Sep 17 00:00:00 2001 From: jacopo grandi Date: Tue, 2 Mar 2021 09:44:19 +0100 Subject: i hate cmake, g++, ld, collect2, cc1, x86_64-w64-mingw32 --- gst/fxs.c | 7 ++++--- gst/fxs.h | 2 +- gst/gst.c | 2 +- gst/gst.h | 17 +++++++++-------- gst/info.c | 11 ++++++----- gst/info.h | 1 + gst/map.c | 5 +++-- gst/units.c | 5 ++--- gst/units.h | 4 ++-- 9 files changed, 29 insertions(+), 25 deletions(-) (limited to 'gst') diff --git a/gst/fxs.c b/gst/fxs.c index ad4d15a..90f56b2 100644 --- a/gst/fxs.c +++ b/gst/fxs.c @@ -1,9 +1,10 @@ #include #include -#include -#include -#include +#include "../umath/vec.h" + +#include "fxs.h" +#include "units.h" void fx_init (fxs *fx) { fx->bullets = (bullet*)malloc(sizeof(bullet)*1024); diff --git a/gst/fxs.h b/gst/fxs.h index 1efe97a..2be62af 100644 --- a/gst/fxs.h +++ b/gst/fxs.h @@ -1,7 +1,7 @@ #ifndef FXS_H #define FXS_H -#include +#include typedef struct { float from[2]; diff --git a/gst/gst.c b/gst/gst.c index 456c1fc..77ca46d 100644 --- a/gst/gst.c +++ b/gst/gst.c @@ -3,7 +3,7 @@ #include #include -#include +#include "gst.h" void gst_init (gamestate *gst) { map_init(&gst->map_editor, MAXMAP, MAXMAP, 32); diff --git a/gst/gst.h b/gst/gst.h index 6d9519e..3178278 100644 --- a/gst/gst.h +++ b/gst/gst.h @@ -1,14 +1,15 @@ #ifndef GST_H #define GST_H -#include -#include -#include -#include -#include - -#include -#include +#include "info.h" +#include "units.h" +#include "map.h" +#include "fxs.h" +#include "../render/render_text.h" + + +#include +#include #define MAXMAP 10 diff --git a/gst/info.c b/gst/info.c index 0a7222d..a1ad3b2 100644 --- a/gst/info.c +++ b/gst/info.c @@ -3,12 +3,12 @@ #include #include -#include -#include +#include "info.h" +#include "units.h" -#include -#include -#include +#include "../umath/vec.h" +#include "../json/jsmn.h" +#include "../json/jsonparse.h" int type_damage_map (char strdmg[][32]) { strcpy(strdmg[0], "pierce"); @@ -578,6 +578,7 @@ void info_load (infos *info) { char json[size]; type_damage_map(info->damage_types); + info->templateslen = 0; info_read_file(json, "content/templates/default.txt", size); info_parse_json(info, json, "template"); diff --git a/gst/info.h b/gst/info.h index eab1a51..ce4d3fd 100644 --- a/gst/info.h +++ b/gst/info.h @@ -103,6 +103,7 @@ void info_save_templates (infos *info, char *filename); void info_template_add (infos *info, info_unit *temp); +#include "units.h" void info_load_army(struct army_ *ar, char *filename); void info_save_army(struct army_ *ar, char *filename); diff --git a/gst/map.c b/gst/map.c index 59d1ad1..f511496 100644 --- a/gst/map.c +++ b/gst/map.c @@ -1,9 +1,10 @@ #include #include -#include #include -#include +#include "units.h" + +#include "map.h" int ptoi (map *m, int *p) { return p[0]+p[1]*m->sx; } int xytoi (map *m, int x, int y) { return x+y*m->sx; } diff --git a/gst/units.c b/gst/units.c index 785230e..78b28ab 100644 --- a/gst/units.c +++ b/gst/units.c @@ -1,10 +1,9 @@ #include #include -#include #include -#include -#include +#include "../umath/vec.h" +#include "units.h" void army_grid_init(army *ar) { if (ar->grid != NULL) free(ar->grid); diff --git a/gst/units.h b/gst/units.h index 2b401e9..12f42dc 100644 --- a/gst/units.h +++ b/gst/units.h @@ -4,7 +4,7 @@ #define MAXUNITS 128 #define MAXSOLVESTEPS 128 -#include +#include "info.h" typedef struct unit_ { float pos[2]; @@ -28,7 +28,7 @@ typedef struct army_ { } army; -#include +#include "map.h" void unit_init (infos *info, army *ar, map *m, int x, int y, info_unit *iu, int owner, unit *u); -- cgit v1.2.3-54-g00ecf