Game Development Community

dev|Pro Game Development Curriculum

Fixes show stop button

by Marcelo Oliveira · 01/06/2004 (8:16 am) · 7 comments

In engine\game\showTSShape.cc :

// Replace (at line 904):
ConsoleFunction( showPlay, void, 1, 2, "(int threadNum = -1)")
{
   ShowTSShape * currentShow = ShowTSShape::currentShow;
   if (!currentShow)
      return;

   if (argc==1)
   {
      for (S32 i=0; i < currentShow->getThreadCount(); i++)
         currentShow->setPlay(i,1);
   }
   else
   {
      S32 i = dAtoi(argv[1]);
      if (i>=0)
         currentShow->setPlay(i,1);
   }
}


// Add (below showPlay function):
ConsoleFunction( showStop, void, 1, 2, "(int threadNum = -1)")
{
   ShowTSShape * currentShow = ShowTSShape::currentShow;
   if (!currentShow)
      return;

   if (argc==1)
   {
      for (S32 i=0; i < currentShow->getThreadCount(); i++)
         currentShow->setPlay(i,0);
   }
   else
   {
      S32 i = dAtoi(argv[1]);
      if (i>=0)
         currentShow->setPlay(i,0);
   }
}

#1
01/06/2004 (8:33 am)
Whoah...

That was one quick fix :)
Its nice to see sensible fixes like this in torque.
#2
01/06/2004 (8:33 am)
Maybe you could submit this to the GG guys as a patch to CVS?
#3
01/06/2004 (10:12 am)
I agree, this should be a patch.
#4
01/06/2004 (11:15 am)
Thanks, this has been noted for some time, and it would hopefully be fixed in the next release(TGEII or something less...?), it has made it difficult to check shapes, except of course; keeping a copy of RealmWars handy...:) I wish I had the skills to work beyond scripting....;/ Affording the engine is hardly an issue...
#5
01/06/2004 (1:19 pm)
I also have some fixes for the show tool - stuff like fixing the orbit camera and free camera modes, stopping non looping threads when they have finished playing and allowing u to stop the currently playing thread (already done above) - tbh I assumed I had an old version of the code and couldnt figure out CVS properly so hadn't really looked into posting them !

There is also the resource recently posted about changing the control to view objects so u can mount weapons which would make a nice addition. Would it be difficult to get everything put into Head so the latest version was a sexed up fully working show tool?
#6
01/06/2004 (2:08 pm)
Improvements i would like in the -show tool :

- Make the light direction point from where the camera is (so you don't have to set it manually all the time, though that feature is still useful)
- The ability to select between meshes you have loaded, or possibly more sensible, the inability to load more than 1 mesh (excluding the mounted meshes of course) for *viewing*
- The ability to use environment maps (hard coded emap.bmp?? WTF?!)
- The ability to load more than 1 DSQ manually using the sequence loader. Currently you can only load 1, and then it stops you from adding more.
- A textured plane which can show off shadows (that of course change with the light) aswell as give one a reference as to where the ground is.
- The ability to show the skeleton of the model. (would be a neato feature. You could even throw in bone names as an extra treat)
- A complete redesign of the gui. It looks terrible.
#7
01/25/2004 (11:41 am)
o.O I remember submitting the same stuff as resource a long time ago (November I think). Did I screw up while posting or was it deleted?