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
c10d95b6
Commit
c10d95b6
authored
Aug 05, 2012
by
André Hentschel
Committed by
Alexandre Julliard
Aug 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Add SceneBackground handling.
parent
292869b9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
12 deletions
+35
-12
frame.c
dlls/d3drm/frame.c
+20
-12
d3drm.c
dlls/d3drm/tests/d3drm.c
+15
-0
No files found.
dlls/d3drm/frame.c
View file @
c10d95b6
...
...
@@ -55,6 +55,7 @@ struct IDirect3DRMFrameImpl {
ULONG
lights_capacity
;
IDirect3DRMLight
**
lights
;
D3DRMMATRIX4D
transform
;
D3DCOLOR
scenebackground
;
};
typedef
struct
{
...
...
@@ -981,9 +982,9 @@ static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneBackground(IDirect3DRMFrame
{
IDirect3DRMFrameImpl
*
This
=
impl_from_IDirect3DRMFrame2
(
iface
);
FIXME
(
"(%p/%p)->(): stub
\n
"
,
iface
,
This
);
TRACE
(
"(%p/%p)->()
\n
"
,
iface
,
This
);
return
0
;
return
IDirect3DRMFrame3_GetSceneBackground
(
&
This
->
IDirect3DRMFrame3_iface
)
;
}
static
HRESULT
WINAPI
IDirect3DRMFrame2Impl_GetSceneBackgroundDepth
(
IDirect3DRMFrame2
*
iface
,
...
...
@@ -1040,9 +1041,9 @@ static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackground(IDirect3DRMFrame2
{
IDirect3DRMFrameImpl
*
This
=
impl_from_IDirect3DRMFrame2
(
iface
);
FIXME
(
"(%p/%p)->(%u): stub
\n
"
,
iface
,
This
,
color
);
TRACE
(
"(%p/%p)->(%u)
\n
"
,
iface
,
This
,
color
);
return
E_NOTIMPL
;
return
IDirect3DRMFrame3_SetSceneBackground
(
&
This
->
IDirect3DRMFrame3_iface
,
color
)
;
}
static
HRESULT
WINAPI
IDirect3DRMFrame2Impl_SetSceneBackgroundRGB
(
IDirect3DRMFrame2
*
iface
,
...
...
@@ -1051,9 +1052,9 @@ static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundRGB(IDirect3DRMFra
{
IDirect3DRMFrameImpl
*
This
=
impl_from_IDirect3DRMFrame2
(
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
;
return
IDirect3DRMFrame3_SetSceneBackgroundRGB
(
&
This
->
IDirect3DRMFrame3_iface
,
red
,
green
,
blue
)
;
}
static
HRESULT
WINAPI
IDirect3DRMFrame2Impl_SetSceneBackgroundDepth
(
IDirect3DRMFrame2
*
iface
,
...
...
@@ -2078,9 +2079,9 @@ static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneBackground(IDirect3DRMFrame
{
IDirect3DRMFrameImpl
*
This
=
impl_from_IDirect3DRMFrame3
(
iface
);
FIXME
(
"(%p/%p)->(): stub
\n
"
,
iface
,
This
);
TRACE
(
"(%p/%p)->()
\n
"
,
iface
,
This
);
return
0
;
return
This
->
scenebackground
;
}
static
HRESULT
WINAPI
IDirect3DRMFrame3Impl_GetSceneBackgroundDepth
(
IDirect3DRMFrame3
*
iface
,
...
...
@@ -2137,9 +2138,11 @@ static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackground(IDirect3DRMFrame3
{
IDirect3DRMFrameImpl
*
This
=
impl_from_IDirect3DRMFrame3
(
iface
);
FIXME
(
"(%p/%p)->(%u): stub
\n
"
,
iface
,
This
,
color
);
TRACE
(
"(%p/%p)->(%u)
\n
"
,
iface
,
This
,
color
);
return
E_NOTIMPL
;
This
->
scenebackground
=
color
;
return
D3DRM_OK
;
}
static
HRESULT
WINAPI
IDirect3DRMFrame3Impl_SetSceneBackgroundRGB
(
IDirect3DRMFrame3
*
iface
,
...
...
@@ -2148,9 +2151,13 @@ static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundRGB(IDirect3DRMFra
{
IDirect3DRMFrameImpl
*
This
=
impl_from_IDirect3DRMFrame3
(
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
->
scenebackground
=
D3DCOLOR_ARGB
(
0xff
,
(
BYTE
)(
red
*
255
.
0
f
),
(
BYTE
)(
green
*
255
.
0
f
),
(
BYTE
)(
blue
*
255
.
0
f
));
return
D3DRM_OK
;
}
static
HRESULT
WINAPI
IDirect3DRMFrame3Impl_SetSceneBackgroundDepth
(
IDirect3DRMFrame3
*
iface
,
...
...
@@ -2685,6 +2692,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
);
memcpy
(
&
object
->
transform
[
0
][
0
],
&
identity
[
0
][
0
],
sizeof
(
D3DRMMATRIX4D
));
...
...
dlls/d3drm/tests/d3drm.c
View file @
c10d95b6
...
...
@@ -602,6 +602,7 @@ static void test_Frame(void)
LPDIRECT3DRMLIGHT
pLight1
;
LPDIRECT3DRMLIGHT
pLightTmp
;
LPDIRECT3DRMLIGHTARRAY
pLightArray
;
D3DCOLOR
color
;
DWORD
count
;
CHAR
cname
[
64
]
=
{
0
};
...
...
@@ -895,6 +896,20 @@ static void test_Frame(void)
CHECK_REFCOUNT
(
pFrameP1
,
3
);
IDirect3DRMLight_Release
(
pLight1
);
/* Test SceneBackground on first parent */
color
=
IDirect3DRMFrame_GetSceneBackground
(
pFrameP1
);
ok
(
color
==
0xff000000
,
"wrong color (%x)
\n
"
,
color
);
hr
=
IDirect3DRMFrame_SetSceneBackground
(
pFrameP1
,
0xff180587
);
ok
(
hr
==
D3DRM_OK
,
"Cannot set color (hr = %x)
\n
"
,
hr
);
color
=
IDirect3DRMFrame_GetSceneBackground
(
pFrameP1
);
ok
(
color
==
0xff180587
,
"wrong color (%x)
\n
"
,
color
);
hr
=
IDirect3DRMFrame_SetSceneBackgroundRGB
(
pFrameP1
,
0
.
5
,
0
.
5
,
0
.
5
);
ok
(
hr
==
D3DRM_OK
,
"Cannot set color (hr = %x)
\n
"
,
hr
);
color
=
IDirect3DRMFrame_GetSceneBackground
(
pFrameP1
);
ok
(
color
==
0xff7f7f7f
,
"wrong color (%x)
\n
"
,
color
);
/* Cleanup */
IDirect3DRMFrame_Release
(
pFrameP2
);
CHECK_REFCOUNT
(
pFrameC
,
2
);
...
...
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