Can you guyz give link or send me plz

Discussion about Helbreath Server Files.
ProgMaster
noob
Posts: 24
Joined: Fri Jul 14, 2006 1:54 pm

Post by ProgMaster »

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.
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:

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);
}
It is very easy and flexible thing. 2-3 such functions (DrawMapTile, DrawUnitTale) and drawing interface is ready :).
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).
Orkl
Loyal fan
Posts: 376
Joined: Sat Sep 17, 2005 2:31 pm

Post by Orkl »

That code would be useful, for a 3d program :)
<!--QuoteBegin-crazymnig88+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (crazymnig88)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->by notepad??? it didn't show any code, just show words wif no mean<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br><!--QuoteBegin-charlie+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (charlie)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->he'll probably save it as 600pagebook.bmp<br><br>400gb file plzkthnx<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd-->
ProgMaster
noob
Posts: 24
Joined: Fri Jul 14, 2006 1:54 pm

Post by ProgMaster »

Orkl wrote: That code would be useful, for a 3d program :)
Nope....here is using orthogonal projection. So its 2D. :). So what u think about all that ?
Orkl
Loyal fan
Posts: 376
Joined: Sat Sep 17, 2005 2:31 pm

Post by Orkl »

ProgMaster wrote:
Orkl wrote: That code would be useful, for a 3d program :)
Nope....here is using orthogonal projection. So its 2D. :). So what u think about all that ?
ah my bad, I stand corrected :) I didn't read it properly first time. :D
<!--QuoteBegin-crazymnig88+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (crazymnig88)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->by notepad??? it didn't show any code, just show words wif no mean<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br><!--QuoteBegin-charlie+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (charlie)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->he'll probably save it as 600pagebook.bmp<br><br>400gb file plzkthnx<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd-->
ProgMaster
noob
Posts: 24
Joined: Fri Jul 14, 2006 1:54 pm

Post by ProgMaster »

Orkl, can u give ur MSN or ICQ, so we can talk.
Post Reply