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
66297080
Commit
66297080
authored
Jul 24, 2008
by
David Adam
Committed by
Alexandre Julliard
Jul 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx8: Implement D3DXSphereBoundProbe.
parent
fee6b384
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
98 additions
and
4 deletions
+98
-4
Makefile.in
dlls/d3dx8/Makefile.in
+2
-1
d3dx8.spec
dlls/d3dx8/d3dx8.spec
+1
-1
mesh.c
dlls/d3dx8/mesh.c
+39
-0
Makefile.in
dlls/d3dx8/tests/Makefile.in
+3
-1
mesh.c
dlls/d3dx8/tests/mesh.c
+51
-0
d3dx8mesh.h
include/d3dx8mesh.h
+2
-1
No files found.
dlls/d3dx8/Makefile.in
View file @
66297080
...
...
@@ -9,7 +9,8 @@ IMPORTS = dxguid uuid kernel32
C_SRCS
=
\
d3dx8_main.c
\
d3dxbuffer.c
\
math.c
math.c
\
mesh.c
@MAKE_DLL_RULES@
...
...
dlls/d3dx8/d3dx8.spec
View file @
66297080
...
...
@@ -108,7 +108,7 @@
@ stub D3DXFVFFromDeclarator
@ stub D3DXWeldVertices
@ stub D3DXIntersect
@ st
ub D3DXSphereBoundProbe
@ st
dcall D3DXSphereBoundProbe(ptr long ptr ptr)
@ stub D3DXBoxBoundProbe
@ stub D3DXCreatePolygon
@ stub D3DXCreateBox
...
...
dlls/d3dx8/mesh.c
0 → 100644
View file @
66297080
/*
* Copyright 2008 David Adam
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "windef.h"
#include "wingdi.h"
#include "d3dx8.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3dx
);
BOOL
WINAPI
D3DXSphereBoundProbe
(
CONST
D3DXVECTOR3
*
pcenter
,
FLOAT
radius
,
CONST
D3DXVECTOR3
*
prayposition
,
CONST
D3DXVECTOR3
*
praydirection
)
{
D3DXVECTOR3
difference
;
FLOAT
a
,
b
,
c
;
a
=
D3DXVec3LengthSq
(
praydirection
);
if
(
!
D3DXVec3Subtract
(
&
difference
,
prayposition
,
pcenter
))
return
FALSE
;
b
=
D3DXVec3Dot
(
&
difference
,
praydirection
);
c
=
D3DXVec3LengthSq
(
&
difference
)
-
radius
*
radius
;
if
(
b
*
b
-
a
*
c
<=
0
.
0
f
)
return
FALSE
;
return
TRUE
;
}
dlls/d3dx8/tests/Makefile.in
View file @
66297080
...
...
@@ -5,7 +5,9 @@ VPATH = @srcdir@
TESTDLL
=
d3dx8.dll
IMPORTS
=
d3dx8 kernel32
CTESTS
=
math.c
CTESTS
=
\
math.c
\
mesh.c
@MAKE_TEST_RULES@
...
...
dlls/d3dx8/tests/mesh.c
0 → 100644
View file @
66297080
/*
* Copyright 2008 David Adam
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "d3dx8.h"
#include "wine/test.h"
static
void
D3DXBoundProbeTest
(
void
)
{
/*____________Test the Sphere case________________________*/
BOOL
result
;
D3DXVECTOR3
center
,
raydirection
,
rayposition
;
FLOAT
radius
;
radius
=
sqrt
(
77
.
0
f
);
center
.
x
=
1
.
0
f
;
center
.
y
=
2
.
0
f
;
center
.
z
=
3
.
0
f
;
raydirection
.
x
=
2
.
0
f
;
raydirection
.
y
=
-
4
.
0
f
;
raydirection
.
z
=
2
.
0
f
;
rayposition
.
x
=
5
.
0
f
;
rayposition
.
y
=
5
.
0
f
;
rayposition
.
z
=
9
.
0
f
;
result
=
D3DXSphereBoundProbe
(
&
center
,
radius
,
&
rayposition
,
&
raydirection
);
ok
(
result
==
TRUE
,
"expected TRUE, received FALSE
\n
"
);
rayposition
.
x
=
5
.
0
f
;
rayposition
.
y
=
7
.
0
f
;
rayposition
.
z
=
9
.
0
f
;
result
=
D3DXSphereBoundProbe
(
&
center
,
radius
,
&
rayposition
,
&
raydirection
);
ok
(
result
==
FALSE
,
"expected FALSE, received TRUE
\n
"
);
rayposition
.
x
=
5
.
0
f
;
rayposition
.
y
=
11
.
0
f
;
rayposition
.
z
=
9
.
0
f
;
result
=
D3DXSphereBoundProbe
(
&
center
,
radius
,
&
rayposition
,
&
raydirection
);
ok
(
result
==
FALSE
,
"expected FALSE, received TRUE
\n
"
);
}
START_TEST
(
mesh
)
{
D3DXBoundProbeTest
();
}
include/d3dx8mesh.h
View file @
66297080
...
...
@@ -19,7 +19,7 @@
#ifndef __WINE_D3DX8MESH_H
#define __WINE_D3DX8MESH_H
#include <d3d8.h>
#include <d3d
x
8.h>
#include <dxfile.h>
#ifdef __cplusplus
...
...
@@ -28,6 +28,7 @@ extern "C" {
HRESULT
WINAPI
D3DXCreateBuffer
(
DWORD
,
LPD3DXBUFFER
*
);
UINT
WINAPI
D3DXGetFVFVertexSize
(
DWORD
);
BOOL
WINAPI
D3DXSphereBoundProbe
(
CONST
D3DXVECTOR3
*
,
FLOAT
,
CONST
D3DXVECTOR3
*
,
CONST
D3DXVECTOR3
*
);
#ifdef __cplusplus
}
...
...
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