• Advertisement

Archived

This topic is now archived and is closed to further replies.

Question about color

This topic is 6525 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

I''m using VC++ 6 with Directx 6.1 in 8 bpp color mode. I was wondering if there''s a way to basically tint the whole screen a certain color by a certain amount or at least be able to darken it a certain amount. I''m using a tile based engine with bitmaps. Thanks in advance for any info

Share this post


Link to post
Share on other sites
Advertisement
I don''t use 8 bpp, so I don''t know the exact procedure, but what you do is take your palette entries and change their color components (to tint red, you would increase red in all the entries). Use IDirectDrawPalette::SetEntries for this. You should a look at the SDK for the full docs, but basically you just go through each palette entry and give it a new color.

Trigon

I like food.

Share this post


Link to post
Share on other sites
Aha! Now this is something i need to know also!

But how would you fade (or tint) the screen in 16bit mode?

Share this post


Link to post
Share on other sites
This would be slow, so I dont recommend it for realtime use.. but you could do a fullscreen alpha blend.. (50% blend with black to darken it.. 50% blend with white to lighten it.. 50% blend with red to tint it red [strongly])...
I used the same technique to nice effect in a game of mine.. although it was too slow to use except in a short burst (like a flash when damage was done.. or for a -very- brief time otherwise)

Share this post


Link to post
Share on other sites

  • Advertisement