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;