delorie.com/archives/browse.cgi | search |
From: | Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: But.......... |
Organization: | Pin Eight Software http://pineight.8m.com/ |
Message-ID: | <1htjiskae05sf67ohrs9n3tivrrir6l376@4ax.com> |
References: | <nKVV4.5169$wYl DOT 218653696 AT newsb DOT telia DOT net> <3928452F DOT F08F3E1F AT mtu-net DOT ru> <Lc4W4.8945$Za1 DOT 137570 AT newsc DOT telia DOT net> <8VeW4.5318$wYl DOT 221486080 AT newsb DOT telia DOT net> |
X-Newsreader: | Forte Agent 1.7/32.534 |
MIME-Version: | 1.0 |
Lines: | 52 |
X-Trace: | +4AzTc6IVWp797Nof1p+s1twaM2aaGw7jqeKxqoGpXeWoFEeEL8jm3F/v61W+qKDWaELNPf/uaoe!NWKST+oO+XVgTSeHFmUT4gZgT8KzoM4egHD3Q+113SuOFqvRgF4uaCa3n5A0LNuKMrGG/EtnuHZR!4KcZgY0= |
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, 23 May 2000 03:12:01 GMT |
Distribution: | world |
Date: | Tue, 23 May 2000 03:12:01 GMT |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
On Mon, 22 May 2000 18:21:56 GMT, "Christian" <christian DOT sanden AT telia DOT com> wrote: >It still doesn't work. > >To get the pallete from a file(for example a bmp), do i write something like >this? > >PALLETE pal; >BITMAP *bmp = load_bmp("file", pal); set_palette(pal); then blit the bitmap to the screen. Try this: /************ 8< (untested code) *************/ #include <allegro.h> int main(void) { BITMAP *bmp; PALETTE pal; allegro_init(); install_timer(); install_keyboard(); if(set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) == 0) { allegro_message("couldn't set gfx mode\n"); return 1; } if((bmp = load_bitmap("foo.bmp", pal)) == NULL) { allegro_message("couldn't load bitmap foo.bmp\n"); return 1; } blit(bmp, screen, 0, 0, 0, 0, bmp->w, bmp->h); readkey(); return 0; } END_OF_MAIN(); /************ 8< (untested code) *************/ -- Damian Yerrick "I refuse to listen to those who refuse to listen to reason." See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html This is McAfee VirusScan. Add these two lines to your signature to prevent the spread of signature viruses. http://www.mcafee.com/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |