17#ifndef DIRECTINPUT_VERSION
18#define DIRECTINPUT_VERSION DIRECTINPUT_HEADER_VERSION
29extern LPDIRECT3D9
GpD3D;
38#define CDXRELEASE(d) if((d)!=NULL){while((d)->Release());(d)=NULL;}
39#define DXRELEASE(d) if((d)!=NULL){(d)->Release();(d)=NULL;}
41#define DXMAXPRIMITIVE 32768
47LPDIRECT3DDEVICE9
Dx9CreateGraphic(LPDIRECT3D9, D3DPRESENT_PARAMETERS*, HWND);
71 r = (int)((pp&0xf000)>>12);
72 g = (int)((pp&0x0f00)>>8);
73 b = (int)((pp&0x00f0)>>4);
74 a = (int) (pp&0x000f);
77 b = (int)((pp&0xf000)>>12);
78 a = (int)((pp&0x0f00)>>8);
79 r = (int)((pp&0x00f0)>>4);
80 g = (int) (pp&0x000f);
83 return D3DCOLOR_RGBA(r*17, g*17, b*17, a*17);
93 a = (int)((pp&0xf000)>>12);
94 r = (int)((pp&0x0f00)>>8);
95 g = (int)((pp&0x00f0)>>4);
96 b = (int) (pp&0x000f);
99 g = (int)((pp&0xf000)>>12);
100 b = (int)((pp&0x0f00)>>8);
101 a = (int)((pp&0x00f0)>>4);
102 r = (int) (pp&0x000f);
105 return D3DCOLOR_ARGB(a*17, r*17, g*17, b*17);
114 if (isLittleEndian) swap_byte(&pp, 2, 2);
116 r = (int)((pp&0xf800)>>11);
117 g = (int)((pp&0x07e0)>>5);
118 b = (int) (pp&0x001f);
120 return D3DCOLOR_XRGB((
int)(r*8.23), (
int)(g*4.05), (
int)(b*8.23));
LPDIRECTINPUTDEVICE8 GpDMouse
BOOL Dx9SurfaceFromByteMemory(LPDIRECT3DDEVICE9, LPDIRECT3DSURFACE9 *, CmnHead)
BOOL Dx9TextureFromMemoryFile(LPDIRECT3DDEVICE9, LPDIRECT3DTEXTURE9 *, CmnHead)
LPDIRECTINPUTDEVICE8 GpDKeyBoard
POINT Dx9GetSurfaceSize(LPDIRECT3DSURFACE9 *lpsf)
LPDIRECTINPUTDEVICE8 Dx9CreateKeyBoard(LPDIRECTINPUT8, HWND)
D3DCOLOR Dx9Word2RGB(uWord pp)
D3DCOLOR Dx9Word2ARGB(uWord pp)
HRESULT Dx9DrawPrimitive(LPDIRECT3DDEVICE9, D3DPRIMITIVETYPE, UINT, UINT)
BOOL Dx9CreateInterface(CWinApp *wapp)
LPDIRECT3DDEVICE9 Dx9CreateGraphic(LPDIRECT3D9, D3DPRESENT_PARAMETERS *, HWND)
BOOL Dx9SurfaceFromMemoryFile(LPDIRECT3DDEVICE9, LPDIRECT3DSURFACE9 *, CmnHead)
POINT Dx9GetBackBuffer(LPDIRECT3DDEVICE9, LPDIRECT3DSURFACE9 *)
LPDIRECTINPUTDEVICE8 Dx9CreateMouse(LPDIRECTINPUT8, HWND)
BOOL Dx9SurfaceFromMemory(LPDIRECT3DDEVICE9, LPDIRECT3DSURFACE9 *, CmnHead)
BOOL Dx9TextureFromMemory(LPDIRECT3DDEVICE9, LPDIRECT3DTEXTURE9 *, CmnHead)
D3DCOLOR Dx9Word2RGBA(uWord pp)
void Dx9ReleaseInterface()
BOOL Dx9DividePrimitiveMode
BOOL Dx9TextureFromByteMemory(LPDIRECT3DDEVICE9, LPDIRECT3DTEXTURE9 *, CmnHead)