delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/24/21:30:23

From: "doug" <deleveld AT dds DOT nl>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: "load_bitmap" newbie...
Date: 25 Jun 2000 00:24:16 GMT
Organization: Rijksuniversiteit Groningen
Lines: 44
Message-ID: <01bfdf05$fc349c00$a2247d81@default>
References: <39553338_2 AT spamkiller DOT newsfeeds DOT com>
NNTP-Posting-Host: client36-162.oprit.rug.nl
X-Trace: info.service.rug.nl 961892656 25808 129.125.36.162 (25 Jun 2000 00:24:16 GMT)
X-Complaints-To: newsmaster AT rug DOT nl
NNTP-Posting-Date: 25 Jun 2000 00:24:16 GMT
X-Newsreader: Microsoft Internet News 4.70.1155
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019