DirectDraw fade 2
Hey guys/gals! I updated the code that performs my gamma ramp
fades in DirectDraw. The problems I had were that I was using an
incrementing long value as a timer, ie:
This obviously wasn't effecient and especially wasn't practical, as
it would run super fast on new machines and slow as molassess
on older ones.
The other problem was that I was setting the gamma ramp values
to 0 then incrementing +/- 1000 per iteration. This was bad
because if you have really low gamma settings then your screen
wouldn't fully reset to it's proper gamma settings and all you'd
see was a black screen (like TechWins).
The fix for this was a little trickier. I declared 3 global arrays of
DWORDs to hold my gamma increment value. Then every 100
milliseconds I add that value to the gamma settings. Since I set
the value to setting/8, I incremented by the DWORD value for the
first 8 iterations of the function call. On the ninth I finished the
gamma ramp transition (settings=0 or setting=original, depending
on which way I was traversing the ramp).
I'm attaching a new *.zip file. Please test it and let me know what
DWORD dwRd, dwGr, dwBl;
//etc. etc. for green and blue arrays
results you get and what you think of the fade. Thanks.
Oh, and anyone who wants more details on the gamma ramp
fading technique can just PM me or ask here and I'll go into more
detail. Also, you'll need DirectX 7 or higher to run it.
yeah, its better than the first one.
though if the UNTER GRUND(sp) fade in/out was a little slower it would look neater.
Yay, it works now!!! Maybe a bit fast, but that's just my opinion, :)
I guess it's a case of overkill. Everyone said it was too slow in the
first attempt so I went the other extreme. I'm just going to find
the happy medium. :D
And you did spell "UnterGrund" right. It's German for
underground ( which is where I lived when I first started