1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
#include <allegro.h>
int main()
{
allegro_init();
install_keyboard();
set_color_depth(16);
set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0);
BITMAP* buffer = create_bitmap(640, 480);
BITMAP* bg = load_bitmap("bg.bmp", NULL);
while(!key[KEY_ESC])
{
blit(bg, buffer, 0, 0, 0, 0, 640, 480);
blit(buffer, screen, 0, 0, 0, 0, 640, 480);
}
destroy_bitmap(buffer);
destroy_bitmap(bg);
return 0;
}
END_OF_MAIN();
|