Cxbx-Reloaded/Include/Win32/CxbxKrnl/xd3d8.h

256 lines
8.6 KiB
C
Raw Normal View History

// ******************************************************************
// *
// * .,-::::: .,:: .::::::::. .,:: .:
// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;;
// * [[[ '[[,,[[' [[[__[[\. '[[,,[['
// * $$$ Y$$$P $$""""Y$$ Y$$$P
// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo,
// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm,
// *
2003-04-02 02:23:30 +00:00
// * Cxbx->Win32->CxbxKrnl->xd3d8.h
// *
// * This file is part of the Cxbx project.
// *
// * Cxbx and Cxbe are free software; you can redistribute them
// * and/or modify them under the terms of the GNU General Public
// * License as published by the Free Software Foundation; either
// * version 2 of the license, or (at your option) any later version.
// *
// * This program 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 General Public License for more details.
// *
// * You should have recieved a copy of the GNU General Public License
// * along with this program; see the file COPYING.
// * If not, write to the Free Software Foundation, Inc.,
// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA.
// *
// * (c) 2002-2003 Aaron Robinson <caustik@caustik.com>
// *
// * All rights reserved
// *
// ******************************************************************
2003-04-02 02:23:30 +00:00
#ifndef XD3D8_H
#define XD3D8_H
2003-05-03 08:29:37 +00:00
#include <d3d8.h>
2003-05-23 02:55:39 +00:00
#include <d3dx8tex.h>
2003-05-02 02:42:29 +00:00
// ******************************************************************
// * D3DResource
// ******************************************************************
struct D3DResource
{
DWORD Common;
DWORD Data;
DWORD Lock;
};
// ******************************************************************
// * D3DVertexBuffer
// ******************************************************************
struct D3DVertexBuffer : public D3DResource
{
};
// ******************************************************************
// * D3DVertexToPrimitive
// ******************************************************************
extern UINT D3DVertexToPrimitive[11][2];
// ******************************************************************
// * D3DVertexToPrimitiveCount
// ******************************************************************
#define D3DVertex2PrimitiveCount(PrimitiveType, VertexCount) \
(((VertexCount)-D3DVertexToPrimitive[PrimitiveType][1])/D3DVertexToPrimitive[PrimitiveType][0])
2003-05-23 02:55:39 +00:00
// ******************************************************************
2003-05-24 06:06:35 +00:00
// * EmuD3DDefferedRenderState
2003-05-23 02:55:39 +00:00
// ******************************************************************
2003-05-24 06:06:35 +00:00
extern DWORD *EmuD3DDefferedRenderState;
2003-05-23 02:55:39 +00:00
2003-05-02 02:42:29 +00:00
// ******************************************************************
// * EmuPrimitiveType
// ******************************************************************
2003-05-23 02:55:39 +00:00
extern D3DPRIMITIVETYPE EmuPrimitiveTypeLookup[];
2003-05-02 02:42:29 +00:00
// ******************************************************************
// * EmuPrimitiveType
// ******************************************************************
static inline D3DPRIMITIVETYPE EmuPrimitiveType(int PrimitiveType)
{
if(PrimitiveType == 0x7FFFFFFF)
return D3DPT_FORCE_DWORD;
return EmuPrimitiveTypeLookup[PrimitiveType];
}
// ******************************************************************
2003-03-27 06:23:58 +00:00
// * func: EmuIDirect3D8_CreateDevice
// ******************************************************************
2003-04-02 02:23:30 +00:00
HRESULT WINAPI EmuIDirect3D8_CreateDevice
(
2003-04-02 02:23:30 +00:00
UINT Adapter,
D3DDEVTYPE DeviceType,
HWND hFocusWindow,
DWORD BehaviorFlags,
D3DPRESENT_PARAMETERS *pPresentationParameters,
IDirect3DDevice8 **ppReturnedDeviceInterface
);
2003-02-19 20:53:33 +00:00
// ******************************************************************
2003-03-27 06:23:58 +00:00
// * func: EmuIDirect3DDevice8_Clear
2003-02-19 20:53:33 +00:00
// ******************************************************************
2003-04-02 02:23:30 +00:00
HRESULT WINAPI EmuIDirect3DDevice8_Clear
2003-02-19 20:53:33 +00:00
(
2003-04-02 02:23:30 +00:00
DWORD Count,
CONST D3DRECT *pRects,
DWORD Flags,
D3DCOLOR Color,
float Z,
DWORD Stencil
2003-02-19 20:53:33 +00:00
);
2003-05-05 06:35:37 +00:00
// ******************************************************************
// * func: EmuIDirect3DDevice8_Present
// ******************************************************************
HRESULT WINAPI EmuIDirect3DDevice8_Present
(
CONST RECT* pSourceRect,
CONST RECT* pDestRect,
PVOID pDummy1,
PVOID pDummy2
);
2003-02-21 00:07:28 +00:00
// ******************************************************************
2003-03-27 06:23:58 +00:00
// * func: EmuIDirect3DDevice8_Swap
2003-02-21 00:07:28 +00:00
// ******************************************************************
2003-04-02 02:23:30 +00:00
HRESULT WINAPI EmuIDirect3DDevice8_Swap
2003-02-21 00:07:28 +00:00
(
2003-04-02 02:23:30 +00:00
DWORD Flags
2003-02-21 00:07:28 +00:00
);
2003-05-06 06:40:09 +00:00
// ******************************************************************
// * func: EmuIDirect3DDevice8_CreateVertexBuffer
// ******************************************************************
HRESULT WINAPI EmuIDirect3DDevice8_CreateVertexBuffer
(
UINT Length,
DWORD Usage,
DWORD FVF,
D3DPOOL Pool,
D3DVertexBuffer **ppVertexBuffer
);
2003-05-02 02:42:29 +00:00
// ******************************************************************
// * func: EmuIDirect3DDevice8_CreateVertexBuffer
// ******************************************************************
D3DVertexBuffer* WINAPI EmuIDirect3DDevice8_CreateVertexBuffer2
(
UINT Length
);
2003-05-05 06:35:37 +00:00
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetRenderState_CullMode
// ******************************************************************
VOID WINAPI EmuIDirect3DDevice8_SetRenderState_CullMode
(
DWORD Value
);
2003-05-23 02:55:39 +00:00
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetRenderState_ZEnable
// ******************************************************************
VOID WINAPI EmuIDirect3DDevice8_SetRenderState_ZEnable
(
DWORD Value
);
2003-05-05 06:35:37 +00:00
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetTransform
// ******************************************************************
VOID WINAPI EmuIDirect3DDevice8_SetTransform
(
D3DTRANSFORMSTATETYPE State,
CONST D3DMATRIX *pMatrix
);
2003-05-02 02:42:29 +00:00
// ******************************************************************
// * func: EmuIDirect3DVertexBuffer8_Lock
// ******************************************************************
2003-05-06 06:40:09 +00:00
VOID WINAPI EmuIDirect3DVertexBuffer8_Lock
(
D3DVertexBuffer *ppVertexBuffer,
UINT OffsetToLock,
UINT SizeToLock,
BYTE **ppbData,
DWORD Flags
);
// ******************************************************************
// * func: EmuIDirect3DVertexBuffer8_Lock2
// ******************************************************************
BYTE* WINAPI EmuIDirect3DVertexBuffer8_Lock2
2003-05-02 02:42:29 +00:00
(
D3DVertexBuffer *ppVertexBuffer,
DWORD Flags
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetStreamSource
// ******************************************************************
2003-05-06 06:40:09 +00:00
HRESULT WINAPI EmuIDirect3DDevice8_SetStreamSource
2003-05-02 02:42:29 +00:00
(
UINT StreamNumber,
D3DVertexBuffer *pStreamData,
UINT Stride
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetVertexShader
// ******************************************************************
2003-05-06 06:40:09 +00:00
HRESULT WINAPI EmuIDirect3DDevice8_SetVertexShader
2003-05-02 02:42:29 +00:00
(
DWORD Handle
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_DrawVertices
// ******************************************************************
2003-05-06 06:40:09 +00:00
HRESULT WINAPI EmuIDirect3DDevice8_DrawVertices
2003-05-02 02:42:29 +00:00
(
D3DPRIMITIVETYPE PrimitiveType,
UINT StartVertex,
UINT VertexCount
);
2003-05-28 07:21:41 +00:00
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetLight
// ******************************************************************
HRESULT WINAPI EmuIDirect3DDevice8_SetLight
(
DWORD Index,
CONST D3DLIGHT8 *pLight
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetMaterial
// ******************************************************************
HRESULT WINAPI EmuIDirect3DDevice8_SetMaterial
(
CONST D3DMATERIAL8 *pMaterial
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_LightEnable
// ******************************************************************
HRESULT WINAPI EmuIDirect3DDevice8_LightEnable
(
DWORD Index,
BOOL bEnable
);
#endif