Advertisement

Allegro

Started by October 24, 2001 11:49 AM
1 comment, last by Wardrobeprogrammer 23 years, 1 month ago
hrmpf... how do you open and load a bmp file? an exampel would be fine... :C) Mvh Wardrobeprogrammer
"Att skita eller skitas? DET är frågan"-herman hedning
#include "allegro.h"
main()
{

BITMAP *image;
PALETTE pal;

allegro_init();
set_gfx_mode(GFX_SAFE, 320,200,0,0); // set graphice mode
image = load_bitmap("picture.bmp", pal); //load file
set_palette(pal);
blit(image, screen, 0,0,0,0,320,200); //draw to screen

}

These will do :-)
Advertisement
thanx! it was almost the same code i used but i forgot a lite thing... i must restart my computer before the code will work... :C) thanx wery much anyway!

Mvh Wardrobeprogrammer
"Att skita eller skitas? DET är frågan"-herman hedning

This topic is closed to new replies.

Advertisement