Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
0f440817
Commit
0f440817
authored
May 13, 2022
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
May 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: IDirect3DRMTexture3 Get/SetShades.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
90b2a8e1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
6 deletions
+29
-6
d3drm_private.h
dlls/d3drm/d3drm_private.h
+1
-0
d3drm.c
dlls/d3drm/tests/d3drm.c
+19
-1
texture.c
dlls/d3drm/texture.c
+9
-5
No files found.
dlls/d3drm/d3drm_private.h
View file @
0f440817
...
...
@@ -67,6 +67,7 @@ struct d3drm_texture
LONG
decal_x
;
LONG
decal_y
;
DWORD
max_colors
;
DWORD
max_shades
;
};
struct
d3drm_frame
...
...
dlls/d3drm/tests/d3drm.c
View file @
0f440817
...
...
@@ -2707,7 +2707,7 @@ static void test_Texture(void)
IDirect3DRMTexture3
*
texture3
;
IDirectDrawSurface
*
surface
;
LONG
decalx
,
decaly
;
DWORD
colors
;
DWORD
colors
,
shades
;
D3DRMIMAGE
initimg
=
{
...
...
@@ -2897,6 +2897,24 @@ static void test_Texture(void)
hr
=
IDirect3DRMTexture_SetColors
(
texture1
,
8
);
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
shades
=
IDirect3DRMTexture_GetShades
(
texture1
);
ok
(
shades
==
16
,
"got %ld.
\n
"
,
shades
);
hr
=
IDirect3DRMTexture_SetShades
(
texture1
,
8
);
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
shades
=
IDirect3DRMTexture_GetShades
(
texture1
);
ok
(
shades
==
8
,
"got %ld.
\n
"
,
shades
);
hr
=
IDirect3DRMTexture_SetShades
(
texture1
,
11
);
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
shades
=
IDirect3DRMTexture_GetShades
(
texture1
);
ok
(
shades
==
11
,
"got %ld.
\n
"
,
shades
);
hr
=
IDirect3DRMTexture_SetShades
(
texture1
,
8
);
ok
(
hr
==
S_OK
,
"got %#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 @
0f440817
...
...
@@ -1183,9 +1183,12 @@ static HRESULT WINAPI d3drm_texture3_SetColors(IDirect3DRMTexture3 *iface, DWORD
static
HRESULT
WINAPI
d3drm_texture3_SetShades
(
IDirect3DRMTexture3
*
iface
,
DWORD
max_shades
)
{
FIXME
(
"iface %p, max_shades %lu stub!
\n
"
,
iface
,
max_shades
);
struct
d3drm_texture
*
texture
=
impl_from_IDirect3DRMTexture3
(
iface
);
TRACE
(
"iface %p, max_shades %lu
\n
"
,
iface
,
max_shades
);
return
E_NOTIMPL
;
texture
->
max_shades
=
max_shades
;
return
S_OK
;
}
static
HRESULT
WINAPI
d3drm_texture3_SetDecalSize
(
IDirect3DRMTexture3
*
iface
,
D3DVALUE
width
,
D3DVALUE
height
)
...
...
@@ -1258,9 +1261,9 @@ static D3DRMIMAGE * WINAPI d3drm_texture3_GetImage(IDirect3DRMTexture3 *iface)
static
DWORD
WINAPI
d3drm_texture3_GetShades
(
IDirect3DRMTexture3
*
iface
)
{
FIXME
(
"iface %p stub!
\n
"
,
iface
);
return
0
;
struct
d3drm_texture
*
texture
=
impl_from_IDirect3DRMTexture3
(
iface
);
TRACE
(
"iface %p
\n
"
,
iface
);
return
texture
->
max_shades
;
}
static
DWORD
WINAPI
d3drm_texture3_GetColors
(
IDirect3DRMTexture3
*
iface
)
...
...
@@ -1437,6 +1440,7 @@ HRESULT d3drm_texture_create(struct d3drm_texture **texture, IDirect3DRM *d3drm)
object
->
IDirect3DRMTexture3_iface
.
lpVtbl
=
&
d3drm_texture3_vtbl
;
object
->
d3drm
=
d3drm
;
object
->
max_colors
=
8
;
object
->
max_shades
=
16
;
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