Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <allegro5/allegro5.h>
- #include <allegro5/allegro_image.h>
- #include <iostream>
- using namespace std;
- int main() {
- al_init();
- ALLEGRO_DISPLAY* display = al_create_display(600,600);
- al_install_mouse();
- al_init_image_addon();
- ALLEGRO_MOUSE_STATE mysz;
- ALLEGRO_BITMAP* papier = al_load_bitmap("papier.png");
- while(1) {
- al_get_mouse_state(&mysz);
- al_clear_to_color(al_map_rgb(255,51,204));
- al_draw_bitmap_region(papier, 600*((mysz.z*-1)%3+1), 0, 600, 600, 0, 0, 0);
- al_flip_display();
- al_rest(0.1);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement