Game Development Community

A blast from the past - fxGrass problem

by Georges LaRou · in Torque Game Engine · 04/19/2004 (10:30 pm) · 10 replies

I got fxGrass 1.01 up and working. Looked great. I tried to compile 1.5 and I got an error that fxgrassreplicator.h is missing stuff that deals with the "GetTerrainTexture" stuff in the .cc. Can anyone be so kind as to fill me in one what I need to put in the .h to get this up and working.

or perhaps just send me the .h if you have it fxGrass 1.5 up and working. haha Im ok with that too.

Thanks a million.

#1
04/20/2004 (12:40 am)
I had the same problem, ATM I'm just using the 1.01.
#2
04/20/2004 (2:57 am)
Works for me :S

Are you sure you read ALL the comments in the first resource and then applied EVERYTHING in the second resource?
#3
04/20/2004 (5:53 am)
Hmmmm Ill take a second look... I *WAS* doing this at 3 in the morning.
#4
04/20/2004 (2:36 pm)
I belive that the new fxGrass requires the twSurfaceReference resource... Make sure you have that first...

-s
#5
06/29/2004 (12:42 pm)
I have the grass & surface resouces installed, but keep getting the same compile error referred to in the first post.


c:\torque\engine\game\fx\fxgrassreplicator.cc(114) : error C2039: 'GetTerrainTextures' : is not a member of 'fxGrassReplicator'
c:\torque\engine\game\fx\fxgrassreplicator.h(114) : see declaration of 'fxGrassReplicator'


Anyone found a solution?


Don't know if this is related but - I notice that the readme refers to :

>3d. In the function initPersistFields()AFTER these lines:
>if ((CollisionType & WaterObjectType) && !>mFieldData.mAllowWaterSurface && etc

But those lines are in
void fxGrassReplicator::CreateGrass(void)
#6
06/29/2004 (1:01 pm)
I just updated from fxGrass 1.01 to 1.5 about 2 weeks ago. Everything is working in my build.

The update process was a bit convoluted, in that I had to go through 3 different resource pages to get it to work. Just make sure you very carefully go through the 1.01 resource page, the 1.5 one, and the twSurfaceReference page. By following everything there, it works. I would just post what I did to make it easier (it *would* be nice to have a set of instructions all in one place), but unfortunately I didn't keep track of what steps I was doing as I did it.

Sam - did you update the .h file for fxGrass? There's instructions for doing that somewhere in the resource comments for 1.5 I believe.
#7
06/30/2004 (8:54 am)
Thanks for the input.

I can get fxGrass 1.01 to work no problem, but several attempts at 1.5 from clean starts still result in the same build error...


c:\torque\engine\game\fx\fxgrassreplicator.cc(114) : error C2039: 'GetTerrainTextures' : is not a member of 'fxGrassReplicator'
c:\torque\engine\game\fx\fxgrassreplicator.h(114) : see declaration of 'fxGrassReplicator'


Argh, the surface reference aspect of 1.5 would be great to have...

Any ideas on when the next tagged release will be?
And whether things like 1.5 will be in it?
#8
06/30/2004 (9:22 am)
Sam, check your .h file. There needs to be a definition of GetTerrainTextures in there for it to work.

Here's a post from the fxGrass 1.5 resource:
-------------------------------------------------
In class fxGrassReplicator : public SceneObject (header)

add:
bool GetTerrainTextures(float,class Point3F &,unsigned char *);
to the public section.

and:
F32 mSurfaceExclusionMode;
U32 mTheSurface;

Under F32 mRotateAngle;



Dunno if its correct, but it seems to be.
-----------------------------------------------
#9
06/30/2004 (10:16 am)
Yes, I saw that post... and promptly added the bool to the wrong place.

Thanks for the prodding, Drew... No errors now!
#10
06/30/2004 (10:41 am)
Sam, that's great. I know that one was tricky, it was a bit tricky for me too to get it working. Glad you are not getting any errors anymore.