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
90b2a8e1
Commit
90b2a8e1
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/SetColors.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
913c82e4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
5 deletions
+23
-5
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
+9
-5
No files found.
dlls/d3drm/d3drm_private.h
View file @
90b2a8e1
...
@@ -66,6 +66,7 @@ struct d3drm_texture
...
@@ -66,6 +66,7 @@ struct d3drm_texture
IDirectDrawSurface
*
surface
;
IDirectDrawSurface
*
surface
;
LONG
decal_x
;
LONG
decal_x
;
LONG
decal_y
;
LONG
decal_y
;
DWORD
max_colors
;
};
};
struct
d3drm_frame
struct
d3drm_frame
...
...
dlls/d3drm/tests/d3drm.c
View file @
90b2a8e1
...
@@ -2707,6 +2707,7 @@ static void test_Texture(void)
...
@@ -2707,6 +2707,7 @@ static void test_Texture(void)
IDirect3DRMTexture3
*
texture3
;
IDirect3DRMTexture3
*
texture3
;
IDirectDrawSurface
*
surface
;
IDirectDrawSurface
*
surface
;
LONG
decalx
,
decaly
;
LONG
decalx
,
decaly
;
DWORD
colors
;
D3DRMIMAGE
initimg
=
D3DRMIMAGE
initimg
=
{
{
...
@@ -2884,6 +2885,18 @@ static void test_Texture(void)
...
@@ -2884,6 +2885,18 @@ static void test_Texture(void)
hr
=
IDirect3DRMTexture_SetDecalOrigin
(
texture1
,
0
,
0
);
hr
=
IDirect3DRMTexture_SetDecalOrigin
(
texture1
,
0
,
0
);
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
colors
=
IDirect3DRMTexture_GetColors
(
texture1
);
ok
(
colors
==
8
,
"got %ld.
\n
"
,
colors
);
hr
=
IDirect3DRMTexture_SetColors
(
texture1
,
256
);
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
colors
=
IDirect3DRMTexture_GetColors
(
texture1
);
ok
(
colors
==
256
,
"got %ld.
\n
"
,
colors
);
hr
=
IDirect3DRMTexture_SetColors
(
texture1
,
8
);
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
d3drm_img
=
IDirect3DRMTexture_GetImage
(
texture1
);
d3drm_img
=
IDirect3DRMTexture_GetImage
(
texture1
);
ok
(
!!
d3drm_img
,
"Failed to get image.
\n
"
);
ok
(
!!
d3drm_img
,
"Failed to get image.
\n
"
);
ok
(
d3drm_img
==
&
initimg
,
"Expected image returned == %p, got %p.
\n
"
,
&
initimg
,
d3drm_img
);
ok
(
d3drm_img
==
&
initimg
,
"Expected image returned == %p, got %p.
\n
"
,
&
initimg
,
d3drm_img
);
...
...
dlls/d3drm/texture.c
View file @
90b2a8e1
...
@@ -1173,9 +1173,12 @@ static HRESULT WINAPI d3drm_texture3_Changed(IDirect3DRMTexture3 *iface,
...
@@ -1173,9 +1173,12 @@ static HRESULT WINAPI d3drm_texture3_Changed(IDirect3DRMTexture3 *iface,
static
HRESULT
WINAPI
d3drm_texture3_SetColors
(
IDirect3DRMTexture3
*
iface
,
DWORD
max_colors
)
static
HRESULT
WINAPI
d3drm_texture3_SetColors
(
IDirect3DRMTexture3
*
iface
,
DWORD
max_colors
)
{
{
FIXME
(
"iface %p, max_colors %lu stub!
\n
"
,
iface
,
max_colors
);
struct
d3drm_texture
*
texture
=
impl_from_IDirect3DRMTexture3
(
iface
);
TRACE
(
"iface %p, max_colors %lu
\n
"
,
iface
,
max_colors
);
return
E_NOTIMPL
;
texture
->
max_colors
=
max_colors
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
d3drm_texture3_SetShades
(
IDirect3DRMTexture3
*
iface
,
DWORD
max_shades
)
static
HRESULT
WINAPI
d3drm_texture3_SetShades
(
IDirect3DRMTexture3
*
iface
,
DWORD
max_shades
)
...
@@ -1262,9 +1265,9 @@ static DWORD WINAPI d3drm_texture3_GetShades(IDirect3DRMTexture3 *iface)
...
@@ -1262,9 +1265,9 @@ static DWORD WINAPI d3drm_texture3_GetShades(IDirect3DRMTexture3 *iface)
static
DWORD
WINAPI
d3drm_texture3_GetColors
(
IDirect3DRMTexture3
*
iface
)
static
DWORD
WINAPI
d3drm_texture3_GetColors
(
IDirect3DRMTexture3
*
iface
)
{
{
FIXME
(
"iface %p stub!
\n
"
,
iface
);
struct
d3drm_texture
*
texture
=
impl_from_IDirect3DRMTexture3
(
iface
);
TRACE
(
"iface %p
\n
"
,
iface
);
return
0
;
return
texture
->
max_colors
;
}
}
static
DWORD
WINAPI
d3drm_texture3_GetDecalScale
(
IDirect3DRMTexture3
*
iface
)
static
DWORD
WINAPI
d3drm_texture3_GetDecalScale
(
IDirect3DRMTexture3
*
iface
)
...
@@ -1433,6 +1436,7 @@ HRESULT d3drm_texture_create(struct d3drm_texture **texture, IDirect3DRM *d3drm)
...
@@ -1433,6 +1436,7 @@ HRESULT d3drm_texture_create(struct d3drm_texture **texture, IDirect3DRM *d3drm)
object
->
IDirect3DRMTexture2_iface
.
lpVtbl
=
&
d3drm_texture2_vtbl
;
object
->
IDirect3DRMTexture2_iface
.
lpVtbl
=
&
d3drm_texture2_vtbl
;
object
->
IDirect3DRMTexture3_iface
.
lpVtbl
=
&
d3drm_texture3_vtbl
;
object
->
IDirect3DRMTexture3_iface
.
lpVtbl
=
&
d3drm_texture3_vtbl
;
object
->
d3drm
=
d3drm
;
object
->
d3drm
=
d3drm
;
object
->
max_colors
=
8
;
d3drm_object_init
(
&
object
->
obj
,
classname
);
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