fix size play dinamic

This commit is contained in:
2024-12-12 20:46:48 +01:00
parent 2c61fbe868
commit 21885b0f99
3 changed files with 10 additions and 8 deletions

12
main.c
View File

@@ -1,17 +1,19 @@
#include <stdio.h>
#include "function.h"
#include "display.h"
#include "read.h"
#include "display.h"
#define SIZE_PLAY 24
int main()
{
vect *playerPos = (vect *)malloc(sizeof(vect));
vect *targets;
int nbr_targets;
unsigned short int **tab2d = creatArea2D(32);
targets = fileToTab2D("test.txt", tab2d, 32, playerPos, &nbr_targets);
screenDisplay(tab2d, 32);
inGameLoop(tab2d,playerPos, targets, nbr_targets);
unsigned short int **tab2d = creatArea2D(SIZE_PLAY);
targets = fileToTab2D("test.txt", tab2d, SIZE_PLAY, playerPos, &nbr_targets);
screenDisplay(tab2d, SIZE_PLAY);
inGameLoop(tab2d, SIZE_PLAY, playerPos, targets, nbr_targets);
free(playerPos);
return 0;
}