🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Transparency Question
I just don't know if this is a problem with the color keying (I used the DDSetColorKey function from ddutil.cpp to set it) or with the bitmap format (I doubt that) or with, I don't know what...
HELP!!!
If I make a change from ANY color to the transparent color (meaning if one pixel is not transparent, and the next few are, the next pixel to the right (or maybe 2 pixels, I cant really tell) show up as black on the screen. I don't know if they are actually showing up as RGB(0,0,0) or something very close, but I know they are (0,0,0) in the bitmap file. I don't know if it's a problem saving the bitmap, loading it to a surface, or blitting it (it happens with both Blt and BltFast).
please help... I'm gonna have a heart attack soon if this doesn't get fixed
[This message has been edited by Qoy (edited December 14, 1999).]
Cool, I thought it was just me. I've been saving Poser models into bitmap form on a black background, but the models always end up with a black outline when they are blt/bltfast.
------------------
Still Learning...
I'll post some of my code so people can see if it's really convoluted, and see if they know what my problem is...
Here is my code for checking the pixel format:
code:// check the pixel format (555 or 565)gMask = desc.ddpfPixelFormat.dwGBitMask;// check the 27th bit from the right in the mask (bit number 26)// if it's 1, then it's 565, else it's 555// it's the 27th bit because it's the 3rd from the beginning of the first byte,// but gMask is 4 bytes// 2^26 = 67108864if(gMask | 67108864) pixelFormat = 565;else pixelFormat = 555;
Here is my code for building up a 16 bit rgb value:
code:#define RGB555(r,g,b) ((b % 32) + ((g % 32) << 6) + ((r % 32) << 11))#define RGB565(r,g,b) ((b % 32) + ((g % 64) << 5) + ((r % 32) << 11))
I can probably handle the converting the bitmap if I can just get this stuff working...
you said this was a bitmapped lettering system, correct? does this mean that there are essentially two colors in your bitmap(black and the letter's color)?
if so, then you may as well design your letters on a monochrome bitmap.
if there's actually a pattern(more than just the two colors), then thats another story.
Does anybody know what the problem could be?
------------------
http://qoy.tripod.com