|
Alpha Blending problems |
thehuggableone
Member #7,625
August 2006
|
Ok, I'm working on a platform shooter, and the edges of my graphics are a little pixelated, so, as I did in a backgammon game I wrote not too long ago, I'm using a function that creates an "anti-aliased" sprite by merging the real sprite with a separate alpha channel (same shape, but black and white with blurred edges). Below is almost exactly the same function I used for my backgammon game, however this one keeps giving me my sprite rendered as a black box. I don't know what's going on. Masked draw is simply a call to masked blit. Is there something I'm missing? I've scoured my backgammon code and can't figure out what's going on. It would help if I actually understood what's going on with the transparency stuff, but it's not a necessity I don't guess. I tried making a call to set_alpha_blender() before printing and even calling draw_trans_sprite() but that didn't work either. Any help would be wonderful, either in fixing my problem or suggesting a better way to do what I'm trying to do. I AM fairly new to game programming and could use all the help I can get. Thanks --Wes
|
Arthur Kalliokoski
Second in Command
February 2005
|
I'm just taking a wild guess here, but stick in a couple lines in the program to save the masked bitmaps to .tga files, then make a little allegro utility to display these and call getpixel() on mouse clicks to display the rgba values. They all watch too much MSNBC... they get ideas. |
|