Advertisement

WGPDUMB troubles.. Taeloid!

Started by February 29, 2000 06:54 PM
1 comment, last by BugSquash 25 years ago
Okay, this is simple enough. I think the 16 bit RGB encoding Macro given in WGPDUMB is faulty. Can anyone show me a better macro? (I think it has something to do with green getting more bits.) Because, right now, White is yellow. Just for... uh... something, here is Lamothe''s Macro: #define _RGB16BIT(r,g,b) ((b%32) + (g%32) << 5) + ((r%32) << 10) Help! --BugSquash Taeloid!
NARF!
I believe your problem is that your card is 5.6.5 format and your macro is 5.5.5 format. To verify, make a call to primary_surface->GetPixelFormat to fill out a DDPixelFormat structure. If the dwRGBBitCount member is 15, then you are in 5.5.5 format. If it''s 16, then you''re in 5.6.5. Try this macro:

_RGB16BIT565(r,g,b) ((b%32)+((g%64)<<6)+((r%32)<<11))
Advertisement
Thanks, dude! Geez, I was hoping I DIDN''T ahve a 5.6.5 format, but oh well.

--BugSquash
Taeloid!
NARF!

This topic is closed to new replies.

Advertisement