Question about color

Started by
3 comments, last by Nazrix 24 years ago
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
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
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.
I like food.
Aha! Now this is something i need to know also!

But how would you fade (or tint) the screen in 16bit mode?
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)
adamm@san.rr.com
You could also try changing the gamma ramp if it''s supported.

This topic is closed to new replies.

Advertisement