delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/31/02:17:44

From: "Yannick Benoit" <yannick DOT benoit AT dr DOT cgocable DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: using static bitmap *
Lines: 29
X-Newsreader: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <iYWE4.2147$pR.22570@carnaval.risq.qc.ca>
Date: Fri, 31 Mar 2000 05:45:50 GMT
NNTP-Posting-Host: 205.237.47.27
X-Complaints-To: abuse AT cgocable DOT ca
X-Trace: carnaval.risq.qc.ca 954481550 205.237.47.27 (Fri, 31 Mar 2000 00:45:50 EST)
NNTP-Posting-Date: Fri, 31 Mar 2000 00:45:50 EST
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

hi
I got 2 bitmap that id like to use for a game,1 is background and 1 is
player
but i have a problem because the palletes are mixed up and the colors are
weird.
its like if it was using only 1 pallete, can anyone help?

static BITMAP *background;
static PALLETE pal1;
BITMAP *player;
PALLETE pal2;

int main ()
{
   allegro_init();
   set_gfx_mode(GFX_AUTODETECT, 800, 600, 0, 0);
   background = load_pcx("background.pcx",pal1);
   set_pallete(pal1);
   player = load_pcx("player.pcx",pal2);
   set_pallete(pal2);
   blit(background,screen,0,0,0,0,800,600);
   blit(player,background,0,490,j,490,92,99);
   destroy_bitmap(background);
   destroy_bitmap(player);
   allegro_exit();
}



- Raw text -


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