Original Post
I whas following some tutorials for allegro. And i whas expirimenting with some stuff. And i come up with this. [main.cpp] #include #include "data.h" int main(int argc, int *argv[]) { allegro_init(); install_keyboard(); set_color_depth(24); set_gfx_mode(GFX_AUTODETECT,640,480,0,0); BITMAP *bac = create_bitmap(640,480); DATAFILE *data_pack = NULL; data_pack = load_datafile("texture.dat"); draw_sprite(bac, (BITMAP*)data_pack[0].dat, 0, 0); readkey(); destroy_bitmap(bac); unload_datafile(data_pack); return 0; } END_OF_MAIN(); [data.h] /* Allegro datafile object indexes, produced by grabber v4.2.0, MSVC */ /* Datafile: c:\gerben\gfx\ */ /* Date: Wed Aug 16 17:24:34 2006 */ /* Do not hand edit! */ #define background 0 /* BMP */ But it does not work. I cant close the window when i run it. (close button is grey) And it does not display anything just a black window. But it doesnt get compile errors. (i use dev-cpp i like it more than visual c++) can someone please help me out? EDIT: The image i want to load/display is 320x217 and it is a 24 bit bmp image. the data file is only 25 kb the image itself (not in the file) is only 203 kb and i can load that one :( but i cant from the data file one :(