patch [1/15]: Header file for D3DRM [try 2]

David.Adam at math.cnrs.fr David.Adam at math.cnrs.fr
Thu Apr 19 14:02:09 CDT 2007


This is a second try to implement the mathematical functions of D3DRM.
Tests works with native d3drm and with built-in d3drm.

[david at gr06 ~]$ cd wine/dlls/d3drm/tests/
[david at gr06 tests]$ WINEDLLOVERRIDES="d3drm=n" /home/david/wine/wine  
d3drm_test.exe.so
vector: 15 tests executed (0 marked as todo, 0 failures), 0 skipped.
[david at gr06 tests]$  /home/david/wine/wine d3drm_test.exe.so
vector: 15 tests executed (0 marked as todo, 0 failures), 0 skipped.
[david at gr06 tests]$

Comments are welcome :)

David Adam

-------------- next part --------------
>From c951256e357aa29605316e35ebc2e3238969665c Mon Sep 17 00:00:00 2001
From: Adam <David.Adam at math.cnrs.fr>
Date: Fri, 20 Apr 2007 01:21:25 +0200
Subject: [PATCH] Implements header file for D3DRM.

---
 include/d3drmdef.h |   83 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 83 insertions(+), 0 deletions(-)

diff --git a/include/d3drmdef.h b/include/d3drmdef.h
new file mode 100644
index 0000000..d596e57
--- /dev/null
+++ b/include/d3drmdef.h
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2007 Vijay Kiran Kamuju
+ *           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, USA
+ */
+
+#ifndef __D3DRMDEFS_H__
+#define __D3DRMDEFS_H__
+
+#include <stddef.h>
+#include <windef.h>
+
+#ifndef DX_SHARED_DEFINES
+
+typedef float D3DVALUE, *LPD3DVALUE;
+
+#ifndef D3DVECTOR_DEFINED
+typedef struct _D3DVECTOR {
+    float x;
+    float y;
+    float z;
+} D3DVECTOR;
+#define D3DVECTOR_DEFINED
+#endif
+
+#ifndef LPD3DVECTOR_DEFINED
+typedef D3DVECTOR *LPD3DVECTOR;
+#define LPD3DVECTOR_DEFINED
+#endif
+
+#define DX_SHARED_DEFINES
+#endif
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+typedef D3DVALUE D3DRMMATRIX4D[4][4];
+typedef struct _D3DRMQUATERNION
+{   D3DVALUE s;
+    D3DVECTOR v;
+} D3DRMQUATERNION, *LPD3DRMQUATERNION;
+
+void WINAPI D3DRMMatrixFromQuaternion(D3DRMMATRIX4D, LPD3DRMQUATERNION);
+
+LPD3DRMQUATERNION WINAPI D3DRMQuaternionFromRotation(LPD3DRMQUATERNION ,LPD3DVECTOR,D3DVALUE);
+LPD3DRMQUATERNION WINAPI D3DRMQuaternionMultiply(LPD3DRMQUATERNION, LPD3DRMQUATERNION, LPD3DRMQUATERNION);
+LPD3DRMQUATERNION WINAPI D3DRMQuaternionSlerp(LPD3DRMQUATERNION, LPD3DRMQUATERNION, LPD3DRMQUATERNION, D3DVALUE);
+
+LPD3DVECTOR WINAPI D3DRMVectorAdd(LPD3DVECTOR, LPD3DVECTOR, LPD3DVECTOR);
+LPD3DVECTOR WINAPI D3DRMVectorCrossProduct(LPD3DVECTOR, LPD3DVECTOR, LPD3DVECTOR);
+D3DVALUE WINAPI D3DRMVectorDotProduct(LPD3DVECTOR, LPD3DVECTOR);
+LPD3DVECTOR WINAPI D3DRMVectorNormalize(LPD3DVECTOR);
+
+#define D3DRMVectorNormalise D3DRMVectorNormalize
+
+D3DVALUE WINAPI D3DRMVectorModulus(LPD3DVECTOR);
+LPD3DVECTOR WINAPI D3DRMVectorRandom(LPD3DVECTOR);
+LPD3DVECTOR WINAPI D3DRMVectorRotate(LPD3DVECTOR, LPD3DVECTOR, LPD3DVECTOR, D3DVALUE);
+LPD3DVECTOR WINAPI D3DRMVectorReflect(LPD3DVECTOR, LPD3DVECTOR, LPD3DVECTOR);
+LPD3DVECTOR WINAPI D3DRMVectorScale(LPD3DVECTOR, LPD3DVECTOR, D3DVALUE);
+LPD3DVECTOR WINAPI D3DRMVectorSubtract(LPD3DVECTOR, LPD3DVECTOR, LPD3DVECTOR);
+
+#if defined(__cplusplus)
+};
+#endif
+
+#endif
+
+
-- 
1.4.2



More information about the wine-patches mailing list