Oh srry. I've started with old version of DX9. Never coded on DX8. But u want to choose cause there is Direct2D or smthg like that. But i dont really think that it is much harder on DX9. For example drawing a map tile:Orkl wrote: I'm using DX7/8 because its easier to integrate into the Helbreath Client, whereas DX9 gets rid of a lot of the old platform of DX7/8 and it would be too much of a pain in the ass to use in conjunction with Helbreath, unless I ported HB to DX9, which would just be a pain in the ass again, because its a lot more difficult to do 2d in DX9 than it is to do it in other DX platforms.
Code: Select all
VOID DrawMapTile(float fXPos, float fYPos, float fXSize, float fYSize, int iTexture)
{
D3DXMATRIX matWorld;
D3DXMATRIX matTranslation;
D3DXMATRIX matScale;
D3DXMatrixIdentity( &matTranslation );
D3DXMatrixScaling( &matScale, fXSize, fYSize, 1.0f );
D3DXMatrixMultiply( &matWorld, &matTranslation, &matScale );
// moving block
matWorld._41 = fXPos - 0.5f; // X
matWorld._42 = fYPos + 0.5f; // Y
g_pD3DDevice->SetTransform(D3DTS_WORLD, &matWorld);
g_pD3DDevice->SetTexture(0, g_pTexture[iTexture]);
D3DXVECTOR3 vec0 = D3DXVECTOR3(0.0f, 0.0f, 0.0f);
D3DXVECTOR3 vec1 = D3DXVECTOR3(0.0f, 1.0f, 0.0f);
D3DXVECTOR3 vec2 = D3DXVECTOR3(1.0f, 0.0f, 0.0f);
D3DXVECTOR3 vec3 = D3DXVECTOR3(1.0f, 1.0f, 0.0f);
TEXCOORD tex0, tex1, tex2, tex3;
tex0.tu = 0.0f; tex0.tv = 1.0f;
tex1.tu = 0.0f; tex1.tv = 0.0f;
tex2.tu = 1.0f; tex2.tv = 1.0f;
tex3.tu = 1.0f; tex3.tv = 0.0f;
ChangeVB(vec0, vec1, vec2, vec3, tex0, tex1, tex2, tex3);
g_pD3DDevice->SetStreamSource(0, g_pVB, 0, sizeof(CUSTOMVERTEX));
g_pD3DDevice->SetFVF(D3DFVF_CUSTOMVERTEX);
g_pD3DDevice->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);
g_pD3DDevice->SetTexture(0, NULL);
}

Cause otherwise i need to get DX8 and get it learn a bit, cause i dont have it on my PC (this will take some time).