Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <allegro5\allegro.h>
- int main () {
- ALLEGRO_DISPLAY *display = NULL;
- //Initialize Allegro library
- if (!al_init()) {
- fprintf(stderr, "Failed to initialize Allegro.\n");
- return(-1);
- }
- //Create screen 640x480
- display = al_create_display(640, 480);
- if (!display) {
- fprintf(stderr, "Failed to create display.\n");
- return(-1);
- }
- al_clear_to_color(al_map_rgb(0,0,0)); //Clear display to white
- al_flip_display(); //Use back image buffer
- al_rest(10.0); //Wait 10sec
- al_destroy_display(display); //End display and free memory
- return(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment