Mail Archives: djgpp/2000/06/24/21:30:23
23yrold3yrold <cbarry AT pangea DOT ca> schreef in artikel
<39553338_2 AT spamkiller DOT newsfeeds DOT com>...
> I'm having trouble using some functions in Allegro; I think the documents
> assume a little too much (or I'm just dense). I've been trying to learn
by
> reading bloddy near every source of Allegro tutorials on the Net but I
get
> things like the following. I know it should work (according to Allegro's
> accompanying documentation) and it's copied exactly as is out of a
tutorial.
Really? *exactly*?
> #include <stdlib.h>
> #include <stdio.h>
>
> #include "allegro.h"
>
> BITMAP *pic;
> PALETTE pal;
>
> int x,y;
>
> main(void)
> {
> allegro_init();
> install_keyboard();
> set_color_depth(16);
> set_gfx_mode(GFX_AUTODETECT,640,480,0,0);
> load_bitmap(pic,pal);
What file do you want the bitmap to load from?
Off the top of my head, it should be something more like this:
pic = load_bitmap("filename.bmp",pal);
Isn't there one of the Allegro examples that does
something like this that you could just simply
copy the code out of?
Doug
- Raw text -