[PATCH] Skeleton header file for d3dx8

David Adam David.Adam at math.cnrs.fr
Fri Oct 5 13:03:41 CDT 2007


---
 include/Makefile.in |    2 +
 include/d3dx8.h     |   28 ++++++++++++++++++++++
 include/d3dx8math.h |   64 ++++++++++++++++++++++++++++++++++++++++++++++++=
+++
 3 files changed, 94 insertions(+), 0 deletions(-)
 create mode 100644 include/d3dx8.h
 create mode 100644 include/d3dx8math.h

diff --git a/include/Makefile.in b/include/Makefile.in
index 60b916a..de8b86a 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -104,7 +104,9 @@ SRCDIR_INCLUDES =3D \
 =09d3drmdef.h \
 =09d3dtypes.h \
 =09d3dvec.inl \
+=09d3dx8.h \
 =09d3dx8core.h \
+=09d3dx8math.h \
 =09dbghelp.h \
 =09dbinit.idl \
 =09dbprop.idl \
diff --git a/include/d3dx8.h b/include/d3dx8.h
new file mode 100644
index 0000000..49153aa
--- /dev/null
+++ b/include/d3dx8.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2007 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, US=
A
+ */
+
+#ifndef __D3DX8_H__
+#define __D3DX8_H__
+
+#include <d3d8.h>
+#include <limits.h>
+
+#include "d3dx8math.h"
+#include "d3dx8core.h"
+
+#endif
diff --git a/include/d3dx8math.h b/include/d3dx8math.h
new file mode 100644
index 0000000..53f18ec
--- /dev/null
+++ b/include/d3dx8math.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2007 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, US=
A
+ */
+
+#ifndef __D3DX8MATH_H__
+#define __D3DX8MATH_H__
+
+#include <math.h>
+
+#define D3DX_PI    4*atan(1.0f)
+#define D3DX_1BYPI atan(1.0f)/4.0f
+
+#define D3DXToRadian( degree ) ((degree) * (D3DX_PI / 180.0f))
+#define D3DXToDegree( radian ) ((radian) * (180.0f / D3DX_PI))
+
+typedef struct D3DXVECTOR2
+{
+    FLOAT x, y;
+} D3DXVECTOR2, *LPD3DXVECTOR2;
+
+typedef struct D3DXVECTOR3
+{
+    FLOAT x, y, z;
+} D3DXVECTOR3, *LPD3DXVECTOR3;
+
+typedef struct D3DXVECTOR4
+{
+    FLOAT x, y, z, w;
+} D3DXVECTOR4, *LPD3DXVECTOR4;
+
+typedef struct _D3DMATRIX D3DXMATRIX, *LPD3DXMATRIX;
+
+typedef struct D3DXQUATERNION
+{
+    FLOAT x, y, z, w;
+} D3DXQUATERNION, *LPD3DXQUATERNION;
+
+typedef struct D3DXPLANE
+{
+    FLOAT a, b, c, d;
+} D3DXPLANE, *LPD3DXPLANE;
+
+typedef struct D3DXCOLOR
+{
+    FLOAT r, g, b, a;
+} D3DXCOLOR, *LPD3DXCOLOR;
+
+FLOAT D3DXVec2LengthSq(CONST LPD3DXVECTOR2);
+
+#endif
--=20
1.5.2.4


--=_75babmq3izok--



More information about the wine-patches mailing list