Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var page1,page2,active_page,logo;
- var tim=0;
- function draw()
- {
- stretch_blit(logo,active_page,0,0,logo.w,logo.h,0,0,SCREEN_W,SCREEN_H);
- }
- function update()
- {
- }
- function main()
- {
- allegro_init();
- set_gfx_mode("example", 640, 480);
- install_keyboard();
- install_timer();
- install_mouse();
- install_sound();
- page1 = create_bitmap(SCREEN_W, SCREEN_H);
- page2 = create_bitmap(SCREEN_W, SCREEN_H);
- logo = load_bmp("allegro.png");
- active_page = page2;
- install_int_ex(function()
- {
- clear_to_color(active_page, makecol(255, 255, 255));
- update();
- draw();
- blit(active_page,canvas,0,0,0,0,SCREEN_W,SCREEN_H);
- if (active_page == page1)
- active_page = page2;
- else
- active_page = page1;
- }, BPS_TO_TIMER(60));
- return 0;
- }
- END_OF_MAIN();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement