visual changes

This commit is contained in:
quenousimporte 2025-04-23 12:09:02 +01:00
parent 55c9dc4b8e
commit 993eb242d8
1 changed files with 3 additions and 5 deletions

6
w/w.c
View File

@ -829,7 +829,6 @@ void update(char* command)
{ {
state.hero.gold -= item.price; state.hero.gold -= item.price;
state.inventory[i].count++; state.inventory[i].count++;
// debugoutput("%d\n", item.count);
} }
} }
} }
@ -933,7 +932,6 @@ void draw()
}*/ }*/
printf("\n\n"); printf("\n\n");
printf("i: Inventaire\n");
if (charatpos(state.position.x, state.position.y) == TILE_START) if (charatpos(state.position.x, state.position.y) == TILE_START)
{ {
printf("r: Retour à la station\n"); printf("r: Retour à la station\n");
@ -974,8 +972,7 @@ void draw()
{ {
Item item = state.inventory[i]; Item item = state.inventory[i];
printf("%c: %s\n", item.id, item.name); printf("%c: %s\n", item.id, item.name);
printf("price: %d\n", item.price); printf("%s en a %d. Prix: %d\n", state.hero.name, item.count, item.price);
printf("owned: %d\n", item.count);
} }
printf("\nr: Retour à la station\n"); printf("\nr: Retour à la station\n");
@ -992,6 +989,7 @@ void draw()
for (int i = 0; i < screenwidth; i++) printf("-"); for (int i = 0; i < screenwidth; i++) printf("-");
printf("\n"); printf("\n");
printf("%s | P.V. : %d | C.G. : %d", state.hero.name, state.hero.hp, state.hero.gold); printf("%s | P.V. : %d | C.G. : %d", state.hero.name, state.hero.hp, state.hero.gold);
printf("\npotions : %d", state.inventory[0].count);
} }
debugoutput(); debugoutput();