diff options
author | jacopo grandi <jak.sk8@hotmail.it> | 2021-03-02 09:44:19 +0100 |
---|---|---|
committer | jacopo grandi <jak.sk8@hotmail.it> | 2021-03-02 09:44:19 +0100 |
commit | 879fb2adefadbc5f38711cd8f01bcc4cee053e3d (patch) | |
tree | 63d9841f0dd321978714dd5839cb6f8c3c8df57e /gst | |
parent | 2f345b1d6e130177efe4fa47d5b2bd11f352ce85 (diff) |
i hate cmake, g++, ld, collect2, cc1, x86_64-w64-mingw32
Diffstat (limited to 'gst')
-rw-r--r-- | gst/fxs.c | 7 | ||||
-rw-r--r-- | gst/fxs.h | 2 | ||||
-rw-r--r-- | gst/gst.c | 2 | ||||
-rw-r--r-- | gst/gst.h | 17 | ||||
-rw-r--r-- | gst/info.c | 11 | ||||
-rw-r--r-- | gst/info.h | 1 | ||||
-rw-r--r-- | gst/map.c | 5 | ||||
-rw-r--r-- | gst/units.c | 5 | ||||
-rw-r--r-- | gst/units.h | 4 |
9 files changed, 29 insertions, 25 deletions
@@ -1,9 +1,10 @@ #include <stdlib.h> #include <stdio.h> -#include <units.h> -#include <vec.h> -#include <fxs.h> +#include "../umath/vec.h" + +#include "fxs.h" +#include "units.h" void fx_init (fxs *fx) { fx->bullets = (bullet*)malloc(sizeof(bullet)*1024); @@ -1,7 +1,7 @@ #ifndef FXS_H #define FXS_H -#include <SDL.h> +#include <SDL2/SDL.h> typedef struct { float from[2]; @@ -3,7 +3,7 @@ #include <string.h> #include <float.h> -#include <gst.h> +#include "gst.h" void gst_init (gamestate *gst) { map_init(&gst->map_editor, MAXMAP, MAXMAP, 32); @@ -1,14 +1,15 @@ #ifndef GST_H #define GST_H -#include <info.h> -#include <units.h> -#include <map.h> -#include <fxs.h> -#include <render_text.h> - -#include <SDL.h> -#include <SDL_mixer.h> +#include "info.h" +#include "units.h" +#include "map.h" +#include "fxs.h" +#include "../render/render_text.h" + + +#include <SDL2/SDL.h> +#include <SDL2/SDL_mixer.h> #define MAXMAP 10 @@ -3,12 +3,12 @@ #include <string.h> #include <math.h> -#include <units.h> -#include <info.h> +#include "info.h" +#include "units.h" -#include <vec.h> -#include <jsmn.h> -#include <jsonparse.h> +#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"); @@ -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); @@ -1,9 +1,10 @@ #include <stdlib.h> #include <stdio.h> -#include <units.h> #include <string.h> -#include <map.h> +#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 <stdlib.h> #include <stdio.h> -#include <units.h> #include <string.h> -#include <vec.h> -#include <jsonparse.h> +#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 <info.h> +#include "info.h" typedef struct unit_ { float pos[2]; @@ -28,7 +28,7 @@ typedef struct army_ { } army; -#include <map.h> +#include "map.h" void unit_init (infos *info, army *ar, map *m, int x, int y, info_unit *iu, int owner, unit *u); |