mirror of
https://github.com/SWG-Source/src.git
synced 2026-08-03 03:16:01 -04:00
this is where i stop for the evening
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+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
|
||||
@@ -25,9 +25,9 @@
|
||||
// @param vertexList Co-planar set of points describing the siloutte edges of the volume.
|
||||
|
||||
Volume::Volume(const Vector &originPoint, const int numberOfVertices, const Vector * const vertexList)
|
||||
:
|
||||
:
|
||||
m_numberOfPlanes(numberOfVertices + 1),
|
||||
m_plane(new Plane[ static_cast<uint>(m_numberOfPlanes) ])
|
||||
m_plane(new Plane[static_cast<uint>(m_numberOfPlanes)])
|
||||
{
|
||||
NOT_NULL(vertexList);
|
||||
DEBUG_FATAL(numberOfVertices < 3, ("At least 3 vertices are necessary"));
|
||||
@@ -37,58 +37,58 @@ Volume::Volume(const Vector &originPoint, const int numberOfVertices, const Vect
|
||||
|
||||
// build the sides
|
||||
for (int i = 1; i < numberOfVertices; ++i)
|
||||
m_plane[i].set(originPoint, vertexList[i-1], vertexList[i]);
|
||||
m_plane[numberOfVertices].set(originPoint, vertexList[numberOfVertices-1], vertexList[0]);
|
||||
m_plane[i].set(originPoint, vertexList[i - 1], vertexList[i]);
|
||||
m_plane[numberOfVertices].set(originPoint, vertexList[numberOfVertices - 1], vertexList[0]);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* Create an undefined volume
|
||||
*
|
||||
*
|
||||
* This constructor creates a volume consisting of the specified number of planes,
|
||||
* but does not set up the plane data.
|
||||
*
|
||||
*
|
||||
* @param numberOfPlanes Number of planes in the volume.
|
||||
*/
|
||||
|
||||
Volume::Volume(const int numberOfPlanes)
|
||||
:
|
||||
:
|
||||
m_numberOfPlanes(numberOfPlanes),
|
||||
m_plane(new Plane[ static_cast<uint>(m_numberOfPlanes) ])
|
||||
m_plane(new Plane[static_cast<uint>(m_numberOfPlanes)])
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* Construct a new volume from another, transformed by the specified transformation.
|
||||
*
|
||||
*
|
||||
* @param other The other volume
|
||||
* @param trans The transform to be applied.
|
||||
*/
|
||||
|
||||
Volume::Volume (const Volume &rhs, const Transform &newTransform)
|
||||
:
|
||||
Volume::Volume(const Volume &rhs, const Transform &newTransform)
|
||||
:
|
||||
m_numberOfPlanes(rhs.m_numberOfPlanes),
|
||||
m_plane(new Plane[ static_cast<uint>(m_numberOfPlanes) ])
|
||||
m_plane(new Plane[static_cast<uint>(m_numberOfPlanes)])
|
||||
{
|
||||
for (int i = 0; i < m_numberOfPlanes; ++i)
|
||||
m_plane [i].set(rhs.m_plane[i], newTransform);
|
||||
m_plane[i].set(rhs.m_plane[i], newTransform);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
Volume::~Volume()
|
||||
{
|
||||
delete [] m_plane;
|
||||
delete[] m_plane;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* Set a specific plane in the volume
|
||||
*
|
||||
*
|
||||
* This routine can be used to build up a volume after having used the
|
||||
* constructor that takes a number of planes.
|
||||
*
|
||||
*
|
||||
* @param index The plane to modify.
|
||||
* @param plane The new value for the plane data.
|
||||
*/
|
||||
@@ -102,10 +102,10 @@ void Volume::setPlane(const int index, const Plane &plane)
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* Set a specific plane in the volume
|
||||
*
|
||||
*
|
||||
* This routine can be used to build up a volume after having used the
|
||||
* constructor that takes a number of planes.
|
||||
*
|
||||
*
|
||||
* @param index The plane to modify.
|
||||
* @param plane The new value for the plane data.
|
||||
*/
|
||||
@@ -119,7 +119,7 @@ const Plane &Volume::getPlane(const int index) const
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* Test a point against a volume
|
||||
*
|
||||
*
|
||||
* @param point Point to test.
|
||||
* @return True if the point is within the volume.
|
||||
*/
|
||||
@@ -136,7 +136,7 @@ bool Volume::contains(const Vector &point) const
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* See if the volume completely contains the sphere
|
||||
*
|
||||
*
|
||||
* @param sphere The sphere to check.
|
||||
* @return True if the entire sphere is within the volume, otherwise false.
|
||||
*/
|
||||
@@ -156,7 +156,7 @@ bool Volume::contains(const Sphere &sphere) const
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* Test a point cloud against a volume
|
||||
*
|
||||
*
|
||||
* @param pointCloud Point cloud to test.
|
||||
* @param numberOfPoints Number of points in the point cloud.
|
||||
* @return True if the point is within the volume.
|
||||
@@ -168,7 +168,7 @@ bool Volume::contains(const Vector *pointCloud, int numberOfPoints) const
|
||||
DEBUG_FATAL(numberOfPoints <= 0, ("numberOfPoints is less than 1"));
|
||||
|
||||
for (int i = 0; i < m_numberOfPlanes; ++i)
|
||||
for (int j = 0; i < numberOfPoints; ++j)
|
||||
for (int j = 0; j < numberOfPoints; ++j)
|
||||
if (m_plane[i].computeDistanceTo(pointCloud[j]) > 0)
|
||||
return false;
|
||||
|
||||
@@ -178,9 +178,9 @@ bool Volume::contains(const Vector *pointCloud, int numberOfPoints) const
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* See if the volume intersects a sphere.
|
||||
*
|
||||
*
|
||||
* The sphere is in the volume if any portion of it is within the volume.
|
||||
*
|
||||
*
|
||||
* @param sphere The sphere to check.
|
||||
* @return True if the any portion of the sphere is within the volume, otherwise false.
|
||||
*/
|
||||
@@ -200,9 +200,9 @@ bool Volume::intersects(const Sphere &sphere) const
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* See if the volume intersects the segment.
|
||||
*
|
||||
*
|
||||
* The segment is considered to be in the volume if both points test on the negative side of any plane
|
||||
*
|
||||
*
|
||||
* @param start Start point of segment.
|
||||
* @param end End point of segment.
|
||||
* @return False if any segment is on the negative side of any plane
|
||||
@@ -223,12 +223,12 @@ bool Volume::intersects(Vector const & start, Vector const & end) const
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* Fast Conservative check of a point cloud against the volume
|
||||
*
|
||||
*
|
||||
* This routine will return true if the point could is completely outside any one
|
||||
* plane of the volume. If the routine returns true, the point cloud is definitely
|
||||
* outside the volume. However, a false result does not guarentee that the point
|
||||
* cloud intersects the volume.
|
||||
*
|
||||
*
|
||||
* @param pointCloud Point cloud to test.
|
||||
* @param numberOfPoints Number of points in the point cloud.
|
||||
* @return See remarks for more information.
|
||||
@@ -255,7 +255,7 @@ bool Volume::fastConservativeExcludes(const Vector *pointCloud, int numberOfPoin
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* Transform the volume by the specified transformation.
|
||||
*
|
||||
*
|
||||
* @param transform The transform to be applied.
|
||||
*/
|
||||
|
||||
@@ -268,7 +268,7 @@ void Volume::transform(const Transform &newTransform)
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* Transform the specified volume by the specified transformation.
|
||||
*
|
||||
*
|
||||
* @param source The source volume to transform.
|
||||
* @param transform The transform to be applied.
|
||||
*/
|
||||
@@ -277,13 +277,13 @@ void Volume::transform(const Volume &source, const Transform &newTransform)
|
||||
{
|
||||
if (m_numberOfPlanes != source.m_numberOfPlanes)
|
||||
{
|
||||
delete [] m_plane;
|
||||
delete[] m_plane;
|
||||
m_numberOfPlanes = source.m_numberOfPlanes;
|
||||
m_plane = new Plane[ static_cast<uint>(m_numberOfPlanes) ];
|
||||
m_plane = new Plane[static_cast<uint>(m_numberOfPlanes)];
|
||||
}
|
||||
|
||||
for (int i = 0; i < m_numberOfPlanes; ++i)
|
||||
m_plane[i].set(source.m_plane[i], newTransform);
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
// ======================================================================
|
||||
@@ -21,16 +21,17 @@
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
ServerArmorTemplate::ServerArmorTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: TpfTemplate(filename)
|
||||
,m_specialProtectionLoaded(false)
|
||||
,m_specialProtectionAppend(false)
|
||||
//@END TFD INIT
|
||||
, m_specialProtectionLoaded(false)
|
||||
, m_specialProtectionAppend(false)
|
||||
, m_templateVersion(0)
|
||||
, m_versionOk(false)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // ServerArmorTemplate::ServerArmorTemplate
|
||||
|
||||
@@ -39,7 +40,7 @@ ServerArmorTemplate::ServerArmorTemplate(const std::string & filename)
|
||||
*/
|
||||
ServerArmorTemplate::~ServerArmorTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
{
|
||||
std::vector<StructParamOT *>::iterator iter;
|
||||
for (iter = m_specialProtection.begin(); iter != m_specialProtection.end(); ++iter)
|
||||
@@ -49,7 +50,7 @@ ServerArmorTemplate::~ServerArmorTemplate()
|
||||
}
|
||||
m_specialProtection.clear();
|
||||
}
|
||||
//@END TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // ServerArmorTemplate::~ServerArmorTemplate
|
||||
|
||||
/**
|
||||
@@ -274,7 +275,6 @@ bool ServerArmorTemplate::isAppend(const char *name) const
|
||||
return TpfTemplate::isAppend(name);
|
||||
} // ServerArmorTemplate::isAppend
|
||||
|
||||
|
||||
int ServerArmorTemplate::getListLength(const char *name) const
|
||||
{
|
||||
if (strcmp(name, "specialProtection") == 0)
|
||||
@@ -297,8 +297,8 @@ int ServerArmorTemplate::getListLength(const char *name) const
|
||||
*/
|
||||
void ServerArmorTemplate::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() != ServerArmorTemplate_tag)
|
||||
{
|
||||
@@ -308,7 +308,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();
|
||||
@@ -328,7 +328,7 @@ 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))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
@@ -401,18 +401,18 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void ServerArmorTemplate::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(ServerArmorTemplate_tag);
|
||||
if (m_baseTemplateName.size() != 0)
|
||||
{
|
||||
file.insertForm(TAG(D,E,R,V));
|
||||
file.insertForm(TAG(D, E, R, V));
|
||||
file.insertChunk(TAG(X, X, X, X));
|
||||
file.insertChunkData(m_baseTemplateName.c_str(), m_baseTemplateName.size() + 1);
|
||||
file.exitChunk();
|
||||
file.exitForm();
|
||||
}
|
||||
file.insertForm(TAG(0,0,0,1));
|
||||
file.insertForm(TAG(0, 0, 0, 1));
|
||||
file.allowNonlinearFunctions();
|
||||
|
||||
int paramCount = 0;
|
||||
@@ -447,7 +447,7 @@ int count;
|
||||
count = m_specialProtection.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_specialProtection[i]->saveToIff(file);}
|
||||
m_specialProtection[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save vulnerability
|
||||
@@ -462,7 +462,7 @@ int count;
|
||||
count = 3;
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < 3; ++i)
|
||||
m_encumbrance[i].saveToIff(file);}
|
||||
m_encumbrance[i].saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
|
||||
@@ -477,7 +477,6 @@ int count;
|
||||
file.exitForm();
|
||||
} // ServerArmorTemplate::save
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// class ServerArmorTemplate::_SpecialProtection
|
||||
|
||||
@@ -621,7 +620,6 @@ bool ServerArmorTemplate::_SpecialProtection::isAppend(const char *name) const
|
||||
return TpfTemplate::isAppend(name);
|
||||
} // ServerArmorTemplate::_SpecialProtection::isAppend
|
||||
|
||||
|
||||
int ServerArmorTemplate::_SpecialProtection::getListLength(const char *name) const
|
||||
{
|
||||
return TpfTemplate::getListLength(name);
|
||||
@@ -635,8 +633,8 @@ int ServerArmorTemplate::_SpecialProtection::getListLength(const char *name) con
|
||||
*/
|
||||
void ServerArmorTemplate::_SpecialProtection::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();
|
||||
|
||||
@@ -666,7 +664,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void ServerArmorTemplate::_SpecialProtection::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(_SpecialProtection_tag);
|
||||
|
||||
@@ -695,4 +693,4 @@ int count;
|
||||
UNREF(count);
|
||||
} // ServerArmorTemplate::_SpecialProtection::save
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+21
-22
@@ -20,17 +20,17 @@
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
ServerCreatureObjectTemplate::ServerCreatureObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: ServerTangibleObjectTemplate(filename)
|
||||
,m_attribModsLoaded(false)
|
||||
,m_attribModsAppend(false)
|
||||
//@END TFD INIT
|
||||
, m_attribModsLoaded(false)
|
||||
, m_attribModsAppend(false)
|
||||
, m_templateVersion(0)
|
||||
, m_versionOk(false)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // ServerCreatureObjectTemplate::ServerCreatureObjectTemplate
|
||||
|
||||
@@ -39,7 +39,7 @@ ServerCreatureObjectTemplate::ServerCreatureObjectTemplate(const std::string & f
|
||||
*/
|
||||
ServerCreatureObjectTemplate::~ServerCreatureObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
{
|
||||
std::vector<StructParamOT *>::iterator iter;
|
||||
for (iter = m_attribMods.begin(); iter != m_attribMods.end(); ++iter)
|
||||
@@ -49,7 +49,7 @@ ServerCreatureObjectTemplate::~ServerCreatureObjectTemplate()
|
||||
}
|
||||
m_attribMods.clear();
|
||||
}
|
||||
//@END TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // ServerCreatureObjectTemplate::~ServerCreatureObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -406,7 +406,6 @@ bool ServerCreatureObjectTemplate::isAppend(const char *name) const
|
||||
return ServerTangibleObjectTemplate::isAppend(name);
|
||||
} // ServerCreatureObjectTemplate::isAppend
|
||||
|
||||
|
||||
int ServerCreatureObjectTemplate::getListLength(const char *name) const
|
||||
{
|
||||
if (strcmp(name, "attributes") == 0)
|
||||
@@ -445,8 +444,8 @@ int ServerCreatureObjectTemplate::getListLength(const char *name) const
|
||||
*/
|
||||
void ServerCreatureObjectTemplate::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() != ServerCreatureObjectTemplate_tag)
|
||||
{
|
||||
@@ -456,7 +455,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();
|
||||
@@ -476,7 +475,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,5))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 5))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
@@ -615,18 +614,18 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void ServerCreatureObjectTemplate::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(ServerCreatureObjectTemplate_tag);
|
||||
if (m_baseTemplateName.size() != 0)
|
||||
{
|
||||
file.insertForm(TAG(D,E,R,V));
|
||||
file.insertForm(TAG(D, E, R, V));
|
||||
file.insertChunk(TAG(X, X, X, X));
|
||||
file.insertChunkData(m_baseTemplateName.c_str(), m_baseTemplateName.size() + 1);
|
||||
file.exitChunk();
|
||||
file.exitForm();
|
||||
}
|
||||
file.insertForm(TAG(0,0,0,5));
|
||||
file.insertForm(TAG(0, 0, 0, 5));
|
||||
file.allowNonlinearFunctions();
|
||||
|
||||
int paramCount = 0;
|
||||
@@ -643,7 +642,7 @@ int count;
|
||||
count = 6;
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < 6; ++i)
|
||||
m_attributes[i].saveToIff(file);}
|
||||
m_attributes[i].saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save minAttributes
|
||||
@@ -652,7 +651,7 @@ int count;
|
||||
count = 6;
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < 6; ++i)
|
||||
m_minAttributes[i].saveToIff(file);}
|
||||
m_minAttributes[i].saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save maxAttributes
|
||||
@@ -661,7 +660,7 @@ int count;
|
||||
count = 6;
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < 6; ++i)
|
||||
m_maxAttributes[i].saveToIff(file);}
|
||||
m_maxAttributes[i].saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save minDrainModifier
|
||||
@@ -700,7 +699,7 @@ int count;
|
||||
count = m_attribMods.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_attribMods[i]->saveToIff(file);}
|
||||
m_attribMods[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save shockWounds
|
||||
@@ -733,7 +732,7 @@ int count;
|
||||
count = 4;
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < 4; ++i)
|
||||
m_maxMentalStates[i].saveToIff(file);}
|
||||
m_maxMentalStates[i].saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save mentalStatesDecay
|
||||
@@ -742,7 +741,7 @@ int count;
|
||||
count = 4;
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < 4; ++i)
|
||||
m_mentalStatesDecay[i].saveToIff(file);}
|
||||
m_mentalStatesDecay[i].saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
|
||||
@@ -757,4 +756,4 @@ int count;
|
||||
file.exitForm();
|
||||
} // ServerCreatureObjectTemplate::save
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+28
-31
@@ -20,21 +20,21 @@
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
ServerDraftSchematicObjectTemplate::ServerDraftSchematicObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: ServerIntangibleObjectTemplate(filename)
|
||||
,m_slotsLoaded(false)
|
||||
,m_slotsAppend(false)
|
||||
,m_skillCommandsLoaded(false)
|
||||
,m_skillCommandsAppend(false)
|
||||
,m_manufactureScriptsLoaded(false)
|
||||
,m_manufactureScriptsAppend(false)
|
||||
//@END TFD INIT
|
||||
, m_slotsLoaded(false)
|
||||
, m_slotsAppend(false)
|
||||
, m_skillCommandsLoaded(false)
|
||||
, m_skillCommandsAppend(false)
|
||||
, m_manufactureScriptsLoaded(false)
|
||||
, m_manufactureScriptsAppend(false)
|
||||
, m_templateVersion(0)
|
||||
, m_versionOk(false)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // ServerDraftSchematicObjectTemplate::ServerDraftSchematicObjectTemplate
|
||||
|
||||
@@ -43,7 +43,7 @@ ServerDraftSchematicObjectTemplate::ServerDraftSchematicObjectTemplate(const std
|
||||
*/
|
||||
ServerDraftSchematicObjectTemplate::~ServerDraftSchematicObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
{
|
||||
std::vector<StructParamOT *>::iterator iter;
|
||||
for (iter = m_slots.begin(); iter != m_slots.end(); ++iter)
|
||||
@@ -71,7 +71,7 @@ ServerDraftSchematicObjectTemplate::~ServerDraftSchematicObjectTemplate()
|
||||
}
|
||||
m_manufactureScripts.clear();
|
||||
}
|
||||
//@END TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // ServerDraftSchematicObjectTemplate::~ServerDraftSchematicObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -372,7 +372,6 @@ bool ServerDraftSchematicObjectTemplate::isAppend(const char *name) const
|
||||
return ServerIntangibleObjectTemplate::isAppend(name);
|
||||
} // ServerDraftSchematicObjectTemplate::isAppend
|
||||
|
||||
|
||||
int ServerDraftSchematicObjectTemplate::getListLength(const char *name) const
|
||||
{
|
||||
if (strcmp(name, "slots") == 0)
|
||||
@@ -399,8 +398,8 @@ int ServerDraftSchematicObjectTemplate::getListLength(const char *name) const
|
||||
*/
|
||||
void ServerDraftSchematicObjectTemplate::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() != ServerDraftSchematicObjectTemplate_tag)
|
||||
{
|
||||
@@ -410,7 +409,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();
|
||||
@@ -430,7 +429,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,7))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 0, 7))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
@@ -533,18 +532,18 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void ServerDraftSchematicObjectTemplate::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(ServerDraftSchematicObjectTemplate_tag);
|
||||
if (m_baseTemplateName.size() != 0)
|
||||
{
|
||||
file.insertForm(TAG(D,E,R,V));
|
||||
file.insertForm(TAG(D, E, R, V));
|
||||
file.insertChunk(TAG(X, X, X, X));
|
||||
file.insertChunkData(m_baseTemplateName.c_str(), m_baseTemplateName.size() + 1);
|
||||
file.exitChunk();
|
||||
file.exitForm();
|
||||
}
|
||||
file.insertForm(TAG(0,0,0,7));
|
||||
file.insertForm(TAG(0, 0, 0, 7));
|
||||
file.allowNonlinearFunctions();
|
||||
|
||||
int paramCount = 0;
|
||||
@@ -579,7 +578,7 @@ int count;
|
||||
count = m_slots.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_slots[i]->saveToIff(file);}
|
||||
m_slots[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
if (!m_skillCommandsLoaded)
|
||||
@@ -594,7 +593,7 @@ int count;
|
||||
count = m_skillCommands.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_skillCommands[i]->saveToIff(file);}
|
||||
m_skillCommands[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save destroyIngredients
|
||||
@@ -615,7 +614,7 @@ int count;
|
||||
count = m_manufactureScripts.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_manufactureScripts[i]->saveToIff(file);}
|
||||
m_manufactureScripts[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save itemsPerContainer
|
||||
@@ -648,7 +647,6 @@ int count;
|
||||
file.exitForm();
|
||||
} // ServerDraftSchematicObjectTemplate::save
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// class ServerDraftSchematicObjectTemplate::_IngredientSlot
|
||||
|
||||
@@ -657,8 +655,8 @@ int count;
|
||||
*/
|
||||
ServerDraftSchematicObjectTemplate::_IngredientSlot::_IngredientSlot(const std::string & filename)
|
||||
: TpfTemplate(filename)
|
||||
,m_optionsLoaded(false)
|
||||
,m_optionsAppend(false)
|
||||
, m_optionsLoaded(false)
|
||||
, m_optionsAppend(false)
|
||||
{
|
||||
} // ServerDraftSchematicObjectTemplate::_IngredientSlot::_IngredientSlot
|
||||
|
||||
@@ -880,7 +878,6 @@ bool ServerDraftSchematicObjectTemplate::_IngredientSlot::isAppend(const char *n
|
||||
return TpfTemplate::isAppend(name);
|
||||
} // ServerDraftSchematicObjectTemplate::_IngredientSlot::isAppend
|
||||
|
||||
|
||||
int ServerDraftSchematicObjectTemplate::_IngredientSlot::getListLength(const char *name) const
|
||||
{
|
||||
if (strcmp(name, "options") == 0)
|
||||
@@ -899,8 +896,8 @@ int ServerDraftSchematicObjectTemplate::_IngredientSlot::getListLength(const cha
|
||||
*/
|
||||
void ServerDraftSchematicObjectTemplate::_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();
|
||||
|
||||
@@ -955,7 +952,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void ServerDraftSchematicObjectTemplate::_IngredientSlot::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(_IngredientSlot_tag);
|
||||
|
||||
@@ -985,7 +982,7 @@ int count;
|
||||
count = m_options.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_options[i]->saveToIff(file);}
|
||||
m_options[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save optionalSkillCommand
|
||||
@@ -1016,4 +1013,4 @@ int count;
|
||||
file.exitForm(true);
|
||||
} // ServerDraftSchematicObjectTemplate::_IngredientSlot::save
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+22
-25
@@ -20,19 +20,19 @@
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
ServerManufactureSchematicObjectTemplate::ServerManufactureSchematicObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: ServerIntangibleObjectTemplate(filename)
|
||||
,m_ingredientsLoaded(false)
|
||||
,m_ingredientsAppend(false)
|
||||
,m_attributesLoaded(false)
|
||||
,m_attributesAppend(false)
|
||||
//@END TFD INIT
|
||||
, m_ingredientsLoaded(false)
|
||||
, m_ingredientsAppend(false)
|
||||
, m_attributesLoaded(false)
|
||||
, m_attributesAppend(false)
|
||||
, m_templateVersion(0)
|
||||
, m_versionOk(false)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // ServerManufactureSchematicObjectTemplate::ServerManufactureSchematicObjectTemplate
|
||||
|
||||
@@ -41,7 +41,7 @@ ServerManufactureSchematicObjectTemplate::ServerManufactureSchematicObjectTempla
|
||||
*/
|
||||
ServerManufactureSchematicObjectTemplate::~ServerManufactureSchematicObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
{
|
||||
std::vector<StructParamOT *>::iterator iter;
|
||||
for (iter = m_ingredients.begin(); iter != m_ingredients.end(); ++iter)
|
||||
@@ -60,7 +60,7 @@ ServerManufactureSchematicObjectTemplate::~ServerManufactureSchematicObjectTempl
|
||||
}
|
||||
m_attributes.clear();
|
||||
}
|
||||
//@END TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // ServerManufactureSchematicObjectTemplate::~ServerManufactureSchematicObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -282,7 +282,6 @@ bool ServerManufactureSchematicObjectTemplate::isAppend(const char *name) const
|
||||
return ServerIntangibleObjectTemplate::isAppend(name);
|
||||
} // ServerManufactureSchematicObjectTemplate::isAppend
|
||||
|
||||
|
||||
int ServerManufactureSchematicObjectTemplate::getListLength(const char *name) const
|
||||
{
|
||||
if (strcmp(name, "ingredients") == 0)
|
||||
@@ -305,8 +304,8 @@ int ServerManufactureSchematicObjectTemplate::getListLength(const char *name) co
|
||||
*/
|
||||
void ServerManufactureSchematicObjectTemplate::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() != ServerManufactureSchematicObjectTemplate_tag)
|
||||
{
|
||||
@@ -316,7 +315,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();
|
||||
@@ -336,7 +335,7 @@ 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))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
@@ -412,18 +411,18 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void ServerManufactureSchematicObjectTemplate::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(ServerManufactureSchematicObjectTemplate_tag);
|
||||
if (m_baseTemplateName.size() != 0)
|
||||
{
|
||||
file.insertForm(TAG(D,E,R,V));
|
||||
file.insertForm(TAG(D, E, R, V));
|
||||
file.insertChunk(TAG(X, X, X, X));
|
||||
file.insertChunkData(m_baseTemplateName.c_str(), m_baseTemplateName.size() + 1);
|
||||
file.exitChunk();
|
||||
file.exitForm();
|
||||
}
|
||||
file.insertForm(TAG(0,0,0,0));
|
||||
file.insertForm(TAG(0, 0, 0, 0));
|
||||
file.allowNonlinearFunctions();
|
||||
|
||||
int paramCount = 0;
|
||||
@@ -452,7 +451,7 @@ int count;
|
||||
count = m_ingredients.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_ingredients[i]->saveToIff(file);}
|
||||
m_ingredients[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save itemCount
|
||||
@@ -473,7 +472,7 @@ int count;
|
||||
count = m_attributes.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_attributes[i]->saveToIff(file);}
|
||||
m_attributes[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
|
||||
@@ -488,7 +487,6 @@ int count;
|
||||
file.exitForm();
|
||||
} // ServerManufactureSchematicObjectTemplate::save
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// class ServerManufactureSchematicObjectTemplate::_IngredientSlot
|
||||
|
||||
@@ -637,7 +635,6 @@ bool ServerManufactureSchematicObjectTemplate::_IngredientSlot::isAppend(const c
|
||||
return TpfTemplate::isAppend(name);
|
||||
} // ServerManufactureSchematicObjectTemplate::_IngredientSlot::isAppend
|
||||
|
||||
|
||||
int ServerManufactureSchematicObjectTemplate::_IngredientSlot::getListLength(const char *name) const
|
||||
{
|
||||
return TpfTemplate::getListLength(name);
|
||||
@@ -651,8 +648,8 @@ int ServerManufactureSchematicObjectTemplate::_IngredientSlot::getListLength(con
|
||||
*/
|
||||
void ServerManufactureSchematicObjectTemplate::_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();
|
||||
|
||||
@@ -682,7 +679,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void ServerManufactureSchematicObjectTemplate::_IngredientSlot::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(_IngredientSlot_tag);
|
||||
|
||||
@@ -711,4 +708,4 @@ int count;
|
||||
UNREF(count);
|
||||
} // ServerManufactureSchematicObjectTemplate::_IngredientSlot::save
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
@@ -20,27 +20,27 @@
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
ServerObjectTemplate::ServerObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: TpfTemplate(filename)
|
||||
,m_scriptsLoaded(false)
|
||||
,m_scriptsAppend(false)
|
||||
,m_visibleFlagsLoaded(false)
|
||||
,m_visibleFlagsAppend(false)
|
||||
,m_deleteFlagsLoaded(false)
|
||||
,m_deleteFlagsAppend(false)
|
||||
,m_moveFlagsLoaded(false)
|
||||
,m_moveFlagsAppend(false)
|
||||
,m_contentsLoaded(false)
|
||||
,m_contentsAppend(false)
|
||||
,m_xpPointsLoaded(false)
|
||||
,m_xpPointsAppend(false)
|
||||
//@END TFD INIT
|
||||
, m_scriptsLoaded(false)
|
||||
, m_scriptsAppend(false)
|
||||
, m_visibleFlagsLoaded(false)
|
||||
, m_visibleFlagsAppend(false)
|
||||
, m_deleteFlagsLoaded(false)
|
||||
, m_deleteFlagsAppend(false)
|
||||
, m_moveFlagsLoaded(false)
|
||||
, m_moveFlagsAppend(false)
|
||||
, m_contentsLoaded(false)
|
||||
, m_contentsAppend(false)
|
||||
, m_xpPointsLoaded(false)
|
||||
, m_xpPointsAppend(false)
|
||||
, m_templateVersion(0)
|
||||
, m_versionOk(false)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // ServerObjectTemplate::ServerObjectTemplate
|
||||
|
||||
@@ -49,7 +49,7 @@ ServerObjectTemplate::ServerObjectTemplate(const std::string & filename)
|
||||
*/
|
||||
ServerObjectTemplate::~ServerObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
{
|
||||
std::vector<StringParam *>::iterator iter;
|
||||
for (iter = m_scripts.begin(); iter != m_scripts.end(); ++iter)
|
||||
@@ -104,7 +104,7 @@ ServerObjectTemplate::~ServerObjectTemplate()
|
||||
}
|
||||
m_xpPoints.clear();
|
||||
}
|
||||
//@END TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // ServerObjectTemplate::~ServerObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -500,7 +500,6 @@ bool ServerObjectTemplate::isAppend(const char *name) const
|
||||
return TpfTemplate::isAppend(name);
|
||||
} // ServerObjectTemplate::isAppend
|
||||
|
||||
|
||||
int ServerObjectTemplate::getListLength(const char *name) const
|
||||
{
|
||||
if (strcmp(name, "scripts") == 0)
|
||||
@@ -543,8 +542,8 @@ int ServerObjectTemplate::getListLength(const char *name) const
|
||||
*/
|
||||
void ServerObjectTemplate::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() != ServerObjectTemplate_tag)
|
||||
{
|
||||
@@ -554,7 +553,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();
|
||||
@@ -574,7 +573,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.exitForm();
|
||||
m_templateVersion = file.getCurrentName();
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,1,1))
|
||||
if (getHighestTemplateVersion() != TAG(0, 0, 1, 1))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
@@ -750,18 +749,18 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void ServerObjectTemplate::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(ServerObjectTemplate_tag);
|
||||
if (m_baseTemplateName.size() != 0)
|
||||
{
|
||||
file.insertForm(TAG(D,E,R,V));
|
||||
file.insertForm(TAG(D, E, R, V));
|
||||
file.insertChunk(TAG(X, X, X, X));
|
||||
file.insertChunkData(m_baseTemplateName.c_str(), m_baseTemplateName.size() + 1);
|
||||
file.exitChunk();
|
||||
file.exitForm();
|
||||
}
|
||||
file.insertForm(TAG(0,0,1,1));
|
||||
file.insertForm(TAG(0, 0, 1, 1));
|
||||
file.allowNonlinearFunctions();
|
||||
|
||||
int paramCount = 0;
|
||||
@@ -784,7 +783,7 @@ int count;
|
||||
count = m_scripts.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_scripts[i]->saveToIff(file);}
|
||||
m_scripts[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save objvars
|
||||
@@ -811,7 +810,7 @@ int count;
|
||||
count = m_visibleFlags.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_visibleFlags[i]->saveToIff(file);}
|
||||
m_visibleFlags[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
if (!m_deleteFlagsLoaded)
|
||||
@@ -826,7 +825,7 @@ int count;
|
||||
count = m_deleteFlags.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_deleteFlags[i]->saveToIff(file);}
|
||||
m_deleteFlags[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
if (!m_moveFlagsLoaded)
|
||||
@@ -841,7 +840,7 @@ int count;
|
||||
count = m_moveFlags.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_moveFlags[i]->saveToIff(file);}
|
||||
m_moveFlags[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save invulnerable
|
||||
@@ -868,7 +867,7 @@ int count;
|
||||
count = 3;
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < 3; ++i)
|
||||
m_updateRanges[i].saveToIff(file);}
|
||||
m_updateRanges[i].saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
if (!m_contentsLoaded)
|
||||
@@ -883,7 +882,7 @@ int count;
|
||||
count = m_contents.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_contents[i]->saveToIff(file);}
|
||||
m_contents[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
if (!m_xpPointsLoaded)
|
||||
@@ -898,7 +897,7 @@ int count;
|
||||
count = m_xpPoints.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_xpPoints[i]->saveToIff(file);}
|
||||
m_xpPoints[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save persistByDefault
|
||||
@@ -925,7 +924,6 @@ int count;
|
||||
file.exitForm();
|
||||
} // ServerObjectTemplate::save
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// class ServerObjectTemplate::_AttribMod
|
||||
|
||||
@@ -1113,7 +1111,6 @@ bool ServerObjectTemplate::_AttribMod::isAppend(const char *name) const
|
||||
return TpfTemplate::isAppend(name);
|
||||
} // ServerObjectTemplate::_AttribMod::isAppend
|
||||
|
||||
|
||||
int ServerObjectTemplate::_AttribMod::getListLength(const char *name) const
|
||||
{
|
||||
return TpfTemplate::getListLength(name);
|
||||
@@ -1127,8 +1124,8 @@ int ServerObjectTemplate::_AttribMod::getListLength(const char *name) const
|
||||
*/
|
||||
void ServerObjectTemplate::_AttribMod::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();
|
||||
|
||||
@@ -1164,7 +1161,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void ServerObjectTemplate::_AttribMod::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(_AttribMod_tag);
|
||||
|
||||
@@ -1211,7 +1208,6 @@ int count;
|
||||
UNREF(count);
|
||||
} // ServerObjectTemplate::_AttribMod::save
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// class ServerObjectTemplate::_Contents
|
||||
|
||||
@@ -1371,7 +1367,6 @@ bool ServerObjectTemplate::_Contents::isAppend(const char *name) const
|
||||
return TpfTemplate::isAppend(name);
|
||||
} // ServerObjectTemplate::_Contents::isAppend
|
||||
|
||||
|
||||
int ServerObjectTemplate::_Contents::getListLength(const char *name) const
|
||||
{
|
||||
return TpfTemplate::getListLength(name);
|
||||
@@ -1385,8 +1380,8 @@ int ServerObjectTemplate::_Contents::getListLength(const char *name) const
|
||||
*/
|
||||
void ServerObjectTemplate::_Contents::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();
|
||||
|
||||
@@ -1418,7 +1413,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void ServerObjectTemplate::_Contents::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(_Contents_tag);
|
||||
|
||||
@@ -1453,7 +1448,6 @@ int count;
|
||||
UNREF(count);
|
||||
} // ServerObjectTemplate::_Contents::save
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// class ServerObjectTemplate::_MentalStateMod
|
||||
|
||||
@@ -1641,7 +1635,6 @@ bool ServerObjectTemplate::_MentalStateMod::isAppend(const char *name) const
|
||||
return TpfTemplate::isAppend(name);
|
||||
} // ServerObjectTemplate::_MentalStateMod::isAppend
|
||||
|
||||
|
||||
int ServerObjectTemplate::_MentalStateMod::getListLength(const char *name) const
|
||||
{
|
||||
return TpfTemplate::getListLength(name);
|
||||
@@ -1655,8 +1648,8 @@ int ServerObjectTemplate::_MentalStateMod::getListLength(const char *name) const
|
||||
*/
|
||||
void ServerObjectTemplate::_MentalStateMod::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();
|
||||
|
||||
@@ -1692,7 +1685,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void ServerObjectTemplate::_MentalStateMod::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(_MentalStateMod_tag);
|
||||
|
||||
@@ -1739,7 +1732,6 @@ int count;
|
||||
UNREF(count);
|
||||
} // ServerObjectTemplate::_MentalStateMod::save
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// class ServerObjectTemplate::_Xp
|
||||
|
||||
@@ -1897,7 +1889,6 @@ bool ServerObjectTemplate::_Xp::isAppend(const char *name) const
|
||||
return TpfTemplate::isAppend(name);
|
||||
} // ServerObjectTemplate::_Xp::isAppend
|
||||
|
||||
|
||||
int ServerObjectTemplate::_Xp::getListLength(const char *name) const
|
||||
{
|
||||
return TpfTemplate::getListLength(name);
|
||||
@@ -1911,8 +1902,8 @@ int ServerObjectTemplate::_Xp::getListLength(const char *name) const
|
||||
*/
|
||||
void ServerObjectTemplate::_Xp::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();
|
||||
|
||||
@@ -1944,7 +1935,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void ServerObjectTemplate::_Xp::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(_Xp_tag);
|
||||
|
||||
@@ -1979,4 +1970,4 @@ int count;
|
||||
UNREF(count);
|
||||
} // ServerObjectTemplate::_Xp::save
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+16
-17
@@ -20,17 +20,17 @@
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
ServerTangibleObjectTemplate::ServerTangibleObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: ServerObjectTemplate(filename)
|
||||
,m_triggerVolumesLoaded(false)
|
||||
,m_triggerVolumesAppend(false)
|
||||
//@END TFD INIT
|
||||
, m_triggerVolumesLoaded(false)
|
||||
, m_triggerVolumesAppend(false)
|
||||
, m_templateVersion(0)
|
||||
, m_versionOk(false)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // ServerTangibleObjectTemplate::ServerTangibleObjectTemplate
|
||||
|
||||
@@ -39,7 +39,7 @@ ServerTangibleObjectTemplate::ServerTangibleObjectTemplate(const std::string & f
|
||||
*/
|
||||
ServerTangibleObjectTemplate::~ServerTangibleObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
{
|
||||
std::vector<TriggerVolumeParam *>::iterator iter;
|
||||
for (iter = m_triggerVolumes.begin(); iter != m_triggerVolumes.end(); ++iter)
|
||||
@@ -49,7 +49,7 @@ ServerTangibleObjectTemplate::~ServerTangibleObjectTemplate()
|
||||
}
|
||||
m_triggerVolumes.clear();
|
||||
}
|
||||
//@END TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // ServerTangibleObjectTemplate::~ServerTangibleObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -303,7 +303,6 @@ bool ServerTangibleObjectTemplate::isAppend(const char *name) const
|
||||
return ServerObjectTemplate::isAppend(name);
|
||||
} // ServerTangibleObjectTemplate::isAppend
|
||||
|
||||
|
||||
int ServerTangibleObjectTemplate::getListLength(const char *name) const
|
||||
{
|
||||
if (strcmp(name, "triggerVolumes") == 0)
|
||||
@@ -322,8 +321,8 @@ int ServerTangibleObjectTemplate::getListLength(const char *name) const
|
||||
*/
|
||||
void ServerTangibleObjectTemplate::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() != ServerTangibleObjectTemplate_tag)
|
||||
{
|
||||
@@ -333,7 +332,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();
|
||||
@@ -353,7 +352,7 @@ 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))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
@@ -418,18 +417,18 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void ServerTangibleObjectTemplate::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(ServerTangibleObjectTemplate_tag);
|
||||
if (m_baseTemplateName.size() != 0)
|
||||
{
|
||||
file.insertForm(TAG(D,E,R,V));
|
||||
file.insertForm(TAG(D, E, R, V));
|
||||
file.insertChunk(TAG(X, X, X, X));
|
||||
file.insertChunkData(m_baseTemplateName.c_str(), m_baseTemplateName.size() + 1);
|
||||
file.exitChunk();
|
||||
file.exitForm();
|
||||
}
|
||||
file.insertForm(TAG(0,0,0,4));
|
||||
file.insertForm(TAG(0, 0, 0, 4));
|
||||
file.allowNonlinearFunctions();
|
||||
|
||||
int paramCount = 0;
|
||||
@@ -446,7 +445,7 @@ int count;
|
||||
count = m_triggerVolumes.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_triggerVolumes[i]->saveToIff(file);}
|
||||
m_triggerVolumes[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save combatSkeleton
|
||||
@@ -503,4 +502,4 @@ int count;
|
||||
file.exitForm();
|
||||
} // ServerTangibleObjectTemplate::save
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+94
-97
@@ -20,59 +20,59 @@
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
ServerUberObjectTemplate::ServerUberObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: TpfTemplate(filename)
|
||||
,m_intListSimpleLoaded(false)
|
||||
,m_intListSimpleAppend(false)
|
||||
,m_intListWeightedListLoaded(false)
|
||||
,m_intListWeightedListAppend(false)
|
||||
,m_intListRandomRangeLoaded(false)
|
||||
,m_intListRandomRangeAppend(false)
|
||||
,m_intListDiceRollLoaded(false)
|
||||
,m_intListDiceRollAppend(false)
|
||||
,m_floatListSimpleLoaded(false)
|
||||
,m_floatListSimpleAppend(false)
|
||||
,m_floatListWeightedListLoaded(false)
|
||||
,m_floatListWeightedListAppend(false)
|
||||
,m_floatListRandomRangeLoaded(false)
|
||||
,m_floatListRandomRangeAppend(false)
|
||||
,m_enumListIndexedLoaded(false)
|
||||
,m_enumListIndexedAppend(false)
|
||||
,m_enumListWeightedListLoaded(false)
|
||||
,m_enumListWeightedListAppend(false)
|
||||
,m_stringIdListSimpleLoaded(false)
|
||||
,m_stringIdListSimpleAppend(false)
|
||||
,m_stringIdListWeightedListLoaded(false)
|
||||
,m_stringIdListWeightedListAppend(false)
|
||||
,m_stringListSimpleLoaded(false)
|
||||
,m_stringListSimpleAppend(false)
|
||||
,m_stringListWeightedListLoaded(false)
|
||||
,m_stringListWeightedListAppend(false)
|
||||
,m_triggerVolumeListLoaded(false)
|
||||
,m_triggerVolumeListAppend(false)
|
||||
,m_triggerVolumesListWeightedListLoaded(false)
|
||||
,m_triggerVolumesListWeightedListAppend(false)
|
||||
,m_boolListDerivedLoaded(false)
|
||||
,m_boolListDerivedAppend(false)
|
||||
,m_boolListSimpleLoaded(false)
|
||||
,m_boolListSimpleAppend(false)
|
||||
,m_boolListWeightedListLoaded(false)
|
||||
,m_boolListWeightedListAppend(false)
|
||||
,m_vectorListSimpleLoaded(false)
|
||||
,m_vectorListSimpleAppend(false)
|
||||
,m_filenameListSimpleLoaded(false)
|
||||
,m_filenameListSimpleAppend(false)
|
||||
,m_templateListSimpleLoaded(false)
|
||||
,m_templateListSimpleAppend(false)
|
||||
,m_structListSimpleLoaded(false)
|
||||
,m_structListSimpleAppend(false)
|
||||
//@END TFD INIT
|
||||
, m_intListSimpleLoaded(false)
|
||||
, m_intListSimpleAppend(false)
|
||||
, m_intListWeightedListLoaded(false)
|
||||
, m_intListWeightedListAppend(false)
|
||||
, m_intListRandomRangeLoaded(false)
|
||||
, m_intListRandomRangeAppend(false)
|
||||
, m_intListDiceRollLoaded(false)
|
||||
, m_intListDiceRollAppend(false)
|
||||
, m_floatListSimpleLoaded(false)
|
||||
, m_floatListSimpleAppend(false)
|
||||
, m_floatListWeightedListLoaded(false)
|
||||
, m_floatListWeightedListAppend(false)
|
||||
, m_floatListRandomRangeLoaded(false)
|
||||
, m_floatListRandomRangeAppend(false)
|
||||
, m_enumListIndexedLoaded(false)
|
||||
, m_enumListIndexedAppend(false)
|
||||
, m_enumListWeightedListLoaded(false)
|
||||
, m_enumListWeightedListAppend(false)
|
||||
, m_stringIdListSimpleLoaded(false)
|
||||
, m_stringIdListSimpleAppend(false)
|
||||
, m_stringIdListWeightedListLoaded(false)
|
||||
, m_stringIdListWeightedListAppend(false)
|
||||
, m_stringListSimpleLoaded(false)
|
||||
, m_stringListSimpleAppend(false)
|
||||
, m_stringListWeightedListLoaded(false)
|
||||
, m_stringListWeightedListAppend(false)
|
||||
, m_triggerVolumeListLoaded(false)
|
||||
, m_triggerVolumeListAppend(false)
|
||||
, m_triggerVolumesListWeightedListLoaded(false)
|
||||
, m_triggerVolumesListWeightedListAppend(false)
|
||||
, m_boolListDerivedLoaded(false)
|
||||
, m_boolListDerivedAppend(false)
|
||||
, m_boolListSimpleLoaded(false)
|
||||
, m_boolListSimpleAppend(false)
|
||||
, m_boolListWeightedListLoaded(false)
|
||||
, m_boolListWeightedListAppend(false)
|
||||
, m_vectorListSimpleLoaded(false)
|
||||
, m_vectorListSimpleAppend(false)
|
||||
, m_filenameListSimpleLoaded(false)
|
||||
, m_filenameListSimpleAppend(false)
|
||||
, m_templateListSimpleLoaded(false)
|
||||
, m_templateListSimpleAppend(false)
|
||||
, m_structListSimpleLoaded(false)
|
||||
, m_structListSimpleAppend(false)
|
||||
, m_templateVersion(0)
|
||||
, m_versionOk(false)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // ServerUberObjectTemplate::ServerUberObjectTemplate
|
||||
|
||||
@@ -81,7 +81,7 @@ ServerUberObjectTemplate::ServerUberObjectTemplate(const std::string & filename)
|
||||
*/
|
||||
ServerUberObjectTemplate::~ServerUberObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
{
|
||||
std::vector<CompilerIntegerParam *>::iterator iter;
|
||||
for (iter = m_intListSimple.begin(); iter != m_intListSimple.end(); ++iter)
|
||||
@@ -258,7 +258,7 @@ ServerUberObjectTemplate::~ServerUberObjectTemplate()
|
||||
*iter = nullptr;
|
||||
}
|
||||
}
|
||||
//@END TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // ServerUberObjectTemplate::~ServerUberObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -1772,7 +1772,6 @@ bool ServerUberObjectTemplate::isAppend(const char *name) const
|
||||
return TpfTemplate::isAppend(name);
|
||||
} // ServerUberObjectTemplate::isAppend
|
||||
|
||||
|
||||
int ServerUberObjectTemplate::getListLength(const char *name) const
|
||||
{
|
||||
if (strcmp(name, "intListSimple") == 0)
|
||||
@@ -1923,8 +1922,8 @@ int ServerUberObjectTemplate::getListLength(const char *name) const
|
||||
*/
|
||||
void ServerUberObjectTemplate::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() != ServerUberObjectTemplate_tag)
|
||||
{
|
||||
@@ -1934,7 +1933,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();
|
||||
@@ -1954,7 +1953,7 @@ 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))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
@@ -2654,18 +2653,18 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void ServerUberObjectTemplate::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(ServerUberObjectTemplate_tag);
|
||||
if (m_baseTemplateName.size() != 0)
|
||||
{
|
||||
file.insertForm(TAG(D,E,R,V));
|
||||
file.insertForm(TAG(D, E, R, V));
|
||||
file.insertChunk(TAG(X, X, X, X));
|
||||
file.insertChunkData(m_baseTemplateName.c_str(), m_baseTemplateName.size() + 1);
|
||||
file.exitChunk();
|
||||
file.exitForm();
|
||||
}
|
||||
file.insertForm(TAG(0,0,0,0));
|
||||
file.insertForm(TAG(0, 0, 0, 0));
|
||||
file.allowNonlinearFunctions();
|
||||
|
||||
int paramCount = 0;
|
||||
@@ -2784,7 +2783,7 @@ int count;
|
||||
count = m_intListSimple.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_intListSimple[i]->saveToIff(file);}
|
||||
m_intListSimple[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
if (!m_intListWeightedListLoaded)
|
||||
@@ -2799,7 +2798,7 @@ int count;
|
||||
count = m_intListWeightedList.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_intListWeightedList[i]->saveToIff(file);}
|
||||
m_intListWeightedList[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
if (!m_intListRandomRangeLoaded)
|
||||
@@ -2814,7 +2813,7 @@ int count;
|
||||
count = m_intListRandomRange.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_intListRandomRange[i]->saveToIff(file);}
|
||||
m_intListRandomRange[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
if (!m_intListDiceRollLoaded)
|
||||
@@ -2829,7 +2828,7 @@ int count;
|
||||
count = m_intListDiceRoll.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_intListDiceRoll[i]->saveToIff(file);}
|
||||
m_intListDiceRoll[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save floatAtDerived
|
||||
@@ -2910,7 +2909,7 @@ int count;
|
||||
count = m_floatListSimple.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_floatListSimple[i]->saveToIff(file);}
|
||||
m_floatListSimple[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
if (!m_floatListWeightedListLoaded)
|
||||
@@ -2925,7 +2924,7 @@ int count;
|
||||
count = m_floatListWeightedList.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_floatListWeightedList[i]->saveToIff(file);}
|
||||
m_floatListWeightedList[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
if (!m_floatListRandomRangeLoaded)
|
||||
@@ -2940,7 +2939,7 @@ int count;
|
||||
count = m_floatListRandomRange.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_floatListRandomRange[i]->saveToIff(file);}
|
||||
m_floatListRandomRange[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save enumIndexedByEnumSingle
|
||||
@@ -2949,7 +2948,7 @@ int count;
|
||||
count = 3;
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < 3; ++i)
|
||||
m_enumIndexedByEnumSingle[i].saveToIff(file);}
|
||||
m_enumIndexedByEnumSingle[i].saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save enumIndexedByEnumWeightedList
|
||||
@@ -2958,7 +2957,7 @@ int count;
|
||||
count = 3;
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < 3; ++i)
|
||||
m_enumIndexedByEnumWeightedList[i].saveToIff(file);}
|
||||
m_enumIndexedByEnumWeightedList[i].saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
if (!m_enumListIndexedLoaded)
|
||||
@@ -2973,7 +2972,7 @@ int count;
|
||||
count = m_enumListIndexed.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_enumListIndexed[i]->saveToIff(file);}
|
||||
m_enumListIndexed[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
if (!m_enumListWeightedListLoaded)
|
||||
@@ -2988,7 +2987,7 @@ int count;
|
||||
count = m_enumListWeightedList.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_enumListWeightedList[i]->saveToIff(file);}
|
||||
m_enumListWeightedList[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save stringIdDerived
|
||||
@@ -3021,7 +3020,7 @@ int count;
|
||||
count = m_stringIdListSimple.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_stringIdListSimple[i]->saveToIff(file);}
|
||||
m_stringIdListSimple[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
if (!m_stringIdListWeightedListLoaded)
|
||||
@@ -3036,7 +3035,7 @@ int count;
|
||||
count = m_stringIdListWeightedList.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_stringIdListWeightedList[i]->saveToIff(file);}
|
||||
m_stringIdListWeightedList[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save stringDerived
|
||||
@@ -3069,7 +3068,7 @@ int count;
|
||||
count = m_stringListSimple.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_stringListSimple[i]->saveToIff(file);}
|
||||
m_stringListSimple[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
if (!m_stringListWeightedListLoaded)
|
||||
@@ -3084,7 +3083,7 @@ int count;
|
||||
count = m_stringListWeightedList.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_stringListWeightedList[i]->saveToIff(file);}
|
||||
m_stringListWeightedList[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save triggerVolumeDerived
|
||||
@@ -3117,7 +3116,7 @@ int count;
|
||||
count = m_triggerVolumeList.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_triggerVolumeList[i]->saveToIff(file);}
|
||||
m_triggerVolumeList[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
if (!m_triggerVolumesListWeightedListLoaded)
|
||||
@@ -3132,7 +3131,7 @@ int count;
|
||||
count = m_triggerVolumesListWeightedList.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_triggerVolumesListWeightedList[i]->saveToIff(file);}
|
||||
m_triggerVolumesListWeightedList[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save boolDerived
|
||||
@@ -3165,7 +3164,7 @@ int count;
|
||||
count = m_boolListDerived.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_boolListDerived[i]->saveToIff(file);}
|
||||
m_boolListDerived[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
if (!m_boolListSimpleLoaded)
|
||||
@@ -3180,7 +3179,7 @@ int count;
|
||||
count = m_boolListSimple.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_boolListSimple[i]->saveToIff(file);}
|
||||
m_boolListSimple[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
if (!m_boolListWeightedListLoaded)
|
||||
@@ -3195,7 +3194,7 @@ int count;
|
||||
count = m_boolListWeightedList.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_boolListWeightedList[i]->saveToIff(file);}
|
||||
m_boolListWeightedList[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save vectorAtDerived
|
||||
@@ -3222,7 +3221,7 @@ int count;
|
||||
count = m_vectorListSimple.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_vectorListSimple[i]->saveToIff(file);}
|
||||
m_vectorListSimple[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save filenameAtDerived
|
||||
@@ -3255,7 +3254,7 @@ int count;
|
||||
count = m_filenameListSimple.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_filenameListSimple[i]->saveToIff(file);}
|
||||
m_filenameListSimple[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save objvarDerived
|
||||
@@ -3300,7 +3299,7 @@ int count;
|
||||
count = m_templateListSimple.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_templateListSimple[i]->saveToIff(file);}
|
||||
m_templateListSimple[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save structAtDerived
|
||||
@@ -3327,7 +3326,7 @@ int count;
|
||||
count = m_structListSimple.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_structListSimple[i]->saveToIff(file);}
|
||||
m_structListSimple[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save structArrayEnum
|
||||
@@ -3336,7 +3335,7 @@ int count;
|
||||
count = 3;
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < 3; ++i)
|
||||
m_structArrayEnum[i].saveToIff(file);}
|
||||
m_structArrayEnum[i].saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save structArrayInteger
|
||||
@@ -3345,7 +3344,7 @@ int count;
|
||||
count = 2;
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < 2; ++i)
|
||||
m_structArrayInteger[i].saveToIff(file);}
|
||||
m_structArrayInteger[i].saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save integerArray
|
||||
@@ -3354,7 +3353,7 @@ int count;
|
||||
count = 2;
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < 2; ++i)
|
||||
m_integerArray[i].saveToIff(file);}
|
||||
m_integerArray[i].saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save floatArray
|
||||
@@ -3363,7 +3362,7 @@ int count;
|
||||
count = 2;
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < 2; ++i)
|
||||
m_floatArray[i].saveToIff(file);}
|
||||
m_floatArray[i].saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save stringArray
|
||||
@@ -3372,7 +3371,7 @@ int count;
|
||||
count = 2;
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < 2; ++i)
|
||||
m_stringArray[i].saveToIff(file);}
|
||||
m_stringArray[i].saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save boolArray
|
||||
@@ -3381,7 +3380,7 @@ int count;
|
||||
count = 2;
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < 2; ++i)
|
||||
m_boolArray[i].saveToIff(file);}
|
||||
m_boolArray[i].saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save stringIdArray
|
||||
@@ -3390,7 +3389,7 @@ int count;
|
||||
count = 2;
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < 2; ++i)
|
||||
m_stringIdArray[i].saveToIff(file);}
|
||||
m_stringIdArray[i].saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save triggerArray
|
||||
@@ -3399,7 +3398,7 @@ int count;
|
||||
count = 2;
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < 2; ++i)
|
||||
m_triggerArray[i].saveToIff(file);}
|
||||
m_triggerArray[i].saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save vectorArray
|
||||
@@ -3408,7 +3407,7 @@ int count;
|
||||
count = 2;
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < 2; ++i)
|
||||
m_vectorArray[i].saveToIff(file);}
|
||||
m_vectorArray[i].saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save fileNameArray
|
||||
@@ -3417,7 +3416,7 @@ int count;
|
||||
count = 2;
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < 2; ++i)
|
||||
m_fileNameArray[i].saveToIff(file);}
|
||||
m_fileNameArray[i].saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
|
||||
@@ -3432,7 +3431,6 @@ int count;
|
||||
file.exitForm();
|
||||
} // ServerUberObjectTemplate::save
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// class ServerUberObjectTemplate::_Foo
|
||||
|
||||
@@ -3594,7 +3592,6 @@ bool ServerUberObjectTemplate::_Foo::isAppend(const char *name) const
|
||||
return TpfTemplate::isAppend(name);
|
||||
} // ServerUberObjectTemplate::_Foo::isAppend
|
||||
|
||||
|
||||
int ServerUberObjectTemplate::_Foo::getListLength(const char *name) const
|
||||
{
|
||||
return TpfTemplate::getListLength(name);
|
||||
@@ -3608,8 +3605,8 @@ int ServerUberObjectTemplate::_Foo::getListLength(const char *name) const
|
||||
*/
|
||||
void ServerUberObjectTemplate::_Foo::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();
|
||||
|
||||
@@ -3641,7 +3638,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void ServerUberObjectTemplate::_Foo::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(_Foo_tag);
|
||||
|
||||
@@ -3676,4 +3673,4 @@ int count;
|
||||
UNREF(count);
|
||||
} // ServerUberObjectTemplate::_Foo::save
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+25
-30
@@ -20,19 +20,19 @@
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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)
|
||||
//@END TFD INIT
|
||||
, m_slotsLoaded(false)
|
||||
, m_slotsAppend(false)
|
||||
, m_attributesLoaded(false)
|
||||
, m_attributesAppend(false)
|
||||
, m_templateVersion(0)
|
||||
, m_versionOk(false)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedDraftSchematicObjectTemplate::SharedDraftSchematicObjectTemplate
|
||||
|
||||
@@ -41,7 +41,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)
|
||||
@@ -60,7 +60,7 @@ SharedDraftSchematicObjectTemplate::~SharedDraftSchematicObjectTemplate()
|
||||
}
|
||||
m_attributes.clear();
|
||||
}
|
||||
//@END TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedDraftSchematicObjectTemplate::~SharedDraftSchematicObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -252,7 +252,6 @@ bool SharedDraftSchematicObjectTemplate::isAppend(const char *name) const
|
||||
return SharedIntangibleObjectTemplate::isAppend(name);
|
||||
} // SharedDraftSchematicObjectTemplate::isAppend
|
||||
|
||||
|
||||
int SharedDraftSchematicObjectTemplate::getListLength(const char *name) const
|
||||
{
|
||||
if (strcmp(name, "slots") == 0)
|
||||
@@ -275,8 +274,8 @@ int SharedDraftSchematicObjectTemplate::getListLength(const char *name) const
|
||||
*/
|
||||
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)
|
||||
{
|
||||
@@ -286,7 +285,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();
|
||||
@@ -306,7 +305,7 @@ 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))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
@@ -378,18 +377,18 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void SharedDraftSchematicObjectTemplate::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(SharedDraftSchematicObjectTemplate_tag);
|
||||
if (m_baseTemplateName.size() != 0)
|
||||
{
|
||||
file.insertForm(TAG(D,E,R,V));
|
||||
file.insertForm(TAG(D, E, R, V));
|
||||
file.insertChunk(TAG(X, X, X, X));
|
||||
file.insertChunkData(m_baseTemplateName.c_str(), m_baseTemplateName.size() + 1);
|
||||
file.exitChunk();
|
||||
file.exitForm();
|
||||
}
|
||||
file.insertForm(TAG(0,0,0,3));
|
||||
file.insertForm(TAG(0, 0, 0, 3));
|
||||
file.allowNonlinearFunctions();
|
||||
|
||||
int paramCount = 0;
|
||||
@@ -406,7 +405,7 @@ int count;
|
||||
count = m_slots.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_slots[i]->saveToIff(file);}
|
||||
m_slots[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
if (!m_attributesLoaded)
|
||||
@@ -421,7 +420,7 @@ int count;
|
||||
count = m_attributes.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_attributes[i]->saveToIff(file);}
|
||||
m_attributes[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save craftedSharedTemplate
|
||||
@@ -442,7 +441,6 @@ int count;
|
||||
file.exitForm();
|
||||
} // SharedDraftSchematicObjectTemplate::save
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// class SharedDraftSchematicObjectTemplate::_IngredientSlot
|
||||
|
||||
@@ -588,7 +586,6 @@ bool SharedDraftSchematicObjectTemplate::_IngredientSlot::isAppend(const char *n
|
||||
return TpfTemplate::isAppend(name);
|
||||
} // SharedDraftSchematicObjectTemplate::_IngredientSlot::isAppend
|
||||
|
||||
|
||||
int SharedDraftSchematicObjectTemplate::_IngredientSlot::getListLength(const char *name) const
|
||||
{
|
||||
return TpfTemplate::getListLength(name);
|
||||
@@ -602,8 +599,8 @@ int SharedDraftSchematicObjectTemplate::_IngredientSlot::getListLength(const cha
|
||||
*/
|
||||
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();
|
||||
|
||||
@@ -633,7 +630,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void SharedDraftSchematicObjectTemplate::_IngredientSlot::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(_IngredientSlot_tag);
|
||||
|
||||
@@ -662,7 +659,6 @@ int count;
|
||||
UNREF(count);
|
||||
} // SharedDraftSchematicObjectTemplate::_IngredientSlot::save
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// class SharedDraftSchematicObjectTemplate::_SchematicAttribute
|
||||
|
||||
@@ -822,7 +818,6 @@ bool SharedDraftSchematicObjectTemplate::_SchematicAttribute::isAppend(const cha
|
||||
return TpfTemplate::isAppend(name);
|
||||
} // SharedDraftSchematicObjectTemplate::_SchematicAttribute::isAppend
|
||||
|
||||
|
||||
int SharedDraftSchematicObjectTemplate::_SchematicAttribute::getListLength(const char *name) const
|
||||
{
|
||||
return TpfTemplate::getListLength(name);
|
||||
@@ -836,8 +831,8 @@ int SharedDraftSchematicObjectTemplate::_SchematicAttribute::getListLength(const
|
||||
*/
|
||||
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();
|
||||
|
||||
@@ -869,7 +864,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void SharedDraftSchematicObjectTemplate::_SchematicAttribute::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(_SchematicAttribute_tag);
|
||||
|
||||
@@ -904,4 +899,4 @@ int count;
|
||||
UNREF(count);
|
||||
} // SharedDraftSchematicObjectTemplate::_SchematicAttribute::save
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
+43
-52
@@ -20,27 +20,27 @@
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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)
|
||||
//@END TFD INIT
|
||||
, 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_templateVersion(0)
|
||||
, m_versionOk(false)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // SharedTangibleObjectTemplate::SharedTangibleObjectTemplate
|
||||
|
||||
@@ -49,7 +49,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)
|
||||
@@ -104,7 +104,7 @@ SharedTangibleObjectTemplate::~SharedTangibleObjectTemplate()
|
||||
}
|
||||
m_customizationVariableMapping.clear();
|
||||
}
|
||||
//@END TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // SharedTangibleObjectTemplate::~SharedTangibleObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -430,7 +430,6 @@ bool SharedTangibleObjectTemplate::isAppend(const char *name) const
|
||||
return SharedObjectTemplate::isAppend(name);
|
||||
} // SharedTangibleObjectTemplate::isAppend
|
||||
|
||||
|
||||
int SharedTangibleObjectTemplate::getListLength(const char *name) const
|
||||
{
|
||||
if (strcmp(name, "paletteColorCustomizationVariables") == 0)
|
||||
@@ -469,8 +468,8 @@ int SharedTangibleObjectTemplate::getListLength(const char *name) const
|
||||
*/
|
||||
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)
|
||||
{
|
||||
@@ -480,7 +479,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();
|
||||
@@ -500,7 +499,7 @@ 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))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
@@ -654,18 +653,18 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void SharedTangibleObjectTemplate::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(SharedTangibleObjectTemplate_tag);
|
||||
if (m_baseTemplateName.size() != 0)
|
||||
{
|
||||
file.insertForm(TAG(D,E,R,V));
|
||||
file.insertForm(TAG(D, E, R, V));
|
||||
file.insertChunk(TAG(X, X, X, X));
|
||||
file.insertChunkData(m_baseTemplateName.c_str(), m_baseTemplateName.size() + 1);
|
||||
file.exitChunk();
|
||||
file.exitForm();
|
||||
}
|
||||
file.insertForm(TAG(0,0,1,0));
|
||||
file.insertForm(TAG(0, 0, 1, 0));
|
||||
file.allowNonlinearFunctions();
|
||||
|
||||
int paramCount = 0;
|
||||
@@ -682,7 +681,7 @@ int count;
|
||||
count = m_paletteColorCustomizationVariables.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_paletteColorCustomizationVariables[i]->saveToIff(file);}
|
||||
m_paletteColorCustomizationVariables[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
if (!m_rangedIntCustomizationVariablesLoaded)
|
||||
@@ -697,7 +696,7 @@ int count;
|
||||
count = m_rangedIntCustomizationVariables.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_rangedIntCustomizationVariables[i]->saveToIff(file);}
|
||||
m_rangedIntCustomizationVariables[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
if (!m_constStringCustomizationVariablesLoaded)
|
||||
@@ -712,7 +711,7 @@ int count;
|
||||
count = m_constStringCustomizationVariables.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_constStringCustomizationVariables[i]->saveToIff(file);}
|
||||
m_constStringCustomizationVariables[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
if (!m_socketDestinationsLoaded)
|
||||
@@ -727,7 +726,7 @@ int count;
|
||||
count = m_socketDestinations.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_socketDestinations[i]->saveToIff(file);}
|
||||
m_socketDestinations[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save structureFootprintFileName
|
||||
@@ -760,7 +759,7 @@ int count;
|
||||
count = m_certificationsRequired.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_certificationsRequired[i]->saveToIff(file);}
|
||||
m_certificationsRequired[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
if (!m_customizationVariableMappingLoaded)
|
||||
@@ -775,7 +774,7 @@ int count;
|
||||
count = m_customizationVariableMapping.size();
|
||||
file.insertChunkData(&count, sizeof(count));
|
||||
{for (int i = 0; i < count; ++i)
|
||||
m_customizationVariableMapping[i]->saveToIff(file);}
|
||||
m_customizationVariableMapping[i]->saveToIff(file); }
|
||||
file.exitChunk();
|
||||
++paramCount;
|
||||
// save clientVisabilityFlag
|
||||
@@ -796,7 +795,6 @@ int count;
|
||||
file.exitForm();
|
||||
} // SharedTangibleObjectTemplate::save
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// class SharedTangibleObjectTemplate::_ConstStringCustomizationVariable
|
||||
|
||||
@@ -940,7 +938,6 @@ bool SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::isAppend(c
|
||||
return TpfTemplate::isAppend(name);
|
||||
} // SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::isAppend
|
||||
|
||||
|
||||
int SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::getListLength(const char *name) const
|
||||
{
|
||||
return TpfTemplate::getListLength(name);
|
||||
@@ -954,8 +951,8 @@ int SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::getListLeng
|
||||
*/
|
||||
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();
|
||||
|
||||
@@ -985,7 +982,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(_ConstStringCustomizationVariable_tag);
|
||||
|
||||
@@ -1014,7 +1011,6 @@ int count;
|
||||
UNREF(count);
|
||||
} // SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::save
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// class SharedTangibleObjectTemplate::_CustomizationVariableMapping
|
||||
|
||||
@@ -1158,7 +1154,6 @@ bool SharedTangibleObjectTemplate::_CustomizationVariableMapping::isAppend(const
|
||||
return TpfTemplate::isAppend(name);
|
||||
} // SharedTangibleObjectTemplate::_CustomizationVariableMapping::isAppend
|
||||
|
||||
|
||||
int SharedTangibleObjectTemplate::_CustomizationVariableMapping::getListLength(const char *name) const
|
||||
{
|
||||
return TpfTemplate::getListLength(name);
|
||||
@@ -1172,8 +1167,8 @@ int SharedTangibleObjectTemplate::_CustomizationVariableMapping::getListLength(c
|
||||
*/
|
||||
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();
|
||||
|
||||
@@ -1203,7 +1198,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void SharedTangibleObjectTemplate::_CustomizationVariableMapping::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(_CustomizationVariableMapping_tag);
|
||||
|
||||
@@ -1232,7 +1227,6 @@ int count;
|
||||
UNREF(count);
|
||||
} // SharedTangibleObjectTemplate::_CustomizationVariableMapping::save
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// class SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable
|
||||
|
||||
@@ -1392,7 +1386,6 @@ bool SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::isAppend(
|
||||
return TpfTemplate::isAppend(name);
|
||||
} // SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::isAppend
|
||||
|
||||
|
||||
int SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getListLength(const char *name) const
|
||||
{
|
||||
return TpfTemplate::getListLength(name);
|
||||
@@ -1406,8 +1399,8 @@ int SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getListLen
|
||||
*/
|
||||
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();
|
||||
|
||||
@@ -1439,7 +1432,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(_PaletteColorCustomizationVariable_tag);
|
||||
|
||||
@@ -1474,7 +1467,6 @@ int count;
|
||||
UNREF(count);
|
||||
} // SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::save
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// class SharedTangibleObjectTemplate::_RangedIntCustomizationVariable
|
||||
|
||||
@@ -1648,7 +1640,6 @@ bool SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::isAppend(con
|
||||
return TpfTemplate::isAppend(name);
|
||||
} // SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::isAppend
|
||||
|
||||
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getListLength(const char *name) const
|
||||
{
|
||||
return TpfTemplate::getListLength(name);
|
||||
@@ -1662,8 +1653,8 @@ int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getListLength
|
||||
*/
|
||||
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();
|
||||
|
||||
@@ -1697,7 +1688,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
*/
|
||||
void SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::save(Iff &file)
|
||||
{
|
||||
int count;
|
||||
int count;
|
||||
|
||||
file.insertForm(_RangedIntCustomizationVariable_tag);
|
||||
|
||||
@@ -1738,4 +1729,4 @@ int count;
|
||||
UNREF(count);
|
||||
} // SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::save
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
File diff suppressed because it is too large
Load Diff
+13
-10
@@ -19,12 +19,15 @@
|
||||
// ======================================================================
|
||||
|
||||
TaskLocateStructure::TaskLocateStructure(const NetworkId &itemId, const std::string &whoRequested) :
|
||||
TaskRequest(),
|
||||
m_itemId(itemId),
|
||||
m_whoRequested(whoRequested)
|
||||
TaskRequest(),
|
||||
m_itemId(itemId),
|
||||
m_whoRequested(whoRequested),
|
||||
m_x(0),
|
||||
m_z(0),
|
||||
m_found(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskLocateStructure::~TaskLocateStructure()
|
||||
@@ -38,7 +41,7 @@ bool TaskLocateStructure::process(DB::Session *session)
|
||||
LocateStructureQuery query;
|
||||
query.item_id = m_itemId;
|
||||
|
||||
if (! (session->exec(&query)))
|
||||
if (!(session->exec(&query)))
|
||||
return false;
|
||||
query.done();
|
||||
|
||||
@@ -49,8 +52,8 @@ bool TaskLocateStructure::process(DB::Session *session)
|
||||
m_z = query.z.getValue();
|
||||
m_sceneId = query.sceneId.getValueASCII();
|
||||
}
|
||||
|
||||
LOG("CustomerService", ("playerStructure: Locate structure (%s): result %s", m_itemId.getValueString().c_str(), (m_found? "found": "not found")));
|
||||
|
||||
LOG("CustomerService", ("playerStructure: Locate structure (%s): result %s", m_itemId.getValueString().c_str(), (m_found ? "found" : "not found")));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -77,7 +80,7 @@ void TaskLocateStructure::onComplete()
|
||||
|
||||
void TaskLocateStructure::LocateStructureQuery::getSQL(std::string &sql)
|
||||
{
|
||||
sql=std::string("begin ") + DatabaseProcess::getInstance().getSchemaQualifier()+"loader.locate_structure(:item_id, :x, :z, :scene_id, :found); end;";
|
||||
sql = std::string("begin ") + DatabaseProcess::getInstance().getSchemaQualifier() + "loader.locate_structure(:item_id, :x, :z, :scene_id, :found); end;";
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
@@ -89,7 +92,7 @@ bool TaskLocateStructure::LocateStructureQuery::bindParameters()
|
||||
if (!bindParameter(z)) return false;
|
||||
if (!bindParameter(sceneId)) return false;
|
||||
if (!bindParameter(found)) return false;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -113,4 +116,4 @@ TaskLocateStructure::LocateStructureQuery::LocateStructureQuery()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
// ======================================================================
|
||||
@@ -18,13 +18,14 @@
|
||||
// ======================================================================
|
||||
|
||||
TaskMoveToPlayer::TaskMoveToPlayer(const NetworkId &oid, const NetworkId &player, const std::string &whoRequested) :
|
||||
TaskRequest(),
|
||||
m_oid(oid),
|
||||
m_player(player),
|
||||
m_whoRequested(whoRequested)
|
||||
TaskRequest(),
|
||||
m_oid(oid),
|
||||
m_player(player),
|
||||
m_whoRequested(whoRequested),
|
||||
m_result(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskMoveToPlayer::~TaskMoveToPlayer()
|
||||
@@ -38,13 +39,13 @@ bool TaskMoveToPlayer::process(DB::Session *session)
|
||||
MoveToPlayerQuery query;
|
||||
query.oid = m_oid;
|
||||
query.player = m_player;
|
||||
|
||||
if (! (session->exec(&query)))
|
||||
|
||||
if (!(session->exec(&query)))
|
||||
return false;
|
||||
query.done();
|
||||
|
||||
m_result = query.result.getValue();
|
||||
|
||||
|
||||
LOG("DatabaseRestore", ("Move Item (%s) to Player (%s): result %i", m_oid.getValueString().c_str(), m_player.getValueString().c_str(), m_result));
|
||||
return true;
|
||||
}
|
||||
@@ -56,81 +57,81 @@ void TaskMoveToPlayer::onComplete()
|
||||
std::string message;
|
||||
switch (m_result)
|
||||
{
|
||||
case 1:
|
||||
message = "Item moved. (It may not reappear until the next server restart.)";
|
||||
break;
|
||||
case 1:
|
||||
message = "Item moved. (It may not reappear until the next server restart.)";
|
||||
break;
|
||||
|
||||
case 2:
|
||||
message = "Could not find player's inventory";
|
||||
break;
|
||||
case 2:
|
||||
message = "Could not find player's inventory";
|
||||
break;
|
||||
|
||||
case 3:
|
||||
message = "Object id does not exist";
|
||||
break;
|
||||
case 3:
|
||||
message = "Object id does not exist";
|
||||
break;
|
||||
|
||||
case 4:
|
||||
message = "The database returned an unknown error code";
|
||||
break;
|
||||
case 4:
|
||||
message = "The database returned an unknown error code";
|
||||
break;
|
||||
|
||||
case 5:
|
||||
message = "Object id cannot be a player";
|
||||
break;
|
||||
case 5:
|
||||
message = "Object id cannot be a player";
|
||||
break;
|
||||
|
||||
case 6:
|
||||
message = "Object id cannot be object/tangible/inventory/character_inventory.iff";
|
||||
break;
|
||||
case 6:
|
||||
message = "Object id cannot be object/tangible/inventory/character_inventory.iff";
|
||||
break;
|
||||
|
||||
case 7:
|
||||
message = "Object id cannot be object/tangible/mission_bag/mission_bag.iff";
|
||||
break;
|
||||
case 7:
|
||||
message = "Object id cannot be object/tangible/mission_bag/mission_bag.iff";
|
||||
break;
|
||||
|
||||
case 8:
|
||||
message = "Object id cannot be object/tangible/datapad/character_datapad.iff";
|
||||
break;
|
||||
case 8:
|
||||
message = "Object id cannot be object/tangible/datapad/character_datapad.iff";
|
||||
break;
|
||||
|
||||
case 9:
|
||||
message = "Object id cannot be object/tangible/bank/character_bank.iff";
|
||||
break;
|
||||
case 9:
|
||||
message = "Object id cannot be object/tangible/bank/character_bank.iff";
|
||||
break;
|
||||
|
||||
case 10:
|
||||
message = "Object id cannot be object/weapon/melee/unarmed/unarmed_default_player.iff";
|
||||
break;
|
||||
case 10:
|
||||
message = "Object id cannot be object/weapon/melee/unarmed/unarmed_default_player.iff";
|
||||
break;
|
||||
|
||||
case 11:
|
||||
message = "Object id cannot be object/player/player.iff";
|
||||
break;
|
||||
case 11:
|
||||
message = "Object id cannot be object/player/player.iff";
|
||||
break;
|
||||
|
||||
case 12:
|
||||
message = "Object id cannot be object/cell/cell.iff";
|
||||
break;
|
||||
case 12:
|
||||
message = "Object id cannot be object/cell/cell.iff";
|
||||
break;
|
||||
|
||||
case 13:
|
||||
message = "Object id cannot be object/tangible/inventory/vendor_inventory.iff";
|
||||
break;
|
||||
case 13:
|
||||
message = "Object id cannot be object/tangible/inventory/vendor_inventory.iff";
|
||||
break;
|
||||
|
||||
case 14:
|
||||
message = "Object cannot be contained directly by a datapad";
|
||||
break;
|
||||
|
||||
case 15:
|
||||
message = "Object cannot be a building";
|
||||
break;
|
||||
|
||||
case 16:
|
||||
message = "Object cannot be an installation";
|
||||
break;
|
||||
|
||||
case 17:
|
||||
message = "Object cannot be a ship";
|
||||
break;
|
||||
|
||||
default:
|
||||
message = "admin.move_item_to_player() returned an unknown error code";
|
||||
break;
|
||||
case 14:
|
||||
message = "Object cannot be contained directly by a datapad";
|
||||
break;
|
||||
|
||||
case 15:
|
||||
message = "Object cannot be a building";
|
||||
break;
|
||||
|
||||
case 16:
|
||||
message = "Object cannot be an installation";
|
||||
break;
|
||||
|
||||
case 17:
|
||||
message = "Object cannot be a ship";
|
||||
break;
|
||||
|
||||
default:
|
||||
message = "admin.move_item_to_player() returned an unknown error code";
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
GenericValueTypeMessage<std::pair<std::string, std::string> > reply("DatabaseConsoleReplyMessage",
|
||||
std::make_pair(m_whoRequested, message));
|
||||
std::make_pair(m_whoRequested, message));
|
||||
DatabaseProcess::getInstance().sendToAnyGameServer(reply);
|
||||
}
|
||||
|
||||
@@ -138,7 +139,7 @@ void TaskMoveToPlayer::onComplete()
|
||||
|
||||
void TaskMoveToPlayer::MoveToPlayerQuery::getSQL(std::string &sql)
|
||||
{
|
||||
sql=std::string("begin :result := ") + DatabaseProcess::getInstance().getSchemaQualifier()+"admin.move_item_to_player (:item_id, :player_id); end;";
|
||||
sql = std::string("begin :result := ") + DatabaseProcess::getInstance().getSchemaQualifier() + "admin.move_item_to_player (:item_id, :player_id); end;";
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
@@ -148,7 +149,7 @@ bool TaskMoveToPlayer::MoveToPlayerQuery::bindParameters()
|
||||
if (!bindParameter(result)) return false;
|
||||
if (!bindParameter(oid)) return false;
|
||||
if (!bindParameter(player)) return false;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -172,4 +173,4 @@ TaskMoveToPlayer::MoveToPlayerQuery::MoveToPlayerQuery()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
// ======================================================================
|
||||
+25
-22
@@ -18,12 +18,15 @@
|
||||
// ======================================================================
|
||||
|
||||
TaskRestoreCharacter::TaskRestoreCharacter(const NetworkId &characterId, const std::string &whoRequested) :
|
||||
TaskRequest(),
|
||||
m_characterId(characterId),
|
||||
m_whoRequested(whoRequested)
|
||||
TaskRequest(),
|
||||
m_characterId(characterId),
|
||||
m_whoRequested(whoRequested),
|
||||
m_result(0),
|
||||
m_account(0),
|
||||
m_templateId(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskRestoreCharacter::~TaskRestoreCharacter()
|
||||
@@ -36,8 +39,8 @@ bool TaskRestoreCharacter::process(DB::Session *session)
|
||||
{
|
||||
RestoreCharacterQuery query;
|
||||
query.character_id = m_characterId;
|
||||
|
||||
if (! (session->exec(&query)))
|
||||
|
||||
if (!(session->exec(&query)))
|
||||
return false;
|
||||
query.done();
|
||||
|
||||
@@ -45,7 +48,7 @@ bool TaskRestoreCharacter::process(DB::Session *session)
|
||||
query.character_name.getValue(m_characterName);
|
||||
query.account.getValue(m_account);
|
||||
query.template_id.getValue(m_templateId);
|
||||
|
||||
|
||||
LOG("DatabaseRestore", ("Restore Character (%s): result %i", m_characterId.getValueString().c_str(), m_result));
|
||||
return true;
|
||||
}
|
||||
@@ -54,7 +57,7 @@ bool TaskRestoreCharacter::process(DB::Session *session)
|
||||
|
||||
void TaskRestoreCharacter::onComplete()
|
||||
{
|
||||
if (m_result==1)
|
||||
if (m_result == 1)
|
||||
{
|
||||
LoginRestoreCharacterMessage msg(m_whoRequested, m_characterId, m_account, m_characterName, m_templateId, false); //TODO: "/restoreJedi" command
|
||||
DatabaseProcess::getInstance().sendToCentralServer(msg, true);
|
||||
@@ -64,21 +67,21 @@ void TaskRestoreCharacter::onComplete()
|
||||
std::string message;
|
||||
switch (m_result)
|
||||
{
|
||||
case 2:
|
||||
message = "Object id was incorrect or character was not deleted";
|
||||
break;
|
||||
case 2:
|
||||
message = "Object id was incorrect or character was not deleted";
|
||||
break;
|
||||
|
||||
case 3:
|
||||
message = "There was an error in the database while attempting to restore the character.";
|
||||
break;
|
||||
case 3:
|
||||
message = "There was an error in the database while attempting to restore the character.";
|
||||
break;
|
||||
|
||||
default:
|
||||
message = "The database returned an unknown code in response to the request to restore the character.";
|
||||
break;
|
||||
default:
|
||||
message = "The database returned an unknown code in response to the request to restore the character.";
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
GenericValueTypeMessage<std::pair<std::string, std::string> > reply("DatabaseConsoleReplyMessage",
|
||||
std::make_pair(m_whoRequested, message));
|
||||
std::make_pair(m_whoRequested, message));
|
||||
DatabaseProcess::getInstance().sendToAnyGameServer(reply);
|
||||
}
|
||||
}
|
||||
@@ -87,7 +90,7 @@ void TaskRestoreCharacter::onComplete()
|
||||
|
||||
void TaskRestoreCharacter::RestoreCharacterQuery::getSQL(std::string &sql)
|
||||
{
|
||||
sql=std::string("begin :result := ") + DatabaseProcess::getInstance().getSchemaQualifier()+"admin.restore_character (:character_id, :character_name, :account, :template_id); end;";
|
||||
sql = std::string("begin :result := ") + DatabaseProcess::getInstance().getSchemaQualifier() + "admin.restore_character (:character_id, :character_name, :account, :template_id); end;";
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
@@ -99,7 +102,7 @@ bool TaskRestoreCharacter::RestoreCharacterQuery::bindParameters()
|
||||
if (!bindParameter(character_name)) return false;
|
||||
if (!bindParameter(account)) return false;
|
||||
if (!bindParameter(template_id)) return false;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -123,4 +126,4 @@ TaskRestoreCharacter::RestoreCharacterQuery::RestoreCharacterQuery()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
// ======================================================================
|
||||
@@ -18,12 +18,13 @@
|
||||
// ======================================================================
|
||||
|
||||
TaskRestoreHouse::TaskRestoreHouse(const NetworkId &houseId, const std::string &whoRequested) :
|
||||
TaskRequest(),
|
||||
m_houseId(houseId),
|
||||
m_whoRequested(whoRequested)
|
||||
TaskRequest(),
|
||||
m_houseId(houseId),
|
||||
m_whoRequested(whoRequested),
|
||||
m_result(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskRestoreHouse::~TaskRestoreHouse()
|
||||
@@ -36,13 +37,13 @@ bool TaskRestoreHouse::process(DB::Session *session)
|
||||
{
|
||||
RestoreHouseQuery query;
|
||||
query.house_id = m_houseId;
|
||||
|
||||
if (! (session->exec(&query)))
|
||||
|
||||
if (!(session->exec(&query)))
|
||||
return false;
|
||||
query.done();
|
||||
|
||||
m_result = query.result.getValue();
|
||||
|
||||
|
||||
LOG("DatabaseRestore", ("Restore house (%s): result %i", m_houseId.getValueString().c_str(), m_result));
|
||||
return true;
|
||||
}
|
||||
@@ -54,25 +55,25 @@ void TaskRestoreHouse::onComplete()
|
||||
std::string message;
|
||||
switch (m_result)
|
||||
{
|
||||
case 1:
|
||||
message = "House restored. (It may not reappear until the next server restart.)";
|
||||
break;
|
||||
case 1:
|
||||
message = "House restored. (It may not reappear until the next server restart.)";
|
||||
break;
|
||||
|
||||
case 2:
|
||||
message = "Object id was incorrect or house was not deleted";
|
||||
break;
|
||||
case 2:
|
||||
message = "Object id was incorrect or house was not deleted";
|
||||
break;
|
||||
|
||||
case 3:
|
||||
message = "There was an error in the database while attempting to restore the house.";
|
||||
break;
|
||||
case 3:
|
||||
message = "There was an error in the database while attempting to restore the house.";
|
||||
break;
|
||||
|
||||
default:
|
||||
message = "The database returned an unknown code in response to the request to restore the house.";
|
||||
break;
|
||||
default:
|
||||
message = "The database returned an unknown code in response to the request to restore the house.";
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
GenericValueTypeMessage<std::pair<std::string, std::string> > reply("DatabaseConsoleReplyMessage",
|
||||
std::make_pair(m_whoRequested, message));
|
||||
std::make_pair(m_whoRequested, message));
|
||||
DatabaseProcess::getInstance().sendToAnyGameServer(reply);
|
||||
}
|
||||
|
||||
@@ -80,7 +81,7 @@ void TaskRestoreHouse::onComplete()
|
||||
|
||||
void TaskRestoreHouse::RestoreHouseQuery::getSQL(std::string &sql)
|
||||
{
|
||||
sql=std::string("begin :result := ") + DatabaseProcess::getInstance().getSchemaQualifier()+"admin.restore_house (:house_id); end;";
|
||||
sql = std::string("begin :result := ") + DatabaseProcess::getInstance().getSchemaQualifier() + "admin.restore_house (:house_id); end;";
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
@@ -89,7 +90,7 @@ bool TaskRestoreHouse::RestoreHouseQuery::bindParameters()
|
||||
{
|
||||
if (!bindParameter(result)) return false;
|
||||
if (!bindParameter(house_id)) return false;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -113,4 +114,4 @@ TaskRestoreHouse::RestoreHouseQuery::RestoreHouseQuery()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
// ======================================================================
|
||||
@@ -18,12 +18,13 @@
|
||||
// ======================================================================
|
||||
|
||||
TaskUndeleteItem::TaskUndeleteItem(const NetworkId &itemId, const std::string &whoRequested) :
|
||||
TaskRequest(),
|
||||
m_itemId(itemId),
|
||||
m_whoRequested(whoRequested)
|
||||
TaskRequest(),
|
||||
m_itemId(itemId),
|
||||
m_whoRequested(whoRequested),
|
||||
m_result(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskUndeleteItem::~TaskUndeleteItem()
|
||||
@@ -37,12 +38,12 @@ bool TaskUndeleteItem::process(DB::Session *session)
|
||||
UndeleteItemQuery query;
|
||||
query.item_id = m_itemId;
|
||||
|
||||
if (! (session->exec(&query)))
|
||||
if (!(session->exec(&query)))
|
||||
return false;
|
||||
query.done();
|
||||
|
||||
m_result = query.result.getValue();
|
||||
|
||||
|
||||
LOG("DatabaseRestore", ("Undelete Item (%s): result %i", m_itemId.getValueString().c_str(), m_result));
|
||||
return true;
|
||||
}
|
||||
@@ -54,29 +55,29 @@ void TaskUndeleteItem::onComplete()
|
||||
std::string message;
|
||||
switch (m_result)
|
||||
{
|
||||
case 1:
|
||||
message = "Item restored.";
|
||||
break;
|
||||
case 1:
|
||||
message = "Item restored.";
|
||||
break;
|
||||
|
||||
case 2:
|
||||
message = "Object id was incorrect or item was not deleted";
|
||||
break;
|
||||
case 2:
|
||||
message = "Object id was incorrect or item was not deleted";
|
||||
break;
|
||||
|
||||
case 3:
|
||||
message = "There was an error in the database while attempting to undelete the item.";
|
||||
break;
|
||||
case 4:
|
||||
message = "Item restored. Loading this item from database...";
|
||||
Loader::getInstance().locateStructure(m_itemId, m_whoRequested);
|
||||
break;
|
||||
case 3:
|
||||
message = "There was an error in the database while attempting to undelete the item.";
|
||||
break;
|
||||
case 4:
|
||||
message = "Item restored. Loading this item from database...";
|
||||
Loader::getInstance().locateStructure(m_itemId, m_whoRequested);
|
||||
break;
|
||||
|
||||
default:
|
||||
message = "The database returned an unknown code in response to the request to undelete the item.";
|
||||
break;
|
||||
default:
|
||||
message = "The database returned an unknown code in response to the request to undelete the item.";
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
GenericValueTypeMessage<std::pair<std::string, std::string> > reply("DatabaseConsoleReplyMessage",
|
||||
std::make_pair(m_whoRequested, message));
|
||||
std::make_pair(m_whoRequested, message));
|
||||
DatabaseProcess::getInstance().sendToAnyGameServer(reply);
|
||||
}
|
||||
|
||||
@@ -84,7 +85,7 @@ void TaskUndeleteItem::onComplete()
|
||||
|
||||
void TaskUndeleteItem::UndeleteItemQuery::getSQL(std::string &sql)
|
||||
{
|
||||
sql=std::string("begin :result := ") + DatabaseProcess::getInstance().getSchemaQualifier()+"admin.undelete_item (:item_id); end;";
|
||||
sql = std::string("begin :result := ") + DatabaseProcess::getInstance().getSchemaQualifier() + "admin.undelete_item (:item_id); end;";
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
@@ -93,7 +94,7 @@ bool TaskUndeleteItem::UndeleteItemQuery::bindParameters()
|
||||
{
|
||||
if (!bindParameter(result)) return false;
|
||||
if (!bindParameter(item_id)) return false;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -117,4 +118,4 @@ TaskUndeleteItem::UndeleteItemQuery::UndeleteItemQuery()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
// ======================================================================
|
||||
+11
-11
@@ -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 ServerJediManagerObjectTemplate::ms_allowDefaultTemplateParams = true;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
ServerJediManagerObjectTemplate::ServerJediManagerObjectTemplate(const std::string & filename)
|
||||
//@BEGIN TFD INIT
|
||||
: ServerUniverseObjectTemplate(filename)
|
||||
,m_versionOk(true)
|
||||
//@END TFD INIT
|
||||
, m_versionOk(true)
|
||||
, m_templateVersion(0)
|
||||
//@END TFD INIT
|
||||
{
|
||||
} // ServerJediManagerObjectTemplate::ServerJediManagerObjectTemplate
|
||||
|
||||
@@ -45,8 +45,8 @@ ServerJediManagerObjectTemplate::ServerJediManagerObjectTemplate(const std::stri
|
||||
*/
|
||||
ServerJediManagerObjectTemplate::~ServerJediManagerObjectTemplate()
|
||||
{
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
//@BEGIN TFD CLEANUP
|
||||
//@END TFD CLEANUP
|
||||
} // ServerJediManagerObjectTemplate::~ServerJediManagerObjectTemplate
|
||||
|
||||
/**
|
||||
@@ -131,8 +131,8 @@ void ServerJediManagerObjectTemplate::testValues(void) const
|
||||
*/
|
||||
void ServerJediManagerObjectTemplate::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() != ServerJediManagerObjectTemplate_tag)
|
||||
{
|
||||
@@ -142,7 +142,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();
|
||||
@@ -162,7 +162,7 @@ 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))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
@@ -183,4 +183,4 @@ char paramName[MAX_NAME_SIZE];
|
||||
return;
|
||||
} // ServerJediManagerObjectTemplate::load
|
||||
|
||||
//@END TFD
|
||||
//@END TFD
|
||||
@@ -6,7 +6,6 @@
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
|
||||
#ifndef _INCLUDED_CombatEngineData_H
|
||||
#define _INCLUDED_CombatEngineData_H
|
||||
|
||||
@@ -67,19 +66,19 @@ namespace CombatEngineData
|
||||
|
||||
enum DamageType
|
||||
{
|
||||
DT_none = 0x00000000,
|
||||
DT_kinetic = 0x00000001,
|
||||
DT_energy = 0x00000002,
|
||||
DT_blast = 0x00000004,
|
||||
DT_stun = 0x00000008,
|
||||
DT_restraint = 0x00000010,
|
||||
DT_elemental_heat = 0x00000020,
|
||||
DT_elemental_cold = 0x00000040,
|
||||
DT_elemental_acid = 0x00000080,
|
||||
DT_elemental_eletrical = 0x00000100,
|
||||
DT_environmental_heat = 0x00000200,
|
||||
DT_environmental_cold = 0x00000400,
|
||||
DT_environmental_acid = 0x00000800,
|
||||
DT_none = 0x00000000,
|
||||
DT_kinetic = 0x00000001,
|
||||
DT_energy = 0x00000002,
|
||||
DT_blast = 0x00000004,
|
||||
DT_stun = 0x00000008,
|
||||
DT_restraint = 0x00000010,
|
||||
DT_elemental_heat = 0x00000020,
|
||||
DT_elemental_cold = 0x00000040,
|
||||
DT_elemental_acid = 0x00000080,
|
||||
DT_elemental_eletrical = 0x00000100,
|
||||
DT_environmental_heat = 0x00000200,
|
||||
DT_environmental_cold = 0x00000400,
|
||||
DT_environmental_acid = 0x00000800,
|
||||
DT_environmental_electrical = 0x00001000
|
||||
};
|
||||
|
||||
@@ -109,14 +108,14 @@ namespace CombatEngineData
|
||||
NetworkId::NetworkIdType target; // if only one target is given
|
||||
NetworkId::NetworkIdType *targets; // for multiple targets
|
||||
} targetData;
|
||||
|
||||
|
||||
struct
|
||||
{
|
||||
//@todo make this a NetworkId
|
||||
NetworkId::NetworkIdType weapon; // if 0, use attacker's primary weapon
|
||||
int mode; // 0 = primary, 1 = secondary, etc
|
||||
} attackData;
|
||||
|
||||
|
||||
int attitudeData;
|
||||
Postures::Enumerator postureData;
|
||||
} actionData;
|
||||
@@ -137,23 +136,23 @@ namespace CombatEngineData
|
||||
{
|
||||
DamageData(void);
|
||||
|
||||
std::vector<AttribMod::AttribMod> damage;// list of attribute modifiers this damage
|
||||
// caused, pre armor effectiveness
|
||||
CachedNetworkId attackerId; // who caused the damage (nullptr for
|
||||
// environmental effects, etc)
|
||||
std::vector<AttribMod::AttribMod> damage;// list of attribute modifiers this damage
|
||||
// caused, pre armor effectiveness
|
||||
CachedNetworkId attackerId; // who caused the damage (nullptr for
|
||||
// environmental effects, etc)
|
||||
NetworkId weaponId; // id of the weapon used
|
||||
DamageType damageType;
|
||||
uint16 hitLocationIndex;
|
||||
uint16 actionId;
|
||||
bool wounded;
|
||||
bool ignoreInvulnerable;
|
||||
// MessageQueueCombatAction * combatActionMessage;
|
||||
// MessageQueueCombatAction * combatActionMessage;
|
||||
};
|
||||
|
||||
struct DefenseData
|
||||
{
|
||||
std::vector<DamageData> damage; // list of damage I have taken this
|
||||
// timeslice
|
||||
std::vector<DamageData> damage; // list of damage I have taken this
|
||||
// timeslice
|
||||
};
|
||||
|
||||
struct CombatData
|
||||
@@ -162,7 +161,6 @@ namespace CombatEngineData
|
||||
DefenseData defenseData;
|
||||
};
|
||||
|
||||
|
||||
//--------------------------------------------------
|
||||
// CombatEngineData inline functions
|
||||
|
||||
@@ -171,6 +169,7 @@ namespace CombatEngineData
|
||||
type = none;
|
||||
memset(&actionData, 0, sizeof(actionData));
|
||||
sequenceId = 0;
|
||||
targetSelf = 0;
|
||||
} // ActionItem::ActionItem
|
||||
|
||||
inline ActionItem::~ActionItem(void)
|
||||
@@ -195,13 +194,11 @@ namespace CombatEngineData
|
||||
actionId(0),
|
||||
wounded(false),
|
||||
ignoreInvulnerable(false)
|
||||
// combatActionMessage(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
// combatActionMessage(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
const char *const getCombatDefenseName(CombatDefense combatDefense);
|
||||
};
|
||||
|
||||
|
||||
#endif // _INCLUDED_CombatEngineData_H
|
||||
|
||||
Reference in New Issue
Block a user