• Advertisement
Sign in to follow this  

DirectDraw RGB Problem (Andre Lamoth sources)

This topic is 2179 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all!

I have a problem with Andre Lamoth sources (based on directdraw, directx7):
wrong colors displayed.

.exe running at windows xp (virtualbox installed at windows 7, cause windows 7 doesn't support dx7), compiled in vs2008

videocard Radeon.

For example, i set triangle color like this

poly1.color = _RGB16BIT565(0, 255, 0);

Looks like it must be green, but see attachement.

_RGB16BIT565 (tried two variants):

#define _RGB16BIT565(r,g,b) ((b & 31) + ((g & 63) << 5) + ((r & 31) << 11))
#define _RGB16BIT565(r,g,b) (((b & 0xF8) >> 3) + ((g & 0xFC) << 3) + ((r & 0xF8) << 8)

In what may be a problem?

Thank you.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement