From e6a677a392b777775d9d29ff333d34a3805d6aa1 Mon Sep 17 00:00:00 2001 From: attilavs2 Date: Sat, 19 Aug 2023 15:53:31 +0200 Subject: [PATCH] =?UTF-8?q?avanc=C3=A9es=20de=20debug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/npc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/npc.c b/src/npc.c index 105355f..b4ce57b 100644 --- a/src/npc.c +++ b/src/npc.c @@ -4,6 +4,7 @@ #include "map.h" #include "config.h" #include +#include /*debug*/ #include @@ -22,7 +23,7 @@ extern bopti_image_t demo_PNJ_img; void npc_draw(Game *game) { Player *player = &game->player; - for (int u=0; umap_level->nbextradata; u++) + for (uint32_t u=0; umap_level->nbextradata; u++) //uint pour enlever un warning { ExtraData *Data = &game->map_level->extradata[u]; @@ -40,6 +41,7 @@ void npc_draw(Game *game) { int16_t deltaX1=((int16_t) (Data->xpath[v % NbPoints] * PXSIZE))-(int16_t) player->wx; int16_t deltaY1=((int16_t) (Data->ypath[v % NbPoints] * PXSIZE))-(int16_t) player->wy; + /*DEBUG*/ dprint(0, 0, 0xFAFA, "coucou 43 : %d", v); dupdate(); getkey(); //plante avant ici (le v % NbPoints est sus) int16_t deltaX2=((int16_t) (Data->xpath[(v+1) % NbPoints] * PXSIZE))-(int16_t) player->wx; int16_t deltaY2=((int16_t) (Data->ypath[(v+1) % NbPoints] * PXSIZE))-(int16_t) player->wy;