2 * Copyright 2007 Vijay Kiran Kamuju
3 * Copyright 2007 David ADAM
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #ifndef __D3DRMDEFS_H__
21 #define __D3DRMDEFS_H__
26 #if defined(__cplusplus)
30 typedef struct _D3DRMVECTOR4D
36 } D3DRMVECTOR4D
, *LPD3DRMVECTOR4D
;
38 typedef D3DVALUE D3DRMMATRIX4D
[4][4];
40 typedef struct _D3DRMQUATERNION
{
43 } D3DRMQUATERNION
, *LPD3DRMQUATERNION
;
45 typedef struct _D3DRMRAY
{
48 } D3DRMRAY
, *LPD3DRMRAY
;
50 typedef struct _D3DRMBOX
{
53 } D3DRMBOX
, *LPD3DRMBOX
;
55 typedef enum _D3DRMLIGHTTYPE
{
59 D3DRMLIGHT_DIRECTIONAL
,
60 D3DRMLIGHT_PARALLELPOINT
61 } D3DRMLIGHTTYPE
, *LPD3DRMLIGHTTYPE
;
63 typedef DWORD D3DRMRENDERQUALITY
, *LPD3DRMRENDERQUALITY
;
65 typedef enum _D3DRMTEXTUREQUALITY
{
68 D3DRMTEXTURE_MIPNEAREST
,
69 D3DRMTEXTURE_MIPLINEAR
,
70 D3DRMTEXTURE_LINEARMIPNEAREST
,
71 D3DRMTEXTURE_LINEARMIPLINEAR
72 } D3DRMTEXTUREQUALITY
, *LPD3DRMTEXTUREQUALITY
;
74 typedef enum _D3DRMCOMBINETYPE
{
78 } D3DRMCOMBINETYPE
, *LPD3DRMCOMBINETYPE
;
80 typedef struct _D3DRMPALETTEENTRY
{
85 } D3DRMPALETTEENTRY
, *LPD3DRMPALETTEENTRY
;
87 typedef struct _D3DRMIMAGE
{
97 unsigned long red_mask
;
98 unsigned long green_mask
;
99 unsigned long blue_mask
;
100 unsigned long alpha_mask
;
102 D3DRMPALETTEENTRY
* palette
;
103 } D3DRMIMAGE
, *LPD3DRMIMAGE
;
105 typedef enum _D3DRMWRAPTYPE
{
112 } D3DRMWRAPTYPE
, *LPD3DRMWRAPTYPE
;
114 typedef enum _D3DRMPROJECTIONTYPE
116 D3DRMPROJECT_PERSPECTIVE
,
117 D3DRMPROJECT_ORTHOGRAPHIC
,
118 D3DRMPROJECT_RIGHTHANDPERSPECTIVE
,
119 D3DRMPROJECT_RIGHTHANDORTHOGRAPHIC
120 } D3DRMPROJECTIONTYPE
, *LPD3DRMPROJECTIONTYPE
;
122 typedef enum _D3DRMXOFFORMAT
{
126 } D3DRMXOFFORMAT
, *LPD3DRMXOFFORMAT
;
128 typedef DWORD D3DRMSAVEOPTIONS
;
130 typedef enum _D3DRMFRAMECONSTRAINT
{
134 } D3DRMFRAMECONSTRAINT
, *LPD3DRMFRAMECONSTRAINT
;
136 typedef enum _D3DRMMATERIALMODE
{
137 D3DRMMATERIAL_FROMMESH
,
138 D3DRMMATERIAL_FROMPARENT
,
139 D3DRMMATERIAL_FROMFRAME
140 } D3DRMMATERIALMODE
, *LPD3DRMMATERIALMODE
;
142 typedef enum _D3DRMFOGMODE
{
144 D3DRMFOG_EXPONENTIAL
,
145 D3DRMFOG_EXPONENTIALSQUARED
146 } D3DRMFOGMODE
, *LPD3DRMFOGMODE
;
148 typedef enum _D3DRMZBUFFERMODE
{
149 D3DRMZBUFFER_FROMPARENT
,
152 } D3DRMZBUFFERMODE
, *LPD3DRMZBUFFERMODE
;
154 typedef enum _D3DRMSORTMODE
{
155 D3DRMSORT_FROMPARENT
,
157 D3DRMSORT_FRONTTOBACK
,
158 D3DRMSORT_BACKTOFRONT
159 } D3DRMSORTMODE
, *LPD3DRMSORTMODE
;
161 typedef struct _D3DRMMATERIALOVERRIDE
{
164 D3DCOLORVALUE dcDiffuse
;
165 D3DCOLORVALUE dcAmbient
;
166 D3DCOLORVALUE dcEmissive
;
167 D3DCOLORVALUE dcSpecular
;
169 LPUNKNOWN lpD3DRMTex
;
170 } D3DRMMATERIALOVERRIDE
, *LPD3DRMMATERIALOVERRIDE
;
172 typedef DWORD D3DRMLOADOPTIONS
;
174 typedef enum _D3DRMUSERVISUALREASON
{
175 D3DRMUSERVISUAL_CANSEE
,
176 D3DRMUSERVISUAL_RENDER
177 } D3DRMUSERVISUALREASON
, *LPD3DRMUSERVISUALREASON
;
179 void WINAPI
D3DRMMatrixFromQuaternion(D3DRMMATRIX4D
, LPD3DRMQUATERNION
);
181 LPD3DRMQUATERNION WINAPI
D3DRMQuaternionFromRotation(LPD3DRMQUATERNION
,LPD3DVECTOR
,D3DVALUE
);
182 LPD3DRMQUATERNION WINAPI
D3DRMQuaternionMultiply(LPD3DRMQUATERNION
, LPD3DRMQUATERNION
, LPD3DRMQUATERNION
);
183 LPD3DRMQUATERNION WINAPI
D3DRMQuaternionSlerp(LPD3DRMQUATERNION
, LPD3DRMQUATERNION
, LPD3DRMQUATERNION
, D3DVALUE
);
185 LPD3DVECTOR WINAPI
D3DRMVectorAdd(LPD3DVECTOR
, LPD3DVECTOR
, LPD3DVECTOR
);
186 LPD3DVECTOR WINAPI
D3DRMVectorCrossProduct(LPD3DVECTOR
, LPD3DVECTOR
, LPD3DVECTOR
);
187 D3DVALUE WINAPI
D3DRMVectorDotProduct(LPD3DVECTOR
, LPD3DVECTOR
);
188 LPD3DVECTOR WINAPI
D3DRMVectorNormalize(LPD3DVECTOR
);
190 #define D3DRMVectorNormalise D3DRMVectorNormalize
192 D3DVALUE WINAPI
D3DRMVectorModulus(LPD3DVECTOR
);
193 LPD3DVECTOR WINAPI
D3DRMVectorRandom(LPD3DVECTOR
);
194 LPD3DVECTOR WINAPI
D3DRMVectorRotate(LPD3DVECTOR
, LPD3DVECTOR
, LPD3DVECTOR
, D3DVALUE
);
195 LPD3DVECTOR WINAPI
D3DRMVectorReflect(LPD3DVECTOR
, LPD3DVECTOR
, LPD3DVECTOR
);
196 LPD3DVECTOR WINAPI
D3DRMVectorScale(LPD3DVECTOR
, LPD3DVECTOR
, D3DVALUE
);
197 LPD3DVECTOR WINAPI
D3DRMVectorSubtract(LPD3DVECTOR
, LPD3DVECTOR
, LPD3DVECTOR
);
199 D3DCOLOR WINAPI
D3DRMCreateColorRGB(D3DVALUE
, D3DVALUE
, D3DVALUE
);
200 D3DCOLOR WINAPI
D3DRMCreateColorRGBA(D3DVALUE
, D3DVALUE
, D3DVALUE
, D3DVALUE
);
201 D3DVALUE WINAPI
D3DRMColorGetAlpha(D3DCOLOR
);
202 D3DVALUE WINAPI
D3DRMColorGetBlue(D3DCOLOR
);
203 D3DVALUE WINAPI
D3DRMColorGetGreen(D3DCOLOR
);
204 D3DVALUE WINAPI
D3DRMColorGetRed(D3DCOLOR
);
206 #if defined(__cplusplus)