Crystal Space
Welcome, Guest. Please login or register.
October 01, 2014, 05:26:27 am

Login with username, password and session length
Search:     Advanced search
9020 Posts in 2053 Topics by 8557 Members
Latest Member: Mstiopcarl03
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  SpriteCal3D- Controlling the Model-error
« previous next »
Pages: [1] 2 Print
Author Topic: SpriteCal3D- Controlling the Model-error  (Read 3979 times)
gabdab
Newbie
*
Posts: 15


View Profile
« on: March 05, 2006, 04:37:15 pm »

Hi,
when I try to load animations ( as from :http://www.crystalspace3d.org/docs/online/manual/cs_4.9.14.php#4.9.14) I get these errors:

Code:
simple1.cpp: In member function `bool Simple::SetupModules()':
simple1.cpp:229: error: parse error before `;' token
simple1.cpp:232: error: `cal3dstate' undeclared (first use this function)
simple1.cpp:232: error: (Each undeclared identifier is reported only once for
   each function it appears in.)
make: *** [simple1.o] Error 1

I succesfully loaded the model using code from the over mentioned page , but can't recompile it with animation .
This is the part of code not working for me:
Code:
// Make it do something.
227    csRef<iSpriteCal3DFactoryState> factstate(
228   scfQueryInterface<iSpriteCal3DFactoryState> (
229 imeshfact->GetMeshObjectFactory());
230        csRef<iSpriteCal3DState> cal3dstate(scfQueryInterface<iSpriteCal3DState> (
231     sprite->GetMeshObject()));
232    cal3dstate->SetAnimCycle("walk", 1.0f);

Any hint ?

Thanks,
Gab-
Logged
gabdab
Newbie
*
Posts: 15


View Profile
« Reply #1 on: March 05, 2006, 05:20:01 pm »

I suspect it mught be due to setting paths for Crystal Space.
I installed it in /opt/Crystal-Space/CS , while /usr/local should have been its primary location.

Any hint on how to set paths ?

Gab-
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #2 on: March 06, 2006, 12:25:09 pm »

I suspect it mught be due to setting paths for Crystal Space.
I installed it in /opt/Crystal-Space/CS , while /usr/local should have been its primary location.

Any hint on how to set paths ?

Gab-

Do you have the CVS of cal3d installed? Is this on linux? On windows? What version of CS?

Greetings,
Logged
gabdab
Newbie
*
Posts: 15


View Profile
« Reply #3 on: March 08, 2006, 10:39:15 am »

Hi Jorrit,
CS and CEL are related :
http://www.crystalspace3d.org/tikiwiki/tiki-index.php?page=Download.

I think the problem might be related to swig missing when I installed CS ( I remember the swig missing voice in configuration ).
Is sprcal3d using python or xml or plugins in general , I can't tell yet .

Thanks,
Gab-
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #4 on: March 08, 2006, 10:43:16 am »

sprcal3d has nothing to do with swig at all. So that can't be the reason. I asked you what version of cal3d you are using though. Can you check that?

Greetings,
Logged
gabdab
Newbie
*
Posts: 15


View Profile
« Reply #5 on: March 08, 2006, 10:47:46 am »

I am on Debian Linux i686.
Development Version in CVS (0.99) as per CS and CEL.
Cal3d last CVS version.
It works as for cel celtst I can see cally and all.

Gab-
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #6 on: March 08, 2006, 10:49:26 am »

Ok, in that case can you show me the FULL source code of the application you are trying to compile?

Greetings,
Logged
gabdab
Newbie
*
Posts: 15


View Profile
« Reply #7 on: March 08, 2006, 11:31:10 am »

First of all forgive my ignorance , because I was following tutorial on manual for old version (0.98) while I am using cvs.
I didn't realize it wasn't referenced in the new version of the manual .
I will stick with cel as it handle cal3d models preatty well.



Here is the chunk of code:
http://cpp.sourceforge.net/?show=13368

Here is the simple.cpp modified for cally ( cal3d) as for tutorial(global):
http://cpp.sourceforge.net/?show=13367



The part not working is , same as below:
Code:
// Make it do something.
227    csRef<iSpriteCal3DFactoryState> factstate(
228   scfQueryInterface<iSpriteCal3DFactoryState> (
229 imeshfact->GetMeshObjectFactory());
230        csRef<iSpriteCal3DState> cal3dstate(scfQueryInterface<iSpriteCal3DState> (
231     sprite->GetMeshObject()));
232    cal3dstate->SetAnimCycle("walk", 1.0f);

simple.h is the same coming with CS distribution should I post that one also ?

Isn't scf supposed to bring in the plugin system ?

Gab-
« Last Edit: March 08, 2006, 12:33:21 pm by gabdab » Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #8 on: March 08, 2006, 12:48:10 pm »

And what error do you get exactly on those lines?

Greetings,
Logged
gabdab
Newbie
*
Posts: 15


View Profile
« Reply #9 on: March 08, 2006, 01:03:54 pm »

Code:
gabdab@debian:/home/plus/games/crystal/CS/apps/tutorial/simplecal3d$ make
g++   -I/opt/Crystal_Space/CS/include/crystalspace      -o simple1.o -c simple1.cpp
simple1.cpp: In member function `bool Simple::SetupModules()':
simple1.cpp:230: error: parse error before `;' token
simple1.cpp:233: error: `cal3dstate' undeclared (first use this function)
simple1.cpp:233: error: (Each undeclared identifier is reported only once for
   each function it appears in.)
make: *** [simple1.o] Error 1

I am using the Makefile.template as in /opt/Crystal_Space/CS/share/crystalspace/build/maketemplate
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #10 on: March 08, 2006, 01:14:11 pm »

Ok, and now I need to know what is on line 230 as I can't see line numbers in the code you pasted here.

Greetings,
Logged
gabdab
Newbie
*
Posts: 15


View Profile
« Reply #11 on: March 08, 2006, 02:01:05 pm »

230- imeshfact->GetMeshObjectFactory());

Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #12 on: March 08, 2006, 02:04:07 pm »

Ok. I really need to see the complete source. This is too confusing otherwise. So I need all of it.

Greetings,
Logged
gabdab
Newbie
*
Posts: 15


View Profile
« Reply #13 on: March 08, 2006, 02:22:13 pm »

Sorry, this is it.
 I corrected lines numbers :
http://cpp.sourceforge.net/?show=13375
Now reflect correct location  of error message.
The modification goes from line 213 to line 233.


The simple.h file for it is here( it shouldn't be involved but..) :
http://cpp.sourceforge.net/?show=13376

Gab-
« Last Edit: March 08, 2006, 02:26:58 pm by gabdab » Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #14 on: March 08, 2006, 02:58:43 pm »

And that error is the first error you get?

I see nothing wrong in your source.

Greetings,
Logged
Pages: [1] 2 Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 5.895 seconds with 15 queries.