Game Development Community

Visual Studio 2005 Solution files

by Chris Schletter · in Torque Game Engine Advanced · 03/10/2006 (10:49 am) · 4 replies

I've put together some Visual Studio 2005 solution files that can be downloaded from http://www.thzero.com/programming/torque/VisualStudio2005Solution.zip One note, that the projects expect a DirectX folder under the 'tse' folder that contains the DirectXSDK's Include and Lib folders.

Even after getting the latest source from CVS, I was not able to compile without a few issues as follows:

In dtsSDK\DTSShape line 596, it has an undeclared i local variable as follows:

for (int i = 0 ; i < detailLevels.size() ; i++)
{
 if (detailLevels[i].size < pixels)
 {
	smallestDetailLevel = i ;
    break ;
	}
}

smallestDetailLevel = i ;

replace with

int i = 0;
for (i = 0 ; i < detailLevels.size() ; i++)
{
 if (detailLevels[i].size < pixels)
 {
	smallestDetailLevel = i ;
    break ;
	}
}

smallestDetailLevel = i ;

I believe this was mentioned elsewhere too.

In ms2dtsExporter\DTSPlugin.cpp line 483, a similar issue:

for (i = 0 ; i < numMaterials ; i++)
{
  char name[MS_MAX_PATH+1];
  msMaterial * msMat = msModel_GetMaterialAt(model, i);
  msMaterial_GetName (msMat, name, MS_MAX_PATH);
  extractOptions(name,&config);
}
for (i = 0 ; i < numMaterials ; i++)
{
  char name[MS_MAX_PATH+1];
  msMaterial * msMat = msModel_GetMaterialAt(model, i);
  msMaterial_GetName (msMat, name, MS_MAX_PATH);
  MilkshapeShape::ImportConfig::Sequence si;
  si.fps = config.animationFPS;
  si.cyclic = config.animationCyclic;
  if (extractSequence(name,&si))
     config.sequence.push_back(si);
}

replace with

for (int i = 0 ; i < numMaterials ; i++)
{
  char name[MS_MAX_PATH+1];
  msMaterial * msMat = msModel_GetMaterialAt(model, i);
  msMaterial_GetName (msMat, name, MS_MAX_PATH);
  extractOptions(name,&config);
}
for (int i = 0 ; i < numMaterials ; i++)
{
  char name[MS_MAX_PATH+1];
  msMaterial * msMat = msModel_GetMaterialAt(model, i);
  msMaterial_GetName (msMat, name, MS_MAX_PATH);
  MilkshapeShape::ImportConfig::Sequence si;
  si.fps = config.animationFPS;
  si.cyclic = config.animationCyclic;
  if (extractSequence(name,&si))
     config.sequence.push_back(si);
}

#1
03/10/2006 (11:41 am)
In the project settings (C++ -> Language) you can also disable the new "Loop Conformance". Personally I'd make the code changes, but I thought I'd point out that there is another option.
#2
03/10/2006 (11:44 am)
Good point.

However even if you did use the "Loop COnformance" option, the first issue should really be fixed.
#3
03/11/2006 (7:36 am)
This is a personal observation, not an "official GG" one...but I agree, that first loop doesn't really conform well to normally taught scoping rules...
#4
03/11/2006 (6:19 pm)
I appreciate the observation. It should be noted that while it may fly in some C/C++ compilers, most other C-esque languages (Java and C# being the most prevalent) it would cause a compliation error right out of the box. :)