Code: Select all
'$include: "allegro.bi"
#define SCR_W 800
#define SCR_H 600
dim shared VBuffer as BITMAP ptr
allegro_init
install_keyboard()
set_color_depth 16
if (set_gfx_mode(GFX_AUTODETECT, SCR_W, SCR_H, 0, 0) <> 0) then
set_gfx_mode(GFX_TEXT, 0, 0, 0, 0)
end 1
end if
VBuffer = load_bmp("temp3.bmp",0)
do
poll_keyboard()
if( key(KEY_ESC) <> 0 )then
exit do
end if
clear_bitmap(VBuffer)
vsync()
blit(VBuffer,screen,0,0,0,0,SCR_W,SCR_H)
loop
destroy_bitmap(VBuffer)
set_gfx_mode(GFX_TEXT, 0, 0, 0, 0)
allegro_exit