mirror of
https://github.com/SWG-Source/src.git
synced 2026-10-21 13:03:10 -04:00
this is where i stop for the evening
This commit is contained in:
+11
-26
@@ -24,20 +24,20 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedBattlefieldMarkerObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedBattlefieldMarkerObjectTemplate::SharedBattlefieldMarkerObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedTangibleObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedBattlefieldMarkerObjectTemplate::SharedBattlefieldMarkerObjectTemplate
|
||||
|
||||
@@ -46,8 +46,8 @@ SharedBattlefieldMarkerObjectTemplate::SharedBattlefieldMarkerObjectTemplate(con
|
||||
*/
|
||||
SharedBattlefieldMarkerObjectTemplate::~SharedBattlefieldMarkerObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedBattlefieldMarkerObjectTemplate::~SharedBattlefieldMarkerObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -106,8 +106,6 @@ Tag SharedBattlefieldMarkerObjectTemplate::getHighestTemplateVersion(void) const
|
||||
//@BEGIN TFD
|
||||
int SharedBattlefieldMarkerObjectTemplate::getNumberOfPoles() const
|
||||
{
|
||||
|
||||
|
||||
const SharedBattlefieldMarkerObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -157,8 +155,6 @@ int SharedBattlefieldMarkerObjectTemplate::getNumberOfPoles() const
|
||||
|
||||
int SharedBattlefieldMarkerObjectTemplate::getNumberOfPolesMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedBattlefieldMarkerObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -208,8 +204,6 @@ int SharedBattlefieldMarkerObjectTemplate::getNumberOfPolesMin() const
|
||||
|
||||
int SharedBattlefieldMarkerObjectTemplate::getNumberOfPolesMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedBattlefieldMarkerObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -259,8 +253,6 @@ int SharedBattlefieldMarkerObjectTemplate::getNumberOfPolesMax() const
|
||||
|
||||
float SharedBattlefieldMarkerObjectTemplate::getRadius() const
|
||||
{
|
||||
|
||||
|
||||
const SharedBattlefieldMarkerObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -310,8 +302,6 @@ float SharedBattlefieldMarkerObjectTemplate::getRadius() const
|
||||
|
||||
float SharedBattlefieldMarkerObjectTemplate::getRadiusMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedBattlefieldMarkerObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -361,8 +351,6 @@ float SharedBattlefieldMarkerObjectTemplate::getRadiusMin() const
|
||||
|
||||
float SharedBattlefieldMarkerObjectTemplate::getRadiusMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedBattlefieldMarkerObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -410,7 +398,6 @@ float SharedBattlefieldMarkerObjectTemplate::getRadiusMax() const
|
||||
return value;
|
||||
} // SharedBattlefieldMarkerObjectTemplate::getRadiusMax
|
||||
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
* for this template.
|
||||
@@ -419,8 +406,8 @@ float SharedBattlefieldMarkerObjectTemplate::getRadiusMax() const
|
||||
*/
|
||||
void SharedBattlefieldMarkerObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedBattlefieldMarkerObjectTemplate_tag)
|
||||
{
|
||||
@@ -430,7 +417,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -450,10 +437,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,1))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 1))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -479,4 +464,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedBattlefieldMarkerObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+11
-18
@@ -23,20 +23,20 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedBuildingObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedBuildingObjectTemplate::SharedBuildingObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedTangibleObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedBuildingObjectTemplate::SharedBuildingObjectTemplate
|
||||
|
||||
@@ -45,8 +45,8 @@ SharedBuildingObjectTemplate::SharedBuildingObjectTemplate(const std::string & f
|
||||
*/
|
||||
SharedBuildingObjectTemplate::~SharedBuildingObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedBuildingObjectTemplate::~SharedBuildingObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -105,8 +105,6 @@ Tag SharedBuildingObjectTemplate::getHighestTemplateVersion(void) const
|
||||
//@BEGIN TFD
|
||||
const std::string & SharedBuildingObjectTemplate::getTerrainModificationFileName() const
|
||||
{
|
||||
|
||||
|
||||
const SharedBuildingObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -134,8 +132,6 @@ const std::string & SharedBuildingObjectTemplate::getTerrainModificationFileName
|
||||
|
||||
const std::string & SharedBuildingObjectTemplate::getInteriorLayoutFileName() const
|
||||
{
|
||||
|
||||
|
||||
const SharedBuildingObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -161,7 +157,6 @@ const std::string & SharedBuildingObjectTemplate::getInteriorLayoutFileName() co
|
||||
return value;
|
||||
} // SharedBuildingObjectTemplate::getInteriorLayoutFileName
|
||||
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
* for this template.
|
||||
@@ -170,8 +165,8 @@ const std::string & SharedBuildingObjectTemplate::getInteriorLayoutFileName() co
|
||||
*/
|
||||
void SharedBuildingObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedBuildingObjectTemplate_tag)
|
||||
{
|
||||
@@ -181,7 +176,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -201,10 +196,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,1))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 1))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -230,4 +223,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedBuildingObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+11
-13
@@ -23,20 +23,20 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedCellObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedCellObjectTemplate::SharedCellObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedCellObjectTemplate::SharedCellObjectTemplate
|
||||
|
||||
@@ -45,8 +45,8 @@ SharedCellObjectTemplate::SharedCellObjectTemplate(const std::string & filename)
|
||||
*/
|
||||
SharedCellObjectTemplate::~SharedCellObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedCellObjectTemplate::~SharedCellObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -112,8 +112,8 @@ Tag SharedCellObjectTemplate::getHighestTemplateVersion(void) const
|
||||
*/
|
||||
void SharedCellObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedCellObjectTemplate_tag)
|
||||
{
|
||||
@@ -123,7 +123,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -143,10 +143,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 0))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -164,4 +162,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedCellObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+11
-13
@@ -23,20 +23,20 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedConstructionContractObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedConstructionContractObjectTemplate::SharedConstructionContractObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedIntangibleObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedConstructionContractObjectTemplate::SharedConstructionContractObjectTemplate
|
||||
|
||||
@@ -45,8 +45,8 @@ SharedConstructionContractObjectTemplate::SharedConstructionContractObjectTempla
|
||||
*/
|
||||
SharedConstructionContractObjectTemplate::~SharedConstructionContractObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedConstructionContractObjectTemplate::~SharedConstructionContractObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -112,8 +112,8 @@ Tag SharedConstructionContractObjectTemplate::getHighestTemplateVersion(void) co
|
||||
*/
|
||||
void SharedConstructionContractObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedConstructionContractObjectTemplate_tag)
|
||||
{
|
||||
@@ -123,7 +123,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -143,10 +143,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 0))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -164,4 +162,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedConstructionContractObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+20
-107
@@ -29,7 +29,7 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedCreatureObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
@@ -42,8 +42,9 @@ typedef ::RangedIntCustomizationVariable GlobalRangedIntCustomizationVariableTyp
|
||||
SharedCreatureObjectTemplate::SharedCreatureObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedTangibleObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
m_movementTable = 0;
|
||||
} // SharedCreatureObjectTemplate::SharedCreatureObjectTemplate
|
||||
@@ -53,8 +54,8 @@ SharedCreatureObjectTemplate::SharedCreatureObjectTemplate(const std::string & f
|
||||
*/
|
||||
SharedCreatureObjectTemplate::~SharedCreatureObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
delete m_movementTable;
|
||||
m_movementTable = 0;
|
||||
} // SharedCreatureObjectTemplate::~SharedCreatureObjectTemplate
|
||||
@@ -122,7 +123,7 @@ void SharedCreatureObjectTemplate::postLoad()
|
||||
|
||||
void SharedCreatureObjectTemplate::createCustomizationDataPropertyAsNeeded(Object &object, bool /* forceCreation */) const
|
||||
{
|
||||
//-- Properties cannot be added while an object is in the world. Some callers may be in the world,
|
||||
//-- Properties cannot be added while an object is in the world. Some callers may be in the world,
|
||||
// so temporarily remove the object from the world if necessary.
|
||||
bool shouldBeInWorld = object.isInWorld();
|
||||
if (shouldBeInWorld)
|
||||
@@ -147,18 +148,18 @@ void SharedCreatureObjectTemplate::createCustomizationDataPropertyAsNeeded(Objec
|
||||
AssetCustomizationManager::addCustomizationVariablesForAsset(TemporaryCrcString(getAppearanceFilename().c_str(), true), *customizationData, skipSharedOwnerVariables);
|
||||
|
||||
//-- set up mappings for any variables which need dependent mappings
|
||||
int numVariableMappings = getCustomizationVariableMappingCount();
|
||||
int numVariableMappings = getCustomizationVariableMappingCount();
|
||||
for (int i = 0; i < numVariableMappings; ++i)
|
||||
{
|
||||
CustomizationVariableMapping localVariableMapping;
|
||||
getCustomizationVariableMapping(localVariableMapping, i);
|
||||
getCustomizationVariableMapping(localVariableMapping, i);
|
||||
GlobalRangedIntCustomizationVariableType *source = safe_cast<GlobalRangedIntCustomizationVariableType *>(customizationData->findVariable(localVariableMapping.sourceVariable));
|
||||
if(source)
|
||||
{
|
||||
source->setDependentVariable(localVariableMapping.dependentVariable);
|
||||
}
|
||||
}
|
||||
|
||||
if (source)
|
||||
{
|
||||
source->setDependentVariable(localVariableMapping.dependentVariable);
|
||||
}
|
||||
}
|
||||
|
||||
//-- release local reference to the CustomizationData instance
|
||||
customizationData->release();
|
||||
}
|
||||
@@ -169,8 +170,6 @@ void SharedCreatureObjectTemplate::createCustomizationDataPropertyAsNeeded(Objec
|
||||
//@BEGIN TFD
|
||||
SharedCreatureObjectTemplate::Gender SharedCreatureObjectTemplate::getGender() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -198,8 +197,6 @@ SharedCreatureObjectTemplate::Gender SharedCreatureObjectTemplate::getGender() c
|
||||
|
||||
SharedCreatureObjectTemplate::Niche SharedCreatureObjectTemplate::getNiche() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -227,8 +224,6 @@ SharedCreatureObjectTemplate::Niche SharedCreatureObjectTemplate::getNiche() con
|
||||
|
||||
SharedCreatureObjectTemplate::Species SharedCreatureObjectTemplate::getSpecies() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -256,8 +251,6 @@ SharedCreatureObjectTemplate::Species SharedCreatureObjectTemplate::getSpecies()
|
||||
|
||||
SharedCreatureObjectTemplate::Race SharedCreatureObjectTemplate::getRace() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -726,8 +719,6 @@ float SharedCreatureObjectTemplate::getTurnRateMax(MovementTypes index) const
|
||||
|
||||
const std::string & SharedCreatureObjectTemplate::getAnimationMapFilename() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -755,8 +746,6 @@ const std::string & SharedCreatureObjectTemplate::getAnimationMapFilename() cons
|
||||
|
||||
float SharedCreatureObjectTemplate::getSlopeModAngle() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -806,8 +795,6 @@ float SharedCreatureObjectTemplate::getSlopeModAngle() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getSlopeModAngleMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -857,8 +844,6 @@ float SharedCreatureObjectTemplate::getSlopeModAngleMin() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getSlopeModAngleMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -908,8 +893,6 @@ float SharedCreatureObjectTemplate::getSlopeModAngleMax() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getSlopeModPercent() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -959,8 +942,6 @@ float SharedCreatureObjectTemplate::getSlopeModPercent() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getSlopeModPercentMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1010,8 +991,6 @@ float SharedCreatureObjectTemplate::getSlopeModPercentMin() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getSlopeModPercentMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1061,8 +1040,6 @@ float SharedCreatureObjectTemplate::getSlopeModPercentMax() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getWaterModPercent() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1112,8 +1089,6 @@ float SharedCreatureObjectTemplate::getWaterModPercent() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getWaterModPercentMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1163,8 +1138,6 @@ float SharedCreatureObjectTemplate::getWaterModPercentMin() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getWaterModPercentMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1214,8 +1187,6 @@ float SharedCreatureObjectTemplate::getWaterModPercentMax() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getStepHeight() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1265,8 +1236,6 @@ float SharedCreatureObjectTemplate::getStepHeight() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getStepHeightMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1316,8 +1285,6 @@ float SharedCreatureObjectTemplate::getStepHeightMin() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getStepHeightMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1367,8 +1334,6 @@ float SharedCreatureObjectTemplate::getStepHeightMax() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getCollisionHeight() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1418,8 +1383,6 @@ float SharedCreatureObjectTemplate::getCollisionHeight() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getCollisionHeightMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1469,8 +1432,6 @@ float SharedCreatureObjectTemplate::getCollisionHeightMin() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getCollisionHeightMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1520,8 +1481,6 @@ float SharedCreatureObjectTemplate::getCollisionHeightMax() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getCollisionRadius() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1571,8 +1530,6 @@ float SharedCreatureObjectTemplate::getCollisionRadius() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getCollisionRadiusMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1622,8 +1579,6 @@ float SharedCreatureObjectTemplate::getCollisionRadiusMin() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getCollisionRadiusMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1673,8 +1628,6 @@ float SharedCreatureObjectTemplate::getCollisionRadiusMax() const
|
||||
|
||||
const std::string & SharedCreatureObjectTemplate::getMovementDatatable() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1729,8 +1682,6 @@ bool SharedCreatureObjectTemplate::getPostureAlignToTerrain(Postures index) cons
|
||||
|
||||
float SharedCreatureObjectTemplate::getSwimHeight() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1780,8 +1731,6 @@ float SharedCreatureObjectTemplate::getSwimHeight() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getSwimHeightMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1831,8 +1780,6 @@ float SharedCreatureObjectTemplate::getSwimHeightMin() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getSwimHeightMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1882,8 +1829,6 @@ float SharedCreatureObjectTemplate::getSwimHeightMax() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getWarpTolerance() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1933,8 +1878,6 @@ float SharedCreatureObjectTemplate::getWarpTolerance() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getWarpToleranceMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1984,8 +1927,6 @@ float SharedCreatureObjectTemplate::getWarpToleranceMin() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getWarpToleranceMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -2035,8 +1976,6 @@ float SharedCreatureObjectTemplate::getWarpToleranceMax() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getCollisionOffsetX() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -2086,8 +2025,6 @@ float SharedCreatureObjectTemplate::getCollisionOffsetX() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getCollisionOffsetXMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -2137,8 +2074,6 @@ float SharedCreatureObjectTemplate::getCollisionOffsetXMin() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getCollisionOffsetXMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -2188,8 +2123,6 @@ float SharedCreatureObjectTemplate::getCollisionOffsetXMax() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getCollisionOffsetZ() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -2239,8 +2172,6 @@ float SharedCreatureObjectTemplate::getCollisionOffsetZ() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getCollisionOffsetZMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -2290,8 +2221,6 @@ float SharedCreatureObjectTemplate::getCollisionOffsetZMin() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getCollisionOffsetZMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -2341,8 +2270,6 @@ float SharedCreatureObjectTemplate::getCollisionOffsetZMax() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getCollisionLength() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -2392,8 +2319,6 @@ float SharedCreatureObjectTemplate::getCollisionLength() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getCollisionLengthMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -2443,8 +2368,6 @@ float SharedCreatureObjectTemplate::getCollisionLengthMin() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getCollisionLengthMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -2494,8 +2417,6 @@ float SharedCreatureObjectTemplate::getCollisionLengthMax() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getCameraHeight() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -2545,8 +2466,6 @@ float SharedCreatureObjectTemplate::getCameraHeight() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getCameraHeightMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -2596,8 +2515,6 @@ float SharedCreatureObjectTemplate::getCameraHeightMin() const
|
||||
|
||||
float SharedCreatureObjectTemplate::getCameraHeightMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedCreatureObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -2645,7 +2562,6 @@ float SharedCreatureObjectTemplate::getCameraHeightMax() const
|
||||
return value;
|
||||
} // SharedCreatureObjectTemplate::getCameraHeightMax
|
||||
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
* for this template.
|
||||
@@ -2654,8 +2570,8 @@ float SharedCreatureObjectTemplate::getCameraHeightMax() const
|
||||
*/
|
||||
void SharedCreatureObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedCreatureObjectTemplate_tag)
|
||||
{
|
||||
@@ -2665,7 +2581,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -2685,10 +2601,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,1,3))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 1, 3))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -2802,5 +2716,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedCreatureObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
|
||||
//@END TFD
|
||||
+78
-102
@@ -23,24 +23,24 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedDraftSchematicObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedDraftSchematicObjectTemplate::SharedDraftSchematicObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedIntangibleObjectTemplate(filename)
|
||||
,m_slotsLoaded(false)
|
||||
,m_slotsAppend(false)
|
||||
,m_attributesLoaded(false)
|
||||
,m_attributesAppend(false)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_slotsLoaded(false)
|
||||
, m_slotsAppend(false)
|
||||
, m_attributesLoaded(false)
|
||||
, m_attributesAppend(false)
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedDraftSchematicObjectTemplate::SharedDraftSchematicObjectTemplate
|
||||
|
||||
@@ -49,7 +49,7 @@ SharedDraftSchematicObjectTemplate::SharedDraftSchematicObjectTemplate(const std
|
||||
*/
|
||||
SharedDraftSchematicObjectTemplate::~SharedDraftSchematicObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
{
|
||||
std::vector<StructParamOT *>::iterator iter;
|
||||
for (iter = m_slots.begin(); iter != m_slots.end(); ++iter)
|
||||
@@ -68,7 +68,7 @@ SharedDraftSchematicObjectTemplate::~SharedDraftSchematicObjectTemplate()
|
||||
}
|
||||
m_attributes.clear();
|
||||
}
|
||||
//@END TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedDraftSchematicObjectTemplate::~SharedDraftSchematicObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -138,7 +138,7 @@ void SharedDraftSchematicObjectTemplate::getSlots(IngredientSlot &data, int inde
|
||||
if (ms_allowDefaultTemplateParams && /*!m_versionOk &&*/ base == nullptr)
|
||||
{
|
||||
DEBUG_WARNING(true, ("Returning default value for missing parameter slots in template %s", DataResource::getName()));
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -152,10 +152,10 @@ void SharedDraftSchematicObjectTemplate::getSlots(IngredientSlot &data, int inde
|
||||
{
|
||||
int baseCount = base->getSlotsCount();
|
||||
if (index < baseCount)
|
||||
{
|
||||
base->getSlots(data, index);
|
||||
return;
|
||||
}
|
||||
{
|
||||
base->getSlots(data, index);
|
||||
return;
|
||||
}
|
||||
index -= baseCount;
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ void SharedDraftSchematicObjectTemplate::getSlotsMin(IngredientSlot &data, int i
|
||||
if (ms_allowDefaultTemplateParams && /*!m_versionOk &&*/ base == nullptr)
|
||||
{
|
||||
DEBUG_WARNING(true, ("Returning default value for missing parameter slots in template %s", DataResource::getName()));
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -195,10 +195,10 @@ void SharedDraftSchematicObjectTemplate::getSlotsMin(IngredientSlot &data, int i
|
||||
{
|
||||
int baseCount = base->getSlotsCount();
|
||||
if (index < baseCount)
|
||||
{
|
||||
base->getSlotsMin(data, index);
|
||||
return;
|
||||
}
|
||||
{
|
||||
base->getSlotsMin(data, index);
|
||||
return;
|
||||
}
|
||||
index -= baseCount;
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ void SharedDraftSchematicObjectTemplate::getSlotsMax(IngredientSlot &data, int i
|
||||
if (ms_allowDefaultTemplateParams && /*!m_versionOk &&*/ base == nullptr)
|
||||
{
|
||||
DEBUG_WARNING(true, ("Returning default value for missing parameter slots in template %s", DataResource::getName()));
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -238,10 +238,10 @@ void SharedDraftSchematicObjectTemplate::getSlotsMax(IngredientSlot &data, int i
|
||||
{
|
||||
int baseCount = base->getSlotsCount();
|
||||
if (index < baseCount)
|
||||
{
|
||||
base->getSlotsMax(data, index);
|
||||
return;
|
||||
}
|
||||
{
|
||||
base->getSlotsMax(data, index);
|
||||
return;
|
||||
}
|
||||
index -= baseCount;
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ void SharedDraftSchematicObjectTemplate::getAttributes(SchematicAttribute &data,
|
||||
if (ms_allowDefaultTemplateParams && /*!m_versionOk &&*/ base == nullptr)
|
||||
{
|
||||
DEBUG_WARNING(true, ("Returning default value for missing parameter attributes in template %s", DataResource::getName()));
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -305,10 +305,10 @@ void SharedDraftSchematicObjectTemplate::getAttributes(SchematicAttribute &data,
|
||||
{
|
||||
int baseCount = base->getAttributesCount();
|
||||
if (index < baseCount)
|
||||
{
|
||||
base->getAttributes(data, index);
|
||||
return;
|
||||
}
|
||||
{
|
||||
base->getAttributes(data, index);
|
||||
return;
|
||||
}
|
||||
index -= baseCount;
|
||||
}
|
||||
|
||||
@@ -335,7 +335,7 @@ void SharedDraftSchematicObjectTemplate::getAttributesMin(SchematicAttribute &da
|
||||
if (ms_allowDefaultTemplateParams && /*!m_versionOk &&*/ base == nullptr)
|
||||
{
|
||||
DEBUG_WARNING(true, ("Returning default value for missing parameter attributes in template %s", DataResource::getName()));
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -349,10 +349,10 @@ void SharedDraftSchematicObjectTemplate::getAttributesMin(SchematicAttribute &da
|
||||
{
|
||||
int baseCount = base->getAttributesCount();
|
||||
if (index < baseCount)
|
||||
{
|
||||
base->getAttributesMin(data, index);
|
||||
return;
|
||||
}
|
||||
{
|
||||
base->getAttributesMin(data, index);
|
||||
return;
|
||||
}
|
||||
index -= baseCount;
|
||||
}
|
||||
|
||||
@@ -379,7 +379,7 @@ void SharedDraftSchematicObjectTemplate::getAttributesMax(SchematicAttribute &da
|
||||
if (ms_allowDefaultTemplateParams && /*!m_versionOk &&*/ base == nullptr)
|
||||
{
|
||||
DEBUG_WARNING(true, ("Returning default value for missing parameter attributes in template %s", DataResource::getName()));
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -393,10 +393,10 @@ void SharedDraftSchematicObjectTemplate::getAttributesMax(SchematicAttribute &da
|
||||
{
|
||||
int baseCount = base->getAttributesCount();
|
||||
if (index < baseCount)
|
||||
{
|
||||
base->getAttributesMax(data, index);
|
||||
return;
|
||||
}
|
||||
{
|
||||
base->getAttributesMax(data, index);
|
||||
return;
|
||||
}
|
||||
index -= baseCount;
|
||||
}
|
||||
|
||||
@@ -436,8 +436,6 @@ size_t SharedDraftSchematicObjectTemplate::getAttributesCount(void) const
|
||||
|
||||
const std::string & SharedDraftSchematicObjectTemplate::getCraftedSharedTemplate() const
|
||||
{
|
||||
|
||||
|
||||
const SharedDraftSchematicObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -463,7 +461,6 @@ const std::string & SharedDraftSchematicObjectTemplate::getCraftedSharedTemplate
|
||||
return value;
|
||||
} // SharedDraftSchematicObjectTemplate::getCraftedSharedTemplate
|
||||
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
* for this template.
|
||||
@@ -472,8 +469,8 @@ const std::string & SharedDraftSchematicObjectTemplate::getCraftedSharedTemplate
|
||||
*/
|
||||
void SharedDraftSchematicObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedDraftSchematicObjectTemplate_tag)
|
||||
{
|
||||
@@ -483,7 +480,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -503,10 +500,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,3))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 3))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -568,7 +563,6 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedDraftSchematicObjectTemplate::load
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// class SharedDraftSchematicObjectTemplate::_IngredientSlot
|
||||
|
||||
@@ -617,8 +611,6 @@ Tag SharedDraftSchematicObjectTemplate::_IngredientSlot::getId(void) const
|
||||
|
||||
const StringId SharedDraftSchematicObjectTemplate::_IngredientSlot::getName(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedDraftSchematicObjectTemplate::_IngredientSlot * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -646,8 +638,6 @@ const StringId SharedDraftSchematicObjectTemplate::_IngredientSlot::getName(bool
|
||||
|
||||
const std::string & SharedDraftSchematicObjectTemplate::_IngredientSlot::getHardpoint(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedDraftSchematicObjectTemplate::_IngredientSlot * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -673,7 +663,6 @@ const std::string & SharedDraftSchematicObjectTemplate::_IngredientSlot::getHard
|
||||
return value;
|
||||
} // SharedDraftSchematicObjectTemplate::_IngredientSlot::getHardpoint
|
||||
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
* for this template.
|
||||
@@ -682,8 +671,8 @@ const std::string & SharedDraftSchematicObjectTemplate::_IngredientSlot::getHard
|
||||
*/
|
||||
void SharedDraftSchematicObjectTemplate::_IngredientSlot::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
|
||||
@@ -705,7 +694,6 @@ char paramName[MAX_NAME_SIZE];
|
||||
UNREF(file);
|
||||
} // SharedDraftSchematicObjectTemplate::_IngredientSlot::load
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// class SharedDraftSchematicObjectTemplate::_SchematicAttribute
|
||||
|
||||
@@ -754,8 +742,6 @@ Tag SharedDraftSchematicObjectTemplate::_SchematicAttribute::getId(void) const
|
||||
|
||||
const StringId SharedDraftSchematicObjectTemplate::_SchematicAttribute::getName(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedDraftSchematicObjectTemplate::_SchematicAttribute * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -783,8 +769,6 @@ const StringId SharedDraftSchematicObjectTemplate::_SchematicAttribute::getName(
|
||||
|
||||
const StringId SharedDraftSchematicObjectTemplate::_SchematicAttribute::getExperiment(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedDraftSchematicObjectTemplate::_SchematicAttribute * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -812,8 +796,6 @@ const StringId SharedDraftSchematicObjectTemplate::_SchematicAttribute::getExper
|
||||
|
||||
int SharedDraftSchematicObjectTemplate::_SchematicAttribute::getValue(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedDraftSchematicObjectTemplate::_SchematicAttribute * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -863,8 +845,6 @@ int SharedDraftSchematicObjectTemplate::_SchematicAttribute::getValue(bool versi
|
||||
|
||||
int SharedDraftSchematicObjectTemplate::_SchematicAttribute::getValueMin(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedDraftSchematicObjectTemplate::_SchematicAttribute * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -914,8 +894,6 @@ int SharedDraftSchematicObjectTemplate::_SchematicAttribute::getValueMin(bool ve
|
||||
|
||||
int SharedDraftSchematicObjectTemplate::_SchematicAttribute::getValueMax(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedDraftSchematicObjectTemplate::_SchematicAttribute * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -963,7 +941,6 @@ int SharedDraftSchematicObjectTemplate::_SchematicAttribute::getValueMax(bool ve
|
||||
return value;
|
||||
} // SharedDraftSchematicObjectTemplate::_SchematicAttribute::getValueMax
|
||||
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
* for this template.
|
||||
@@ -972,8 +949,8 @@ int SharedDraftSchematicObjectTemplate::_SchematicAttribute::getValueMax(bool ve
|
||||
*/
|
||||
void SharedDraftSchematicObjectTemplate::_SchematicAttribute::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
|
||||
@@ -1001,17 +978,17 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
const StringId SharedDraftSchematicObjectTemplate::getCraftedName () const
|
||||
const StringId SharedDraftSchematicObjectTemplate::getCraftedName() const
|
||||
{
|
||||
StringId sid = getObjectName ();
|
||||
StringId sid = getObjectName();
|
||||
|
||||
if (sid.isInvalid ())
|
||||
if (sid.isInvalid())
|
||||
{
|
||||
const SharedObjectTemplate * const sot = fetchCraftedSharedObjectTemplate ();
|
||||
const SharedObjectTemplate * const sot = fetchCraftedSharedObjectTemplate();
|
||||
if (sot)
|
||||
{
|
||||
sid = sot->getObjectName ();
|
||||
sot->releaseReference ();
|
||||
sid = sot->getObjectName();
|
||||
sot->releaseReference();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1020,17 +997,17 @@ const StringId SharedDraftSchematicObjectTemplate::getCraftedName
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
const StringId SharedDraftSchematicObjectTemplate::getCraftedDetailedDescription () const
|
||||
const StringId SharedDraftSchematicObjectTemplate::getCraftedDetailedDescription() const
|
||||
{
|
||||
StringId sid = getDetailedDescription ();
|
||||
StringId sid = getDetailedDescription();
|
||||
|
||||
if (sid.isInvalid ())
|
||||
if (sid.isInvalid())
|
||||
{
|
||||
const SharedObjectTemplate * const sot = fetchCraftedSharedObjectTemplate ();
|
||||
const SharedObjectTemplate * const sot = fetchCraftedSharedObjectTemplate();
|
||||
if (sot)
|
||||
{
|
||||
sid = sot->getDetailedDescription ();
|
||||
sot->releaseReference ();
|
||||
sid = sot->getDetailedDescription();
|
||||
sot->releaseReference();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1039,17 +1016,17 @@ const StringId SharedDraftSchematicObjectTemplate::getCraftedDetailedDescription
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
const StringId SharedDraftSchematicObjectTemplate::getCraftedLookAtText () const
|
||||
const StringId SharedDraftSchematicObjectTemplate::getCraftedLookAtText() const
|
||||
{
|
||||
StringId sid = getLookAtText ();
|
||||
StringId sid = getLookAtText();
|
||||
|
||||
if (sid.isInvalid ())
|
||||
if (sid.isInvalid())
|
||||
{
|
||||
const SharedObjectTemplate * const sot = fetchCraftedSharedObjectTemplate ();
|
||||
const SharedObjectTemplate * const sot = fetchCraftedSharedObjectTemplate();
|
||||
if (sot)
|
||||
{
|
||||
sid = sot->getLookAtText ();
|
||||
sot->releaseReference ();
|
||||
sid = sot->getLookAtText();
|
||||
sot->releaseReference();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1058,17 +1035,17 @@ const StringId SharedDraftSchematicObjectTemplate::getCraftedLookAtText
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
const std::string SharedDraftSchematicObjectTemplate::getCraftedAppearanceFilename () const
|
||||
const std::string SharedDraftSchematicObjectTemplate::getCraftedAppearanceFilename() const
|
||||
{
|
||||
const std::string & app = getAppearanceFilename ();
|
||||
const std::string & app = getAppearanceFilename();
|
||||
|
||||
if (app.empty ())
|
||||
if (app.empty())
|
||||
{
|
||||
const SharedObjectTemplate * const sot = fetchCraftedSharedObjectTemplate ();
|
||||
const SharedObjectTemplate * const sot = fetchCraftedSharedObjectTemplate();
|
||||
if (sot)
|
||||
{
|
||||
const std::string capp = sot->getAppearanceFilename ();
|
||||
sot->releaseReference ();
|
||||
const std::string capp = sot->getAppearanceFilename();
|
||||
sot->releaseReference();
|
||||
return capp;
|
||||
}
|
||||
}
|
||||
@@ -1078,19 +1055,18 @@ const std::string SharedDraftSchematicObjectTemplate::getCraftedAppearanceFilena
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
const SharedObjectTemplate * SharedDraftSchematicObjectTemplate::fetchCraftedSharedObjectTemplate () const
|
||||
const SharedObjectTemplate * SharedDraftSchematicObjectTemplate::fetchCraftedSharedObjectTemplate() const
|
||||
{
|
||||
const std::string & sotName = getCraftedSharedTemplate ();
|
||||
const SharedObjectTemplate * const sot = safe_cast<const SharedObjectTemplate *>(ObjectTemplateList::fetch (sotName.c_str ()));
|
||||
const std::string & sotName = getCraftedSharedTemplate();
|
||||
const SharedObjectTemplate * const sot = safe_cast<const SharedObjectTemplate *>(ObjectTemplateList::fetch(sotName.c_str()));
|
||||
|
||||
if (!sot)
|
||||
{
|
||||
const char * const draftName = this->DataResource::getName ();
|
||||
WARNING (true, ("SharedDraftSchematicObjectTemplate [%s] could not load craftedSharedTemplate [%s]", draftName ? draftName : "", sotName.c_str ()));
|
||||
const char * const draftName = this->DataResource::getName();
|
||||
WARNING(true, ("SharedDraftSchematicObjectTemplate [%s] could not load craftedSharedTemplate [%s]", draftName ? draftName : "", sotName.c_str()));
|
||||
}
|
||||
|
||||
return sot;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
+11
-13
@@ -23,20 +23,20 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedFactoryObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedFactoryObjectTemplate::SharedFactoryObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedTangibleObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedFactoryObjectTemplate::SharedFactoryObjectTemplate
|
||||
|
||||
@@ -45,8 +45,8 @@ SharedFactoryObjectTemplate::SharedFactoryObjectTemplate(const std::string & fil
|
||||
*/
|
||||
SharedFactoryObjectTemplate::~SharedFactoryObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedFactoryObjectTemplate::~SharedFactoryObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -112,8 +112,8 @@ Tag SharedFactoryObjectTemplate::getHighestTemplateVersion(void) const
|
||||
*/
|
||||
void SharedFactoryObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedFactoryObjectTemplate_tag)
|
||||
{
|
||||
@@ -123,7 +123,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -143,10 +143,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 0))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -164,4 +162,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedFactoryObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+11
-13
@@ -23,20 +23,20 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedGroupObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedGroupObjectTemplate::SharedGroupObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedUniverseObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedGroupObjectTemplate::SharedGroupObjectTemplate
|
||||
|
||||
@@ -45,8 +45,8 @@ SharedGroupObjectTemplate::SharedGroupObjectTemplate(const std::string & filenam
|
||||
*/
|
||||
SharedGroupObjectTemplate::~SharedGroupObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedGroupObjectTemplate::~SharedGroupObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -112,8 +112,8 @@ Tag SharedGroupObjectTemplate::getHighestTemplateVersion(void) const
|
||||
*/
|
||||
void SharedGroupObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedGroupObjectTemplate_tag)
|
||||
{
|
||||
@@ -123,7 +123,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -143,10 +143,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 0))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -164,4 +162,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedGroupObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+11
-13
@@ -23,20 +23,20 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedGuildObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedGuildObjectTemplate::SharedGuildObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedUniverseObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedGuildObjectTemplate::SharedGuildObjectTemplate
|
||||
|
||||
@@ -45,8 +45,8 @@ SharedGuildObjectTemplate::SharedGuildObjectTemplate(const std::string & filenam
|
||||
*/
|
||||
SharedGuildObjectTemplate::~SharedGuildObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedGuildObjectTemplate::~SharedGuildObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -112,8 +112,8 @@ Tag SharedGuildObjectTemplate::getHighestTemplateVersion(void) const
|
||||
*/
|
||||
void SharedGuildObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedGuildObjectTemplate_tag)
|
||||
{
|
||||
@@ -123,7 +123,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -143,10 +143,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 0))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -164,4 +162,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedGuildObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+11
-13
@@ -23,20 +23,20 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedInstallationObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedInstallationObjectTemplate::SharedInstallationObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedTangibleObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedInstallationObjectTemplate::SharedInstallationObjectTemplate
|
||||
|
||||
@@ -45,8 +45,8 @@ SharedInstallationObjectTemplate::SharedInstallationObjectTemplate(const std::st
|
||||
*/
|
||||
SharedInstallationObjectTemplate::~SharedInstallationObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedInstallationObjectTemplate::~SharedInstallationObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -112,8 +112,8 @@ Tag SharedInstallationObjectTemplate::getHighestTemplateVersion(void) const
|
||||
*/
|
||||
void SharedInstallationObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedInstallationObjectTemplate_tag)
|
||||
{
|
||||
@@ -123,7 +123,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -143,10 +143,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 0))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -164,4 +162,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedInstallationObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+11
-13
@@ -23,20 +23,20 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedIntangibleObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedIntangibleObjectTemplate::SharedIntangibleObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedIntangibleObjectTemplate::SharedIntangibleObjectTemplate
|
||||
|
||||
@@ -45,8 +45,8 @@ SharedIntangibleObjectTemplate::SharedIntangibleObjectTemplate(const std::string
|
||||
*/
|
||||
SharedIntangibleObjectTemplate::~SharedIntangibleObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedIntangibleObjectTemplate::~SharedIntangibleObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -112,8 +112,8 @@ Tag SharedIntangibleObjectTemplate::getHighestTemplateVersion(void) const
|
||||
*/
|
||||
void SharedIntangibleObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedIntangibleObjectTemplate_tag)
|
||||
{
|
||||
@@ -123,7 +123,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -143,10 +143,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 0))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -164,4 +162,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedIntangibleObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+11
-13
@@ -24,20 +24,20 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedJediManagerObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedJediManagerObjectTemplate::SharedJediManagerObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedUniverseObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedJediManagerObjectTemplate::SharedJediManagerObjectTemplate
|
||||
|
||||
@@ -46,8 +46,8 @@ SharedJediManagerObjectTemplate::SharedJediManagerObjectTemplate(const std::stri
|
||||
*/
|
||||
SharedJediManagerObjectTemplate::~SharedJediManagerObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedJediManagerObjectTemplate::~SharedJediManagerObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -113,8 +113,8 @@ Tag SharedJediManagerObjectTemplate::getHighestTemplateVersion(void) const
|
||||
*/
|
||||
void SharedJediManagerObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedJediManagerObjectTemplate_tag)
|
||||
{
|
||||
@@ -124,7 +124,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -144,10 +144,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 0))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -165,4 +163,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedJediManagerObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+11
-13
@@ -23,20 +23,20 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedManufactureSchematicObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedManufactureSchematicObjectTemplate::SharedManufactureSchematicObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedIntangibleObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedManufactureSchematicObjectTemplate::SharedManufactureSchematicObjectTemplate
|
||||
|
||||
@@ -45,8 +45,8 @@ SharedManufactureSchematicObjectTemplate::SharedManufactureSchematicObjectTempla
|
||||
*/
|
||||
SharedManufactureSchematicObjectTemplate::~SharedManufactureSchematicObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedManufactureSchematicObjectTemplate::~SharedManufactureSchematicObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -112,8 +112,8 @@ Tag SharedManufactureSchematicObjectTemplate::getHighestTemplateVersion(void) co
|
||||
*/
|
||||
void SharedManufactureSchematicObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedManufactureSchematicObjectTemplate_tag)
|
||||
{
|
||||
@@ -123,7 +123,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -143,10 +143,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 0))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -164,4 +162,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedManufactureSchematicObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+11
-13
@@ -23,20 +23,20 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedMissionObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedMissionObjectTemplate::SharedMissionObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedIntangibleObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedMissionObjectTemplate::SharedMissionObjectTemplate
|
||||
|
||||
@@ -45,8 +45,8 @@ SharedMissionObjectTemplate::SharedMissionObjectTemplate(const std::string & fil
|
||||
*/
|
||||
SharedMissionObjectTemplate::~SharedMissionObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedMissionObjectTemplate::~SharedMissionObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -112,8 +112,8 @@ Tag SharedMissionObjectTemplate::getHighestTemplateVersion(void) const
|
||||
*/
|
||||
void SharedMissionObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedMissionObjectTemplate_tag)
|
||||
{
|
||||
@@ -123,7 +123,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -143,10 +143,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 0))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -164,4 +162,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedMissionObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+45
-117
@@ -33,7 +33,7 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
@@ -46,13 +46,13 @@ class SharedObjectTemplate::PreloadManager
|
||||
{
|
||||
public:
|
||||
|
||||
explicit PreloadManager (const SharedObjectTemplate* sharedObjectTemplate);
|
||||
~PreloadManager ();
|
||||
explicit PreloadManager(const SharedObjectTemplate* sharedObjectTemplate);
|
||||
~PreloadManager();
|
||||
|
||||
private:
|
||||
|
||||
PreloadManager ();
|
||||
PreloadManager (const PreloadManager&);
|
||||
|
||||
PreloadManager();
|
||||
PreloadManager(const PreloadManager&);
|
||||
PreloadManager& operator= (const PreloadManager&);
|
||||
|
||||
private:
|
||||
@@ -63,40 +63,40 @@ private:
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
SharedObjectTemplate::PreloadManager::PreloadManager (const SharedObjectTemplate* const sharedObjectTemplate) :
|
||||
m_preloadAppearanceTemplate (0),
|
||||
m_preloadPortalPropertyTemplate (0)
|
||||
SharedObjectTemplate::PreloadManager::PreloadManager(const SharedObjectTemplate* const sharedObjectTemplate) :
|
||||
m_preloadAppearanceTemplate(0),
|
||||
m_preloadPortalPropertyTemplate(0)
|
||||
{
|
||||
NOT_NULL(sharedObjectTemplate);
|
||||
const std::string& appearanceFileName = sharedObjectTemplate->getAppearanceFilename ();
|
||||
if (!appearanceFileName.empty ())
|
||||
const std::string& appearanceFileName = sharedObjectTemplate->getAppearanceFilename();
|
||||
if (!appearanceFileName.empty())
|
||||
{
|
||||
bool found = false;
|
||||
m_preloadAppearanceTemplate = AppearanceTemplateList::fetch (appearanceFileName.c_str (), found);
|
||||
m_preloadAppearanceTemplate = AppearanceTemplateList::fetch(appearanceFileName.c_str(), found);
|
||||
WARNING(!found, ("SharedObjectTemplate [%s] unable to load appearance [%s]", sharedObjectTemplate->getName(), appearanceFileName.c_str()));
|
||||
m_preloadAppearanceTemplate->preloadAssets ();
|
||||
m_preloadAppearanceTemplate->preloadAssets();
|
||||
}
|
||||
|
||||
const std::string& portalLayoutFilename = sharedObjectTemplate->getPortalLayoutFilename ();
|
||||
if (!portalLayoutFilename.empty ())
|
||||
const std::string& portalLayoutFilename = sharedObjectTemplate->getPortalLayoutFilename();
|
||||
if (!portalLayoutFilename.empty())
|
||||
{
|
||||
m_preloadPortalPropertyTemplate = PortalPropertyTemplateList::fetch (TemporaryCrcString (portalLayoutFilename.c_str (), true));
|
||||
m_preloadPortalPropertyTemplate->preloadAssets ();
|
||||
m_preloadPortalPropertyTemplate = PortalPropertyTemplateList::fetch(TemporaryCrcString(portalLayoutFilename.c_str(), true));
|
||||
m_preloadPortalPropertyTemplate->preloadAssets();
|
||||
}
|
||||
|
||||
if (sharedObjectTemplate->m_clientData)
|
||||
sharedObjectTemplate->m_clientData->preloadAssets ();
|
||||
sharedObjectTemplate->m_clientData->preloadAssets();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
SharedObjectTemplate::PreloadManager::~PreloadManager ()
|
||||
SharedObjectTemplate::PreloadManager::~PreloadManager()
|
||||
{
|
||||
if (m_preloadAppearanceTemplate)
|
||||
AppearanceTemplateList::release (m_preloadAppearanceTemplate);
|
||||
AppearanceTemplateList::release(m_preloadAppearanceTemplate);
|
||||
|
||||
if (m_preloadPortalPropertyTemplate)
|
||||
m_preloadPortalPropertyTemplate->release ();
|
||||
m_preloadPortalPropertyTemplate->release();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
@@ -107,12 +107,13 @@ SharedObjectTemplate::PreloadManager::~PreloadManager ()
|
||||
SharedObjectTemplate::SharedObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: ObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
, m_slotDescriptor(nullptr)
|
||||
, m_arrangementDescriptor(nullptr)
|
||||
, m_clientData (0)
|
||||
, m_preloadManager (0)
|
||||
, m_clientData(0)
|
||||
, m_preloadManager(0)
|
||||
{
|
||||
} // SharedObjectTemplate::SharedObjectTemplate
|
||||
|
||||
@@ -121,10 +122,10 @@ SharedObjectTemplate::SharedObjectTemplate(const std::string & filename)
|
||||
*/
|
||||
SharedObjectTemplate::~SharedObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
|
||||
//-- Release ArrangementDescriptor resource.
|
||||
//-- Release ArrangementDescriptor resource.
|
||||
if (m_arrangementDescriptor)
|
||||
{
|
||||
m_arrangementDescriptor->release();
|
||||
@@ -140,7 +141,7 @@ SharedObjectTemplate::~SharedObjectTemplate()
|
||||
|
||||
//-- delete client data
|
||||
if (m_clientData)
|
||||
m_clientData->releaseReference ();
|
||||
m_clientData->releaseReference();
|
||||
|
||||
//-- delete preloadmanager
|
||||
if (m_preloadManager)
|
||||
@@ -184,18 +185,17 @@ ObjectTemplate * SharedObjectTemplate::create(const std::string & filename)
|
||||
return new SharedObjectTemplate(filename);
|
||||
} // SharedObjectTemplate::create
|
||||
|
||||
|
||||
void SharedObjectTemplate::preloadAssets () const
|
||||
void SharedObjectTemplate::preloadAssets() const
|
||||
{
|
||||
ObjectTemplate::preloadAssets ();
|
||||
ObjectTemplate::preloadAssets();
|
||||
|
||||
if (!m_preloadManager)
|
||||
m_preloadManager = new PreloadManager (this);
|
||||
m_preloadManager = new PreloadManager(this);
|
||||
}
|
||||
|
||||
void SharedObjectTemplate::garbageCollect () const
|
||||
void SharedObjectTemplate::garbageCollect() const
|
||||
{
|
||||
ObjectTemplate::garbageCollect ();
|
||||
ObjectTemplate::garbageCollect();
|
||||
|
||||
if (m_preloadManager)
|
||||
{
|
||||
@@ -204,7 +204,6 @@ void SharedObjectTemplate::garbageCollect () const
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the template id.
|
||||
*
|
||||
@@ -258,18 +257,16 @@ void SharedObjectTemplate::postLoad(void)
|
||||
//-- load the client data file
|
||||
if (ms_createClientDataFunction)
|
||||
{
|
||||
const std::string& clientDataFile = getClientDataFile ();
|
||||
const std::string& clientDataFile = getClientDataFile();
|
||||
|
||||
if (!clientDataFile.empty ())
|
||||
m_clientData = ms_createClientDataFunction (clientDataFile.c_str ());
|
||||
if (!clientDataFile.empty())
|
||||
m_clientData = ms_createClientDataFunction(clientDataFile.c_str());
|
||||
}
|
||||
} // SharedObjectTemplate::postLoad
|
||||
|
||||
//@BEGIN TFD
|
||||
const StringId SharedObjectTemplate::getObjectName() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -297,8 +294,6 @@ const StringId SharedObjectTemplate::getObjectName() const
|
||||
|
||||
const StringId SharedObjectTemplate::getDetailedDescription() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -326,8 +321,6 @@ const StringId SharedObjectTemplate::getDetailedDescription() const
|
||||
|
||||
const StringId SharedObjectTemplate::getLookAtText() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -355,8 +348,6 @@ const StringId SharedObjectTemplate::getLookAtText() const
|
||||
|
||||
bool SharedObjectTemplate::getSnapToTerrain() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -384,8 +375,6 @@ bool SharedObjectTemplate::getSnapToTerrain() const
|
||||
|
||||
SharedObjectTemplate::ContainerType SharedObjectTemplate::getContainerType() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -413,8 +402,6 @@ SharedObjectTemplate::ContainerType SharedObjectTemplate::getContainerType() con
|
||||
|
||||
int SharedObjectTemplate::getContainerVolumeLimit() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -464,8 +451,6 @@ int SharedObjectTemplate::getContainerVolumeLimit() const
|
||||
|
||||
int SharedObjectTemplate::getContainerVolumeLimitMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -515,8 +500,6 @@ int SharedObjectTemplate::getContainerVolumeLimitMin() const
|
||||
|
||||
int SharedObjectTemplate::getContainerVolumeLimitMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -566,8 +549,6 @@ int SharedObjectTemplate::getContainerVolumeLimitMax() const
|
||||
|
||||
const std::string & SharedObjectTemplate::getTintPalette() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -595,8 +576,6 @@ const std::string & SharedObjectTemplate::getTintPalette() const
|
||||
|
||||
const std::string & SharedObjectTemplate::getSlotDescriptorFilename() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -624,8 +603,6 @@ const std::string & SharedObjectTemplate::getSlotDescriptorFilename() const
|
||||
|
||||
const std::string & SharedObjectTemplate::getArrangementDescriptorFilename() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -653,8 +630,6 @@ const std::string & SharedObjectTemplate::getArrangementDescriptorFilename() con
|
||||
|
||||
const std::string & SharedObjectTemplate::getAppearanceFilename() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -682,8 +657,6 @@ const std::string & SharedObjectTemplate::getAppearanceFilename() const
|
||||
|
||||
const std::string & SharedObjectTemplate::getPortalLayoutFilename() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -711,8 +684,6 @@ const std::string & SharedObjectTemplate::getPortalLayoutFilename() const
|
||||
|
||||
const std::string & SharedObjectTemplate::getClientDataFile() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -740,8 +711,6 @@ const std::string & SharedObjectTemplate::getClientDataFile() const
|
||||
|
||||
float SharedObjectTemplate::getScale() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -791,8 +760,6 @@ float SharedObjectTemplate::getScale() const
|
||||
|
||||
float SharedObjectTemplate::getScaleMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -842,8 +809,6 @@ float SharedObjectTemplate::getScaleMin() const
|
||||
|
||||
float SharedObjectTemplate::getScaleMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -893,8 +858,6 @@ float SharedObjectTemplate::getScaleMax() const
|
||||
|
||||
SharedObjectTemplate::GameObjectType SharedObjectTemplate::getGameObjectType() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -922,8 +885,6 @@ SharedObjectTemplate::GameObjectType SharedObjectTemplate::getGameObjectType() c
|
||||
|
||||
bool SharedObjectTemplate::getSendToClient() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -951,8 +912,6 @@ bool SharedObjectTemplate::getSendToClient() const
|
||||
|
||||
float SharedObjectTemplate::getScaleThresholdBeforeExtentTest() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1002,8 +961,6 @@ float SharedObjectTemplate::getScaleThresholdBeforeExtentTest() const
|
||||
|
||||
float SharedObjectTemplate::getScaleThresholdBeforeExtentTestMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1053,8 +1010,6 @@ float SharedObjectTemplate::getScaleThresholdBeforeExtentTestMin() const
|
||||
|
||||
float SharedObjectTemplate::getScaleThresholdBeforeExtentTestMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1104,8 +1059,6 @@ float SharedObjectTemplate::getScaleThresholdBeforeExtentTestMax() const
|
||||
|
||||
float SharedObjectTemplate::getClearFloraRadius() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1155,8 +1108,6 @@ float SharedObjectTemplate::getClearFloraRadius() const
|
||||
|
||||
float SharedObjectTemplate::getClearFloraRadiusMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1206,8 +1157,6 @@ float SharedObjectTemplate::getClearFloraRadiusMin() const
|
||||
|
||||
float SharedObjectTemplate::getClearFloraRadiusMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1257,8 +1206,6 @@ float SharedObjectTemplate::getClearFloraRadiusMax() const
|
||||
|
||||
SharedObjectTemplate::SurfaceType SharedObjectTemplate::getSurfaceType() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1286,8 +1233,6 @@ SharedObjectTemplate::SurfaceType SharedObjectTemplate::getSurfaceType() const
|
||||
|
||||
float SharedObjectTemplate::getNoBuildRadius() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1337,8 +1282,6 @@ float SharedObjectTemplate::getNoBuildRadius() const
|
||||
|
||||
float SharedObjectTemplate::getNoBuildRadiusMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1388,8 +1331,6 @@ float SharedObjectTemplate::getNoBuildRadiusMin() const
|
||||
|
||||
float SharedObjectTemplate::getNoBuildRadiusMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1439,8 +1380,6 @@ float SharedObjectTemplate::getNoBuildRadiusMax() const
|
||||
|
||||
bool SharedObjectTemplate::getOnlyVisibleInTools() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1468,8 +1407,6 @@ bool SharedObjectTemplate::getOnlyVisibleInTools() const
|
||||
|
||||
float SharedObjectTemplate::getLocationReservationRadius() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1519,8 +1456,6 @@ float SharedObjectTemplate::getLocationReservationRadius() const
|
||||
|
||||
float SharedObjectTemplate::getLocationReservationRadiusMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1570,8 +1505,6 @@ float SharedObjectTemplate::getLocationReservationRadiusMin() const
|
||||
|
||||
float SharedObjectTemplate::getLocationReservationRadiusMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1621,8 +1554,6 @@ float SharedObjectTemplate::getLocationReservationRadiusMax() const
|
||||
|
||||
bool SharedObjectTemplate::getForceNoCollision() const
|
||||
{
|
||||
|
||||
|
||||
const SharedObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1648,7 +1579,6 @@ bool SharedObjectTemplate::getForceNoCollision() const
|
||||
return value;
|
||||
} // SharedObjectTemplate::getForceNoCollision
|
||||
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
* for this template.
|
||||
@@ -1657,8 +1587,8 @@ bool SharedObjectTemplate::getForceNoCollision() const
|
||||
*/
|
||||
void SharedObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedObjectTemplate_tag)
|
||||
{
|
||||
@@ -1667,7 +1597,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -1687,10 +1617,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,1,0))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 1, 0))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -1760,7 +1688,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
// PUBLIC STATIC SharedObjectTemplate
|
||||
//===================================================================
|
||||
|
||||
void SharedObjectTemplate::setCreateClientDataFunction (SharedObjectTemplate::CreateClientDataFunction createClientDataFunction)
|
||||
void SharedObjectTemplate::setCreateClientDataFunction(SharedObjectTemplate::CreateClientDataFunction createClientDataFunction)
|
||||
{
|
||||
ms_createClientDataFunction = createClientDataFunction;
|
||||
}
|
||||
@@ -1769,7 +1697,7 @@ void SharedObjectTemplate::setCreateClientDataFunction (SharedObjectTemplate::Cr
|
||||
// PUBLIC SharedObjectTemplate
|
||||
//===================================================================
|
||||
|
||||
const SharedObjectTemplateClientData* SharedObjectTemplate::getClientData () const
|
||||
const SharedObjectTemplateClientData* SharedObjectTemplate::getClientData() const
|
||||
{
|
||||
return m_clientData;
|
||||
}
|
||||
@@ -1780,4 +1708,4 @@ const SharedObjectTemplateClientData* SharedObjectTemplate::getClientData () con
|
||||
|
||||
SharedObjectTemplate::CreateClientDataFunction SharedObjectTemplate::ms_createClientDataFunction;
|
||||
|
||||
//===================================================================
|
||||
//===================================================================
|
||||
+11
-13
@@ -24,20 +24,20 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedPlayerObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedPlayerObjectTemplate::SharedPlayerObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedIntangibleObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedPlayerObjectTemplate::SharedPlayerObjectTemplate
|
||||
|
||||
@@ -46,8 +46,8 @@ SharedPlayerObjectTemplate::SharedPlayerObjectTemplate(const std::string & filen
|
||||
*/
|
||||
SharedPlayerObjectTemplate::~SharedPlayerObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedPlayerObjectTemplate::~SharedPlayerObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -113,8 +113,8 @@ Tag SharedPlayerObjectTemplate::getHighestTemplateVersion(void) const
|
||||
*/
|
||||
void SharedPlayerObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedPlayerObjectTemplate_tag)
|
||||
{
|
||||
@@ -124,7 +124,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -144,10 +144,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 0))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -165,4 +163,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedPlayerObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+11
-13
@@ -24,20 +24,20 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedPlayerQuestObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedPlayerQuestObjectTemplate::SharedPlayerQuestObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedTangibleObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedPlayerQuestObjectTemplate::SharedPlayerQuestObjectTemplate
|
||||
|
||||
@@ -46,8 +46,8 @@ SharedPlayerQuestObjectTemplate::SharedPlayerQuestObjectTemplate(const std::stri
|
||||
*/
|
||||
SharedPlayerQuestObjectTemplate::~SharedPlayerQuestObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedPlayerQuestObjectTemplate::~SharedPlayerQuestObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -113,8 +113,8 @@ Tag SharedPlayerQuestObjectTemplate::getHighestTemplateVersion(void) const
|
||||
*/
|
||||
void SharedPlayerQuestObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedPlayerQuestObjectTemplate_tag)
|
||||
{
|
||||
@@ -124,7 +124,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -144,10 +144,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 0))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -165,4 +163,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedPlayerQuestObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+11
-13
@@ -23,20 +23,20 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedResourceContainerObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedResourceContainerObjectTemplate::SharedResourceContainerObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedTangibleObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedResourceContainerObjectTemplate::SharedResourceContainerObjectTemplate
|
||||
|
||||
@@ -45,8 +45,8 @@ SharedResourceContainerObjectTemplate::SharedResourceContainerObjectTemplate(con
|
||||
*/
|
||||
SharedResourceContainerObjectTemplate::~SharedResourceContainerObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedResourceContainerObjectTemplate::~SharedResourceContainerObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -112,8 +112,8 @@ Tag SharedResourceContainerObjectTemplate::getHighestTemplateVersion(void) const
|
||||
*/
|
||||
void SharedResourceContainerObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedResourceContainerObjectTemplate_tag)
|
||||
{
|
||||
@@ -123,7 +123,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -143,10 +143,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 0))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -164,4 +162,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedResourceContainerObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+15
-27
@@ -13,7 +13,6 @@
|
||||
#include "sharedGame/FirstSharedGame.h"
|
||||
#include "sharedGame/SharedShipObjectTemplate.h"
|
||||
|
||||
|
||||
#include "sharedFile/Iff.h"
|
||||
#include "sharedGame/AssetCustomizationManager.h"
|
||||
#include "sharedMath/Vector.h"
|
||||
@@ -30,20 +29,20 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedShipObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedShipObjectTemplate::SharedShipObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedTangibleObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedShipObjectTemplate::SharedShipObjectTemplate
|
||||
|
||||
@@ -52,8 +51,8 @@ SharedShipObjectTemplate::SharedShipObjectTemplate(const std::string & filename)
|
||||
*/
|
||||
SharedShipObjectTemplate::~SharedShipObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedShipObjectTemplate::~SharedShipObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -129,16 +128,16 @@ void SharedShipObjectTemplate::createCustomizationDataPropertyAsNeeded(Object &o
|
||||
// variables since we are a creature. The SharedTangibleObjectTemplate version of
|
||||
// this function sets it to true.
|
||||
bool const skipSharedOwnerVariables = false;
|
||||
const std::string & appearanceFilename = getAppearanceFilename();
|
||||
if(!appearanceFilename.empty())
|
||||
{
|
||||
const std::string & appearanceFilename = getAppearanceFilename();
|
||||
if (!appearanceFilename.empty())
|
||||
{
|
||||
AssetCustomizationManager::addCustomizationVariablesForAsset(TemporaryCrcString(appearanceFilename.c_str(), true), *customizationData, skipSharedOwnerVariables);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Perhaps it's a POB ship, check the portalLayoutFilename
|
||||
const std::string & portalLayoutFilename = getPortalLayoutFilename();
|
||||
AssetCustomizationManager::addCustomizationVariablesForAsset(TemporaryCrcString(portalLayoutFilename.c_str(), true), *customizationData, skipSharedOwnerVariables);
|
||||
AssetCustomizationManager::addCustomizationVariablesForAsset(TemporaryCrcString(portalLayoutFilename.c_str(), true), *customizationData, skipSharedOwnerVariables);
|
||||
}
|
||||
|
||||
//-- release local reference to the CustomizationData instance
|
||||
@@ -149,8 +148,6 @@ void SharedShipObjectTemplate::createCustomizationDataPropertyAsNeeded(Object &o
|
||||
//@BEGIN TFD
|
||||
const std::string & SharedShipObjectTemplate::getCockpitFilename() const
|
||||
{
|
||||
|
||||
|
||||
const SharedShipObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -178,8 +175,6 @@ const std::string & SharedShipObjectTemplate::getCockpitFilename() const
|
||||
|
||||
bool SharedShipObjectTemplate::getHasWings() const
|
||||
{
|
||||
|
||||
|
||||
const SharedShipObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -207,8 +202,6 @@ bool SharedShipObjectTemplate::getHasWings() const
|
||||
|
||||
bool SharedShipObjectTemplate::getPlayerControlled() const
|
||||
{
|
||||
|
||||
|
||||
const SharedShipObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -236,8 +229,6 @@ bool SharedShipObjectTemplate::getPlayerControlled() const
|
||||
|
||||
const std::string & SharedShipObjectTemplate::getInteriorLayoutFileName() const
|
||||
{
|
||||
|
||||
|
||||
const SharedShipObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -263,7 +254,6 @@ const std::string & SharedShipObjectTemplate::getInteriorLayoutFileName() const
|
||||
return value;
|
||||
} // SharedShipObjectTemplate::getInteriorLayoutFileName
|
||||
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
* for this template.
|
||||
@@ -272,8 +262,8 @@ const std::string & SharedShipObjectTemplate::getInteriorLayoutFileName() const
|
||||
*/
|
||||
void SharedShipObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedShipObjectTemplate_tag)
|
||||
{
|
||||
@@ -283,7 +273,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -303,10 +293,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,4))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 4))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -336,4 +324,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedShipObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+11
-13
@@ -23,20 +23,20 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedStaticObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedStaticObjectTemplate::SharedStaticObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedStaticObjectTemplate::SharedStaticObjectTemplate
|
||||
|
||||
@@ -45,8 +45,8 @@ SharedStaticObjectTemplate::SharedStaticObjectTemplate(const std::string & filen
|
||||
*/
|
||||
SharedStaticObjectTemplate::~SharedStaticObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedStaticObjectTemplate::~SharedStaticObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -112,8 +112,8 @@ Tag SharedStaticObjectTemplate::getHighestTemplateVersion(void) const
|
||||
*/
|
||||
void SharedStaticObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedStaticObjectTemplate_tag)
|
||||
{
|
||||
@@ -123,7 +123,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -143,10 +143,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 0))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -164,4 +162,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedStaticObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+99
-158
@@ -32,33 +32,33 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedTangibleObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedTangibleObjectTemplate::SharedTangibleObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedObjectTemplate(filename)
|
||||
,m_paletteColorCustomizationVariablesLoaded(false)
|
||||
,m_paletteColorCustomizationVariablesAppend(false)
|
||||
,m_rangedIntCustomizationVariablesLoaded(false)
|
||||
,m_rangedIntCustomizationVariablesAppend(false)
|
||||
,m_constStringCustomizationVariablesLoaded(false)
|
||||
,m_constStringCustomizationVariablesAppend(false)
|
||||
,m_socketDestinationsLoaded(false)
|
||||
,m_socketDestinationsAppend(false)
|
||||
,m_certificationsRequiredLoaded(false)
|
||||
,m_certificationsRequiredAppend(false)
|
||||
,m_customizationVariableMappingLoaded(false)
|
||||
,m_customizationVariableMappingAppend(false)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
,m_structureFootprint (0)
|
||||
, m_paletteColorCustomizationVariablesLoaded(false)
|
||||
, m_paletteColorCustomizationVariablesAppend(false)
|
||||
, m_rangedIntCustomizationVariablesLoaded(false)
|
||||
, m_rangedIntCustomizationVariablesAppend(false)
|
||||
, m_constStringCustomizationVariablesLoaded(false)
|
||||
, m_constStringCustomizationVariablesAppend(false)
|
||||
, m_socketDestinationsLoaded(false)
|
||||
, m_socketDestinationsAppend(false)
|
||||
, m_certificationsRequiredLoaded(false)
|
||||
, m_certificationsRequiredAppend(false)
|
||||
, m_customizationVariableMappingLoaded(false)
|
||||
, m_customizationVariableMappingAppend(false)
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
, m_structureFootprint(0)
|
||||
{
|
||||
} // SharedTangibleObjectTemplate::SharedTangibleObjectTemplate
|
||||
|
||||
@@ -67,7 +67,7 @@ SharedTangibleObjectTemplate::SharedTangibleObjectTemplate(const std::string & f
|
||||
*/
|
||||
SharedTangibleObjectTemplate::~SharedTangibleObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
{
|
||||
std::vector<StructParamOT *>::iterator iter;
|
||||
for (iter = m_paletteColorCustomizationVariables.begin(); iter != m_paletteColorCustomizationVariables.end(); ++iter)
|
||||
@@ -122,8 +122,8 @@ SharedTangibleObjectTemplate::~SharedTangibleObjectTemplate()
|
||||
}
|
||||
m_customizationVariableMapping.clear();
|
||||
}
|
||||
//@END TFD CLEANUP
|
||||
|
||||
//@END TFD CLEANUP
|
||||
|
||||
if (m_structureFootprint)
|
||||
{
|
||||
delete m_structureFootprint;
|
||||
@@ -189,13 +189,13 @@ Tag SharedTangibleObjectTemplate::getHighestTemplateVersion(void) const
|
||||
*/
|
||||
void SharedTangibleObjectTemplate::postLoad()
|
||||
{
|
||||
SharedObjectTemplate::postLoad ();
|
||||
SharedObjectTemplate::postLoad();
|
||||
|
||||
//-- load the structure footprint
|
||||
if (getStructureFootprintFileName ().length () != 0)
|
||||
if (getStructureFootprintFileName().length() != 0)
|
||||
{
|
||||
m_structureFootprint = new StructureFootprint ();
|
||||
m_structureFootprint->load (getStructureFootprintFileName ().c_str ());
|
||||
m_structureFootprint = new StructureFootprint();
|
||||
m_structureFootprint->load(getStructureFootprintFileName().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ void SharedTangibleObjectTemplate::postLoad()
|
||||
*
|
||||
* @return the structure footprint
|
||||
*/
|
||||
const StructureFootprint* SharedTangibleObjectTemplate::getStructureFootprint () const
|
||||
const StructureFootprint* SharedTangibleObjectTemplate::getStructureFootprint() const
|
||||
{
|
||||
return m_structureFootprint;
|
||||
}
|
||||
@@ -236,7 +236,7 @@ const StructureFootprint* SharedTangibleObjectTemplate::getStructureFootprint ()
|
||||
*/
|
||||
void SharedTangibleObjectTemplate::createCustomizationDataPropertyAsNeeded(Object &object, bool /* forceCreation */) const
|
||||
{
|
||||
//-- Properties cannot be added while an object is in the world. Some callers may be in the world,
|
||||
//-- Properties cannot be added while an object is in the world. Some callers may be in the world,
|
||||
// so temporarily remove the object from the world if necessary.
|
||||
bool shouldBeInWorld = object.isInWorld();
|
||||
if (shouldBeInWorld)
|
||||
@@ -260,8 +260,6 @@ void SharedTangibleObjectTemplate::createCustomizationDataPropertyAsNeeded(Objec
|
||||
bool const skipSharedOwnerVariables = true;
|
||||
AssetCustomizationManager::addCustomizationVariablesForAsset(TemporaryCrcString(getAppearanceFilename().c_str(), true), *customizationData, skipSharedOwnerVariables);
|
||||
|
||||
|
||||
|
||||
//-- release local reference to the CustomizationData instance
|
||||
customizationData->release();
|
||||
}
|
||||
@@ -281,7 +279,7 @@ void SharedTangibleObjectTemplate::getPaletteColorCustomizationVariables(Palette
|
||||
if (ms_allowDefaultTemplateParams && /*!m_versionOk &&*/ base == nullptr)
|
||||
{
|
||||
DEBUG_WARNING(true, ("Returning default value for missing parameter paletteColorCustomizationVariables in template %s", DataResource::getName()));
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -295,10 +293,10 @@ void SharedTangibleObjectTemplate::getPaletteColorCustomizationVariables(Palette
|
||||
{
|
||||
int baseCount = base->getPaletteColorCustomizationVariablesCount();
|
||||
if (index < baseCount)
|
||||
{
|
||||
base->getPaletteColorCustomizationVariables(data, index);
|
||||
return;
|
||||
}
|
||||
{
|
||||
base->getPaletteColorCustomizationVariables(data, index);
|
||||
return;
|
||||
}
|
||||
index -= baseCount;
|
||||
}
|
||||
|
||||
@@ -325,7 +323,7 @@ void SharedTangibleObjectTemplate::getPaletteColorCustomizationVariablesMin(Pale
|
||||
if (ms_allowDefaultTemplateParams && /*!m_versionOk &&*/ base == nullptr)
|
||||
{
|
||||
DEBUG_WARNING(true, ("Returning default value for missing parameter paletteColorCustomizationVariables in template %s", DataResource::getName()));
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -339,10 +337,10 @@ void SharedTangibleObjectTemplate::getPaletteColorCustomizationVariablesMin(Pale
|
||||
{
|
||||
int baseCount = base->getPaletteColorCustomizationVariablesCount();
|
||||
if (index < baseCount)
|
||||
{
|
||||
base->getPaletteColorCustomizationVariablesMin(data, index);
|
||||
return;
|
||||
}
|
||||
{
|
||||
base->getPaletteColorCustomizationVariablesMin(data, index);
|
||||
return;
|
||||
}
|
||||
index -= baseCount;
|
||||
}
|
||||
|
||||
@@ -369,7 +367,7 @@ void SharedTangibleObjectTemplate::getPaletteColorCustomizationVariablesMax(Pale
|
||||
if (ms_allowDefaultTemplateParams && /*!m_versionOk &&*/ base == nullptr)
|
||||
{
|
||||
DEBUG_WARNING(true, ("Returning default value for missing parameter paletteColorCustomizationVariables in template %s", DataResource::getName()));
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -383,10 +381,10 @@ void SharedTangibleObjectTemplate::getPaletteColorCustomizationVariablesMax(Pale
|
||||
{
|
||||
int baseCount = base->getPaletteColorCustomizationVariablesCount();
|
||||
if (index < baseCount)
|
||||
{
|
||||
base->getPaletteColorCustomizationVariablesMax(data, index);
|
||||
return;
|
||||
}
|
||||
{
|
||||
base->getPaletteColorCustomizationVariablesMax(data, index);
|
||||
return;
|
||||
}
|
||||
index -= baseCount;
|
||||
}
|
||||
|
||||
@@ -437,7 +435,7 @@ void SharedTangibleObjectTemplate::getRangedIntCustomizationVariables(RangedIntC
|
||||
if (ms_allowDefaultTemplateParams && /*!m_versionOk &&*/ base == nullptr)
|
||||
{
|
||||
DEBUG_WARNING(true, ("Returning default value for missing parameter rangedIntCustomizationVariables in template %s", DataResource::getName()));
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -451,10 +449,10 @@ void SharedTangibleObjectTemplate::getRangedIntCustomizationVariables(RangedIntC
|
||||
{
|
||||
int baseCount = base->getRangedIntCustomizationVariablesCount();
|
||||
if (index < baseCount)
|
||||
{
|
||||
base->getRangedIntCustomizationVariables(data, index);
|
||||
return;
|
||||
}
|
||||
{
|
||||
base->getRangedIntCustomizationVariables(data, index);
|
||||
return;
|
||||
}
|
||||
index -= baseCount;
|
||||
}
|
||||
|
||||
@@ -482,7 +480,7 @@ void SharedTangibleObjectTemplate::getRangedIntCustomizationVariablesMin(RangedI
|
||||
if (ms_allowDefaultTemplateParams && /*!m_versionOk &&*/ base == nullptr)
|
||||
{
|
||||
DEBUG_WARNING(true, ("Returning default value for missing parameter rangedIntCustomizationVariables in template %s", DataResource::getName()));
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -496,10 +494,10 @@ void SharedTangibleObjectTemplate::getRangedIntCustomizationVariablesMin(RangedI
|
||||
{
|
||||
int baseCount = base->getRangedIntCustomizationVariablesCount();
|
||||
if (index < baseCount)
|
||||
{
|
||||
base->getRangedIntCustomizationVariablesMin(data, index);
|
||||
return;
|
||||
}
|
||||
{
|
||||
base->getRangedIntCustomizationVariablesMin(data, index);
|
||||
return;
|
||||
}
|
||||
index -= baseCount;
|
||||
}
|
||||
|
||||
@@ -527,7 +525,7 @@ void SharedTangibleObjectTemplate::getRangedIntCustomizationVariablesMax(RangedI
|
||||
if (ms_allowDefaultTemplateParams && /*!m_versionOk &&*/ base == nullptr)
|
||||
{
|
||||
DEBUG_WARNING(true, ("Returning default value for missing parameter rangedIntCustomizationVariables in template %s", DataResource::getName()));
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -541,10 +539,10 @@ void SharedTangibleObjectTemplate::getRangedIntCustomizationVariablesMax(RangedI
|
||||
{
|
||||
int baseCount = base->getRangedIntCustomizationVariablesCount();
|
||||
if (index < baseCount)
|
||||
{
|
||||
base->getRangedIntCustomizationVariablesMax(data, index);
|
||||
return;
|
||||
}
|
||||
{
|
||||
base->getRangedIntCustomizationVariablesMax(data, index);
|
||||
return;
|
||||
}
|
||||
index -= baseCount;
|
||||
}
|
||||
|
||||
@@ -596,7 +594,7 @@ void SharedTangibleObjectTemplate::getConstStringCustomizationVariables(ConstStr
|
||||
if (ms_allowDefaultTemplateParams && /*!m_versionOk &&*/ base == nullptr)
|
||||
{
|
||||
DEBUG_WARNING(true, ("Returning default value for missing parameter constStringCustomizationVariables in template %s", DataResource::getName()));
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -610,10 +608,10 @@ void SharedTangibleObjectTemplate::getConstStringCustomizationVariables(ConstStr
|
||||
{
|
||||
int baseCount = base->getConstStringCustomizationVariablesCount();
|
||||
if (index < baseCount)
|
||||
{
|
||||
base->getConstStringCustomizationVariables(data, index);
|
||||
return;
|
||||
}
|
||||
{
|
||||
base->getConstStringCustomizationVariables(data, index);
|
||||
return;
|
||||
}
|
||||
index -= baseCount;
|
||||
}
|
||||
|
||||
@@ -639,7 +637,7 @@ void SharedTangibleObjectTemplate::getConstStringCustomizationVariablesMin(Const
|
||||
if (ms_allowDefaultTemplateParams && /*!m_versionOk &&*/ base == nullptr)
|
||||
{
|
||||
DEBUG_WARNING(true, ("Returning default value for missing parameter constStringCustomizationVariables in template %s", DataResource::getName()));
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -653,10 +651,10 @@ void SharedTangibleObjectTemplate::getConstStringCustomizationVariablesMin(Const
|
||||
{
|
||||
int baseCount = base->getConstStringCustomizationVariablesCount();
|
||||
if (index < baseCount)
|
||||
{
|
||||
base->getConstStringCustomizationVariablesMin(data, index);
|
||||
return;
|
||||
}
|
||||
{
|
||||
base->getConstStringCustomizationVariablesMin(data, index);
|
||||
return;
|
||||
}
|
||||
index -= baseCount;
|
||||
}
|
||||
|
||||
@@ -682,7 +680,7 @@ void SharedTangibleObjectTemplate::getConstStringCustomizationVariablesMax(Const
|
||||
if (ms_allowDefaultTemplateParams && /*!m_versionOk &&*/ base == nullptr)
|
||||
{
|
||||
DEBUG_WARNING(true, ("Returning default value for missing parameter constStringCustomizationVariables in template %s", DataResource::getName()));
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -696,10 +694,10 @@ void SharedTangibleObjectTemplate::getConstStringCustomizationVariablesMax(Const
|
||||
{
|
||||
int baseCount = base->getConstStringCustomizationVariablesCount();
|
||||
if (index < baseCount)
|
||||
{
|
||||
base->getConstStringCustomizationVariablesMax(data, index);
|
||||
return;
|
||||
}
|
||||
{
|
||||
base->getConstStringCustomizationVariablesMax(data, index);
|
||||
return;
|
||||
}
|
||||
index -= baseCount;
|
||||
}
|
||||
|
||||
@@ -796,8 +794,6 @@ size_t SharedTangibleObjectTemplate::getSocketDestinationsCount(void) const
|
||||
|
||||
const std::string & SharedTangibleObjectTemplate::getStructureFootprintFileName() const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -825,8 +821,6 @@ const std::string & SharedTangibleObjectTemplate::getStructureFootprintFileName(
|
||||
|
||||
bool SharedTangibleObjectTemplate::getUseStructureFootprintOutline() const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -854,8 +848,6 @@ bool SharedTangibleObjectTemplate::getUseStructureFootprintOutline() const
|
||||
|
||||
bool SharedTangibleObjectTemplate::getTargetable() const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -953,7 +945,7 @@ void SharedTangibleObjectTemplate::getCustomizationVariableMapping(Customization
|
||||
if (ms_allowDefaultTemplateParams && /*!m_versionOk &&*/ base == nullptr)
|
||||
{
|
||||
DEBUG_WARNING(true, ("Returning default value for missing parameter customizationVariableMapping in template %s", DataResource::getName()));
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -967,10 +959,10 @@ void SharedTangibleObjectTemplate::getCustomizationVariableMapping(Customization
|
||||
{
|
||||
int baseCount = base->getCustomizationVariableMappingCount();
|
||||
if (index < baseCount)
|
||||
{
|
||||
base->getCustomizationVariableMapping(data, index);
|
||||
return;
|
||||
}
|
||||
{
|
||||
base->getCustomizationVariableMapping(data, index);
|
||||
return;
|
||||
}
|
||||
index -= baseCount;
|
||||
}
|
||||
|
||||
@@ -996,7 +988,7 @@ void SharedTangibleObjectTemplate::getCustomizationVariableMappingMin(Customizat
|
||||
if (ms_allowDefaultTemplateParams && /*!m_versionOk &&*/ base == nullptr)
|
||||
{
|
||||
DEBUG_WARNING(true, ("Returning default value for missing parameter customizationVariableMapping in template %s", DataResource::getName()));
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1010,10 +1002,10 @@ void SharedTangibleObjectTemplate::getCustomizationVariableMappingMin(Customizat
|
||||
{
|
||||
int baseCount = base->getCustomizationVariableMappingCount();
|
||||
if (index < baseCount)
|
||||
{
|
||||
base->getCustomizationVariableMappingMin(data, index);
|
||||
return;
|
||||
}
|
||||
{
|
||||
base->getCustomizationVariableMappingMin(data, index);
|
||||
return;
|
||||
}
|
||||
index -= baseCount;
|
||||
}
|
||||
|
||||
@@ -1039,7 +1031,7 @@ void SharedTangibleObjectTemplate::getCustomizationVariableMappingMax(Customizat
|
||||
if (ms_allowDefaultTemplateParams && /*!m_versionOk &&*/ base == nullptr)
|
||||
{
|
||||
DEBUG_WARNING(true, ("Returning default value for missing parameter customizationVariableMapping in template %s", DataResource::getName()));
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1053,10 +1045,10 @@ void SharedTangibleObjectTemplate::getCustomizationVariableMappingMax(Customizat
|
||||
{
|
||||
int baseCount = base->getCustomizationVariableMappingCount();
|
||||
if (index < baseCount)
|
||||
{
|
||||
base->getCustomizationVariableMappingMax(data, index);
|
||||
return;
|
||||
}
|
||||
{
|
||||
base->getCustomizationVariableMappingMax(data, index);
|
||||
return;
|
||||
}
|
||||
index -= baseCount;
|
||||
}
|
||||
|
||||
@@ -1095,8 +1087,6 @@ size_t SharedTangibleObjectTemplate::getCustomizationVariableMappingCount(void)
|
||||
|
||||
SharedTangibleObjectTemplate::ClientVisabilityFlags SharedTangibleObjectTemplate::getClientVisabilityFlag() const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1122,7 +1112,6 @@ SharedTangibleObjectTemplate::ClientVisabilityFlags SharedTangibleObjectTemplate
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::getClientVisabilityFlag
|
||||
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
* for this template.
|
||||
@@ -1131,8 +1120,8 @@ SharedTangibleObjectTemplate::ClientVisabilityFlags SharedTangibleObjectTemplate
|
||||
*/
|
||||
void SharedTangibleObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedTangibleObjectTemplate_tag)
|
||||
{
|
||||
@@ -1142,7 +1131,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -1162,10 +1151,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,1,0))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 1, 0))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -1309,7 +1296,6 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedTangibleObjectTemplate::load
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// class SharedTangibleObjectTemplate::_ConstStringCustomizationVariable
|
||||
|
||||
@@ -1358,8 +1344,6 @@ Tag SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::getId(void)
|
||||
|
||||
const std::string & SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::getVariableName(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_ConstStringCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1387,8 +1371,6 @@ const std::string & SharedTangibleObjectTemplate::_ConstStringCustomizationVaria
|
||||
|
||||
const std::string & SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::getConstValue(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_ConstStringCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1414,7 +1396,6 @@ const std::string & SharedTangibleObjectTemplate::_ConstStringCustomizationVaria
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::getConstValue
|
||||
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
* for this template.
|
||||
@@ -1423,8 +1404,8 @@ const std::string & SharedTangibleObjectTemplate::_ConstStringCustomizationVaria
|
||||
*/
|
||||
void SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
|
||||
@@ -1446,7 +1427,6 @@ char paramName[MAX_NAME_SIZE];
|
||||
UNREF(file);
|
||||
} // SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::load
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// class SharedTangibleObjectTemplate::_CustomizationVariableMapping
|
||||
|
||||
@@ -1495,8 +1475,6 @@ Tag SharedTangibleObjectTemplate::_CustomizationVariableMapping::getId(void) con
|
||||
|
||||
const std::string & SharedTangibleObjectTemplate::_CustomizationVariableMapping::getSourceVariable(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_CustomizationVariableMapping * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1524,8 +1502,6 @@ const std::string & SharedTangibleObjectTemplate::_CustomizationVariableMapping:
|
||||
|
||||
const std::string & SharedTangibleObjectTemplate::_CustomizationVariableMapping::getDependentVariable(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_CustomizationVariableMapping * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1551,7 +1527,6 @@ const std::string & SharedTangibleObjectTemplate::_CustomizationVariableMapping:
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_CustomizationVariableMapping::getDependentVariable
|
||||
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
* for this template.
|
||||
@@ -1560,8 +1535,8 @@ const std::string & SharedTangibleObjectTemplate::_CustomizationVariableMapping:
|
||||
*/
|
||||
void SharedTangibleObjectTemplate::_CustomizationVariableMapping::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
|
||||
@@ -1583,7 +1558,6 @@ char paramName[MAX_NAME_SIZE];
|
||||
UNREF(file);
|
||||
} // SharedTangibleObjectTemplate::_CustomizationVariableMapping::load
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// class SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable
|
||||
|
||||
@@ -1632,8 +1606,6 @@ Tag SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getId(void
|
||||
|
||||
const std::string & SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getVariableName(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1661,8 +1633,6 @@ const std::string & SharedTangibleObjectTemplate::_PaletteColorCustomizationVari
|
||||
|
||||
const std::string & SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getPalettePathName(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1690,8 +1660,6 @@ const std::string & SharedTangibleObjectTemplate::_PaletteColorCustomizationVari
|
||||
|
||||
int SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getDefaultPaletteIndex(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1741,8 +1709,6 @@ int SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getDefault
|
||||
|
||||
int SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getDefaultPaletteIndexMin(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1792,8 +1758,6 @@ int SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getDefault
|
||||
|
||||
int SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getDefaultPaletteIndexMax(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1841,7 +1805,6 @@ int SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getDefault
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getDefaultPaletteIndexMax
|
||||
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
* for this template.
|
||||
@@ -1850,8 +1813,8 @@ int SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getDefault
|
||||
*/
|
||||
void SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
|
||||
@@ -1875,7 +1838,6 @@ char paramName[MAX_NAME_SIZE];
|
||||
UNREF(file);
|
||||
} // SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::load
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// class SharedTangibleObjectTemplate::_RangedIntCustomizationVariable
|
||||
|
||||
@@ -1924,8 +1886,6 @@ Tag SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getId(void) c
|
||||
|
||||
const std::string & SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getVariableName(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1953,8 +1913,6 @@ const std::string & SharedTangibleObjectTemplate::_RangedIntCustomizationVariabl
|
||||
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMinValueInclusive(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -2004,8 +1962,6 @@ int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMinValueIn
|
||||
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMinValueInclusiveMin(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -2055,8 +2011,6 @@ int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMinValueIn
|
||||
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMinValueInclusiveMax(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -2106,8 +2060,6 @@ int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMinValueIn
|
||||
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getDefaultValue(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -2157,8 +2109,6 @@ int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getDefaultVal
|
||||
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getDefaultValueMin(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -2208,8 +2158,6 @@ int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getDefaultVal
|
||||
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getDefaultValueMax(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -2259,8 +2207,6 @@ int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getDefaultVal
|
||||
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMaxValueExclusive(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -2310,8 +2256,6 @@ int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMaxValueEx
|
||||
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMaxValueExclusiveMin(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -2361,8 +2305,6 @@ int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMaxValueEx
|
||||
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMaxValueExclusiveMax(bool versionOk) const
|
||||
{
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -2410,7 +2352,6 @@ int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMaxValueEx
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMaxValueExclusiveMax
|
||||
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
* for this template.
|
||||
@@ -2419,8 +2360,8 @@ int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMaxValueEx
|
||||
*/
|
||||
void SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
|
||||
@@ -2446,4 +2387,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
UNREF(file);
|
||||
} // SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+11
-22
@@ -23,20 +23,20 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedTerrainSurfaceObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedTerrainSurfaceObjectTemplate::SharedTerrainSurfaceObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: ObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedTerrainSurfaceObjectTemplate::SharedTerrainSurfaceObjectTemplate
|
||||
|
||||
@@ -45,8 +45,8 @@ SharedTerrainSurfaceObjectTemplate::SharedTerrainSurfaceObjectTemplate(const std
|
||||
*/
|
||||
SharedTerrainSurfaceObjectTemplate::~SharedTerrainSurfaceObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedTerrainSurfaceObjectTemplate::~SharedTerrainSurfaceObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -105,8 +105,6 @@ Tag SharedTerrainSurfaceObjectTemplate::getHighestTemplateVersion(void) const
|
||||
//@BEGIN TFD
|
||||
float SharedTerrainSurfaceObjectTemplate::getCover() const
|
||||
{
|
||||
|
||||
|
||||
const SharedTerrainSurfaceObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -156,8 +154,6 @@ float SharedTerrainSurfaceObjectTemplate::getCover() const
|
||||
|
||||
float SharedTerrainSurfaceObjectTemplate::getCoverMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedTerrainSurfaceObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -207,8 +203,6 @@ float SharedTerrainSurfaceObjectTemplate::getCoverMin() const
|
||||
|
||||
float SharedTerrainSurfaceObjectTemplate::getCoverMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedTerrainSurfaceObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -258,8 +252,6 @@ float SharedTerrainSurfaceObjectTemplate::getCoverMax() const
|
||||
|
||||
const std::string & SharedTerrainSurfaceObjectTemplate::getSurfaceType() const
|
||||
{
|
||||
|
||||
|
||||
const SharedTerrainSurfaceObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -285,7 +277,6 @@ const std::string & SharedTerrainSurfaceObjectTemplate::getSurfaceType() const
|
||||
return value;
|
||||
} // SharedTerrainSurfaceObjectTemplate::getSurfaceType
|
||||
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
* for this template.
|
||||
@@ -294,8 +285,8 @@ const std::string & SharedTerrainSurfaceObjectTemplate::getSurfaceType() const
|
||||
*/
|
||||
void SharedTerrainSurfaceObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedTerrainSurfaceObjectTemplate_tag)
|
||||
{
|
||||
@@ -304,7 +295,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -324,10 +315,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 0))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -351,4 +340,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedTerrainSurfaceObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+11
-13
@@ -24,20 +24,20 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedUniverseObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedUniverseObjectTemplate::SharedUniverseObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedUniverseObjectTemplate::SharedUniverseObjectTemplate
|
||||
|
||||
@@ -46,8 +46,8 @@ SharedUniverseObjectTemplate::SharedUniverseObjectTemplate(const std::string & f
|
||||
*/
|
||||
SharedUniverseObjectTemplate::~SharedUniverseObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedUniverseObjectTemplate::~SharedUniverseObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -113,8 +113,8 @@ Tag SharedUniverseObjectTemplate::getHighestTemplateVersion(void) const
|
||||
*/
|
||||
void SharedUniverseObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedUniverseObjectTemplate_tag)
|
||||
{
|
||||
@@ -124,7 +124,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -144,10 +144,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 0))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -165,4 +163,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedUniverseObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+11
-50
@@ -23,20 +23,20 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedVehicleObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedVehicleObjectTemplate::SharedVehicleObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedTangibleObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedVehicleObjectTemplate::SharedVehicleObjectTemplate
|
||||
|
||||
@@ -45,8 +45,8 @@ SharedVehicleObjectTemplate::SharedVehicleObjectTemplate(const std::string & fil
|
||||
*/
|
||||
SharedVehicleObjectTemplate::~SharedVehicleObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedVehicleObjectTemplate::~SharedVehicleObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -252,8 +252,6 @@ float SharedVehicleObjectTemplate::getSpeedMax(MovementTypes index) const
|
||||
|
||||
float SharedVehicleObjectTemplate::getSlopeAversion() const
|
||||
{
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -303,8 +301,6 @@ float SharedVehicleObjectTemplate::getSlopeAversion() const
|
||||
|
||||
float SharedVehicleObjectTemplate::getSlopeAversionMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -354,8 +350,6 @@ float SharedVehicleObjectTemplate::getSlopeAversionMin() const
|
||||
|
||||
float SharedVehicleObjectTemplate::getSlopeAversionMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -405,8 +399,6 @@ float SharedVehicleObjectTemplate::getSlopeAversionMax() const
|
||||
|
||||
float SharedVehicleObjectTemplate::getHoverValue() const
|
||||
{
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -456,8 +448,6 @@ float SharedVehicleObjectTemplate::getHoverValue() const
|
||||
|
||||
float SharedVehicleObjectTemplate::getHoverValueMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -507,8 +497,6 @@ float SharedVehicleObjectTemplate::getHoverValueMin() const
|
||||
|
||||
float SharedVehicleObjectTemplate::getHoverValueMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -558,8 +546,6 @@ float SharedVehicleObjectTemplate::getHoverValueMax() const
|
||||
|
||||
float SharedVehicleObjectTemplate::getTurnRate() const
|
||||
{
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -609,8 +595,6 @@ float SharedVehicleObjectTemplate::getTurnRate() const
|
||||
|
||||
float SharedVehicleObjectTemplate::getTurnRateMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -660,8 +644,6 @@ float SharedVehicleObjectTemplate::getTurnRateMin() const
|
||||
|
||||
float SharedVehicleObjectTemplate::getTurnRateMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -711,8 +693,6 @@ float SharedVehicleObjectTemplate::getTurnRateMax() const
|
||||
|
||||
float SharedVehicleObjectTemplate::getMaxVelocity() const
|
||||
{
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -762,8 +742,6 @@ float SharedVehicleObjectTemplate::getMaxVelocity() const
|
||||
|
||||
float SharedVehicleObjectTemplate::getMaxVelocityMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -813,8 +791,6 @@ float SharedVehicleObjectTemplate::getMaxVelocityMin() const
|
||||
|
||||
float SharedVehicleObjectTemplate::getMaxVelocityMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -864,8 +840,6 @@ float SharedVehicleObjectTemplate::getMaxVelocityMax() const
|
||||
|
||||
float SharedVehicleObjectTemplate::getAcceleration() const
|
||||
{
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -915,8 +889,6 @@ float SharedVehicleObjectTemplate::getAcceleration() const
|
||||
|
||||
float SharedVehicleObjectTemplate::getAccelerationMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -966,8 +938,6 @@ float SharedVehicleObjectTemplate::getAccelerationMin() const
|
||||
|
||||
float SharedVehicleObjectTemplate::getAccelerationMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1017,8 +987,6 @@ float SharedVehicleObjectTemplate::getAccelerationMax() const
|
||||
|
||||
float SharedVehicleObjectTemplate::getBraking() const
|
||||
{
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1068,8 +1036,6 @@ float SharedVehicleObjectTemplate::getBraking() const
|
||||
|
||||
float SharedVehicleObjectTemplate::getBrakingMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1119,8 +1085,6 @@ float SharedVehicleObjectTemplate::getBrakingMin() const
|
||||
|
||||
float SharedVehicleObjectTemplate::getBrakingMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -1168,7 +1132,6 @@ float SharedVehicleObjectTemplate::getBrakingMax() const
|
||||
return value;
|
||||
} // SharedVehicleObjectTemplate::getBrakingMax
|
||||
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
* for this template.
|
||||
@@ -1177,8 +1140,8 @@ float SharedVehicleObjectTemplate::getBrakingMax() const
|
||||
*/
|
||||
void SharedVehicleObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedVehicleObjectTemplate_tag)
|
||||
{
|
||||
@@ -1188,7 +1151,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -1208,10 +1171,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 0))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -1259,4 +1220,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedVehicleObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+11
-13
@@ -23,20 +23,20 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedWaypointObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedWaypointObjectTemplate::SharedWaypointObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedIntangibleObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedWaypointObjectTemplate::SharedWaypointObjectTemplate
|
||||
|
||||
@@ -45,8 +45,8 @@ SharedWaypointObjectTemplate::SharedWaypointObjectTemplate(const std::string & f
|
||||
*/
|
||||
SharedWaypointObjectTemplate::~SharedWaypointObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedWaypointObjectTemplate::~SharedWaypointObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -112,8 +112,8 @@ Tag SharedWaypointObjectTemplate::getHighestTemplateVersion(void) const
|
||||
*/
|
||||
void SharedWaypointObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedWaypointObjectTemplate_tag)
|
||||
{
|
||||
@@ -123,7 +123,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -143,10 +143,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 0))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -164,4 +162,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedWaypointObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+11
-24
@@ -23,20 +23,20 @@
|
||||
|
||||
const std::string DefaultString("");
|
||||
const StringId DefaultStringId("", 0);
|
||||
const Vector DefaultVector(0,0,0);
|
||||
const Vector DefaultVector(0, 0, 0);
|
||||
const TriggerVolumeData DefaultTriggerVolumeData;
|
||||
|
||||
bool SharedWeaponObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
SharedWeaponObjectTemplate::SharedWeaponObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: SharedTangibleObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedWeaponObjectTemplate::SharedWeaponObjectTemplate
|
||||
|
||||
@@ -45,8 +45,8 @@ SharedWeaponObjectTemplate::SharedWeaponObjectTemplate(const std::string & filen
|
||||
*/
|
||||
SharedWeaponObjectTemplate::~SharedWeaponObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedWeaponObjectTemplate::~SharedWeaponObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -105,8 +105,6 @@ Tag SharedWeaponObjectTemplate::getHighestTemplateVersion(void) const
|
||||
//@BEGIN TFD
|
||||
const std::string & SharedWeaponObjectTemplate::getWeaponEffect() const
|
||||
{
|
||||
|
||||
|
||||
const SharedWeaponObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -134,8 +132,6 @@ const std::string & SharedWeaponObjectTemplate::getWeaponEffect() const
|
||||
|
||||
int SharedWeaponObjectTemplate::getWeaponEffectIndex() const
|
||||
{
|
||||
|
||||
|
||||
const SharedWeaponObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -185,8 +181,6 @@ int SharedWeaponObjectTemplate::getWeaponEffectIndex() const
|
||||
|
||||
int SharedWeaponObjectTemplate::getWeaponEffectIndexMin() const
|
||||
{
|
||||
|
||||
|
||||
const SharedWeaponObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -236,8 +230,6 @@ int SharedWeaponObjectTemplate::getWeaponEffectIndexMin() const
|
||||
|
||||
int SharedWeaponObjectTemplate::getWeaponEffectIndexMax() const
|
||||
{
|
||||
|
||||
|
||||
const SharedWeaponObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -287,8 +279,6 @@ int SharedWeaponObjectTemplate::getWeaponEffectIndexMax() const
|
||||
|
||||
SharedWeaponObjectTemplate::AttackType SharedWeaponObjectTemplate::getAttackType() const
|
||||
{
|
||||
|
||||
|
||||
const SharedWeaponObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
@@ -314,7 +304,6 @@ SharedWeaponObjectTemplate::AttackType SharedWeaponObjectTemplate::getAttackType
|
||||
return value;
|
||||
} // SharedWeaponObjectTemplate::getAttackType
|
||||
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
* for this template.
|
||||
@@ -323,8 +312,8 @@ SharedWeaponObjectTemplate::AttackType SharedWeaponObjectTemplate::getAttackType
|
||||
*/
|
||||
void SharedWeaponObjectTemplate::load(Iff &file)
|
||||
{
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
static const int MAX_NAME_SIZE = 256;
|
||||
char paramName[MAX_NAME_SIZE];
|
||||
|
||||
if (file.getCurrentName() != SharedWeaponObjectTemplate_tag)
|
||||
{
|
||||
@@ -334,7 +323,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
|
||||
file.enterForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
if (m_templateVersion == TAG(D,E,R,V))
|
||||
if (m_templateVersion == TAG(D, E, R, V))
|
||||
{
|
||||
file.enterForm();
|
||||
file.enterChunk();
|
||||
@@ -354,10 +343,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,4))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 4))
|
||||
{
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -385,4 +372,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // SharedWeaponObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
Reference in New Issue
Block a user