Right, so converting from dx8 to dx9 wasn't nearly as hard as I thought it would be.
Just did find/replace on most of the stuff. For drawing text, you don't need the Begin() and End() stuff anymore, just DrawText.
Code:
pFont->DrawTextA( NULL, text, -1, &Rectangle, 0, color );
Also removed calls to SetVertexShader() and used SetFVF instead.
Code:
//pDevice->SetVertexShader( NULL /*D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1*/);
pDevice->SetFVF( D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1 );
No longer using CreateImageSurface(). Using CreateOffscreenPlainSurface() now:
Code:
//pDevice->CreateImageSurface(surfDesc.Width, surfDesc.Height, surfDesc.Format, &pCleanSurface);
pDevice->CreateOffscreenPlainSurface( surfDesc.Width, surfDesc.Height, surfDesc.Format, D3DPOOL_MANAGED , &pCleanSurface, NULL );
Replaced CopyRects() with UpdateSurface():
Code:
//pDevice->CopyRects(pCleanSurface, NULL, 0, pTexSurface, NULL);
pDevice->UpdateSurface( pCleanSurface, NULL, pTexSurface, NULL );
Code:
//pDevice->CopyRects(pSurface, pSrcRect, 1, pTexSurface, &destPoint);
pDevice->UpdateSurface( pSurface, pSrcRect, pTexSurface, &destPoint );
Think that about sums up my changes. I don't know much about D3D programming, but it seems to work so w/e. xD
So all thats left is to update the structs. Woohoo! ....