rm print
This commit is contained in:
2
main.c
2
main.c
@@ -6,7 +6,7 @@
|
|||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
vect *playerPos = (vect *)malloc(sizeof(vect));
|
vect *playerPos = (vect *)malloc(sizeof(vect));
|
||||||
vect *targets = malloc(sizeof(vect));
|
vect *targets;
|
||||||
int nbr_targets;
|
int nbr_targets;
|
||||||
unsigned short int **tab2d = creatArea2D(32);
|
unsigned short int **tab2d = creatArea2D(32);
|
||||||
targets = fileToTab2D("test.txt", tab2d, 32, playerPos, &nbr_targets);
|
targets = fileToTab2D("test.txt", tab2d, 32, playerPos, &nbr_targets);
|
||||||
|
|||||||
4
read.c
4
read.c
@@ -23,12 +23,8 @@ fileToTab2D (const char *name_file, unsigned short int **tab, const unsigned N,
|
|||||||
break;
|
break;
|
||||||
case '.':
|
case '.':
|
||||||
targets = realloc (targets, sizeof (vect) * (++nbr_targets[0]));
|
targets = realloc (targets, sizeof (vect) * (++nbr_targets[0]));
|
||||||
printf ("nbr %d, pointeur %p\n", nbr_targets[0], targets);
|
|
||||||
targets[nbr_targets[0] - 1].x = x;
|
targets[nbr_targets[0] - 1].x = x;
|
||||||
printf ("%d : %d\n", targets[nbr_targets[0] - 1].x,
|
|
||||||
nbr_targets[0] - 1);
|
|
||||||
targets[nbr_targets[0] - 1].y = y;
|
targets[nbr_targets[0] - 1].y = y;
|
||||||
printf ("%d\n", targets[nbr_targets[0] - 1].y);
|
|
||||||
tab[x][y] = TARGET;
|
tab[x][y] = TARGET;
|
||||||
break;
|
break;
|
||||||
case '@':
|
case '@':
|
||||||
|
|||||||
Reference in New Issue
Block a user