Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #include <allegro5/allegro5.h>
  2. #include <allegro5/allegro_image.h>
  3. #include <iostream>
  4. using namespace std;
  5. int main() {
  6. al_init();
  7. ALLEGRO_DISPLAY* display = al_create_display(600,600);
  8. al_install_mouse();
  9. al_init_image_addon();
  10. ALLEGRO_MOUSE_STATE mysz;
  11. ALLEGRO_BITMAP* papier = al_load_bitmap("papier.png");
  12. while(1) {
  13. al_get_mouse_state(&mysz);
  14. al_clear_to_color(al_map_rgb(255,51,204));
  15. al_draw_bitmap_region(papier, 600*((mysz.z*-1)%3+1), 0, 600, 600, 0, 0, 0);
  16. al_flip_display();
  17. al_rest(0.1);
  18. }
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement