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
d2a52d1e
Commit
d2a52d1e
authored
May 27, 2012
by
André Hentschel
Committed by
Alexandre Julliard
May 29, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Implement IDirect3DRMLight_[Get|Set]Color and IDirect3DRMLight_SetColorRGB.
parent
8fa6a0b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
11 deletions
+20
-11
light.c
dlls/d3drm/light.c
+15
-6
d3drm.c
dlls/d3drm/tests/d3drm.c
+5
-5
No files found.
dlls/d3drm/light.c
View file @
d2a52d1e
...
...
@@ -29,10 +29,13 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3drm
);
#define D3DCOLOR_ARGB(a,r,g,b) ((D3DCOLOR)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff)))
typedef
struct
{
IDirect3DRMLight
IDirect3DRMLight_iface
;
LONG
ref
;
D3DRMLIGHTTYPE
type
;
D3DCOLOR
color
;
}
IDirect3DRMLightImpl
;
static
inline
IDirect3DRMLightImpl
*
impl_from_IDirect3DRMLight
(
IDirect3DRMLight
*
iface
)
...
...
@@ -186,9 +189,11 @@ static HRESULT WINAPI IDirect3DRMLightImpl_SetColor(IDirect3DRMLight* iface, D3D
{
IDirect3DRMLightImpl
*
This
=
impl_from_IDirect3DRMLight
(
iface
);
FIXME
(
"(%p/%p)->(%u): stub
\n
"
,
iface
,
This
,
color
);
TRACE
(
"(%p/%p)->(%u)
\n
"
,
iface
,
This
,
color
);
return
E_NOTIMPL
;
This
->
color
=
color
;
return
D3DRM_OK
;
}
static
HRESULT
WINAPI
IDirect3DRMLightImpl_SetColorRGB
(
IDirect3DRMLight
*
iface
,
...
...
@@ -196,9 +201,13 @@ static HRESULT WINAPI IDirect3DRMLightImpl_SetColorRGB(IDirect3DRMLight* iface,
{
IDirect3DRMLightImpl
*
This
=
impl_from_IDirect3DRMLight
(
iface
);
FIXME
(
"(%p/%p)->(%f,%f,%f): stub
\n
"
,
iface
,
This
,
red
,
green
,
blue
);
TRACE
(
"(%p/%p)->(%f,%f,%f)
\n
"
,
iface
,
This
,
red
,
green
,
blue
);
return
E_NOTIMPL
;
This
->
color
=
D3DCOLOR_ARGB
(
0xff
,
(
BYTE
)(
red
*
255
.
0
f
),
(
BYTE
)(
green
*
255
.
0
f
),
(
BYTE
)(
blue
*
255
.
0
f
));
return
D3DRM_OK
;
}
static
HRESULT
WINAPI
IDirect3DRMLightImpl_SetRange
(
IDirect3DRMLight
*
iface
,
D3DVALUE
range
)
...
...
@@ -316,9 +325,9 @@ static D3DCOLOR WINAPI IDirect3DRMLightImpl_GetColor(IDirect3DRMLight* iface)
{
IDirect3DRMLightImpl
*
This
=
impl_from_IDirect3DRMLight
(
iface
);
FIXME
(
"(%p/%p)->(): stub
\n
"
,
iface
,
This
);
TRACE
(
"(%p/%p)->()
\n
"
,
iface
,
This
);
return
0
;
return
This
->
color
;
}
static
D3DRMLIGHTTYPE
WINAPI
IDirect3DRMLightImpl_GetType
(
IDirect3DRMLight
*
iface
)
...
...
dlls/d3drm/tests/d3drm.c
View file @
d2a52d1e
...
...
@@ -842,7 +842,7 @@ static void test_Light(void)
ok
(
type
==
D3DRMLIGHT_SPOT
,
"wrong type (%u)
\n
"
,
type
);
color
=
IDirect3DRMLight_GetColor
(
pLight
);
todo_wine
ok
(
color
==
0xff7f7f7f
,
"wrong color (%x)
\n
"
,
color
);
ok
(
color
==
0xff7f7f7f
,
"wrong color (%x)
\n
"
,
color
);
hr
=
IDirect3DRMLight_SetType
(
pLight
,
D3DRMLIGHT_POINT
);
ok
(
hr
==
D3DRM_OK
,
"Cannot set type (hr = %x)
\n
"
,
hr
);
...
...
@@ -850,14 +850,14 @@ static void test_Light(void)
ok
(
type
==
D3DRMLIGHT_POINT
,
"wrong type (%u)
\n
"
,
type
);
hr
=
IDirect3DRMLight_SetColor
(
pLight
,
0xff180587
);
todo_wine
ok
(
hr
==
D3DRM_OK
,
"Cannot set color (hr = %x)
\n
"
,
hr
);
ok
(
hr
==
D3DRM_OK
,
"Cannot set color (hr = %x)
\n
"
,
hr
);
color
=
IDirect3DRMLight_GetColor
(
pLight
);
todo_wine
ok
(
color
==
0xff180587
,
"wrong color (%x)
\n
"
,
color
);
ok
(
color
==
0xff180587
,
"wrong color (%x)
\n
"
,
color
);
hr
=
IDirect3DRMLight_SetColorRGB
(
pLight
,
0
.
5
,
0
.
5
,
0
.
5
);
todo_wine
ok
(
hr
==
D3DRM_OK
,
"Cannot set color (hr = %x)
\n
"
,
hr
);
ok
(
hr
==
D3DRM_OK
,
"Cannot set color (hr = %x)
\n
"
,
hr
);
color
=
IDirect3DRMLight_GetColor
(
pLight
);
todo_wine
ok
(
color
==
0xff7f7f7f
,
"wrong color (%x)
\n
"
,
color
);
ok
(
color
==
0xff7f7f7f
,
"wrong color (%x)
\n
"
,
color
);
IDirect3DRMLight_Release
(
pLight
);
...
...
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