Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <allegro5/allegro.h>
- #include <allegro5\allegro_image.h>
- using namespace std;
- int init();
- int maxWidth();
- int maxHeight();
- ALLEGRO_DISPLAY *display;
- ALLEGRO_EVENT_QUEUE *event_queue;
- ALLEGRO_TIMER *timer;
- ALLEGRO_BITMAP *square;
- ALLEGRO_BITMAP *image;
- const float fps = 60;
- bool redraw;
- int x = 0;
- int y = 0;
- int main(int argc, char **argv)
- {
- init();
- image = al_load_bitmap("C:\Users\Charles\Downloads\image.png");
- al_draw_bitmap(image, 0,0, 0);
- return 0;
- }
- int init()
- {
- if(!al_init())
- {
- cout << "Failed to initalize allegro." << endl;
- return -1;
- }
- if(!al_init_image_addon())
- {
- cout << "Failed to initalize the allegro image addon." << endl;
- return -1;
- }
- display = NULL;
- display = al_create_display(640, 480);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement