Mail Archives: djgpp/2000/02/15/22:42:19
From: | Damian Yerrick <MYNAMEISd_yerrick AT hotmail DOT comNO2CANNEDHAM>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: LOAD_BMP... please help!
|
Organization: | Pin Eight Software http://pineight.8m.com/
|
Message-ID: | <7dmiasgt4os12hsiosvm5ddj3m19bj81fr@4ax.com>
|
References: | <sahd2j92pd57 AT corp DOT supernews DOT com>
|
X-Newsreader: | Forte Agent 1.7/32.534
|
MIME-Version: | 1.0
|
Lines: | 40
|
X-Trace: | +r2abl70ACN9LS880kCfznIFmw1tYPnxqXRbKRjPOZkz0YpLLLsn5swiMHF9Rca/ka8umukbIG7R!QCZ00OeIk1YK+gZMxuMcSQVUJ2VEWh0jvXuwZJsvD+vf1oDLRF9EZJLRur2wm4WKqYlsYyoqAnp0!JEfIgBw=
|
X-Complaints-To: | abuse AT gte DOT net
|
X-Abuse-Info: | Please be sure to forward a copy of ALL headers
|
X-Abuse-Info: | Otherwise we will be unable to process your complaint properly
|
NNTP-Posting-Date: | Tue, 15 Feb 2000 13:55:51 GMT
|
Distribution: | world
|
Date: | Tue, 15 Feb 2000 13:55:51 GMT
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
On Sun, 13 Feb 2000 21:05:30 -0500, "Bryan Edds"
<dkmoore2 AT dragonbbs DOT com> wrote:
>Well, here I am begging for more answers... I hope I'm not being too much of
>an annoyance. Okay, here's the question: How exactly do you use allegro's
>LOAD_BMP function? Nothing I try or read seems to work. Please, if you have
>a simple program that shows how to load a .bmp then show the .bmp file, I
>could really use it. Please, I've wasted 4 hours getting nowhere with it. Be
>assured that I have tried everything before I ask you guys about it... hate
>to be an annoyance. Thank you.
Throw this into one of your Allegro programs:
void ShowBitmap(char *filename)
{
BITMAP *bmp;
PALETTE pal;
bmp = load_bitmap(filename, pal);
if(bmp == NULL)
return;
set_palette(pal);
blit(bmp, screen, 0, 0, 0, 0, bmp->w, bmp->h);
readkey(); // wait for user to press [ANY] to continue
destroy_bitmap(bmp); // free the memory
}
Allegro has a mailing list. It's listed on the Allegro home page:
http://www.talula.demon.co.uk/allegro/
--
Damian Yerrick http://yerricde.tripod.com/
Comment on story ideas: http://home1.gte.net/frodo/quickjot.html
AOL is sucks! Find out why: http://anti-aol.org/faqs/aas/
View full sig: http://www.rose-hulman.edu/~yerricde/sig.html
This is McAfee VirusScan. Add these two lines to your .sig to
prevent the spread of .sig viruses. http://www.mcafee.com/
- Raw text -