From: Neil R. <ne...@co...> - 2003-10-29 18:50:26
|
Steven Schlansker wrote: > Hi everyone, G'day! > I just saw Allegro a while back and it looked cool, so yesterday I > decided to start learning. I've run into a slight problem - using > draw_sprite() doesn't reproduce colors properly. I have a 32 bpp > offscreen bitmap which I blit() to the screen. I use > draw_sprite(buffer,(BITMAP *)data[spr].dat,x,y); > to draw the sprite. The sprite looks fine when displayed in the Grabber > program, and then I use dat2c to change it to a C file. Where am I > going wrong? > > Thanks for any help. First off, how many colours are you using for your bitmap? 8, 15/16, 24/32? If you're using more than 8bit (256) colour, are you setting your depth BEFORE you load your datafile? You should set your palette (if you have one) before you load in your datafile and your colour depth of course. Personally, I stored my palette in my datafile so that presented a problem for me, I had to load my datafile, set the palette stored in it, than unload and reload the datafile to get my bitmaps stored in it to display properly. I just know there is a better way to do this, I just haven't sat down and figured it out. I switched to 16bit instead. ;) -- Neil Roy - http://home.cogeco.ca/~nroy15 "No one has ever gone into heaven" - John 3:13 (NIV) |