Advertisement
Guest User

Untitled

a guest
Feb 29th, 2012
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.85 KB | None | 0 0
  1. #include "stdafx.h"
  2.  
  3.  
  4. #include <iostream>
  5. #include <allegro5/allegro.h>
  6. #include <allegro5\allegro_image.h>
  7.  
  8.  
  9. using namespace std;
  10.  
  11.  
  12. int init();
  13. int maxWidth();
  14. int maxHeight();
  15.  
  16. ALLEGRO_DISPLAY *display;
  17. ALLEGRO_EVENT_QUEUE *event_queue;
  18. ALLEGRO_TIMER *timer;
  19. ALLEGRO_BITMAP *square;
  20. ALLEGRO_BITMAP *image;
  21.  
  22. const float fps = 60;
  23. bool redraw;
  24.  
  25. int x = 0;
  26. int y = 0;
  27.  
  28. int main(int argc, char **argv)
  29. {
  30.     init();
  31.  
  32.  
  33.     image = al_load_bitmap("C:\Users\Charles\Downloads\image.png");
  34.  
  35.     al_draw_bitmap(image, 0,0, 0);
  36.  
  37.     return 0;
  38. }
  39.  
  40. int init()
  41. {
  42.     if(!al_init())
  43.     {
  44.         cout << "Failed to initalize allegro." << endl;
  45.  
  46.         return -1;
  47.     }
  48.     if(!al_init_image_addon())
  49.     {
  50.         cout << "Failed to initalize the allegro image addon." << endl;
  51.  
  52.         return -1;
  53.     }
  54.  
  55.    display = NULL;
  56.  
  57.    display = al_create_display(640, 480);
  58.  
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement