allegro help - page flipping?
i'm having some trouble with "page flipping" using allegro.. maybe i don't really understand the concept. i took a look at the link from the allegro thread in the FAQ, but it didn't really help... i've got some code, but i'm sure a lot of it is off.. i did it mostly by copy/pasting and trial and error.. this finally compiled without errors, but won't run.. it crashes. if someone could point me to a tutorial, or an example program, or something, that would be great..
here's the code i have
any help is appreciated.
BITMAP *Screen, *Buffer, *character;
// Initialize Allegro.
set_gfx_mode(GFX_SAFE, 800, 600, 0, 0);
character = load_bitmap("MyPicture.bmp", NULL);
character = load_bitmap("MyPicture1.bmp", NULL);
draw_sprite(Buffer, character[vid], 400, 300);
blit(Buffer, Screen[vid+1], 0, 0, 0, 0, 800, 600);
vid = !vid;