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
c0faf86f
Commit
c0faf86f
authored
Aug 01, 2013
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 01, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Fix double to float conversion warnings.
parent
ba61730d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
15 deletions
+13
-15
device.c
dlls/ddraw/device.c
+1
-1
executebuffer.c
dlls/ddraw/executebuffer.c
+8
-10
viewport.c
dlls/ddraw/viewport.c
+4
-4
No files found.
dlls/ddraw/device.c
View file @
c0faf86f
...
...
@@ -4391,7 +4391,7 @@ static DWORD in_plane(UINT plane, D3DVECTOR normal, D3DVALUE origin_plane, D3DVE
{
float
distance
,
norm
;
norm
=
sqrt
(
normal
.
u1
.
x
*
normal
.
u1
.
x
+
normal
.
u2
.
y
*
normal
.
u2
.
y
+
normal
.
u3
.
z
*
normal
.
u3
.
z
);
norm
=
sqrt
f
(
normal
.
u1
.
x
*
normal
.
u1
.
x
+
normal
.
u2
.
y
*
normal
.
u2
.
y
+
normal
.
u3
.
z
*
normal
.
u3
.
z
);
distance
=
(
origin_plane
+
normal
.
u1
.
x
*
center
.
u1
.
x
+
normal
.
u2
.
y
*
center
.
u2
.
y
+
normal
.
u3
.
z
*
center
.
u3
.
z
)
/
norm
;
if
(
fabs
(
distance
)
<
radius
)
return
D3DSTATUS_CLIPUNIONLEFT
<<
plane
;
...
...
dlls/ddraw/executebuffer.c
View file @
c0faf86f
...
...
@@ -381,11 +381,10 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer,
dst
->
u7
.
tu
=
src
->
u7
.
tu
;
dst
->
u8
.
tv
=
src
->
u8
.
tv
;
/* Now, the matrix multiplication */
dst
->
u1
.
sx
=
(
src
->
u1
.
x
*
mat
.
_11
)
+
(
src
->
u2
.
y
*
mat
.
_21
)
+
(
src
->
u3
.
z
*
mat
.
_31
)
+
(
1
.
0
*
mat
.
_41
);
dst
->
u2
.
sy
=
(
src
->
u1
.
x
*
mat
.
_12
)
+
(
src
->
u2
.
y
*
mat
.
_22
)
+
(
src
->
u3
.
z
*
mat
.
_32
)
+
(
1
.
0
*
mat
.
_42
);
dst
->
u3
.
sz
=
(
src
->
u1
.
x
*
mat
.
_13
)
+
(
src
->
u2
.
y
*
mat
.
_23
)
+
(
src
->
u3
.
z
*
mat
.
_33
)
+
(
1
.
0
*
mat
.
_43
);
dst
->
u4
.
rhw
=
(
src
->
u1
.
x
*
mat
.
_14
)
+
(
src
->
u2
.
y
*
mat
.
_24
)
+
(
src
->
u3
.
z
*
mat
.
_34
)
+
(
1
.
0
*
mat
.
_44
);
dst
->
u1
.
sx
=
(
src
->
u1
.
x
*
mat
.
_11
)
+
(
src
->
u2
.
y
*
mat
.
_21
)
+
(
src
->
u3
.
z
*
mat
.
_31
)
+
mat
.
_41
;
dst
->
u2
.
sy
=
(
src
->
u1
.
x
*
mat
.
_12
)
+
(
src
->
u2
.
y
*
mat
.
_22
)
+
(
src
->
u3
.
z
*
mat
.
_32
)
+
mat
.
_42
;
dst
->
u3
.
sz
=
(
src
->
u1
.
x
*
mat
.
_13
)
+
(
src
->
u2
.
y
*
mat
.
_23
)
+
(
src
->
u3
.
z
*
mat
.
_33
)
+
mat
.
_43
;
dst
->
u4
.
rhw
=
(
src
->
u1
.
x
*
mat
.
_14
)
+
(
src
->
u2
.
y
*
mat
.
_24
)
+
(
src
->
u3
.
z
*
mat
.
_34
)
+
mat
.
_44
;
dst
->
u1
.
sx
=
dst
->
u1
.
sx
/
dst
->
u4
.
rhw
*
Viewport
->
dvScaleX
+
Viewport
->
dwX
+
Viewport
->
dwWidth
/
2
;
...
...
@@ -424,11 +423,10 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer,
dst
->
u7
.
tu
=
src
->
u6
.
tu
;
dst
->
u8
.
tv
=
src
->
u7
.
tv
;
/* Now, the matrix multiplication */
dst
->
u1
.
sx
=
(
src
->
u1
.
x
*
mat
.
_11
)
+
(
src
->
u2
.
y
*
mat
.
_21
)
+
(
src
->
u3
.
z
*
mat
.
_31
)
+
(
1
.
0
*
mat
.
_41
);
dst
->
u2
.
sy
=
(
src
->
u1
.
x
*
mat
.
_12
)
+
(
src
->
u2
.
y
*
mat
.
_22
)
+
(
src
->
u3
.
z
*
mat
.
_32
)
+
(
1
.
0
*
mat
.
_42
);
dst
->
u3
.
sz
=
(
src
->
u1
.
x
*
mat
.
_13
)
+
(
src
->
u2
.
y
*
mat
.
_23
)
+
(
src
->
u3
.
z
*
mat
.
_33
)
+
(
1
.
0
*
mat
.
_43
);
dst
->
u4
.
rhw
=
(
src
->
u1
.
x
*
mat
.
_14
)
+
(
src
->
u2
.
y
*
mat
.
_24
)
+
(
src
->
u3
.
z
*
mat
.
_34
)
+
(
1
.
0
*
mat
.
_44
);
dst
->
u1
.
sx
=
(
src
->
u1
.
x
*
mat
.
_11
)
+
(
src
->
u2
.
y
*
mat
.
_21
)
+
(
src
->
u3
.
z
*
mat
.
_31
)
+
mat
.
_41
;
dst
->
u2
.
sy
=
(
src
->
u1
.
x
*
mat
.
_12
)
+
(
src
->
u2
.
y
*
mat
.
_22
)
+
(
src
->
u3
.
z
*
mat
.
_32
)
+
mat
.
_42
;
dst
->
u3
.
sz
=
(
src
->
u1
.
x
*
mat
.
_13
)
+
(
src
->
u2
.
y
*
mat
.
_23
)
+
(
src
->
u3
.
z
*
mat
.
_33
)
+
mat
.
_43
;
dst
->
u4
.
rhw
=
(
src
->
u1
.
x
*
mat
.
_14
)
+
(
src
->
u2
.
y
*
mat
.
_24
)
+
(
src
->
u3
.
z
*
mat
.
_34
)
+
mat
.
_44
;
dst
->
u1
.
sx
=
dst
->
u1
.
sx
/
dst
->
u4
.
rhw
*
Viewport
->
dvScaleX
+
Viewport
->
dwX
+
Viewport
->
dwWidth
/
2
;
...
...
dlls/ddraw/viewport.c
View file @
c0faf86f
...
...
@@ -428,10 +428,10 @@ static HRESULT WINAPI d3d_viewport_TransformVertices(IDirect3DViewport3 *iface,
outH
=
lpData
->
lpHOut
;
for
(
i
=
0
;
i
<
dwVertexCount
;
i
++
)
{
x
=
(
in
[
0
]
*
mat
.
_11
)
+
(
in
[
1
]
*
mat
.
_21
)
+
(
in
[
2
]
*
mat
.
_31
)
+
(
1
.
0
*
mat
.
_41
)
;
y
=
(
in
[
0
]
*
mat
.
_12
)
+
(
in
[
1
]
*
mat
.
_22
)
+
(
in
[
2
]
*
mat
.
_32
)
+
(
1
.
0
*
mat
.
_42
)
;
z
=
(
in
[
0
]
*
mat
.
_13
)
+
(
in
[
1
]
*
mat
.
_23
)
+
(
in
[
2
]
*
mat
.
_33
)
+
(
1
.
0
*
mat
.
_43
)
;
w
=
(
in
[
0
]
*
mat
.
_14
)
+
(
in
[
1
]
*
mat
.
_24
)
+
(
in
[
2
]
*
mat
.
_34
)
+
(
1
.
0
*
mat
.
_44
)
;
x
=
(
in
[
0
]
*
mat
.
_11
)
+
(
in
[
1
]
*
mat
.
_21
)
+
(
in
[
2
]
*
mat
.
_31
)
+
mat
.
_41
;
y
=
(
in
[
0
]
*
mat
.
_12
)
+
(
in
[
1
]
*
mat
.
_22
)
+
(
in
[
2
]
*
mat
.
_32
)
+
mat
.
_42
;
z
=
(
in
[
0
]
*
mat
.
_13
)
+
(
in
[
1
]
*
mat
.
_23
)
+
(
in
[
2
]
*
mat
.
_33
)
+
mat
.
_43
;
w
=
(
in
[
0
]
*
mat
.
_14
)
+
(
in
[
1
]
*
mat
.
_24
)
+
(
in
[
2
]
*
mat
.
_34
)
+
mat
.
_44
;
if
(
dwFlags
&
D3DTRANSFORM_CLIPPED
)
{
...
...
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