Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Perfect World
You last visited: Today at 08:34

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Some Questions

Discussion on Some Questions within the Perfect World forum part of the MMORPGs category.

Reply
 
Old 02/17/2012, 23:58   #31
 
elite*gold: 0
Join Date: Jul 2011
Posts: 57
Received Thanks: 8
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! ....
boredsauce is offline  
Old 02/18/2012, 10:17   #32
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 575
I guess I'll have to give it a go when I have time. I do love my autopot lol.
Interest07 is offline  
Old 02/22/2012, 12:21   #33
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 575
had to change

Code:
pDevice->CreateOffscreenPlainSurface( surfDesc.Width, surfDesc.Height, surfDesc.Format, D3DPOOL_MANAGED , &pCleanSurface, NULL );
to
Code:
pDevice->CreateOffscreenPlainSurface( surfDesc.Width, surfDesc.Height, surfDesc.Format, D3DPOOL_SCRATCH , &pCleanSurface, NULL );
for the same effect as d3d8 surfaces. Cutting up surfaces didn't work very well with D3DPOOL_MANAGED. (i.e. crashes) But the rest worked well for me, thanks Saved me some looking around... autoPot all functional and pretty again.

Mind giving an update on your progress? I'm kinda intrigued about what exactly you're doing (perhaps a screenshot or so lol)

edit: **** it doesn't actually work... it only stops my program from crashing, but it doesn't make it display the dragged items properly
Interest07 is offline  
Old 02/22/2012, 19:26   #34
 
elite*gold: 0
Join Date: Jul 2011
Posts: 57
Received Thanks: 8
The Descent update changed the structs a bit, need to update them. I haven't tried yet, been taking advantage of the 2x drop/exp on the servers xD

Some of the new entries are probably the Orders they added (Corona, Shroud, etc.).
boredsauce is offline  
Old 02/23/2012, 10:23   #35
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 575
The structs weren't very hard to update, just stupid d3d9. I'll have to either cut the icons out in advance or figure a different way to cut them runtime

For now I'm rewriting my d3d framework a little and gonna see how hard it is to add 3D objects to the game.
Interest07 is offline  
Reply




All times are GMT +2. The time now is 08:34.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.