Fix some stupid bug with missing braces.
This commit is contained in:
parent
5cc4b3ba16
commit
4a078c8376
|
@ -765,17 +765,20 @@ GL_IDirect3DDeviceImpl_3_2T_SetLightState(LPDIRECT3DDEVICE3 iface,
|
||||||
|
|
||||||
TRACE("(%p/%p)->(%08x,%08lx)\n", This, iface, dwLightStateType, dwLightState);
|
TRACE("(%p/%p)->(%08x,%08lx)\n", This, iface, dwLightStateType, dwLightState);
|
||||||
|
|
||||||
if (!dwLightStateType && (dwLightStateType > D3DLIGHTSTATE_COLORVERTEX))
|
if (!dwLightStateType && (dwLightStateType > D3DLIGHTSTATE_COLORVERTEX)) {
|
||||||
TRACE("Unexpected Light State Type\n");
|
TRACE("Unexpected Light State Type\n");
|
||||||
return DDERR_INVALIDPARAMS;
|
return DDERR_INVALIDPARAMS;
|
||||||
|
}
|
||||||
|
|
||||||
if (dwLightStateType == D3DLIGHTSTATE_MATERIAL /* 1 */) {
|
if (dwLightStateType == D3DLIGHTSTATE_MATERIAL /* 1 */) {
|
||||||
IDirect3DMaterialImpl *mat = (IDirect3DMaterialImpl *) dwLightState;
|
IDirect3DMaterialImpl *mat = (IDirect3DMaterialImpl *) dwLightState;
|
||||||
|
|
||||||
if (mat != NULL) {
|
if (mat != NULL) {
|
||||||
|
TRACE(" activating material %p.\n", mat);
|
||||||
mat->activate(mat);
|
mat->activate(mat);
|
||||||
} else {
|
} else {
|
||||||
ERR(" D3DLIGHTSTATE_MATERIAL called with NULL material !!!\n");
|
ERR(" D3DLIGHTSTATE_MATERIAL called with NULL material !!!\n");
|
||||||
|
return DDERR_INVALIDPARAMS;
|
||||||
}
|
}
|
||||||
} else if (dwLightStateType == D3DLIGHTSTATE_COLORMODEL /* 3 */) {
|
} else if (dwLightStateType == D3DLIGHTSTATE_COLORMODEL /* 3 */) {
|
||||||
switch (dwLightState) {
|
switch (dwLightState) {
|
||||||
|
@ -784,15 +787,15 @@ GL_IDirect3DDeviceImpl_3_2T_SetLightState(LPDIRECT3DDEVICE3 iface,
|
||||||
break;
|
break;
|
||||||
case D3DCOLOR_RGB:
|
case D3DCOLOR_RGB:
|
||||||
/* We are already in this mode */
|
/* We are already in this mode */
|
||||||
|
TRACE("Setting color model to RGB (no-op).\n");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ERR("Unknown color model!\n");
|
ERR("Unknown color model!\n");
|
||||||
break;
|
return DDERR_INVALIDPARAMS;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
D3DRENDERSTATETYPE rs;
|
D3DRENDERSTATETYPE rs;
|
||||||
switch (dwLightStateType) {
|
switch (dwLightStateType) {
|
||||||
|
|
||||||
case D3DLIGHTSTATE_AMBIENT: /* 2 */
|
case D3DLIGHTSTATE_AMBIENT: /* 2 */
|
||||||
rs = D3DRENDERSTATE_AMBIENT;
|
rs = D3DRENDERSTATE_AMBIENT;
|
||||||
break;
|
break;
|
||||||
|
@ -812,7 +815,8 @@ GL_IDirect3DDeviceImpl_3_2T_SetLightState(LPDIRECT3DDEVICE3 iface,
|
||||||
rs = D3DRENDERSTATE_COLORVERTEX;
|
rs = D3DRENDERSTATE_COLORVERTEX;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
ERR("Unknown D3DLIGHTSTATETYPE %d.\n", dwLightStateType);
|
||||||
|
return DDERR_INVALIDPARAMS;
|
||||||
}
|
}
|
||||||
|
|
||||||
IDirect3DDevice7_SetRenderState(ICOM_INTERFACE(This, IDirect3DDevice7),
|
IDirect3DDevice7_SetRenderState(ICOM_INTERFACE(This, IDirect3DDevice7),
|
||||||
|
|
|
@ -309,17 +309,15 @@ static void activate(IDirect3DMaterialImpl* This) {
|
||||||
(float *) &(This->mat.u3.emissive));
|
(float *) &(This->mat.u3.emissive));
|
||||||
LEAVE_GL();
|
LEAVE_GL();
|
||||||
|
|
||||||
if (TRACE_ON(ddraw)) {
|
if (TRACE_ON(ddraw)) {
|
||||||
DPRINTF(" - size : %ld\n", This->mat.dwSize);
|
DPRINTF(" - size : %ld\n", This->mat.dwSize);
|
||||||
DPRINTF(" - diffuse : "); dump_D3DCOLORVALUE(&(This->mat.u.diffuse)); DPRINTF("\n");
|
DPRINTF(" - diffuse : "); dump_D3DCOLORVALUE(&(This->mat.u.diffuse)); DPRINTF("\n");
|
||||||
DPRINTF(" - ambient : "); dump_D3DCOLORVALUE(&(This->mat.u1.ambient)); DPRINTF("\n");
|
DPRINTF(" - ambient : "); dump_D3DCOLORVALUE(&(This->mat.u1.ambient)); DPRINTF("\n");
|
||||||
DPRINTF(" - specular: "); dump_D3DCOLORVALUE(&(This->mat.u2.specular)); DPRINTF("\n");
|
DPRINTF(" - specular: "); dump_D3DCOLORVALUE(&(This->mat.u2.specular)); DPRINTF("\n");
|
||||||
DPRINTF(" - emissive: "); dump_D3DCOLORVALUE(&(This->mat.u3.emissive)); DPRINTF("\n");
|
DPRINTF(" - emissive: "); dump_D3DCOLORVALUE(&(This->mat.u3.emissive)); DPRINTF("\n");
|
||||||
DPRINTF(" - power : %f\n", This->mat.u4.power);
|
DPRINTF(" - power : %f\n", This->mat.u4.power);
|
||||||
DPRINTF(" - texture handle : %08lx\n", (DWORD)This->mat.hTexture);
|
DPRINTF(" - texture handle : %08lx\n", (DWORD)This->mat.hTexture);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
|
#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
|
||||||
|
|
Loading…
Reference in New Issue