#define _CRT_SECURE_NO_WARNINGS
/* Direct3D9 Device */
#include
#include "main.h"
#include "d3d9.h"
#include
#include "Texture.h"
BOOL BFont = FALSE;
bool bWallHack = false;
bool bWallHack1 = false;
bool bTex_Zemla = false;
bool bFog = false;
bool bZemla = false;
bool bTex_Listva = false;
bool bArtefice = false;
bool bArtefice1 = false;
bool bTex_Mutants = false;
bool bTex_Mutants1 = false;
bool bMount = false;
bool bDrop = false;
bool bDrop1 = false;
bool bXhair = false;
bool bColors = true;
bool Colors = false;
bool Generate = true;
bool ColorShader = true;
bool GenOne = 0;
unsigned int m_Stride = 0;
unsigned int primCount; // Переменная primCount
unsigned int NumVertices; // Переменная NumVertices
bool Color = true;
D3DCOLOR dWhite = D3DCOLOR_ARGB(255, 255, 255, 255);//белый
D3DCOLOR dRed = D3DCOLOR_ARGB(255, 255, 000, 000);//красный
D3DCOLOR dGreen = D3DCOLOR_ARGB(255, 000, 255, 0);//зеленый
D3DCOLOR dPink = D3DCOLOR_ARGB(255, 255, 2, 200);//розовый
D3DCOLOR dOrange = D3DCOLOR_ARGB(255, 255, 165, 0);//оранжевый
const D3DCOLOR txtRed = D3DCOLOR_ARGB(255, 255, 0, 0);
const D3DCOLOR txtYellow = D3DCOLOR_ARGB(255, 255, 255, 0);
const D3DCOLOR txtGreen = D3DCOLOR_ARGB(255, 0, 255, 0);
const D3DCOLOR txtBlue = D3DCOLOR_ARGB(255, 0, 0, 255);
D3DXVECTOR2 CrosshairX[2], CrosshairY[2]; // CrossHair - статический красный прицел посередине экрана, облегчает прицеливание.
D3DVIEWPORT9 Viewport; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
int a = 1;
LPDIRECT3DPIXELSHADER9 Shade_Blue, Shade_Red, Shade_Yellow, Shade_Green, Shade_White, Shade_Fiolet, Shade_Siren, Shade_Orange, Shade_Limon, Shade_Gay, Shade_Pink, Shade_TEST;
char szShader[256] = { 0 };
LPDIRECT3DTEXTURE9 Blue;
const BYTE bBlue[60] = //Blue
{
0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 0x12, 0x0B, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0x00, 0x00, 0x00, 0x00, 0x00
};
LPDIRECT3DTEXTURE9 Black;
const BYTE bBlack[60] = //Black
{
0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 0x12, 0x0B, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xFF
};
LPDIRECT3DTEXTURE9 Red;
const BYTE bRed[60] = //Red
{
0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 0x12, 0x0B, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xFF, 0x00, 0x00, 0x00
};
LPDIRECT3DTEXTURE9 Yellow;
const BYTE bYellow[60] = //Yellow
{
0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 0x12, 0x0B, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00
};
LPDIRECT3DTEXTURE9 Green;
const BYTE bGreen[60] = //Green
{
0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 0x12, 0x0B, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x20, 0xA0, 0x00, 0x00, 0xFF, 0xFF
};
LPDIRECT3DTEXTURE9 Pink;
const BYTE bPink[58] = //Pink
{
0x42, 0x4D, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x00, 0xFF, 0x00
};
LPDIRECT3DTEXTURE9 Turquoise;
const BYTE bTur[60] = //Turquoise
{
0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 0x12, 0x0B, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00
};
LPDIRECT3DTEXTURE9 Orange;
const BYTE bOrange[60] = //Orange
{
0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 0x12, 0x0B, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x80, 0xF0, 0xB0, 0x00, 0x00
};
LPDIRECT3DTEXTURE9 White;
const BYTE bWhite[58] = //White
{
0x42, 0x4D, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0x00
};
HRESULT CD3DManager::Initialize()
{
/*
initialize Resources such as textures
(managed and unmanaged [D3DPOOL]),
vertex buffers, and other D3D rendering resources
...
m_pD3Ddev->CreateTexture(..., ..., &m_pD3Dtexture);
*/
return S_OK;
}
HRESULT CD3DManager::PreReset()
{
/*
release all UNMANAGED [D3DPOOL_DEFAULT]
textures, vertex buffers, and other
volitile resources
...
_SAFE_RELEASE(m_pD3Dtexture);
*/
return S_OK;
}
HRESULT CD3DManager::PostReset()
{
/*
re-initialize all UNMANAGED [D3DPOOL_DEFAULT]
textures, vertex buffers, and other volitile
resources
...
m_pD3Ddev->CreateTexture(..., ..., &m_pD3Dtexture);
*/
return S_OK;
}
HRESULT CD3DManager::Release()
{
/*
Release all textures, vertex buffers, and
other resources
...
_SAFE_RELEASE(m_pD3Dtexture);
*/
return S_OK;
}
//-----------------------------------------------------------------------------
HRESULT APIENTRY hkIDirect3DDevice9::QueryInterface(REFIID riid, LPVOID *ppvObj)
{
return m_pD3Ddev->QueryInterface(riid, ppvObj);
}
ULONG APIENTRY hkIDirect3DDevice9::AddRef()
{
m_refCount++;
return m_pD3Ddev->AddRef();
}
HRESULT APIENTRY hkIDirect3DDevice9::BeginScene()
{
if (a == 1)
{
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bGreen,60,&Green);
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bWhite,58,&White);
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bPink,60,&Pink);
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bBlue,60,&Blue);
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bOrange,60,&Orange);
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bRed,60,&Red);
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bBlue,60,&Blue);
a = 0;
}
m_pD3Ddev->GetViewport(&Viewport);
float ScreenCenterX = (float)Viewport.Width / 2 + Viewport.X;
float ScreenCenterY = (float)Viewport.Height / 2 + Viewport.Y;
CrosshairX[0].x = ScreenCenterX - 20;
CrosshairX[0].y = ScreenCenterY;
CrosshairX[1].x = ScreenCenterX + 20;
CrosshairX[1].y = ScreenCenterY;
CrosshairY[0].x = ScreenCenterX;
CrosshairY[0].y = ScreenCenterY - 20;
CrosshairY[1].x = ScreenCenterX;
CrosshairY[1].y = ScreenCenterY + 20;
return m_pD3Ddev->BeginScene();
}
HRESULT APIENTRY hkIDirect3DDevice9::BeginStateBlock()
{
return m_pD3Ddev->BeginStateBlock();
}
HRESULT APIENTRY hkIDirect3DDevice9::Clear(DWORD Count, CONST D3DRECT *pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil)
{
return m_pD3Ddev->Clear(Count, pRects, Flags, Color, Z, Stencil);
}
HRESULT APIENTRY hkIDirect3DDevice9::ColorFill(IDirect3DSurface9* pSurface,CONST RECT* pRect, D3DCOLOR color)
{
return m_pD3Ddev->ColorFill(pSurface,pRect,color);
}
HRESULT APIENTRY hkIDirect3DDevice9::CreateAdditionalSwapChain(D3DPRESENT_PARAMETERS *pPresentationParameters, IDirect3DSwapChain9 **ppSwapChain)
{
return m_pD3Ddev->CreateAdditionalSwapChain(pPresentationParameters, ppSwapChain);
}
HRESULT APIENTRY hkIDirect3DDevice9::CreateCubeTexture(UINT EdgeLength,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DCubeTexture9** ppCubeTexture,HANDLE* pSharedHandle)
{
return m_pD3Ddev->CreateCubeTexture(EdgeLength, Levels, Usage, Format, Pool, ppCubeTexture,pSharedHandle);
}
HRESULT APIENTRY hkIDirect3DDevice9::CreateDepthStencilSurface(UINT Width,UINT Height,D3DFORMAT Format,D3DMULTISAMPLE_TYPE MultiSample,DWORD MultisampleQuality,BOOL Discard,IDirect3DSurface9** ppSurface,HANDLE* pSharedHandle)
{
return m_pD3Ddev->CreateDepthStencilSurface(Width, Height, Format, MultiSample, MultisampleQuality,Discard,ppSurface, pSharedHandle);
}
HRESULT APIENTRY hkIDirect3DDevice9::CreateIndexBuffer(UINT Length,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DIndexBuffer9** ppIndexBuffer,HANDLE* pSharedHandle)
{
return m_pD3Ddev->CreateIndexBuffer(Length, Usage, Format, Pool, ppIndexBuffer,pSharedHandle);
}
HRESULT APIENTRY hkIDirect3DDevice9::CreateOffscreenPlainSurface(UINT Width,UINT Height,D3DFORMAT Format,D3DPOOL Pool,IDirect3DSurface9** ppSurface,HANDLE* pSharedHandle)
{
return m_pD3Ddev->CreateOffscreenPlainSurface(Width,Height,Format,Pool,ppSurface,pSharedHandle);
}
HRESULT APIENTRY hkIDirect3DDevice9::CreatePixelShader(CONST DWORD* pFunction,IDirect3DPixelShader9** ppShader)
{
return m_pD3Ddev->CreatePixelShader(pFunction, ppShader);
}
HRESULT APIENTRY hkIDirect3DDevice9::CreateQuery(D3DQUERYTYPE Type, IDirect3DQuery9** ppQuery)
{
if (Type == D3DQUERYTYPE_OCCLUSION) { Type = D3DQUERYTYPE_EVENT; }
return m_pD3Ddev->CreateQuery(Type, ppQuery);
}
HRESULT APIENTRY hkIDirect3DDevice9::CreateRenderTarget(UINT Width,UINT Height,D3DFORMAT Format,D3DMULTISAMPLE_TYPE MultiSample,DWORD MultisampleQuality,BOOL Lockable,IDirect3DSurface9** ppSurface,HANDLE* pSharedHandle)
{
return m_pD3Ddev->CreateRenderTarget(Width, Height, Format, MultiSample,MultisampleQuality, Lockable, ppSurface,pSharedHandle);
}
HRESULT APIENTRY hkIDirect3DDevice9::CreateStateBlock(D3DSTATEBLOCKTYPE Type,IDirect3DStateBlock9** ppSB)
{
return m_pD3Ddev->CreateStateBlock(Type, ppSB);
}
HRESULT APIENTRY hkIDirect3DDevice9::CreateTexture(UINT Width,UINT Height,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DTexture9** ppTexture,HANDLE* pSharedHandle)
{
HRESULT ret = m_pD3Ddev->CreateTexture(Width, Height, Levels, Usage, Format, Pool, ppTexture, pSharedHandle);
#ifdef D3DHOOK_TEXTURES
if(ret == D3D_OK) { new hkIDirect3DTexture9(ppTexture, this, Width, Height, Format); }
#endif
return ret;
}
HRESULT APIENTRY hkIDirect3DDevice9::CreateVertexBuffer(UINT Length,DWORD Usage,DWORD FVF,D3DPOOL Pool,IDirect3DVertexBuffer9** ppVertexBuffer,HANDLE* pSharedHandle)
{
return m_pD3Ddev->CreateVertexBuffer(Length, Usage, FVF, Pool, ppVertexBuffer,pSharedHandle);
}
HRESULT APIENTRY hkIDirect3DDevice9::CreateVertexDeclaration(CONST D3DVERTEXELEMENT9* pVertexElements,IDirect3DVertexDeclaration9** ppDecl)
{
return m_pD3Ddev->CreateVertexDeclaration(pVertexElements,ppDecl);
}
HRESULT APIENTRY hkIDirect3DDevice9::CreateVertexShader(CONST DWORD* pFunction,IDirect3DVertexShader9** ppShader)
{
return m_pD3Ddev->CreateVertexShader(pFunction, ppShader);
}
HRESULT APIENTRY hkIDirect3DDevice9::CreateVolumeTexture(UINT Width,UINT Height,UINT Depth,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DVolumeTexture9** ppVolumeTexture,HANDLE* pSharedHandle)
{
return m_pD3Ddev->CreateVolumeTexture(Width, Height, Depth, Levels, Usage, Format, Pool, ppVolumeTexture,pSharedHandle);
}
HRESULT APIENTRY hkIDirect3DDevice9::DeletePatch(UINT Handle)
{
return m_pD3Ddev->DeletePatch(Handle);
}
bool GenerateTexture(IDirect3DDevice9 * pDevInter, LPDIRECT3DTEXTURE9 * texture, DWORD colorARGB) {
if (FAILED(pDevInter->CreateTexture(8, 8, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED, texture, NULL)))
return false;
WORD color16 = ((WORD)((colorARGB >> 28) & 0xF) << 12)
| (WORD)(((colorARGB >> 20) & 0xF) << 8)
| (WORD)(((colorARGB >> 12) & 0xF) << 4)
| (WORD)(((colorARGB >> 4) & 0xF) << 0);
D3DLOCKED_RECT d3dlr;
(*texture)->LockRect(0, &d3dlr, 0, 0);
WORD *pDst16 = (WORD*)d3dlr.pBits;
for (int xy = 0; xy < 8 * 8; xy++) *pDst16++ = color16;
(*texture)->UnlockRect(0);
return true;
}
HRESULT GenerateShader(IDirect3DDevice9 *pDevice, IDirect3DPixelShader9 **pixelShader, float r, float g, float
{
char szShader[256];
ID3DXBuffer *pShaderBuf = NULL;
sprintf(szShader, "ps.3.0\ndef c0, %f, %f, %f, %f\nmov oC0,c0", r, g, b, 1.0f);
D3DXAssembleShader(szShader, sizeof(szShader), NULL, NULL, 0, &pShaderBuf, NULL);
if (FAILED(pDevice->CreatePixelShader((const DWORD*)pShaderBuf->GetBufferPointer(), pixelShader)))return E_FAIL;
return S_OK;
}
HRESULT APIENTRY hkIDirect3DDevice9::DrawIndexedPrimitive(D3DPRIMITIVETYPE Type, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount)
{
if (ColorShader)
{
GenerateShader(m_pD3Ddev, &Shade_Red, 1.0f, 0.0f, 0.0f);//Красный
GenerateShader(m_pD3Ddev, &Shade_Red, 1.0f, 0.0f, 0.0f);//Красный
GenerateShader(m_pD3Ddev, &Shade_Green, 0.0f, 1.0f, 0.0f);//Зелёный
GenerateShader(m_pD3Ddev, &Shade_Yellow, 1.0f, 1.0f, 0.0f);//Жёлтый
GenerateShader(m_pD3Ddev, &Shade_Fiolet, 1.0f, 0.0f, 1.0f);//Фиолетовый
GenerateShader(m_pD3Ddev, &Shade_Siren, 0.0f, 1.0f, 1.0f);//Сереневый
GenerateShader(m_pD3Ddev, &Shade_Orange, 1.0f, 0.8f, 0.0f);//Оранжевый
GenerateShader(m_pD3Ddev, &Shade_Limon, 0.8f, 1.0f, 0.0f);//Лимонный
GenerateShader(m_pD3Ddev, &Shade_Gay, 0.0f, 0.8f, 1.0f);//Голубой
ColorShader = false;
}
if (bWallHack)
{
if (MyWallhack)
{
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
m_pD3Ddev->SetRenderState(D3DRS_ZFUNC, D3DCMP_NEVER);
m_pD3Ddev->SetPixelShader(Shade_Green); //тут цвет
m_pD3Ddev->DrawIndexedPrimitive(Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
m_pD3Ddev->SetRenderState(D3DRS_ZFUNC, D3DCMP_LESSEQUAL);
m_pD3Ddev->SetPixelShader(Shade_Red);
}
}
if (bWallHack1)
{
if (MyWallhack1)
{
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, false);
m_pD3Ddev->SetPixelShader(Shade_Limon);
m_pD3Ddev->DrawIndexedPrimitive(Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
m_pD3Ddev->SetPixelShader(Shade_Red);
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, true);
}
}
if (bTex_Listva)
if (Tex_Listva)
{
return 0;
}
if (bMount)
if (Mount)
{
return 0;
}
if (bTex_Mutants)
{
if (Tex_Mutants)
{
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, false);
m_pD3Ddev->SetPixelShader(Shade_Pink);
m_pD3Ddev->DrawIndexedPrimitive(Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, true);
m_pD3Ddev->SetPixelShader(Shade_Green);
}
}
if (bTex_Mutants1)
{
if (Tex_Mutants1)
{
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, false);
m_pD3Ddev->SetPixelShader(Shade_Green);
m_pD3Ddev->DrawIndexedPrimitive(Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, true);
m_pD3Ddev->SetPixelShader(Shade_Pink);
}
}
if (bFog)
if (Fog)
{
return 0;
}
if (bZemla)
if (Zemla)
{
return 0;
}
if(bArtefice)
{
if (Artefice)
{
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, false);
m_pD3Ddev->SetPixelShader(Shade_Green);
m_pD3Ddev->DrawIndexedPrimitive(Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, true);
m_pD3Ddev->SetPixelShader(Shade_Green);
}
}
if (bArtefice1)
{
if (Artefice1)
{
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, false);
m_pD3Ddev->SetPixelShader(Shade_Green);
m_pD3Ddev->DrawIndexedPrimitive(Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, true);
m_pD3Ddev->SetPixelShader(Shade_Green);
}
}
if (bDrop)
{
if (Drop)
{
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, false);
m_pD3Ddev->SetPixelShader(Shade_Siren);
m_pD3Ddev->DrawIndexedPrimitive(Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, true);
m_pD3Ddev->SetPixelShader(Shade_Siren);
}
}
if (bDrop1)
{
if (Drop1)
{
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, false);
m_pD3Ddev->SetPixelShader(Shade_Siren);
m_pD3Ddev->DrawIndexedPrimitive(Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, true);
m_pD3Ddev->SetPixelShader(Shade_Siren);
}
}
return m_pD3Ddev->DrawIndexedPrimitive(Type,BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
}
HRESULT APIENTRY hkIDirect3DDevice9::DrawIndexedPrimitiveUP(D3DPRIMITIVETYPE PrimitiveType, UINT MinIndex, UINT NumVertices, UINT PrimitiveCount, CONST void *pIndexData, D3DFORMAT IndexDataFormat, CONST void *pVertexStreamZeroData, UINT VertexStreamZeroStride)
{
return m_pD3Ddev->DrawIndexedPrimitiveUP(PrimitiveType, MinIndex, NumVertices, PrimitiveCount, pIndexData, IndexDataFormat, pVertexStreamZeroData, VertexStreamZeroStride);
}
HRESULT APIENTRY hkIDirect3DDevice9::DrawPrimitive(D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount)
{
if (bFog)
{
m_pD3Ddev->SetRenderState(D3DRS_FOGENABLE, false);
}
return m_pD3Ddev->DrawPrimitive(PrimitiveType, StartVertex, PrimitiveCount);
}
HRESULT APIENTRY hkIDirect3DDevice9::DrawPrimitiveUP(D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount, CONST void *pVertexStreamZeroData, UINT VertexStreamZeroStride)
{
return m_pD3Ddev->DrawPrimitiveUP(PrimitiveType, PrimitiveCount, pVertexStreamZeroData, VertexStreamZeroStride);
}
HRESULT APIENTRY hkIDirect3DDevice9::DrawRectPatch(UINT Handle, CONST float *pNumSegs, CONST D3DRECTPATCH_INFO *pRectPatchInfo)
{
return m_pD3Ddev->DrawRectPatch(Handle, pNumSegs, pRectPatchInfo);
}
HRESULT APIENTRY hkIDirect3DDevice9::DrawTriPatch(UINT Handle, CONST float *pNumSegs, CONST D3DTRIPATCH_INFO *pTriPatchInfo)
{
return m_pD3Ddev->DrawTriPatch(Handle, pNumSegs, pTriPatchInfo);
}
HRESULT APIENTRY hkIDirect3DDevice9::EndScene()
{
if(GetAsyncKeyState( VK_NUMPAD1 ) &1 )
bWallHack = !bWallHack;
if(GetAsyncKeyState( VK_NUMPAD2 ) & 1)
bFog = !bFog;
if(GetAsyncKeyState( VK_NUMPAD3 ) & 1)
bWallHack1=!bWallHack1;
if(GetAsyncKeyState( VK_NUMPAD4 ) & 1)
bTex_Listva = !bTex_Listva;
if (GetAsyncKeyState(VK_NUMPAD5) & 1)
bTex_Mutants = !bTex_Mutants;
if(GetAsyncKeyState(VK_NUMPAD5) & 1)
bTex_Mutants1 = !bTex_Mutants1;
if (GetAsyncKeyState(VK_NUMPAD2) & 1)
bFog = !bFog;
if (GetAsyncKeyState(VK_NUMPAD6) & 1)
bDrop = !bDrop;
if (GetAsyncKeyState(VK_NUMPAD6) & 1)
bDrop1 = !bDrop1;
if (GetAsyncKeyState(VK_NUMPAD7) & 1)
bArtefice = !bArtefice;
if (GetAsyncKeyState(VK_NUMPAD7) & 1)
bArtefice1 = !bArtefice1;
if (GetAsyncKeyState(VK_NUMPAD0) & 1)
bMount = !bMount;
if (GetAsyncKeyState(VK_NUMPAD8) & 1)
bZemla = !bZemla;
return m_pD3Ddev->EndScene();
}
HRESULT APIENTRY hkIDirect3DDevice9::EndStateBlock(IDirect3DStateBlock9** ppSB)
{
return m_pD3Ddev->EndStateBlock(ppSB);
}
HRESULT APIENTRY hkIDirect3DDevice9::EvictManagedResources()
{
return m_pD3Ddev->EvictManagedResources();
}
UINT APIENTRY hkIDirect3DDevice9::GetAvailableTextureMem()
{
return m_pD3Ddev->GetAvailableTextureMem();
}
HRESULT APIENTRY hkIDirect3DDevice9::GetBackBuffer(UINT iSwapChain,UINT iBackBuffer,D3DBACKBUFFER_TYPE Type,IDirect3DSurface9** ppBackBuffer)
{
return m_pD3Ddev->GetBackBuffer(iSwapChain,iBackBuffer, Type, ppBackBuffer);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetClipPlane(DWORD Index, float *pPlane)
{
return m_pD3Ddev->GetClipPlane(Index, pPlane);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetClipStatus(D3DCLIPSTATUS9 *pClipStatus)
{
return m_pD3Ddev->GetClipStatus(pClipStatus);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetCreationParameters(D3DDEVICE_CREATION_PARAMETERS *pParameters)
{
return m_pD3Ddev->GetCreationParameters(pParameters);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetCurrentTexturePalette(UINT *pPaletteNumber)
{
return m_pD3Ddev->GetCurrentTexturePalette(pPaletteNumber);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetDepthStencilSurface(IDirect3DSurface9 **ppZStencilSurface)
{
return m_pD3Ddev->GetDepthStencilSurface(ppZStencilSurface);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetDeviceCaps(D3DCAPS9 *pCaps)
{
return m_pD3Ddev->GetDeviceCaps(pCaps);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetDirect3D(IDirect3D9 **ppD3D9)
{
HRESULT hRet = m_pD3Ddev->GetDirect3D(ppD3D9);
if( SUCCEEDED(hRet) )
*ppD3D9 = m_pD3Dint;
return hRet;
}
HRESULT APIENTRY hkIDirect3DDevice9::GetDisplayMode(UINT iSwapChain,D3DDISPLAYMODE* pMode)
{
return m_pD3Ddev->GetDisplayMode(iSwapChain,pMode);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetFrontBufferData(UINT iSwapChain,IDirect3DSurface9* pDestSurface)
{
return m_pD3Ddev->GetFrontBufferData(iSwapChain,pDestSurface);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetFVF(DWORD* pFVF)
{
return m_pD3Ddev->GetFVF(pFVF);
}
void APIENTRY hkIDirect3DDevice9::GetGammaRamp(UINT iSwapChain,D3DGAMMARAMP* pRamp)
{
m_pD3Ddev->GetGammaRamp(iSwapChain,pRamp);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetIndices(IDirect3DIndexBuffer9** ppIndexData)
{
return m_pD3Ddev->GetIndices(ppIndexData);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetLight(DWORD Index, D3DLIGHT9 *pLight)
{
return m_pD3Ddev->GetLight(Index, pLight);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetLightEnable(DWORD Index, BOOL *pEnable)
{
return m_pD3Ddev->GetLightEnable(Index, pEnable);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetMaterial(D3DMATERIAL9 *pMaterial)
{
return m_pD3Ddev->GetMaterial(pMaterial);
}
float APIENTRY hkIDirect3DDevice9::GetNPatchMode()
{
return m_pD3Ddev->GetNPatchMode();
}
unsigned int APIENTRY hkIDirect3DDevice9::GetNumberOfSwapChains()
{
return m_pD3Ddev->GetNumberOfSwapChains();
}
HRESULT APIENTRY hkIDirect3DDevice9::GetPaletteEntries(UINT PaletteNumber, PALETTEENTRY *pEntries)
{
return m_pD3Ddev->GetPaletteEntries(PaletteNumber, pEntries);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetPixelShader(IDirect3DPixelShader9** ppShader)
{
return m_pD3Ddev->GetPixelShader(ppShader);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetPixelShaderConstantB(UINT StartRegister,BOOL* pConstantData,UINT BoolCount)
{
return m_pD3Ddev->GetPixelShaderConstantB(StartRegister,pConstantData,BoolCount);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetPixelShaderConstantF(UINT StartRegister,float* pConstantData,UINT Vector4fCount)
{
return m_pD3Ddev->GetPixelShaderConstantF(StartRegister,pConstantData,Vector4fCount);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetPixelShaderConstantI(UINT StartRegister,int* pConstantData,UINT Vector4iCount)
{
return m_pD3Ddev->GetPixelShaderConstantI(StartRegister,pConstantData,Vector4iCount);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetRasterStatus(UINT iSwapChain,D3DRASTER_STATUS* pRasterStatus)
{
return m_pD3Ddev->GetRasterStatus(iSwapChain,pRasterStatus);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetRenderState(D3DRENDERSTATETYPE State, DWORD *pValue)
{
return m_pD3Ddev->GetRenderState(State, pValue);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetRenderTarget(DWORD RenderTargetIndex,IDirect3DSurface9** ppRenderTarget)
{
return m_pD3Ddev->GetRenderTarget(RenderTargetIndex,ppRenderTarget);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetRenderTargetData(IDirect3DSurface9* pRenderTarget,IDirect3DSurface9* pDestSurface)
{
return m_pD3Ddev->GetRenderTargetData(pRenderTarget,pDestSurface);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetSamplerState(DWORD Sampler,D3DSAMPLERSTATETYPE Type,DWORD* pValue)
{
return m_pD3Ddev->GetSamplerState(Sampler,Type,pValue);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetScissorRect(RECT* pRect)
{
return m_pD3Ddev->GetScissorRect(pRect);
}
BOOL APIENTRY hkIDirect3DDevice9::GetSoftwareVertexProcessing()
{
return m_pD3Ddev->GetSoftwareVertexProcessing();
}
HRESULT APIENTRY hkIDirect3DDevice9::GetStreamSource(UINT StreamNumber,IDirect3DVertexBuffer9** ppStreamData,UINT* OffsetInBytes,UINT* pStride)
{
return m_pD3Ddev->GetStreamSource(StreamNumber, ppStreamData,OffsetInBytes, pStride);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetStreamSourceFreq(UINT StreamNumber,UINT* Divider)
{
return m_pD3Ddev->GetStreamSourceFreq(StreamNumber,Divider);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetSwapChain(UINT iSwapChain,IDirect3DSwapChain9** pSwapChain)
{
return m_pD3Ddev->GetSwapChain(iSwapChain,pSwapChain);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetTexture(DWORD Stage, IDirect3DBaseTexture9 **ppTexture)
{
return m_pD3Ddev->GetTexture(Stage, ppTexture);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetTextureStageState(DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD *pValue)
{
return m_pD3Ddev->GetTextureStageState(Stage, Type, pValue);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetTransform(D3DTRANSFORMSTATETYPE State, D3DMATRIX *pMatrix)
{
return m_pD3Ddev->GetTransform(State, pMatrix);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetVertexDeclaration(IDirect3DVertexDeclaration9** ppDecl)
{
return m_pD3Ddev->GetVertexDeclaration(ppDecl);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetVertexShader(IDirect3DVertexShader9** ppShader)
{
return m_pD3Ddev->GetVertexShader(ppShader);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetVertexShaderConstantB(UINT StartRegister,BOOL* pConstantData,UINT BoolCount)
{
return m_pD3Ddev->GetVertexShaderConstantB(StartRegister,pConstantData,BoolCount);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetVertexShaderConstantF(UINT StartRegister,float* pConstantData,UINT Vector4fCount)
{
return m_pD3Ddev->GetVertexShaderConstantF(StartRegister,pConstantData,Vector4fCount);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetVertexShaderConstantI(UINT StartRegister,int* pConstantData,UINT Vector4iCount)
{
return m_pD3Ddev->GetVertexShaderConstantI(StartRegister,pConstantData,Vector4iCount);
}
HRESULT APIENTRY hkIDirect3DDevice9::GetViewport(D3DVIEWPORT9 *pViewport)
{
return m_pD3Ddev->GetViewport(pViewport);
}
HRESULT APIENTRY hkIDirect3DDevice9::LightEnable(DWORD LightIndex, BOOL bEnable)
{
return m_pD3Ddev->LightEnable(LightIndex, bEnable);
}
HRESULT APIENTRY hkIDirect3DDevice9::MultiplyTransform(D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX *pMatrix)
{
return m_pD3Ddev->MultiplyTransform(State, pMatrix);
}
HRESULT APIENTRY hkIDirect3DDevice9::Present(CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion)
{
return m_pD3Ddev->Present(pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
}
HRESULT APIENTRY hkIDirect3DDevice9::ProcessVertices(UINT SrcStartIndex,UINT DestIndex,UINT VertexCount,IDirect3DVertexBuffer9* pDestBuffer,IDirect3DVertexDeclaration9* pVertexDecl,DWORD Flags)
{
return m_pD3Ddev->ProcessVertices(SrcStartIndex, DestIndex, VertexCount, pDestBuffer,pVertexDecl, Flags);
}
ULONG APIENTRY hkIDirect3DDevice9::Release()
{
if( --m_refCount == 0 )
m_pManager->Release();
return m_pD3Ddev->Release();
}
HRESULT APIENTRY hkIDirect3DDevice9::Reset(D3DPRESENT_PARAMETERS *pPresentationParameters)
{
m_pManager->PreReset();
HRESULT hRet = m_pD3Ddev->Reset(pPresentationParameters);
if( SUCCEEDED(hRet) )
{
m_PresentParam = *pPresentationParameters;
m_pManager->PostReset();
}
return hRet;
}
HRESULT APIENTRY hkIDirect3DDevice9::SetClipPlane(DWORD Index, CONST float *pPlane)
{
return m_pD3Ddev->SetClipPlane(Index, pPlane);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetClipStatus(CONST D3DCLIPSTATUS9 *pClipStatus)
{
return m_pD3Ddev->SetClipStatus(pClipStatus);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetCurrentTexturePalette(UINT PaletteNumber)
{
return m_pD3Ddev->SetCurrentTexturePalette(PaletteNumber);
}
void APIENTRY hkIDirect3DDevice9::SetCursorPosition(int X, int Y, DWORD Flags)
{
m_pD3Ddev->SetCursorPosition(X, Y, Flags);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetCursorProperties(UINT XHotSpot, UINT YHotSpot, IDirect3DSurface9 *pCursorBitmap)
{
return m_pD3Ddev->SetCursorProperties(XHotSpot, YHotSpot, pCursorBitmap);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetDepthStencilSurface(IDirect3DSurface9* pNewZStencil)
{
return m_pD3Ddev->SetDepthStencilSurface(pNewZStencil);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetDialogBoxMode(BOOL bEnableDialogs)
{
return m_pD3Ddev->SetDialogBoxMode(bEnableDialogs);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetFVF(DWORD FVF)
{
return m_pD3Ddev->SetFVF(FVF);
}
void APIENTRY hkIDirect3DDevice9::SetGammaRamp(UINT iSwapChain,DWORD Flags,CONST D3DGAMMARAMP* pRamp)
{
m_pD3Ddev->SetGammaRamp(iSwapChain,Flags, pRamp);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetIndices(IDirect3DIndexBuffer9* pIndexData)
{
return m_pD3Ddev->SetIndices(pIndexData);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetLight(DWORD Index, CONST D3DLIGHT9 *pLight)
{
return m_pD3Ddev->SetLight(Index, pLight);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetMaterial(CONST D3DMATERIAL9 *pMaterial)
{
return m_pD3Ddev->SetMaterial(pMaterial);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetNPatchMode(float nSegments)
{
return m_pD3Ddev->SetNPatchMode(nSegments);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetPaletteEntries(UINT PaletteNumber, CONST PALETTEENTRY *pEntries)
{
return m_pD3Ddev->SetPaletteEntries(PaletteNumber, pEntries);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetPixelShader(IDirect3DPixelShader9* pShader)
{
return m_pD3Ddev->SetPixelShader(pShader);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetPixelShaderConstantB(UINT StartRegister,CONST BOOL* pConstantData,UINT BoolCount)
{
return m_pD3Ddev->SetPixelShaderConstantB(StartRegister,pConstantData,BoolCount);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetPixelShaderConstantF(UINT StartRegister,CONST float* pConstantData,UINT Vector4fCount)
{
return m_pD3Ddev->SetPixelShaderConstantF(StartRegister,pConstantData,Vector4fCount);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetPixelShaderConstantI(UINT StartRegister,CONST int* pConstantData,UINT Vector4iCount)
{
return m_pD3Ddev->SetPixelShaderConstantI(StartRegister,pConstantData,Vector4iCount);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetRenderState(D3DRENDERSTATETYPE State, DWORD Value)
{
return m_pD3Ddev->SetRenderState(State, Value);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetRenderTarget(DWORD RenderTargetIndex, IDirect3DSurface9* pRenderTarget)
{
return m_pD3Ddev->SetRenderTarget(RenderTargetIndex,pRenderTarget);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetSamplerState(DWORD Sampler,D3DSAMPLERSTATETYPE Type,DWORD Value)
{
return m_pD3Ddev->SetSamplerState(Sampler,Type,Value);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetScissorRect(CONST RECT* pRect)
{
return m_pD3Ddev->SetScissorRect(pRect);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetSoftwareVertexProcessing(BOOL bSoftware)
{
return m_pD3Ddev->SetSoftwareVertexProcessing(bSoftware);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetStreamSource(UINT StreamNumber,IDirect3DVertexBuffer9* pStreamData,UINT OffsetInBytes,UINT Stride)
{
if (StreamNumber == 0) m_Stride = Stride;
return m_pD3Ddev->SetStreamSource(StreamNumber, pStreamData,OffsetInBytes, Stride);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetStreamSourceFreq(UINT StreamNumber,UINT Divider)
{
return m_pD3Ddev->SetStreamSourceFreq(StreamNumber,Divider);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetTexture(DWORD Stage, IDirect3DBaseTexture9 *pTexture)
{
#ifdef D3DHOOK_TEXTURES
IDirect3DDevice9 *dev = NULL;
if(pTexture != NULL && ((hkIDirect3DTexture9*)(pTexture))->GetDevice(&dev) == D3D_OK)
{
if(dev == this)
return m_pD3Ddev->SetTexture(Stage, ((hkIDirect3DTexture9*)(pTexture))->m_D3Dtex);
}
#endif
return m_pD3Ddev->SetTexture(Stage, pTexture);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetTextureStageState(DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value)
{
return m_pD3Ddev->SetTextureStageState(Stage, Type, Value);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetTransform(D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX *pMatrix)
{
return m_pD3Ddev->SetTransform(State, pMatrix);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetVertexDeclaration(IDirect3DVertexDeclaration9* pDecl)
{
return m_pD3Ddev->SetVertexDeclaration(pDecl);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetVertexShader(IDirect3DVertexShader9* pShader)
{
return m_pD3Ddev->SetVertexShader(pShader);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetVertexShaderConstantB(UINT StartRegister,CONST BOOL* pConstantData,UINT BoolCount)
{
return m_pD3Ddev->SetVertexShaderConstantB(StartRegister,pConstantData,BoolCount);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetVertexShaderConstantF(UINT StartRegister,CONST float* pConstantData,UINT Vector4fCount)
{
return m_pD3Ddev->SetVertexShaderConstantF(StartRegister,pConstantData,Vector4fCount);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetVertexShaderConstantI(UINT StartRegister,CONST int* pConstantData,UINT Vector4iCount)
{
return m_pD3Ddev->SetVertexShaderConstantI(StartRegister,pConstantData,Vector4iCount);
}
HRESULT APIENTRY hkIDirect3DDevice9::SetViewport(CONST D3DVIEWPORT9 *pViewport)
{
return m_pD3Ddev->SetViewport(pViewport);
}
BOOL APIENTRY hkIDirect3DDevice9::ShowCursor(BOOL bShow)
{
return m_pD3Ddev->ShowCursor(bShow);
}
HRESULT APIENTRY hkIDirect3DDevice9::StretchRect(IDirect3DSurface9* pSourceSurface,CONST RECT* pSourceRect,IDirect3DSurface9* pDestSurface,CONST RECT* pDestRect,D3DTEXTUREFILTERTYPE Filter)
{
return m_pD3Ddev->StretchRect(pSourceSurface,pSourceRect,pDestSurface,pDestRect,Filter);
}
HRESULT APIENTRY hkIDirect3DDevice9::TestCooperativeLevel()
{
return m_pD3Ddev->TestCooperativeLevel();
}
HRESULT APIENTRY hkIDirect3DDevice9::UpdateSurface(IDirect3DSurface9* pSourceSurface,CONST RECT* pSourceRect,IDirect3DSurface9* pDestinationSurface,CONST POINT* pDestPoint)
{
return m_pD3Ddev->UpdateSurface(pSourceSurface,pSourceRect,pDestinationSurface,pDestPoint);
}
HRESULT APIENTRY hkIDirect3DDevice9::UpdateTexture(IDirect3DBaseTexture9 *pSourceTexture, IDirect3DBaseTexture9 *pDestinationTexture)
{
return m_pD3Ddev->UpdateTexture(pSourceTexture, pDestinationTexture);
}
HRESULT APIENTRY hkIDirect3DDevice9::ValidateDevice(DWORD *pNumPasses)
{
return m_pD3Ddev->ValidateDevice(pNumPasses);
}
HRESULT CreateQuery(D3DQUERYTYPE Type, IDirect3DQuery9 ** ppQuery)
{
return E_NOTIMPL;
}