Guest User

Untitled

a guest
Jan 12th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. bool running = true;
  2.  
  3. int width = al_get_display_width(display);
  4. while (running) {
  5.  
  6. for (;;) {
  7. al_clear_to_color(al_map_rgb(255, 255, 255));
  8. al_draw_bitmap(bitmap, 0, 0, 0);
  9. al_draw_text(font, al_map_rgb(0, 0, 0), 760, 375, 0, "Play (Spacebar)");
  10. al_flip_display();
  11. al_rest(1.5);
  12.  
  13. al_clear_to_color(al_map_rgb(255, 255, 255));
  14. al_draw_bitmap(bitmap, 0, 0, 0);
  15. al_flip_display();
  16. al_rest(0.5);
  17. }
  18.  
  19. ALLEGRO_EVENT event;
  20. al_wait_for_event(queue, &event);
  21. if (event.type == ALLEGRO_EVENT_DISPLAY_CLOSE) {
  22. running = false;
  23. }
  24. }
Add Comment
Please, Sign In to add comment