well this is how i have it set up.. and it wont work.. I have directx 9c and here is my script it's called gammaramp.wdl and it's called from my main WDL after I include all my other WDLs

Code:

//-------------------------- WDL code -----------------------------
//2005 by LionTs.
//Free for all 3DGS community. Just send me $1000 per one game start.
//Ok, it's my another stupid joke :)
//Correct gamma ramp for FULLSCREEN mode.
// I'm trying to implement gammaramp in windowed mode thru GetDeviceGammaRamp,
// but I think it's useless.
//It's just an example, try to modify formula for gamma ramp arrays,
//You'll see intresting usefull effects.
//////////all code is working, I'm using this stuff in my game project
//function for simple gamma manipulation like overall brightness or color splash

dllfunction set_gamma(var,var,var); //red green blue: 0 - ~3.5, change overall brightness if all are equal
//functions for advansed effects like color inverted vision
dllfunction get_gamma_ramp(&var,&var,&var); //arrays of gamma ramp values: 0-65536
dllfunction set_gamma_ramp(&var,&var,&var); //arrays of gamma ramp values: 0-65536

var gr_red[256];
var gr_green[256];
var gr_blue[256];
var br_gamma=1.0;
//example for overall brightness correction
//PGUP & PGDN change it ingame
function gamma_correct
{
while(player == null){wait(1);}
var i=0;
get_gamma_ramp(gr_red,gr_green,gr_blue); //fill arrays with current gamma ramp
while(1)
{
if (key_any)
{
br_gamma+=time*0.1;
br_gamma=min(br_gamma,2.0);
}
else
{
if(key_pgdn)
{
br_gamma-=time*0.1;
br_gamma=max(br_gamma,0.5);
}
}
i=0;
while(i<256)//calculate values for gamma ramp
{
gr_red[i]=pow(i/256.0,1/br_gamma)*65536;
gr_green[i]=pow(i/256.0,1/br_gamma)*65536;
gr_blue[i]=pow(i/256.0,1/br_gamma)*65536;
/*
//try this, for example
gr_red[i]=pow((256.0-i)/256.0,1/br_gamma)*65536;
gr_green[i]=pow((256.0-i)/256.0,1/br_gamma)*65536;
gr_blue[i]=pow((256.0-i)/256.0,1/br_gamma)*65536;
*/
i+=1;
}

set_gamma_ramp(gr_red,gr_green,gr_blue); //commit new gamma ramp
}
wait(1);
}
//END of GAMMA_CORRECT()



well what is wrong here?


"There is no problem that can't be solved with time and determination." -me
prenceofdarkness for instant messages on AIM.

Looking for a model designer
PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.