From 3b3ed255a05eb0a0a3ed2886c010b952c1b1bd8c Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Sun, 4 Sep 2016 17:59:59 +0200 Subject: create a structure battle and make use of it Signed-off-by: Olivier Gayot --- map.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'map.c') diff --git a/map.c b/map.c index 6783873..d2e2c30 100644 --- a/map.c +++ b/map.c @@ -1,7 +1,8 @@ -#include -#include #include #include + +#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 } -- cgit v1.2.3