www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/05/26/02:01:53

From: "Fredrik Persson" <irnman AT rocketmail DOT com>
Newsgroups: comp.os.msdos.djgpp
References: <gIRW4.5531$wYl DOT 221161984 AT newsb DOT telia DOT net> <392D5317 DOT 27751FA1 AT gtcom DOT net>
Subject: re: THANX!!!!!!!!!!
Lines: 64
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Message-ID: <6VgX4.9525$Za1.148882@newsc.telia.net>
Date: Thu, 25 May 2000 21:27:30 GMT
NNTP-Posting-Host: 195.252.57.152
X-Complaints-To: abuse AT telia DOT com
X-Trace: newsc.telia.net 959290050 195.252.57.152 (Thu, 25 May 2000 23:27:30 MET DST)
NNTP-Posting-Date: Thu, 25 May 2000 23:27:30 MET DST
Organization: Telia Internet
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Thanx a lot!!!!!!!!!!!!!!!



Krogg <krogg DOT no DOT to DOT spam AT gtcom DOT net> skrev i
diskussionsgruppsmeddelandet:392D5317 DOT 27751FA1 AT gtcom DOT net...
> Fredrik Persson wrote:
> >
> > Hi i tried to set_pelette after loading the bitmap but it still just
returns
> > a black screen..
> >
> > {
> > allegro_init();
> > install_keyboard();
> > set_gfx_mode(GFX_VGA, 320, 200, 0, 0);
> > PALETTE p;
> > screen=load_bitmap("drop.bmp",p);
> > set_palette(p);
> > readkey();
> > allegro_exit();
> > }
> >
> > what is wrong??
>
> you are changing where `screen' points to,not sending the
> picture to the screen.....
>
> you need to declare a pointer to the picture and load
> the picture with that pointer and then BLIT it to the screen.
>
> Here is the changes assuming you are using c.
>
>
>  {
>  PALETTE p;
>  BITMAP  *MY_PICTURE;  file://reserve a pointer for your picture
>  allegro_init();
>  install_keyboard();
>  set_gfx_mode(GFX_VGA, 320, 200, 0, 0);
>  MY_PICTURE=load_bitmap("drop.bmp",p); file://load your picture
>  set_palette(p);
>  blit(MY_PICTURE,screen,0,0,0,0,319,199);//blit to screen
>  readkey();
>  allegro_exit();
>  }
>
> Hope that helps you
>
> (If anyone sees my canceled post,i had forgot to make a pointer
>  out of `MY_PICTURE')
> --
>
>
> |"""""<`.THE PRINCE ,'>"""""""""""""""""""""""""""""""""""|
> |      `.`/""""""\,','            my sig is too big,      |
> |SEE HIS (  /   \ \' SEE HIS      but its really cool.    |
> | FACE    \/<> <>\/   SMILE                               |
> |         /   W   \          Visit my ascii art site:     |
> |       ,'\_|||||_/`.  http://www.gtcom.net/~krogg/ascii/ |
> |     ,','   |||   `.`.     krogg DOT no DOT to DOT spam AT gtcom DOT net    |
> |____<,' TIME TO DIE `.>____Remove no.to.spam to reply____|


- Raw text -


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