🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Allegro

Started by
1 comment, last by Wardrobeprogrammer 22 years, 8 months 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
Advertisement
#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 :-)
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