d3drm: Just use RGBA_MAKE.
D3DCOLOR_ARGB is a d3d8+ thing, ddraw has RGBA_MAKE.
This commit is contained in:
parent
12a05be5b6
commit
0c228f5faf
|
@ -24,8 +24,6 @@
|
|||
#include "d3drm.h"
|
||||
#include "dxfile.h"
|
||||
|
||||
#define D3DCOLOR_ARGB(a,r,g,b) ((D3DCOLOR)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff)))
|
||||
|
||||
HRESULT Direct3DRM_create(IUnknown** ppObj) DECLSPEC_HIDDEN;
|
||||
HRESULT Direct3DRMDevice_create(REFIID riid, IUnknown** ppObj) DECLSPEC_HIDDEN;
|
||||
HRESULT Direct3DRMFrame_create(REFIID riid, IUnknown* parent_frame, IUnknown** ret_iface) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -2133,9 +2133,8 @@ static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundRGB(IDirect3DRMFra
|
|||
|
||||
TRACE("(%p/%p)->(%f,%f,%f)\n", iface, This, red, green, blue);
|
||||
|
||||
This->scenebackground = D3DCOLOR_ARGB(0xff, (BYTE)(red * 255.0f),
|
||||
(BYTE)(green * 255.0f),
|
||||
(BYTE)(blue * 255.0f));
|
||||
This->scenebackground = RGBA_MAKE((BYTE)(red * 255.0f),
|
||||
(BYTE)(green * 255.0f), (BYTE)(blue * 255.0f), 0xff);
|
||||
|
||||
return D3DRM_OK;
|
||||
}
|
||||
|
@ -2661,7 +2660,7 @@ HRESULT Direct3DRMFrame_create(REFIID riid, IUnknown* parent, IUnknown** ret_ifa
|
|||
object->IDirect3DRMFrame2_iface.lpVtbl = &Direct3DRMFrame2_Vtbl;
|
||||
object->IDirect3DRMFrame3_iface.lpVtbl = &Direct3DRMFrame3_Vtbl;
|
||||
object->ref = 1;
|
||||
object->scenebackground = D3DCOLOR_ARGB(0xff, 0, 0, 0);
|
||||
object->scenebackground = RGBA_MAKE(0, 0, 0, 0xff);
|
||||
|
||||
memcpy(object->transform, identity, sizeof(D3DRMMATRIX4D));
|
||||
|
||||
|
|
|
@ -213,9 +213,7 @@ static HRESULT WINAPI IDirect3DRMLightImpl_SetColorRGB(IDirect3DRMLight* iface,
|
|||
|
||||
TRACE("(%p/%p)->(%f,%f,%f)\n", iface, This, red, green, blue);
|
||||
|
||||
This->color = D3DCOLOR_ARGB(0xff, (BYTE)(red * 255.0f),
|
||||
(BYTE)(green * 255.0f),
|
||||
(BYTE)(blue * 255.0f));
|
||||
This->color = RGBA_MAKE((BYTE)(red * 255.0f), (BYTE)(green * 255.0f), (BYTE)(blue * 255.0f), 0xff);
|
||||
|
||||
return D3DRM_OK;
|
||||
}
|
||||
|
|
|
@ -1337,8 +1337,8 @@ HRESULT load_mesh_data(IDirect3DRMMeshBuilder3 *iface, IDirectXFileData *pData,
|
|||
|
||||
values = (float*)ptr;
|
||||
|
||||
This->materials[i].color = D3DCOLOR_ARGB((BYTE)(values[3] * 255.0f), (BYTE)(values[0] * 255.0f),
|
||||
(BYTE)(values[1] * 255.0f), (BYTE)(values[2] * 255.0f));
|
||||
This->materials[i].color = RGBA_MAKE((BYTE)(values[0] * 255.0f), (BYTE)(values[1] * 255.0f),
|
||||
(BYTE)(values[2] * 255.0f), (BYTE)(values[3] * 255.0f));
|
||||
|
||||
IDirect3DRMMaterial2_SetAmbient(This->materials[i].material, values[0], values [1], values[2]); /* Alpha ignored */
|
||||
IDirect3DRMMaterial2_SetPower(This->materials[i].material, values[4]);
|
||||
|
@ -1827,9 +1827,7 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_SetColorRGB(IDirect3DRMMeshBui
|
|||
|
||||
TRACE("(%p)->(%f,%f,%f)\n", This, red, green, blue);
|
||||
|
||||
This->color = D3DCOLOR_ARGB(0xff, (BYTE)(red * 255.0f),
|
||||
(BYTE)(green * 255.0f),
|
||||
(BYTE)(blue * 255.0f));
|
||||
This->color = RGBA_MAKE((BYTE)(red * 255.0f), (BYTE)(green * 255.0f), (BYTE)(blue * 255.0f), 0xff);
|
||||
|
||||
return D3DRM_OK;
|
||||
}
|
||||
|
@ -2845,9 +2843,7 @@ static HRESULT WINAPI IDirect3DRMMeshImpl_SetGroupColorRGB(IDirect3DRMMesh* ifac
|
|||
if (id >= This->nb_groups)
|
||||
return D3DRMERR_BADVALUE;
|
||||
|
||||
This->groups[id].color = D3DCOLOR_ARGB(0xff, (BYTE)(red * 255.0f),
|
||||
(BYTE)(green * 255.0f),
|
||||
(BYTE)(blue * 255.0f));
|
||||
This->groups[id].color = RGBA_MAKE((BYTE)(red * 255.0f), (BYTE)(green * 255.0f), (BYTE)(blue * 255.0f), 0xff);
|
||||
|
||||
return D3DRM_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue