Does anybody know what the problem could be?
Jump to content
Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
Posted 16 December 1999 - 02:32 PM
Posted 13 December 1999 - 06:45 PM
Posted 14 December 1999 - 03:07 PM
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).]
Posted 15 December 1999 - 03:09 PM
Here is my code for checking the pixel format:
// 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 = 67108864
if(gMask | 67108864)
pixelFormat = 565;
pixelFormat = 555;
Here is my code for building up a 16 bit rgb value:
#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...
Posted 16 December 1999 - 12:33 AM
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.
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.