void HealthBox(int x, int y, int w, int h, D3DCOLOR ColorOne, D3DCOLOR ColorTwo, IDirect3DDevice9* pDevice)
{
struct CUSTOMVERTEX
{
float x, y, w, h;
DWORD color;
};
D3DVERTEX vertices[] =
{
{ x, y, w, h, ColorOne },
{ x + w, y, w, h, ColorTwo },
{ x - 10, y + h, w, h, ColorOne },
{ x + w-10, y + h, w, h, ColorTwo }
};
pDevice->SetTexture(0, NULL);
pDevice->SetPixelShader(0);
pDevice->SetFVF(D3DFVF_XYZRHW | D3DFVF_DIFFUSE);
pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, true);
pDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
pDevice->SetRenderState(D3DRS_ZENABLE, FALSE);
pDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 2, vertices, sizeof(D3DVERTEX));
}