Archived

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

Nazrix

Question about color

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
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
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