add init logs

This commit is contained in:
quenousimporte 2025-04-18 16:00:21 +02:00
parent 4ad82585d8
commit 52b79e3e5f
1 changed files with 3 additions and 0 deletions

3
w/w.c
View File

@ -450,10 +450,12 @@ void clearscreen()
void init() void init()
{ {
printf("Démarrage...\n");
srand(time(NULL)); srand(time(NULL));
FILE* file = fopen(statepath, "r"); FILE* file = fopen(statepath, "r");
if (file) if (file)
{ {
printf("Chargement de la partie...\n");
fread(&state, sizeof(Gamestate), 1, file); fread(&state, sizeof(Gamestate), 1, file);
fclose(file); fclose(file);
} }
@ -461,6 +463,7 @@ void init()
{ {
state.screen = SC_TITLE; state.screen = SC_TITLE;
} }
printf("Début de la boucle principale...\n");
} }
int attack(Character* attacker, Character* defender) int attack(Character* attacker, Character* defender)