SAE11_2023/SAE_semestre1/terrain.c

23 lines
669 B
C
Executable File

#include <stdlib.h>
#include <graph.h>
#include "time.h"
#include "terrain.h"
#include "serpent.h"
#include "main.h"
#include "Oeuf.h"
void DessinerScene(int murx[], int mury[], int minute, int seconde, char timer []){
int mur;
int i;
snprintf(timer,6,"%02d:%02d", minute ,seconde);
ChoisirCouleurDessin(CouleurParComposante(218,209,77));
RemplirRectangle(20,20,1160,700);
ChoisirCouleurDessin(CouleurParComposante(255,255,255));
srand(time(NULL));
for(i=0; i<30; i++){
murx[i] = ((rand() % (55)+1)*20);
mury[i] = ((rand() % (35)+1)*20);
ChargerImage("../img/cactus.png", murx[i], mury[i],0,0, 20,20);
}
}