[AD] Bitmap and pallete programs

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


i have a problem with load_bitmap and pallete it turns blue when i run my code
#include <stdio.h>
#include <allegro.h>
    int color_depth;
    int main() {

    PALETTE a_palette;
	install_allegro(SYSTEM_AUTODETECT, &errno, atexit);
	install_keyboard();
	
      if (set_gfx_mode(GFX_AUTODETECT, 800, 600, 0, 0) != 0) {

         allegro_exit();

         printf("Error setting graphics mode\n%s\n\n",
         allegro_error);
         exit(1);
      }
       
   BITMAP *bmp = create_bitmap(64, 64); 
  clear_bitmap(bmp);   
   bmp = load_bitmap("bmps/1.bmp", a_palette);
   draw onto the memory bitmap
   color_depth = 32;
   set_color_depth(color_depth);
   set_palette(a_palette); 
   blit( bmp, screen,0,0,0,0,64,64);
   
      readkey();
	
	return 0;
}
END_OF_MAIN();




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/