Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0c228f5f
Commit
0c228f5f
authored
Apr 15, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Just use RGBA_MAKE.
D3DCOLOR_ARGB is a d3d8+ thing, ddraw has RGBA_MAKE.
parent
12a05be5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
17 deletions
+8
-17
d3drm_private.h
dlls/d3drm/d3drm_private.h
+0
-2
frame.c
dlls/d3drm/frame.c
+3
-4
light.c
dlls/d3drm/light.c
+1
-3
meshbuilder.c
dlls/d3drm/meshbuilder.c
+4
-8
No files found.
dlls/d3drm/d3drm_private.h
View file @
0c228f5f
...
...
@@ -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
;
...
...
dlls/d3drm/frame.c
View file @
0c228f5f
...
...
@@ -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
.
0
f
),
(
BYTE
)(
green
*
255
.
0
f
),
(
BYTE
)(
blue
*
255
.
0
f
));
This
->
scenebackground
=
RGBA_MAKE
((
BYTE
)(
red
*
255
.
0
f
),
(
BYTE
)(
green
*
255
.
0
f
),
(
BYTE
)(
blue
*
255
.
0
f
),
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
));
...
...
dlls/d3drm/light.c
View file @
0c228f5f
...
...
@@ -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
.
0
f
),
(
BYTE
)(
green
*
255
.
0
f
),
(
BYTE
)(
blue
*
255
.
0
f
));
This
->
color
=
RGBA_MAKE
((
BYTE
)(
red
*
255
.
0
f
),
(
BYTE
)(
green
*
255
.
0
f
),
(
BYTE
)(
blue
*
255
.
0
f
),
0xff
);
return
D3DRM_OK
;
}
...
...
dlls/d3drm/meshbuilder.c
View file @
0c228f5f
...
...
@@ -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
.
0
f
),
(
BYTE
)(
values
[
0
]
*
255
.
0
f
),
(
BYTE
)(
values
[
1
]
*
255
.
0
f
),
(
BYTE
)(
values
[
2
]
*
255
.
0
f
));
This
->
materials
[
i
].
color
=
RGBA_MAKE
((
BYTE
)(
values
[
0
]
*
255
.
0
f
),
(
BYTE
)(
values
[
1
]
*
255
.
0
f
),
(
BYTE
)(
values
[
2
]
*
255
.
0
f
),
(
BYTE
)(
values
[
3
]
*
255
.
0
f
));
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
.
0
f
),
(
BYTE
)(
green
*
255
.
0
f
),
(
BYTE
)(
blue
*
255
.
0
f
));
This
->
color
=
RGBA_MAKE
((
BYTE
)(
red
*
255
.
0
f
),
(
BYTE
)(
green
*
255
.
0
f
),
(
BYTE
)(
blue
*
255
.
0
f
),
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
.
0
f
),
(
BYTE
)(
green
*
255
.
0
f
),
(
BYTE
)(
blue
*
255
.
0
f
));
This
->
groups
[
id
].
color
=
RGBA_MAKE
((
BYTE
)(
red
*
255
.
0
f
),
(
BYTE
)(
green
*
255
.
0
f
),
(
BYTE
)(
blue
*
255
.
0
f
),
0xff
);
return
D3DRM_OK
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment