#include <allegro.h>
int main(void)
{
BITMAP *picture;
PALETTE pal;
allegro_init();
install_keyboard();
set_gfx_mode(GFX_AUTODETECT,640,480,0,0);
picture=load_bitmap("picture.pcx",&pal);
set_palette(pal);
blit(picture,screen,0,0,0,0,picture->w,picture->h);
while(!key[KEY_SPACE]){}
allegro_exit();
return(0);
}
However, Dev-C++ says following:
12 passing `RGB (*)[256]' as argument 2 of `load_bitmap(const char *, RGB *)'
Thanks for help.
EDIT: Accidentally typed some stuff in finnish, forgive me
Edited by - Pegu on March 2, 2002 5:38:29 PM
Allegro: loading a bitmap
Hello, I'm having troubles in Allegro with loading bitmaps. I'm using MinGW compiler (Dev-C++). The following example is from one tutorial about Allegro.
kuva=load_bitmap("picture.pcx",pal);
'ROIDRAGE!!! - I wanna work for the chinese communist regime!
quote: Original post by En Dum En
kuva=load_bitmap("picture.pcx",pal);
Thanks ! It now works perfectly.
Now I can sleep... Ahh.
March 02, 2002 04:54 PM
you just just pass NULL for the pallete if your not using 256 color mode...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement