J'ai changer les images car elles étaient tous en 400x400 alors qu'il failait des dimensions différentes, il y avait aussi un petit problème dans le découpage c'était décaler de 1
@@ -52,8 +52,8 @@ void afficher_plateau(int grille[MAX_TAILLE][MAX_TAILLE],int nb_ligne,int nb_col
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
src_x = (num % nb_colonne) * l_case;
|
src_x = (num-1) % nb_colonne * l_case;
|
||||||
src_y = (num / nb_colonne) * h_case;
|
src_y = (num-1) / nb_colonne * h_case;
|
||||||
|
|
||||||
CopierZone(1, 0, src_x, src_y, l_case, h_case, x, y);
|
CopierZone(1, 0, src_x, src_y, l_case, h_case, x, y);
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 208 KiB After Width: | Height: | Size: 384 KiB |
|
Before Width: | Height: | Size: 109 KiB |
|
Before Width: | Height: | Size: 207 KiB After Width: | Height: | Size: 531 KiB |
@@ -55,12 +55,12 @@ int main(void){
|
|||||||
}
|
}
|
||||||
else if(touche == XK_2 || touche == XK_KP_2) {
|
else if(touche == XK_2 || touche == XK_KP_2) {
|
||||||
nom_image = "image2.png";
|
nom_image = "image2.png";
|
||||||
img_w = 400; img_h = 400;
|
img_w = 600; img_h = 600;
|
||||||
choix_image_fait = 2;
|
choix_image_fait = 2;
|
||||||
}
|
}
|
||||||
else if(touche == XK_3 || touche == XK_KP_3) {
|
else if(touche == XK_3 || touche == XK_KP_3) {
|
||||||
nom_image = "image3.png";
|
nom_image = "image3.png";
|
||||||
img_w = 400; img_h = 400;
|
img_w = 800; img_h = 800;
|
||||||
choix_image_fait = 3;
|
choix_image_fait = 3;
|
||||||
}
|
}
|
||||||
else if(touche == XK_q || touche == XK_Q) {
|
else if(touche == XK_q || touche == XK_Q) {
|
||||||
@@ -164,6 +164,7 @@ int main(void){
|
|||||||
/* Pour quitter on clique sur q */
|
/* Pour quitter on clique sur q */
|
||||||
if (touche == XK_q || touche == XK_Q) {
|
if (touche == XK_q || touche == XK_Q) {
|
||||||
FermerGraphique();
|
FermerGraphique();
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||