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
a8a126c4
Commit
a8a126c4
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}DecalSize().
parent
66c8cb3e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
4 deletions
+35
-4
d3drm_private.h
dlls/d3drm/d3drm_private.h
+2
-0
d3drm.c
dlls/d3drm/tests/d3drm.c
+17
-0
texture.c
dlls/d3drm/texture.c
+16
-4
No files found.
dlls/d3drm/d3drm_private.h
View file @
a8a126c4
...
@@ -69,6 +69,8 @@ struct d3drm_texture
...
@@ -69,6 +69,8 @@ struct d3drm_texture
DWORD
max_colors
;
DWORD
max_colors
;
DWORD
max_shades
;
DWORD
max_shades
;
BOOL
transparency
;
BOOL
transparency
;
D3DVALUE
decal_width
;
D3DVALUE
decal_height
;
};
};
struct
d3drm_frame
struct
d3drm_frame
...
...
dlls/d3drm/tests/d3drm.c
View file @
a8a126c4
...
@@ -2713,6 +2713,7 @@ static void test_Texture(void)
...
@@ -2713,6 +2713,7 @@ static void test_Texture(void)
LONG
decalx
,
decaly
;
LONG
decalx
,
decaly
;
DWORD
colors
,
shades
;
DWORD
colors
,
shades
;
BOOL
transparency
;
BOOL
transparency
;
D3DVALUE
width
,
height
;
D3DRMIMAGE
initimg
=
D3DRMIMAGE
initimg
=
{
{
...
@@ -2920,6 +2921,22 @@ static void test_Texture(void)
...
@@ -2920,6 +2921,22 @@ static void test_Texture(void)
hr
=
IDirect3DRMTexture_SetShades
(
texture1
,
8
);
hr
=
IDirect3DRMTexture_SetShades
(
texture1
,
8
);
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
hr
=
IDirect3DRMTexture_GetDecalSize
(
texture1
,
&
width
,
&
height
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
width
==
1
.
0
f
,
"Got %.8e.
\n
"
,
width
);
ok
(
height
==
1
.
0
f
,
"Got %.8e.
\n
"
,
height
);
hr
=
IDirect3DRMTexture_SetDecalSize
(
texture1
,
8
.
0
f
,
7
.
0
f
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IDirect3DRMTexture_GetDecalSize
(
texture1
,
&
width
,
&
height
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
width
==
8
.
0
f
,
"Got %.8e.
\n
"
,
width
);
ok
(
height
==
7
.
0
f
,
"Got %.8e.
\n
"
,
height
);
hr
=
IDirect3DRMTexture_SetDecalSize
(
texture1
,
1
.
0
f
,
1
.
0
f
);
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
transparency
=
IDirect3DRMTexture_GetDecalTransparency
(
texture1
);
transparency
=
IDirect3DRMTexture_GetDecalTransparency
(
texture1
);
ok
(
transparency
==
FALSE
,
"Got %d.
\n
"
,
transparency
);
ok
(
transparency
==
FALSE
,
"Got %d.
\n
"
,
transparency
);
...
...
dlls/d3drm/texture.c
View file @
a8a126c4
...
@@ -1193,9 +1193,14 @@ static HRESULT WINAPI d3drm_texture3_SetShades(IDirect3DRMTexture3 *iface, DWORD
...
@@ -1193,9 +1193,14 @@ static HRESULT WINAPI d3drm_texture3_SetShades(IDirect3DRMTexture3 *iface, DWORD
static
HRESULT
WINAPI
d3drm_texture3_SetDecalSize
(
IDirect3DRMTexture3
*
iface
,
D3DVALUE
width
,
D3DVALUE
height
)
static
HRESULT
WINAPI
d3drm_texture3_SetDecalSize
(
IDirect3DRMTexture3
*
iface
,
D3DVALUE
width
,
D3DVALUE
height
)
{
{
FIXME
(
"iface %p, width %.8e, height %.8e stub!
\n
"
,
iface
,
width
,
height
);
struct
d3drm_texture
*
texture
=
impl_from_IDirect3DRMTexture3
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"iface %p, width %.8e, height %.8e.
\n
"
,
iface
,
width
,
height
);
texture
->
decal_width
=
width
;
texture
->
decal_height
=
height
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
d3drm_texture3_SetDecalOrigin
(
IDirect3DRMTexture3
*
iface
,
LONG
x
,
LONG
y
)
static
HRESULT
WINAPI
d3drm_texture3_SetDecalOrigin
(
IDirect3DRMTexture3
*
iface
,
LONG
x
,
LONG
y
)
...
@@ -1237,9 +1242,14 @@ static HRESULT WINAPI d3drm_texture3_SetDecalTransparentColor(IDirect3DRMTexture
...
@@ -1237,9 +1242,14 @@ static HRESULT WINAPI d3drm_texture3_SetDecalTransparentColor(IDirect3DRMTexture
static
HRESULT
WINAPI
d3drm_texture3_GetDecalSize
(
IDirect3DRMTexture3
*
iface
,
D3DVALUE
*
width
,
D3DVALUE
*
height
)
static
HRESULT
WINAPI
d3drm_texture3_GetDecalSize
(
IDirect3DRMTexture3
*
iface
,
D3DVALUE
*
width
,
D3DVALUE
*
height
)
{
{
FIXME
(
"iface %p, width %p, height %p stub!
\n
"
,
iface
,
width
,
height
);
struct
d3drm_texture
*
texture
=
impl_from_IDirect3DRMTexture3
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"iface %p, width %p, height %p.
\n
"
,
iface
,
width
,
height
);
*
width
=
texture
->
decal_width
;
*
height
=
texture
->
decal_height
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
d3drm_texture3_GetDecalOrigin
(
IDirect3DRMTexture3
*
iface
,
LONG
*
x
,
LONG
*
y
)
static
HRESULT
WINAPI
d3drm_texture3_GetDecalOrigin
(
IDirect3DRMTexture3
*
iface
,
LONG
*
x
,
LONG
*
y
)
...
@@ -1448,6 +1458,8 @@ HRESULT d3drm_texture_create(struct d3drm_texture **texture, IDirect3DRM *d3drm)
...
@@ -1448,6 +1458,8 @@ HRESULT d3drm_texture_create(struct d3drm_texture **texture, IDirect3DRM *d3drm)
object
->
max_colors
=
8
;
object
->
max_colors
=
8
;
object
->
max_shades
=
16
;
object
->
max_shades
=
16
;
object
->
transparency
=
FALSE
;
object
->
transparency
=
FALSE
;
object
->
decal_width
=
1
.
0
f
;
object
->
decal_height
=
1
.
0
f
;
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