37 lines
876 B
C
37 lines
876 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <graph.h>
|
|
#include "cheat.h"
|
|
|
|
int cheat(int affichage[50],int tab[40]){
|
|
int x,n,pos_x,pos_y;
|
|
while(n<1){
|
|
x=0;
|
|
for (pos_y=10;pos_y<=370;pos_y=pos_y+90){
|
|
for (pos_x=10;pos_x<=640;pos_x=pos_x+90){
|
|
if (tab[x]==-1){
|
|
pos_x=650;
|
|
pos_y=1000;
|
|
}
|
|
snprintf(affichage,50,"Images/image%d.png",(tab[x]+1));
|
|
ChargerImage(affichage,pos_x,pos_y,0,0,80,80);
|
|
x++;
|
|
}
|
|
}
|
|
if(ToucheEnAttente() && Touche()==XK_t){
|
|
x=0;
|
|
for (pos_y=10;pos_y<=370;pos_y=pos_y+90){
|
|
for (pos_x=10;pos_x<=640;pos_x=pos_x+90){
|
|
if (tab[x]==-1){
|
|
pos_x=650;
|
|
pos_y=1000;
|
|
}
|
|
ChargerImage("Images/image0.png",pos_x,pos_y,0,0,80,80);
|
|
x++;
|
|
}
|
|
}
|
|
n=1;
|
|
}
|
|
}
|
|
return n;
|
|
} |