Original Post
how can i allow myself to put NULL instead of the predefined value to the function ie:
for example if diff is NULL i put the default value in if it isn't i put the value.
thx
[edited by - luxitan on January 6, 2003 5:34:07 PM]
D3DMATERIAL9 CNothing::MakeMaterial(D3DCOLORVALUE diff, D3DCOLORVALUE amb, D3DCOLORVALUE emi, D3DCOLORVALUE spec, float power)
{
D3DCOLORVALUE black = MakeColorA(0.0f, 0.0f, 0.0f);
D3DMATERIAL9 temp =
{
diff==NULL?black:diff,
amb==NULL?black:amb,
spec==NULL?black:spec,
emi==NULL?black:emi,
power
};
return temp;
}