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
66c8cb3e
Commit
66c8cb3e
authored
May 27, 2022
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
May 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Implement IDirect3DRMTexture3::{Get,Set}DecalTransparency().
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
parent
49845c51
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
4 deletions
+25
-4
d3drm_private.h
dlls/d3drm/d3drm_private.h
+1
-0
d3drm.c
dlls/d3drm/tests/d3drm.c
+13
-0
texture.c
dlls/d3drm/texture.c
+11
-4
No files found.
dlls/d3drm/d3drm_private.h
View file @
66c8cb3e
...
...
@@ -68,6 +68,7 @@ struct d3drm_texture
LONG
decal_y
;
DWORD
max_colors
;
DWORD
max_shades
;
BOOL
transparency
;
};
struct
d3drm_frame
...
...
dlls/d3drm/tests/d3drm.c
View file @
66c8cb3e
...
...
@@ -2712,6 +2712,7 @@ static void test_Texture(void)
IDirectDrawSurface
*
surface
;
LONG
decalx
,
decaly
;
DWORD
colors
,
shades
;
BOOL
transparency
;
D3DRMIMAGE
initimg
=
{
...
...
@@ -2919,6 +2920,18 @@ static void test_Texture(void)
hr
=
IDirect3DRMTexture_SetShades
(
texture1
,
8
);
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
transparency
=
IDirect3DRMTexture_GetDecalTransparency
(
texture1
);
ok
(
transparency
==
FALSE
,
"Got %d.
\n
"
,
transparency
);
hr
=
IDirect3DRMTexture_SetDecalTransparency
(
texture1
,
TRUE
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
transparency
=
IDirect3DRMTexture_GetDecalTransparency
(
texture1
);
ok
(
transparency
==
TRUE
,
"Got %d.
\n
"
,
transparency
);
hr
=
IDirect3DRMTexture_SetDecalTransparency
(
texture1
,
FALSE
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
d3drm_img
=
IDirect3DRMTexture_GetImage
(
texture1
);
ok
(
!!
d3drm_img
,
"Failed to get image.
\n
"
);
ok
(
d3drm_img
==
&
initimg
,
"Expected image returned == %p, got %p.
\n
"
,
&
initimg
,
d3drm_img
);
...
...
dlls/d3drm/texture.c
View file @
66c8cb3e
...
...
@@ -1219,9 +1219,13 @@ static HRESULT WINAPI d3drm_texture3_SetDecalScale(IDirect3DRMTexture3 *iface, D
static
HRESULT
WINAPI
d3drm_texture3_SetDecalTransparency
(
IDirect3DRMTexture3
*
iface
,
BOOL
transparency
)
{
FIXME
(
"iface %p, transparency %#x stub!
\n
"
,
iface
,
transparency
);
struct
d3drm_texture
*
texture
=
impl_from_IDirect3DRMTexture3
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"iface %p, transparency %#x.
\n
"
,
iface
,
transparency
);
texture
->
transparency
=
transparency
;
return
S_OK
;
}
static
HRESULT
WINAPI
d3drm_texture3_SetDecalTransparentColor
(
IDirect3DRMTexture3
*
iface
,
D3DCOLOR
color
)
...
...
@@ -1282,9 +1286,11 @@ static DWORD WINAPI d3drm_texture3_GetDecalScale(IDirect3DRMTexture3 *iface)
static
BOOL
WINAPI
d3drm_texture3_GetDecalTransparency
(
IDirect3DRMTexture3
*
iface
)
{
FIXME
(
"iface %p stub!
\n
"
,
iface
);
struct
d3drm_texture
*
texture
=
impl_from_IDirect3DRMTexture3
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
FALSE
;
return
texture
->
transparency
;
}
static
D3DCOLOR
WINAPI
d3drm_texture3_GetDecalTransparentColor
(
IDirect3DRMTexture3
*
iface
)
...
...
@@ -1441,6 +1447,7 @@ HRESULT d3drm_texture_create(struct d3drm_texture **texture, IDirect3DRM *d3drm)
object
->
d3drm
=
d3drm
;
object
->
max_colors
=
8
;
object
->
max_shades
=
16
;
object
->
transparency
=
FALSE
;
d3drm_object_init
(
&
object
->
obj
,
classname
);
...
...
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