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
e8f97044
Commit
e8f97044
authored
Jan 11, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 11, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Avoid LPD3DLIGHT2.
parent
89838342
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
+23
-23
light.c
dlls/ddraw/light.c
+23
-23
No files found.
dlls/ddraw/light.c
View file @
e8f97044
...
...
@@ -188,45 +188,45 @@ static const float zero_value[] = {
0
.
0
,
0
.
0
,
0
.
0
,
0
.
0
};
static
HRESULT
WINAPI
d3d_light_SetLight
(
IDirect3DLight
*
iface
,
D3DLIGHT
*
lpLight
)
static
HRESULT
WINAPI
d3d_light_SetLight
(
IDirect3DLight
*
iface
,
D3DLIGHT
*
data
)
{
struct
d3d_light
*
light
=
impl_from_IDirect3DLight
(
iface
);
D3DLIGHT7
*
light7
=
&
light
->
light7
;
TRACE
(
"iface %p,
light %p.
\n
"
,
iface
,
lpLight
);
TRACE
(
"iface %p,
data %p.
\n
"
,
iface
,
data
);
if
(
TRACE_ON
(
ddraw
))
{
TRACE
(
" Light definition :
\n
"
);
dump_light
((
LPD3DLIGHT2
)
lpLight
);
dump_light
((
D3DLIGHT2
*
)
data
);
}
if
(
(
lpLight
->
dltType
==
0
)
||
(
lpLight
->
dltType
>
D3DLIGHT_PARALLELPOINT
)
)
if
(
(
!
data
->
dltType
)
||
(
data
->
dltType
>
D3DLIGHT_PARALLELPOINT
)
)
return
DDERR_INVALIDPARAMS
;
if
(
lpLight
->
dltType
==
D3DLIGHT_PARALLELPOINT
)
FIXME
(
"D3DLIGHT_PARALLELPOINT not
supported
\n
"
);
if
(
data
->
dltType
==
D3DLIGHT_PARALLELPOINT
)
FIXME
(
"D3DLIGHT_PARALLELPOINT not
implemented.
\n
"
);
/* Translate D3DLIGH
2 structure to D3DLIGHT7
*/
light7
->
dltType
=
lpLight
->
dltType
;
light7
->
dcvDiffuse
=
lpLight
->
dcvColor
;
if
(((
(
LPD3DLIGHT2
)
lpLight
)
->
dwFlags
&
D3DLIGHT_NO_SPECULAR
)
!=
0
)
light7
->
dcvSpecular
=
lpLight
->
dcvColor
;
/* Translate D3DLIGH
T2 structure to D3DLIGHT7.
*/
light7
->
dltType
=
data
->
dltType
;
light7
->
dcvDiffuse
=
data
->
dcvColor
;
if
(((
D3DLIGHT2
*
)
data
)
->
dwFlags
&
D3DLIGHT_NO_SPECULAR
)
light7
->
dcvSpecular
=
data
->
dcvColor
;
else
light7
->
dcvSpecular
=
*
(
const
D3DCOLORVALUE
*
)
zero_value
;
light7
->
dcvAmbient
=
lpLight
->
dcvColor
;
light7
->
dvPosition
=
lpLight
->
dvPosition
;
light7
->
dvDirection
=
lpLight
->
dvDirection
;
light7
->
dvRange
=
lpLight
->
dvRange
;
light7
->
dvFalloff
=
lpLight
->
dvFalloff
;
light7
->
dvAttenuation0
=
lpLight
->
dvAttenuation0
;
light7
->
dvAttenuation1
=
lpLight
->
dvAttenuation1
;
light7
->
dvAttenuation2
=
lpLight
->
dvAttenuation2
;
light7
->
dvTheta
=
lpLight
->
dvTheta
;
light7
->
dvPhi
=
lpLight
->
dvPhi
;
light7
->
dcvSpecular
=
*
(
const
D3DCOLORVALUE
*
)
zero_value
;
light7
->
dcvAmbient
=
data
->
dcvColor
;
light7
->
dvPosition
=
data
->
dvPosition
;
light7
->
dvDirection
=
data
->
dvDirection
;
light7
->
dvRange
=
data
->
dvRange
;
light7
->
dvFalloff
=
data
->
dvFalloff
;
light7
->
dvAttenuation0
=
data
->
dvAttenuation0
;
light7
->
dvAttenuation1
=
data
->
dvAttenuation1
;
light7
->
dvAttenuation2
=
data
->
dvAttenuation2
;
light7
->
dvTheta
=
data
->
dvTheta
;
light7
->
dvPhi
=
data
->
dvPhi
;
wined3d_mutex_lock
();
memcpy
(
&
light
->
light
,
lpLight
,
lpLight
->
dwSize
);
memcpy
(
&
light
->
light
,
data
,
data
->
dwSize
);
if
(
light
->
light
.
dwFlags
&
D3DLIGHT_ACTIVE
)
light_update
(
light
);
wined3d_mutex_unlock
();
...
...
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