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
9059fee7
Commit
9059fee7
authored
Jun 09, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 09, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Use unsafe_impl_from_IDirect3DLight() for application provided ifaces.
parent
05194507
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
14 deletions
+19
-14
ddraw_private.h
dlls/ddraw/ddraw_private.h
+1
-0
light.c
dlls/ddraw/light.c
+9
-0
viewport.c
dlls/ddraw/viewport.c
+9
-14
No files found.
dlls/ddraw/ddraw_private.h
View file @
9059fee7
...
...
@@ -408,6 +408,7 @@ struct IDirect3DLightImpl
void
light_activate
(
IDirect3DLightImpl
*
light
)
DECLSPEC_HIDDEN
;
void
light_deactivate
(
IDirect3DLightImpl
*
light
)
DECLSPEC_HIDDEN
;
void
d3d_light_init
(
IDirect3DLightImpl
*
light
,
IDirectDrawImpl
*
ddraw
)
DECLSPEC_HIDDEN
;
IDirect3DLightImpl
*
unsafe_impl_from_IDirect3DLight
(
IDirect3DLight
*
iface
)
DECLSPEC_HIDDEN
;
/******************************************************************************
* IDirect3DMaterial implementation structure - Wraps to D3D7
...
...
dlls/ddraw/light.c
View file @
9059fee7
...
...
@@ -281,3 +281,12 @@ void d3d_light_init(IDirect3DLightImpl *light, IDirectDrawImpl *ddraw)
light
->
ref
=
1
;
light
->
ddraw
=
ddraw
;
}
IDirect3DLightImpl
*
unsafe_impl_from_IDirect3DLight
(
IDirect3DLight
*
iface
)
{
if
(
!
iface
)
return
NULL
;
assert
(
iface
->
lpVtbl
==
&
d3d_light_vtbl
);
return
impl_from_IDirect3DLight
(
iface
);
}
dlls/ddraw/viewport.c
View file @
9059fee7
...
...
@@ -715,12 +715,11 @@ static HRESULT WINAPI IDirect3DViewportImpl_Clear(IDirect3DViewport3 *iface,
* DDERR_INVALIDPARAMS if there are 8 lights or more
*
*****************************************************************************/
static
HRESULT
WINAPI
IDirect3DViewportImpl_AddLight
(
IDirect3DViewport3
*
iface
,
IDirect3DLight
*
lpDirect3DLight
)
static
HRESULT
WINAPI
IDirect3DViewportImpl_AddLight
(
IDirect3DViewport3
*
iface
,
IDirect3DLight
*
lpDirect3DLight
)
{
IDirect3DViewportImpl
*
This
=
(
IDirect3DViewportImpl
*
)
iface
;
IDirect3DLightImpl
*
lpDirect3DLightImpl
=
(
IDirect3DLightImpl
*
)
lpDirect3DLight
;
IDirect3DLightImpl
*
lpDirect3DLightImpl
=
unsafe_impl_from_IDirect3DLight
(
lpDirect3DLight
)
;
DWORD
i
=
0
;
DWORD
map
=
This
->
map_lights
;
...
...
@@ -771,12 +770,11 @@ IDirect3DViewportImpl_AddLight(IDirect3DViewport3 *iface,
* DDERR_INVALIDPARAMS if the light wasn't found
*
*****************************************************************************/
static
HRESULT
WINAPI
IDirect3DViewportImpl_DeleteLight
(
IDirect3DViewport3
*
iface
,
IDirect3DLight
*
lpDirect3DLight
)
static
HRESULT
WINAPI
IDirect3DViewportImpl_DeleteLight
(
IDirect3DViewport3
*
iface
,
IDirect3DLight
*
lpDirect3DLight
)
{
IDirect3DViewportImpl
*
This
=
(
IDirect3DViewportImpl
*
)
iface
;
IDirect3DLightImpl
*
l
=
(
IDirect3DLightImpl
*
)
lpDirect3DLight
;
IDirect3DLightImpl
*
l
=
unsafe_impl_from_IDirect3DLight
(
lpDirect3DLight
)
;
TRACE
(
"iface %p, light %p.
\n
"
,
iface
,
lpDirect3DLight
);
...
...
@@ -814,14 +812,11 @@ IDirect3DViewportImpl_DeleteLight(IDirect3DViewport3 *iface,
* D3D_OK, because it's a stub
*
*****************************************************************************/
static
HRESULT
WINAPI
IDirect3DViewportImpl_NextLight
(
IDirect3DViewport3
*
iface
,
IDirect3DLight
*
lpDirect3DLight
,
IDirect3DLight
**
lplpDirect3DLight
,
DWORD
dwFlags
)
static
HRESULT
WINAPI
IDirect3DViewportImpl_NextLight
(
IDirect3DViewport3
*
iface
,
IDirect3DLight
*
lpDirect3DLight
,
IDirect3DLight
**
lplpDirect3DLight
,
DWORD
dwFlags
)
{
IDirect3DViewportImpl
*
This
=
(
IDirect3DViewportImpl
*
)
iface
;
IDirect3DLightImpl
*
l
=
(
IDirect3DLightImpl
*
)
lpDirect3DLight
;
IDirect3DLightImpl
*
l
=
unsafe_impl_from_IDirect3DLight
(
lpDirect3DLight
)
;
struct
list
*
entry
;
HRESULT
hr
;
...
...
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