Ejemplo n.º 1
0
// ################
// ## 6. LE MAIN ##
// ################
int main () {
    int n;
    BOOL b;

    init_graphics(600,600);

    write_text("Bonjour");
    write_text("Au revoir");
    write_text("ЮИХНТОГ юихнтог");

    n = 23;
    write_int(n);
    write_int(42);

    b = (2<3);
    write_bool(b);
    write_bool(2 == 3);

    POINT centre;
    centre = wait_clic();
    draw_fill_circle(centre, 20, rouge);

    wait_escape();
    exit (0);
}
Ejemplo n.º 2
0
	// Affiche tous les objets et vérifie que la fonction init_graphics 
	// a été appelée précédemment et affiche un message d'erreur sinon.	
void affiche_all()
	{
	SDL_Event event;
	if (SDL_PollEvent(&event)) if (event.type == SDL_QUIT) exit(0);
	if (__init_graphics_is_already_called == 25) SDL_Flip(SDL_screen);
		else {
		     init_graphics(380,80);
		     write_text("init_graphics() n'a pas été appelée.");
		     write_text("");
		     write_text("           Cliquer pour terminer.");
		     fprintf(stderr,"init_graphics() n'a pas été appelée.\n");
		     fprintf(stderr,"Cliquer pour terminer.\n");
		     wait_clic();
		     exit(1);
		     }
	}
Ejemplo n.º 3
0
int main()
{
init_graphics(500,500);

// Debut du code
POINT p;
p=wait_clic();

int i;
for (i=0;i<=10;i++){
	p.x=p.x+10;p.y=p.y+20;
	dessine_etoile(p);
}
// Fin du code

wait_escape();
exit(0);
}