Bonjour,
J'avais un Pb dans mon code et je fait un test tous simple pour voir:
et voilà le résultat:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 void jouer(SDL_Surface *damier) { int i = 0, j = 0; int carte[NB_BLOCS_LARGEUR][NB_BLOCS_HAUTEUR] = {0}; for (i = 0; i < NB_BLOCS_LARGEUR; i++) { //fprintf(stderr, "boucle hori\n"); for (j = 0; j < NB_BLOCS_HAUTEUR; j++) { fprintf(stderr, "carte[%d][%d] = %d\n", j, i, carte[j][i]); } }
carte[0][0] = 0
carte[1][0] = 0
carte[2][0] = 0
carte[3][0] = 0
carte[4][0] = 0
carte[5][0] = 0
carte[6][0] = 0
carte[7][0] = -858993460
carte[8][0] = -858993460
carte[9][0] = 0
carte[0][1] = 0
carte[1][1] = 0
carte[2][1] = 0
carte[3][1] = 0
carte[4][1] = 0
carte[5][1] = 0
carte[6][1] = 0
carte[7][1] = -858993460
carte[8][1] = 1
carte[9][1] = 0
carte[0][2] = 0
carte[1][2] = 0
carte[2][2] = 0
carte[3][2] = 0
carte[4][2] = 0
carte[5][2] = 0
carte[6][2] = 0
carte[7][2] = 7
carte[8][2] = -858993460
carte[9][2] = 0
carte[0][3] = 0
carte[1][3] = 0
carte[2][3] = 0
carte[3][3] = 0
carte[4][3] = 0
carte[5][3] = 0
carte[6][3] = 0
carte[7][3] = -858993460
carte[8][3] = -858993460
carte[9][3] = 0
carte[0][4] = 0
carte[1][4] = 0
carte[2][4] = 0
carte[3][4] = 0
carte[4][4] = 0
carte[5][4] = 0
carte[6][4] = 0
carte[7][4] = -858993460
carte[8][4] = 0
carte[9][4] = 0
carte[0][5] = 0
carte[1][5] = 0
carte[2][5] = 0
carte[3][5] = 0
carte[4][5] = 0
carte[5][5] = 0
carte[6][5] = 0
carte[7][5] = 5
carte[8][5] = -858993460
carte[9][5] = 0
carte[0][6] = 0
carte[1][6] = 0
carte[2][6] = 0
carte[3][6] = 0
carte[4][6] = 0
carte[5][6] = 0
carte[6][6] = 0
carte[7][6] = -858993460
carte[8][6] = -858993460
carte[9][6] = -858993460
D'où sorte ces valeurs svp ?
Merci d'avance pour votre aide.
Cédric.
Partager