aboutsummaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
Diffstat (limited to 'gst')
-rw-r--r--gst/fxs.c7
-rw-r--r--gst/fxs.h2
-rw-r--r--gst/gst.c2
-rw-r--r--gst/gst.h17
-rw-r--r--gst/info.c11
-rw-r--r--gst/info.h1
-rw-r--r--gst/map.c5
-rw-r--r--gst/units.c5
-rw-r--r--gst/units.h4
9 files changed, 29 insertions, 25 deletions
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 <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);
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 <SDL.h>
+#include <SDL2/SDL.h>
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 <string.h>
#include <float.h>
-#include <gst.h>
+#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 <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
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 <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");
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 <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);