Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, ozgur, AbrahamR, wdlmaster), 849 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
Support for volume textures #357753
02/08/11 16:48
02/08/11 16:48
Joined: Feb 2011
Posts: 44
UK, Aylesbury
A
AdrenalinMod Offline OP
Newbie
AdrenalinMod  Offline OP
Newbie
A

Joined: Feb 2011
Posts: 44
UK, Aylesbury
There is a stunning error in your code. It should read
Code:
// Creates a volume texture from the given filename
LPDIRECT3DVOLUMETEXTURE9 shd_voltex_create(STRING *filename)
{
	LPDIRECT3DVOLUMETEXTURE9 temptex;
	HRESULT res = D3DXCreateVolumeTextureFromFile((LPDIRECT3DDEVICE9)pd3ddev, filename, &temptex);
	if(res != S_OK)
	{
		printf("error: %x", res);
		return NULL;
	}
	return temptex;
}


What is _chr anyways?

Re: Support for volume textures [Re: AdrenalinMod] #357755
02/08/11 16:52
02/08/11 16:52
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
_chr converts a Gamestudio String to a char-array

Re: Support for volume textures [Re: AdrenalinMod] #357757
02/08/11 16:59
02/08/11 16:59
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: AdrenalinMod
There is a stunning error in your code.

There is a stunning fail in your post


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Support for volume textures [Re: WretchedSid] #357856
02/08/11 22:00
02/08/11 22:00
Joined: Feb 2011
Posts: 44
UK, Aylesbury
A
AdrenalinMod Offline OP
Newbie
AdrenalinMod  Offline OP
Newbie
A

Joined: Feb 2011
Posts: 44
UK, Aylesbury
Why fail? I just wanted to help, sorry that you don't appreciate it.

Re: Support for volume textures [Re: AdrenalinMod] #357859
02/08/11 22:04
02/08/11 22:04
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Because it's wrong, so you mustn't have tested it.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: Support for volume textures [Re: AdrenalinMod] #357860
02/08/11 22:06
02/08/11 22:06
Joined: Feb 2011
Posts: 44
UK, Aylesbury
A
AdrenalinMod Offline OP
Newbie
AdrenalinMod  Offline OP
Newbie
A

Joined: Feb 2011
Posts: 44
UK, Aylesbury
I have been coding DirectX and WIN API for over ten years now, I rarely make any mistakes. I didn't recognize the chr command and thought it was a typo.

Re: Support for volume textures [Re: AdrenalinMod] #357862
02/08/11 22:07
02/08/11 22:07
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
And you thought that STRING evaluates to char?


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Support for volume textures [Re: WretchedSid] #357870
02/08/11 22:14
02/08/11 22:14
Joined: Feb 2011
Posts: 44
UK, Aylesbury
A
AdrenalinMod Offline OP
Newbie
AdrenalinMod  Offline OP
Newbie
A

Joined: Feb 2011
Posts: 44
UK, Aylesbury
STRING is no WIN32 data type, maybe you should look that up.

Re: Support for volume textures [Re: AdrenalinMod] #357873
02/08/11 22:18
02/08/11 22:18
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
You should've looked it up, you'd knew that it isn't a type definition of char. But as the function gets the name passed at STRING and the function excepts a char, there has to be some kind of conversion.
If you had looked that up, you had made one fail less.

Oh and btw, char is neither a Win32 data type, so what?


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Support for volume textures [Re: AdrenalinMod] #357875
02/08/11 22:19
02/08/11 22:19
Joined: Feb 2011
Posts: 44
UK, Aylesbury
A
AdrenalinMod Offline OP
Newbie
AdrenalinMod  Offline OP
Newbie
A

Joined: Feb 2011
Posts: 44
UK, Aylesbury
normally strings are char type only. I was confused.

Page 1 of 3 1 2 3

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1