include ddraw.h, questionable fix for questionable struct/union

construct in MS's D3DVECTOR definition.
This commit is contained in:
Robert Riggs 1998-11-22 15:10:19 +00:00 committed by Alexandre Julliard
parent 88bd980951
commit 4021f5cceb
1 changed files with 10 additions and 0 deletions

View File

@ -1,6 +1,8 @@
#ifndef _WINE_D3D_H #ifndef _WINE_D3D_H
#define _WINE_D3D_H #define _WINE_D3D_H
#include "ddraw.h"
typedef LPVOID LPDIRECT3DMATERIAL,LPDIRECT3DVIEWPORT; typedef LPVOID LPDIRECT3DMATERIAL,LPDIRECT3DVIEWPORT;
typedef LPVOID LPDIRECT3DMATERIAL2,LPDIRECT3DVIEWPORT2; typedef LPVOID LPDIRECT3DMATERIAL2,LPDIRECT3DVIEWPORT2;
typedef LPVOID LPDIRECT3DDEVICE2; typedef LPVOID LPDIRECT3DDEVICE2;
@ -277,6 +279,8 @@ typedef float D3DVALUE,*LPD3DVALUE;
#define D3DDivide(a, b) (float)((double) (a) / (double) (b)) #define D3DDivide(a, b) (float)((double) (a) / (double) (b))
#define D3DMultiply(a, b) ((a) * (b)) #define D3DMultiply(a, b) ((a) * (b))
#if 0
// This causes lots o' problems
typedef struct { typedef struct {
union { union {
D3DVALUE x; D3DVALUE x;
@ -292,7 +296,13 @@ typedef struct {
} z; } z;
/* the c++ variant has operator overloads etc. too */ /* the c++ variant has operator overloads etc. too */
} D3DVECTOR,*LPD3DVECTOR; } D3DVECTOR,*LPD3DVECTOR;
#endif
typedef struct _D3DVECTOR {
D3DVALUE x;
D3DVALUE y;
D3DVALUE z;
} D3DVECTOR,*LPD3DVECTOR;
typedef enum { typedef enum {
D3DLIGHT_POINT = 1, D3DLIGHT_POINT = 1,