Author: akhaldi
Date: Tue Dec 8 12:38:18 2015
New Revision: 70302
URL:
http://svn.reactos.org/svn/reactos?rev=70302&view=rev
Log:
[PSDK] Update d3dtypes.h. CORE-10536
Modified:
trunk/reactos/include/psdk/d3dtypes.h
Modified: trunk/reactos/include/psdk/d3dtypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/d3dtypes.h?re…
==============================================================================
--- trunk/reactos/include/psdk/d3dtypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/d3dtypes.h [iso-8859-1] Tue Dec 8 12:38:18 2015
@@ -34,6 +34,10 @@
#include <float.h>
#include <ddraw.h>
+#ifdef __i386__
+#include <pshpack4.h>
+#endif
+
#define D3DVALP(val, prec) ((float)(val))
#define D3DVAL(val) ((float)(val))
#define D3DDivide(a, b) (float)((double) (a) / (double) (b))
@@ -57,10 +61,10 @@
#define RGBA_MAKE(r, g, b, a) ((D3DCOLOR) (((a) << 24) | ((r) << 16) | ((g)
<< 8) | (b)))
#define D3DRGB(r, g, b) \
- (0xff000000L | ( ((long)((r) * 255)) << 16) | (((long)((g) * 255)) << 8)
| (long)((b) * 255))
+ (0xff000000 | ( ((LONG)((r) * 255)) << 16) | (((LONG)((g) * 255)) << 8) |
(LONG)((b) * 255))
#define D3DRGBA(r, g, b, a) \
- ( (((long)((a) * 255)) << 24) | (((long)((r) * 255)) << 16) \
- | (((long)((g) * 255)) << 8) | (long)((b) * 255) \
+ ( (((LONG)((a) * 255)) << 24) | (((LONG)((r) * 255)) << 16) \
+ | (((LONG)((g) * 255)) << 8) | (LONG)((b) * 255) \
)
#define RGB_GETRED(rgb) (((rgb) >> 16) & 0xff)
@@ -76,9 +80,9 @@
#define D3DENUMRET_CANCEL DDENUMRET_CANCEL
#define D3DENUMRET_OK DDENUMRET_OK
-typedef HRESULT (CALLBACK *LPD3DVALIDATECALLBACK)(LPVOID lpUserArg, DWORD dwOffset);
-typedef HRESULT (CALLBACK *LPD3DENUMTEXTUREFORMATSCALLBACK)(LPDDSURFACEDESC lpDdsd,
LPVOID lpContext);
-typedef HRESULT (CALLBACK *LPD3DENUMPIXELFORMATSCALLBACK)(LPDDPIXELFORMAT lpDDPixFmt,
LPVOID lpContext);
+typedef HRESULT (CALLBACK *LPD3DVALIDATECALLBACK)(void *ctx, DWORD offset);
+typedef HRESULT (CALLBACK *LPD3DENUMTEXTUREFORMATSCALLBACK)(DDSURFACEDESC *surface_desc,
void *ctx);
+typedef HRESULT (CALLBACK *LPD3DENUMPIXELFORMATSCALLBACK)(DDPIXELFORMAT *format, void
*ctx);
#ifndef DX_SHARED_DEFINES
@@ -344,9 +348,9 @@
/* This is different from MS, but avoids anonymous structs. */
D3DVALUE &operator () (int r, int c)
- { return ((D3DVALUE [4][4])&_11)[r][c]; }
+ { return (&_11)[r*4 + c]; }
const D3DVALUE &operator() (int r, int c) const
- { return ((const D3DVALUE [4][4])&_11)[r][c]; }
+ { return (&_11)[r*4 + c]; }
#endif
} D3DMATRIX, *LPD3DMATRIX;
#endif
@@ -480,11 +484,11 @@
typedef struct _D3DTRANSFORMDATA {
DWORD dwSize;
- LPVOID lpIn;
+ void *lpIn;
DWORD dwInSize;
- LPVOID lpOut;
+ void *lpOut;
DWORD dwOutSize;
- LPD3DHVERTEX lpHOut;
+ D3DHVERTEX *lpHOut;
DWORD dwClip;
DWORD dwClipIntersection;
DWORD dwClipUnion;
@@ -613,9 +617,9 @@
typedef struct _D3DLIGHTDATA {
DWORD dwSize;
- LPD3DLIGHTINGELEMENT lpIn;
+ D3DLIGHTINGELEMENT *lpIn;
DWORD dwInSize;
- LPD3DTLVERTEX lpOut;
+ D3DTLVERTEX *lpOut;
DWORD dwOutSize;
} D3DLIGHTDATA, *LPD3DLIGHTDATA;
@@ -1327,9 +1331,10 @@
#define D3DFVF_TLVERTEX ( D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | \
D3DFVF_TEX1 )
-typedef struct _D3DDP_PTRSTRIDE {
- LPVOID lpvData;
- DWORD dwStride;
+typedef struct _D3DDP_PTRSTRIDE
+{
+ void *lpvData;
+ DWORD dwStride;
} D3DDP_PTRSTRIDE;
#define D3DDP_MAXTEXCOORD 8
@@ -1415,6 +1420,10 @@
#define D3DFVF_TEXCOORDSIZE4(CoordIndex) (D3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 +
16))
#define D3DFVF_TEXCOORDSIZE1(CoordIndex) (D3DFVF_TEXTUREFORMAT1 << (CoordIndex*2 +
16))
+#ifdef __i386__
+#include <poppack.h>
+#endif
+
#endif /* (DIRECT3D_VERSION < 0x0800) */
#endif