Merge branch 'master' of dwarves.iut-fbleau.fr:foucher/SAE12_2021
This commit is contained in:
@@ -51,15 +51,6 @@ int ouvrir_fichier(char* path){
|
||||
}
|
||||
printf(" ");
|
||||
|
||||
/*if (!feof(fluxouverture) || !strcmp(arg1, buffer)==0){
|
||||
for (i=0; i<strlen(arg1); i++){
|
||||
printf("%c", arg1[i]);
|
||||
}
|
||||
printf(" ");
|
||||
} else {
|
||||
printf("\n");
|
||||
}*/
|
||||
|
||||
if (!feof(fluxouverture) || !strcmp(arg1, buffer)==0){
|
||||
if (strcmp(arg1, "MOV")==0 || strcmp(arg1, "ADD")==0 || strcmp(arg1, "SUB")==0 || strcmp(arg1, "JMP")==0 || strcmp(arg1, "JMZ")==0 || strcmp(arg1, "JMG")==0 || strcmp(arg1, "DJZ")==0 || strcmp(arg1, "CMP")==0 || strcmp(arg1, "DAT")==0){
|
||||
/*printf("\n");*/
|
||||
@@ -106,8 +97,6 @@ int ouvrir_fichier(char* path){
|
||||
verif_instru(instru, arg1, arg2);
|
||||
}
|
||||
errinstru=0;
|
||||
// return de la fonction si pas d'erreur
|
||||
// instru / arg1 / arg2
|
||||
|
||||
if (strcmp(instru, "MOV")==0){
|
||||
toto.instruct.codeOp =MOV;
|
||||
|
@@ -8,9 +8,27 @@
|
||||
#define NBRLIGNES 89
|
||||
#define NBRCOLONNES 89
|
||||
|
||||
int main(void){
|
||||
void dessiner_case(int colonne, int ligne, int numerovirus){
|
||||
|
||||
couleur rouge, gris, noir;
|
||||
/* le numerovirus est là pour choisir la couleur à dessiner */
|
||||
|
||||
couleur rouge, bleu;
|
||||
|
||||
if(numerovirus==1){
|
||||
rouge=CouleurParNom("red");
|
||||
ChoisirCouleurDessin(rouge);
|
||||
}
|
||||
|
||||
if(numerovirus==2){
|
||||
bleu=CouleurParNom("blue");
|
||||
ChoisirCouleurDessin(bleu);
|
||||
}
|
||||
|
||||
RemplirRectangle(colonne*10+1,ligne*10+1,9,9);
|
||||
|
||||
}
|
||||
void print_grille(void){
|
||||
couleur gris, noir;
|
||||
|
||||
int i, y;
|
||||
|
||||
@@ -21,7 +39,6 @@ InitialiserGraphique();
|
||||
CreerFenetre(0, 0, LONGUEUR, HAUTEUR);
|
||||
|
||||
gris=CouleurParNom("gray");
|
||||
rouge=CouleurParNom("red");
|
||||
noir=CouleurParNom("black");
|
||||
ChoisirCouleurDessin(gris);
|
||||
|
||||
@@ -39,10 +56,20 @@ for (i=0; i<NBRLIGNES; i++){
|
||||
decalageligne=decalageligne+10;
|
||||
decalagecolonne=0;
|
||||
}
|
||||
for (y=0; y<79; y++){
|
||||
DessinerRectangle(decalagecolonne,decalageligne,10, 10);
|
||||
decalagecolonne=decalagecolonne+10;
|
||||
}
|
||||
|
||||
couleur bleu, jaune;
|
||||
|
||||
int x, z;
|
||||
}
|
||||
|
||||
int main(void){
|
||||
|
||||
print_grille();
|
||||
|
||||
dessiner_case(50,10,2);
|
||||
|
||||
Touche();
|
||||
FermerGraphique();
|
||||
}
|
Reference in New Issue
Block a user