Mike
Could you check the new Mobj_SetLightColor()
I am not sure of the best way to setup and use the new macro...
When using lighting materials i would like that all the matching parameters be set to VISIBLE mode at startup.
void Mobj_SetLightColor() {
BYTE a, r, g, b;
DWORD dwStyle = 0;
if (gP.frontall) {
zSplitColorARGB(gP.frontall, a, r, g, b);
gP.light0ColorAll = false;
DOCOLORALL(0);
DOLIGHTON(0, 1, 2);
DOCOLORCHEAP(0);
} else {
if (gP.frontambient) {
zSplitColorARGB(gP.frontambient, a, r, g, b);
DOLIGHTON(0, 1, 2);
SETCOLORAMB(0);
}
if (gP.frontdiffuse) {
zSplitColorARGB(gP.frontdiffuse, a, r, g, b);
DOLIGHTON(0, 1, 2);
SETCOLORDIF(0);
}
if (gP.frontspecular) {
zSplitColorARGB(gP.frontspecular, a, r, g, b);
DOLIGHTON(0, 1, 2);
SETCOLORSPEC(0);
}
}
if (gP.leftall) {
zSplitColorARGB(gP.leftall, a, r, g, b);
gP.light1ColorAll = false;
DOCOLORALL(1);
DOLIGHTON(1, 0, 2);
DOCOLORCHEAP(1);
} else {
if (gP.leftambient) {
zSplitColorARGB(gP.leftambient, a, r, g, b);
DOLIGHTON(1, 0, 2);
SETCOLORAMB(1);
}
if (gP.leftdiffuse) {
zSplitColorARGB(gP.leftdiffuse, a, r, g, b);
DOLIGHTON(1, 0, 2);
SETCOLORDIF(1);
}
if (gP.leftspecular) {
zSplitColorARGB(gP.leftspecular, a, r, g, b);
DOLIGHTON(1, 0, 2);
SETCOLORSPEC(1);
}
}
if (gP.rightall) {
zSplitColorARGB(gP.rightall, a, r, g, b);
gP.light2ColorAll = false;
DOCOLORALL(2);
DOLIGHTON(2, 0, 1);
DOCOLORCHEAP(2);
} else {
if (gP.rightambient) {
zSplitColorARGB(gP.rightambient, a, r, g, b);
DOLIGHTON(2, 0, 1);
SETCOLORAMB(2);
}
if (gP.rightdiffuse) {
zSplitColorARGB(gP.rightdiffuse, a, r, g, b);
DOLIGHTON(2, 0, 1);
SETCOLORDIF(1);
}
if (gP.rightspecular) {
zSplitColorARGB(gP.rightspecular, a, r, g, b);
DOLIGHTON(2, 0, 1);
SETCOLORSPEC(2);
}
}
}