From 57f279bead6985e78bdd728e0a2cef1f16b293f6 Mon Sep 17 00:00:00 2001 From: ColinDrieu <colin.drieu@insa-rennes.fr> Date: Sun, 1 May 2016 11:54:34 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20de=20tests=20des=20fonctions=20g=C3=A9r?= =?UTF-8?q?ant=20la=20carte=20dans=20le=20main.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On peut gérer les cartes, mais il faut acceder aux parramètres par un entier représentant l'adresse des cases, l'utilisation des pointeurs ne fonctionne pas, je ne sais pas pourquoi. --- src/main.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index d3bac46..455167f 100644 --- a/src/main.c +++ b/src/main.c @@ -135,8 +135,19 @@ int main() /* -------------------------------------*/ /* -------------------------------------*/ - main_SDL(Map_ANCIENNE_VERSION); + int n,i; + + Carte * carteTest = nouvelleCarte(); + init_carte(carteTest); + + n=carteTest; + + for(i=0;i<TAILLE_MAX_CARTE;i++){ + printf("x=%d, y=%d\n",n,get_x(n),get_y(n)); + n=n+sizeof(Case); + } + return 0; } -- GitLab