summaryrefslogtreecommitdiff
path: root/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'map.c')
-rw-r--r--map.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/map.c b/map.c
index 6783873..d2e2c30 100644
--- a/map.c
+++ b/map.c
@@ -1,7 +1,8 @@
-#include <stdio.h>
-#include <stdlib.h>
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
+
+#include "battle.h"
+
#include "constantes.h"
#include "structures.h"
#include "prototypes.h"
@@ -46,7 +47,15 @@ void Fmap (SURFACES*surfaces, POSITIONS* positions,
(void) surfaces;
(void) positions;
- battle(t1, t2);
+ struct battle_t battle;
+
+ if (battle_init(&battle, t1, t2) < 0) {
+ return;
+ }
+
+ battle_run(&battle);
+
+ battle_close(&battle);
#endif
}