mirror of
https://github.com/SWG-Source/src.git
synced 2026-07-28 22:15:49 -04:00
remove all the set but not used testDataValue warnings - coan is a great tool! http://coan2.sourceforge.net/
This commit is contained in:
+15
-106
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "sharedGame/FirstSharedGame.h"
|
||||
#include "SharedBattlefieldMarkerObjectTemplate.h"
|
||||
#include "sharedDebug/DataLint.h"
|
||||
|
||||
#include "sharedFile/Iff.h"
|
||||
#include "sharedMath/Vector.h"
|
||||
#include "sharedObject/ObjectTemplate.h"
|
||||
@@ -104,22 +104,14 @@ Tag SharedBattlefieldMarkerObjectTemplate::getHighestTemplateVersion(void) const
|
||||
} // SharedBattlefieldMarkerObjectTemplate::getHighestTemplateVersion
|
||||
|
||||
//@BEGIN TFD
|
||||
int SharedBattlefieldMarkerObjectTemplate::getNumberOfPoles(bool testData) const
|
||||
int SharedBattlefieldMarkerObjectTemplate::getNumberOfPoles() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int testDataValue = 0;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedBattlefieldMarkerObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedBattlefieldMarkerObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getNumberOfPoles(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_numberOfPoles.isLoaded())
|
||||
@@ -159,31 +151,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedBattlefieldMarkerObjectTemplate::getNumberOfPoles
|
||||
|
||||
int SharedBattlefieldMarkerObjectTemplate::getNumberOfPolesMin(bool testData) const
|
||||
int SharedBattlefieldMarkerObjectTemplate::getNumberOfPolesMin() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int testDataValue = 0;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedBattlefieldMarkerObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedBattlefieldMarkerObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getNumberOfPolesMin(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_numberOfPoles.isLoaded())
|
||||
@@ -223,31 +202,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedBattlefieldMarkerObjectTemplate::getNumberOfPolesMin
|
||||
|
||||
int SharedBattlefieldMarkerObjectTemplate::getNumberOfPolesMax(bool testData) const
|
||||
int SharedBattlefieldMarkerObjectTemplate::getNumberOfPolesMax() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int testDataValue = 0;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedBattlefieldMarkerObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedBattlefieldMarkerObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getNumberOfPolesMax(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_numberOfPoles.isLoaded())
|
||||
@@ -287,31 +253,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedBattlefieldMarkerObjectTemplate::getNumberOfPolesMax
|
||||
|
||||
float SharedBattlefieldMarkerObjectTemplate::getRadius(bool testData) const
|
||||
float SharedBattlefieldMarkerObjectTemplate::getRadius() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedBattlefieldMarkerObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedBattlefieldMarkerObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getRadius(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_radius.isLoaded())
|
||||
@@ -351,31 +304,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedBattlefieldMarkerObjectTemplate::getRadius
|
||||
|
||||
float SharedBattlefieldMarkerObjectTemplate::getRadiusMin(bool testData) const
|
||||
float SharedBattlefieldMarkerObjectTemplate::getRadiusMin() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedBattlefieldMarkerObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedBattlefieldMarkerObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getRadiusMin(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_radius.isLoaded())
|
||||
@@ -415,31 +355,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedBattlefieldMarkerObjectTemplate::getRadiusMin
|
||||
|
||||
float SharedBattlefieldMarkerObjectTemplate::getRadiusMax(bool testData) const
|
||||
float SharedBattlefieldMarkerObjectTemplate::getRadiusMax() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedBattlefieldMarkerObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedBattlefieldMarkerObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getRadiusMax(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_radius.isLoaded())
|
||||
@@ -479,28 +406,10 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedBattlefieldMarkerObjectTemplate::getRadiusMax
|
||||
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedBattlefieldMarkerObjectTemplate::testValues(void) const
|
||||
{
|
||||
IGNORE_RETURN(getNumberOfPolesMin(true));
|
||||
IGNORE_RETURN(getNumberOfPolesMax(true));
|
||||
IGNORE_RETURN(getRadiusMin(true));
|
||||
IGNORE_RETURN(getRadiusMax(true));
|
||||
SharedTangibleObjectTemplate::testValues();
|
||||
} // SharedBattlefieldMarkerObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -543,8 +452,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,1))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
|
||||
+6
-11
@@ -44,18 +44,13 @@ public:
|
||||
|
||||
//@BEGIN TFD
|
||||
public:
|
||||
int getNumberOfPoles(bool testData = false) const;
|
||||
int getNumberOfPolesMin(bool testData = false) const;
|
||||
int getNumberOfPolesMax(bool testData = false) const;
|
||||
float getRadius(bool testData = false) const;
|
||||
float getRadiusMin(bool testData = false) const;
|
||||
float getRadiusMax(bool testData = false) const;
|
||||
int getNumberOfPoles() const;
|
||||
int getNumberOfPolesMin() const;
|
||||
int getNumberOfPolesMax() const;
|
||||
float getRadius() const;
|
||||
float getRadiusMin() const;
|
||||
float getRadiusMax() const;
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+6
-43
@@ -103,22 +103,14 @@ Tag SharedBuildingObjectTemplate::getHighestTemplateVersion(void) const
|
||||
} // SharedBuildingObjectTemplate::getHighestTemplateVersion
|
||||
|
||||
//@BEGIN TFD
|
||||
const std::string & SharedBuildingObjectTemplate::getTerrainModificationFileName(bool testData) const
|
||||
const std::string & SharedBuildingObjectTemplate::getTerrainModificationFileName() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
std::string testDataValue = DefaultString;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedBuildingObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedBuildingObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getTerrainModificationFileName(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_terrainModificationFileName.isLoaded())
|
||||
@@ -136,31 +128,18 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
const std::string & value = m_terrainModificationFileName.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedBuildingObjectTemplate::getTerrainModificationFileName
|
||||
|
||||
const std::string & SharedBuildingObjectTemplate::getInteriorLayoutFileName(bool testData) const
|
||||
const std::string & SharedBuildingObjectTemplate::getInteriorLayoutFileName() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
std::string testDataValue = DefaultString;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedBuildingObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedBuildingObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getInteriorLayoutFileName(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_interiorLayoutFileName.isLoaded())
|
||||
@@ -178,26 +157,10 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
const std::string & value = m_interiorLayoutFileName.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedBuildingObjectTemplate::getInteriorLayoutFileName
|
||||
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedBuildingObjectTemplate::testValues(void) const
|
||||
{
|
||||
IGNORE_RETURN(getTerrainModificationFileName(true));
|
||||
IGNORE_RETURN(getInteriorLayoutFileName(true));
|
||||
SharedTangibleObjectTemplate::testValues();
|
||||
} // SharedBuildingObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -240,8 +203,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,1))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
|
||||
+2
-7
@@ -44,14 +44,9 @@ public:
|
||||
|
||||
//@BEGIN TFD
|
||||
public:
|
||||
const std::string & getTerrainModificationFileName(bool testData = false) const;
|
||||
const std::string & getInteriorLayoutFileName(bool testData = false) const;
|
||||
const std::string & getTerrainModificationFileName() const;
|
||||
const std::string & getInteriorLayoutFileName() const;
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+2
-11
@@ -103,15 +103,6 @@ Tag SharedCellObjectTemplate::getHighestTemplateVersion(void) const
|
||||
} // SharedCellObjectTemplate::getHighestTemplateVersion
|
||||
|
||||
//@BEGIN TFD
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedCellObjectTemplate::testValues(void) const
|
||||
{
|
||||
SharedObjectTemplate::testValues();
|
||||
} // SharedCellObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -154,8 +145,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,11 +45,6 @@ public:
|
||||
//@BEGIN TFD
|
||||
public:
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+2
-11
@@ -103,15 +103,6 @@ Tag SharedConstructionContractObjectTemplate::getHighestTemplateVersion(void) co
|
||||
} // SharedConstructionContractObjectTemplate::getHighestTemplateVersion
|
||||
|
||||
//@BEGIN TFD
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedConstructionContractObjectTemplate::testValues(void) const
|
||||
{
|
||||
SharedIntangibleObjectTemplate::testValues();
|
||||
} // SharedConstructionContractObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -154,8 +145,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
|
||||
-5
@@ -45,11 +45,6 @@ public:
|
||||
//@BEGIN TFD
|
||||
public:
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+86
-671
File diff suppressed because it is too large
Load Diff
+42
-47
@@ -361,10 +361,10 @@ public:
|
||||
};
|
||||
|
||||
public:
|
||||
Gender getGender(bool testData = false) const;
|
||||
Niche getNiche(bool testData = false) const;
|
||||
Species getSpecies(bool testData = false) const;
|
||||
Race getRace(bool testData = false) const;
|
||||
Gender getGender() const;
|
||||
Niche getNiche() const;
|
||||
Species getSpecies() const;
|
||||
Race getRace() const;
|
||||
float getAcceleration(MovementTypes index) const;
|
||||
float getAccelerationMin(MovementTypes index) const;
|
||||
float getAccelerationMax(MovementTypes index) const;
|
||||
@@ -374,51 +374,46 @@ public:
|
||||
float getTurnRate(MovementTypes index) const;
|
||||
float getTurnRateMin(MovementTypes index) const;
|
||||
float getTurnRateMax(MovementTypes index) const;
|
||||
const std::string & getAnimationMapFilename(bool testData = false) const;
|
||||
float getSlopeModAngle(bool testData = false) const;
|
||||
float getSlopeModAngleMin(bool testData = false) const;
|
||||
float getSlopeModAngleMax(bool testData = false) const;
|
||||
float getSlopeModPercent(bool testData = false) const;
|
||||
float getSlopeModPercentMin(bool testData = false) const;
|
||||
float getSlopeModPercentMax(bool testData = false) const;
|
||||
float getWaterModPercent(bool testData = false) const;
|
||||
float getWaterModPercentMin(bool testData = false) const;
|
||||
float getWaterModPercentMax(bool testData = false) const;
|
||||
float getStepHeight(bool testData = false) const;
|
||||
float getStepHeightMin(bool testData = false) const;
|
||||
float getStepHeightMax(bool testData = false) const;
|
||||
float getCollisionHeight(bool testData = false) const;
|
||||
float getCollisionHeightMin(bool testData = false) const;
|
||||
float getCollisionHeightMax(bool testData = false) const;
|
||||
float getCollisionRadius(bool testData = false) const;
|
||||
float getCollisionRadiusMin(bool testData = false) const;
|
||||
float getCollisionRadiusMax(bool testData = false) const;
|
||||
const std::string & getMovementDatatable(bool testData = false) const;
|
||||
const std::string & getAnimationMapFilename() const;
|
||||
float getSlopeModAngle() const;
|
||||
float getSlopeModAngleMin() const;
|
||||
float getSlopeModAngleMax() const;
|
||||
float getSlopeModPercent() const;
|
||||
float getSlopeModPercentMin() const;
|
||||
float getSlopeModPercentMax() const;
|
||||
float getWaterModPercent() const;
|
||||
float getWaterModPercentMin() const;
|
||||
float getWaterModPercentMax() const;
|
||||
float getStepHeight() const;
|
||||
float getStepHeightMin() const;
|
||||
float getStepHeightMax() const;
|
||||
float getCollisionHeight() const;
|
||||
float getCollisionHeightMin() const;
|
||||
float getCollisionHeightMax() const;
|
||||
float getCollisionRadius() const;
|
||||
float getCollisionRadiusMin() const;
|
||||
float getCollisionRadiusMax() const;
|
||||
const std::string & getMovementDatatable() const;
|
||||
bool getPostureAlignToTerrain(Postures index) const;
|
||||
float getSwimHeight(bool testData = false) const;
|
||||
float getSwimHeightMin(bool testData = false) const;
|
||||
float getSwimHeightMax(bool testData = false) const;
|
||||
float getWarpTolerance(bool testData = false) const;
|
||||
float getWarpToleranceMin(bool testData = false) const;
|
||||
float getWarpToleranceMax(bool testData = false) const;
|
||||
float getCollisionOffsetX(bool testData = false) const;
|
||||
float getCollisionOffsetXMin(bool testData = false) const;
|
||||
float getCollisionOffsetXMax(bool testData = false) const;
|
||||
float getCollisionOffsetZ(bool testData = false) const;
|
||||
float getCollisionOffsetZMin(bool testData = false) const;
|
||||
float getCollisionOffsetZMax(bool testData = false) const;
|
||||
float getCollisionLength(bool testData = false) const;
|
||||
float getCollisionLengthMin(bool testData = false) const;
|
||||
float getCollisionLengthMax(bool testData = false) const;
|
||||
float getCameraHeight(bool testData = false) const;
|
||||
float getCameraHeightMin(bool testData = false) const;
|
||||
float getCameraHeightMax(bool testData = false) const;
|
||||
float getSwimHeight() const;
|
||||
float getSwimHeightMin() const;
|
||||
float getSwimHeightMax() const;
|
||||
float getWarpTolerance() const;
|
||||
float getWarpToleranceMin() const;
|
||||
float getWarpToleranceMax() const;
|
||||
float getCollisionOffsetX() const;
|
||||
float getCollisionOffsetXMin() const;
|
||||
float getCollisionOffsetXMax() const;
|
||||
float getCollisionOffsetZ() const;
|
||||
float getCollisionOffsetZMin() const;
|
||||
float getCollisionOffsetZMax() const;
|
||||
float getCollisionLength() const;
|
||||
float getCollisionLengthMin() const;
|
||||
float getCollisionLengthMax() const;
|
||||
float getCameraHeight() const;
|
||||
float getCameraHeightMin() const;
|
||||
float getCameraHeightMax() const;
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+18
-154
@@ -434,22 +434,14 @@ size_t SharedDraftSchematicObjectTemplate::getAttributesCount(void) const
|
||||
return count;
|
||||
} // SharedDraftSchematicObjectTemplate::getAttributesCount
|
||||
|
||||
const std::string & SharedDraftSchematicObjectTemplate::getCraftedSharedTemplate(bool testData) const
|
||||
const std::string & SharedDraftSchematicObjectTemplate::getCraftedSharedTemplate() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
std::string testDataValue = DefaultString;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedDraftSchematicObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedDraftSchematicObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getCraftedSharedTemplate(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_craftedSharedTemplate.isLoaded())
|
||||
@@ -467,25 +459,10 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
const std::string & value = m_craftedSharedTemplate.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedDraftSchematicObjectTemplate::getCraftedSharedTemplate
|
||||
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedDraftSchematicObjectTemplate::testValues(void) const
|
||||
{
|
||||
IGNORE_RETURN(getCraftedSharedTemplate(true));
|
||||
SharedIntangibleObjectTemplate::testValues();
|
||||
} // SharedDraftSchematicObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -528,8 +505,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,3))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -638,22 +615,14 @@ Tag SharedDraftSchematicObjectTemplate::_IngredientSlot::getId(void) const
|
||||
return _IngredientSlot_tag;
|
||||
} // SharedDraftSchematicObjectTemplate::_IngredientSlot::getId
|
||||
|
||||
const StringId SharedDraftSchematicObjectTemplate::_IngredientSlot::getName(bool versionOk, bool testData) const
|
||||
const StringId SharedDraftSchematicObjectTemplate::_IngredientSlot::getName(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
StringId testDataValue = DefaultStringId;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedDraftSchematicObjectTemplate::_IngredientSlot * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedDraftSchematicObjectTemplate::_IngredientSlot *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getName(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_name.isLoaded())
|
||||
@@ -671,31 +640,18 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
const StringId value = m_name.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedDraftSchematicObjectTemplate::_IngredientSlot::getName
|
||||
|
||||
const std::string & SharedDraftSchematicObjectTemplate::_IngredientSlot::getHardpoint(bool versionOk, bool testData) const
|
||||
const std::string & SharedDraftSchematicObjectTemplate::_IngredientSlot::getHardpoint(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
std::string testDataValue = DefaultString;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedDraftSchematicObjectTemplate::_IngredientSlot * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedDraftSchematicObjectTemplate::_IngredientSlot *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getHardpoint(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_hardpoint.isLoaded())
|
||||
@@ -713,25 +669,10 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
const std::string & value = m_hardpoint.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedDraftSchematicObjectTemplate::_IngredientSlot::getHardpoint
|
||||
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedDraftSchematicObjectTemplate::_IngredientSlot::testValues(void) const
|
||||
{
|
||||
IGNORE_RETURN(getName(true));
|
||||
IGNORE_RETURN(getHardpoint(true));
|
||||
} // SharedDraftSchematicObjectTemplate::_IngredientSlot::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -811,22 +752,14 @@ Tag SharedDraftSchematicObjectTemplate::_SchematicAttribute::getId(void) const
|
||||
return _SchematicAttribute_tag;
|
||||
} // SharedDraftSchematicObjectTemplate::_SchematicAttribute::getId
|
||||
|
||||
const StringId SharedDraftSchematicObjectTemplate::_SchematicAttribute::getName(bool versionOk, bool testData) const
|
||||
const StringId SharedDraftSchematicObjectTemplate::_SchematicAttribute::getName(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
StringId testDataValue = DefaultStringId;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedDraftSchematicObjectTemplate::_SchematicAttribute * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedDraftSchematicObjectTemplate::_SchematicAttribute *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getName(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_name.isLoaded())
|
||||
@@ -844,31 +777,18 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
const StringId value = m_name.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedDraftSchematicObjectTemplate::_SchematicAttribute::getName
|
||||
|
||||
const StringId SharedDraftSchematicObjectTemplate::_SchematicAttribute::getExperiment(bool versionOk, bool testData) const
|
||||
const StringId SharedDraftSchematicObjectTemplate::_SchematicAttribute::getExperiment(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
StringId testDataValue = DefaultStringId;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedDraftSchematicObjectTemplate::_SchematicAttribute * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedDraftSchematicObjectTemplate::_SchematicAttribute *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getExperiment(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_experiment.isLoaded())
|
||||
@@ -886,31 +806,18 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
const StringId value = m_experiment.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedDraftSchematicObjectTemplate::_SchematicAttribute::getExperiment
|
||||
|
||||
int SharedDraftSchematicObjectTemplate::_SchematicAttribute::getValue(bool versionOk, bool testData) const
|
||||
int SharedDraftSchematicObjectTemplate::_SchematicAttribute::getValue(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int testDataValue = 0;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedDraftSchematicObjectTemplate::_SchematicAttribute * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedDraftSchematicObjectTemplate::_SchematicAttribute *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getValue(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_value.isLoaded())
|
||||
@@ -950,31 +857,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedDraftSchematicObjectTemplate::_SchematicAttribute::getValue
|
||||
|
||||
int SharedDraftSchematicObjectTemplate::_SchematicAttribute::getValueMin(bool versionOk, bool testData) const
|
||||
int SharedDraftSchematicObjectTemplate::_SchematicAttribute::getValueMin(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int testDataValue = 0;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedDraftSchematicObjectTemplate::_SchematicAttribute * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedDraftSchematicObjectTemplate::_SchematicAttribute *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getValueMin(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_value.isLoaded())
|
||||
@@ -1014,31 +908,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedDraftSchematicObjectTemplate::_SchematicAttribute::getValueMin
|
||||
|
||||
int SharedDraftSchematicObjectTemplate::_SchematicAttribute::getValueMax(bool versionOk, bool testData) const
|
||||
int SharedDraftSchematicObjectTemplate::_SchematicAttribute::getValueMax(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int testDataValue = 0;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedDraftSchematicObjectTemplate::_SchematicAttribute * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedDraftSchematicObjectTemplate::_SchematicAttribute *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getValueMax(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_value.isLoaded())
|
||||
@@ -1078,27 +959,10 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedDraftSchematicObjectTemplate::_SchematicAttribute::getValueMax
|
||||
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedDraftSchematicObjectTemplate::_SchematicAttribute::testValues(void) const
|
||||
{
|
||||
IGNORE_RETURN(getName(true));
|
||||
IGNORE_RETURN(getExperiment(true));
|
||||
IGNORE_RETURN(getValueMin(true));
|
||||
IGNORE_RETURN(getValueMax(true));
|
||||
} // SharedDraftSchematicObjectTemplate::_SchematicAttribute::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
|
||||
+8
-23
@@ -109,14 +109,9 @@ protected:
|
||||
virtual Tag getId(void) const;
|
||||
|
||||
public:
|
||||
const StringId getName(bool versionOk, bool testData = false) const;
|
||||
const std::string & getHardpoint(bool versionOk, bool testData = false) const;
|
||||
const StringId getName(bool versionOk) const;
|
||||
const std::string & getHardpoint(bool versionOk) const;
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
@@ -149,17 +144,12 @@ private:
|
||||
virtual Tag getId(void) const;
|
||||
|
||||
public:
|
||||
const StringId getName(bool versionOk, bool testData = false) const;
|
||||
const StringId getExperiment(bool versionOk, bool testData = false) const;
|
||||
int getValue(bool versionOk, bool testData = false) const;
|
||||
int getValueMin(bool versionOk, bool testData = false) const;
|
||||
int getValueMax(bool versionOk, bool testData = false) const;
|
||||
const StringId getName(bool versionOk) const;
|
||||
const StringId getExperiment(bool versionOk) const;
|
||||
int getValue(bool versionOk) const;
|
||||
int getValueMin(bool versionOk) const;
|
||||
int getValueMax(bool versionOk) const;
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
@@ -186,13 +176,8 @@ public:
|
||||
void getAttributesMin(SchematicAttribute &data, int index) const;
|
||||
void getAttributesMax(SchematicAttribute &data, int index) const;
|
||||
size_t getAttributesCount(void) const;
|
||||
const std::string & getCraftedSharedTemplate(bool testData = false) const;
|
||||
const std::string & getCraftedSharedTemplate() const;
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+2
-11
@@ -103,15 +103,6 @@ Tag SharedFactoryObjectTemplate::getHighestTemplateVersion(void) const
|
||||
} // SharedFactoryObjectTemplate::getHighestTemplateVersion
|
||||
|
||||
//@BEGIN TFD
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedFactoryObjectTemplate::testValues(void) const
|
||||
{
|
||||
SharedTangibleObjectTemplate::testValues();
|
||||
} // SharedFactoryObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -154,8 +145,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
|
||||
-5
@@ -45,11 +45,6 @@ public:
|
||||
//@BEGIN TFD
|
||||
public:
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+2
-11
@@ -103,15 +103,6 @@ Tag SharedGroupObjectTemplate::getHighestTemplateVersion(void) const
|
||||
} // SharedGroupObjectTemplate::getHighestTemplateVersion
|
||||
|
||||
//@BEGIN TFD
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedGroupObjectTemplate::testValues(void) const
|
||||
{
|
||||
SharedUniverseObjectTemplate::testValues();
|
||||
} // SharedGroupObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -154,8 +145,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,11 +45,6 @@ public:
|
||||
//@BEGIN TFD
|
||||
public:
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+2
-11
@@ -103,15 +103,6 @@ Tag SharedGuildObjectTemplate::getHighestTemplateVersion(void) const
|
||||
} // SharedGuildObjectTemplate::getHighestTemplateVersion
|
||||
|
||||
//@BEGIN TFD
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedGuildObjectTemplate::testValues(void) const
|
||||
{
|
||||
SharedUniverseObjectTemplate::testValues();
|
||||
} // SharedGuildObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -154,8 +145,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,11 +45,6 @@ public:
|
||||
//@BEGIN TFD
|
||||
public:
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+2
-11
@@ -103,15 +103,6 @@ Tag SharedInstallationObjectTemplate::getHighestTemplateVersion(void) const
|
||||
} // SharedInstallationObjectTemplate::getHighestTemplateVersion
|
||||
|
||||
//@BEGIN TFD
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedInstallationObjectTemplate::testValues(void) const
|
||||
{
|
||||
SharedTangibleObjectTemplate::testValues();
|
||||
} // SharedInstallationObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -154,8 +145,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
|
||||
-5
@@ -45,11 +45,6 @@ public:
|
||||
//@BEGIN TFD
|
||||
public:
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+2
-11
@@ -103,15 +103,6 @@ Tag SharedIntangibleObjectTemplate::getHighestTemplateVersion(void) const
|
||||
} // SharedIntangibleObjectTemplate::getHighestTemplateVersion
|
||||
|
||||
//@BEGIN TFD
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedIntangibleObjectTemplate::testValues(void) const
|
||||
{
|
||||
SharedObjectTemplate::testValues();
|
||||
} // SharedIntangibleObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -154,8 +145,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
|
||||
-5
@@ -45,11 +45,6 @@ public:
|
||||
//@BEGIN TFD
|
||||
public:
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+3
-12
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "sharedGame/FirstSharedGame.h"
|
||||
#include "SharedJediManagerObjectTemplate.h"
|
||||
#include "sharedDebug/DataLint.h"
|
||||
|
||||
#include "sharedFile/Iff.h"
|
||||
#include "sharedMath/Vector.h"
|
||||
#include "sharedObject/ObjectTemplate.h"
|
||||
@@ -104,15 +104,6 @@ Tag SharedJediManagerObjectTemplate::getHighestTemplateVersion(void) const
|
||||
} // SharedJediManagerObjectTemplate::getHighestTemplateVersion
|
||||
|
||||
//@BEGIN TFD
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedJediManagerObjectTemplate::testValues(void) const
|
||||
{
|
||||
SharedUniverseObjectTemplate::testValues();
|
||||
} // SharedJediManagerObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -155,8 +146,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
|
||||
-5
@@ -45,11 +45,6 @@ public:
|
||||
//@BEGIN TFD
|
||||
public:
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+2
-11
@@ -103,15 +103,6 @@ Tag SharedManufactureSchematicObjectTemplate::getHighestTemplateVersion(void) co
|
||||
} // SharedManufactureSchematicObjectTemplate::getHighestTemplateVersion
|
||||
|
||||
//@BEGIN TFD
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedManufactureSchematicObjectTemplate::testValues(void) const
|
||||
{
|
||||
SharedIntangibleObjectTemplate::testValues();
|
||||
} // SharedManufactureSchematicObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -154,8 +145,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
|
||||
-5
@@ -45,11 +45,6 @@ public:
|
||||
//@BEGIN TFD
|
||||
public:
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+2
-11
@@ -103,15 +103,6 @@ Tag SharedMissionObjectTemplate::getHighestTemplateVersion(void) const
|
||||
} // SharedMissionObjectTemplate::getHighestTemplateVersion
|
||||
|
||||
//@BEGIN TFD
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedMissionObjectTemplate::testValues(void) const
|
||||
{
|
||||
SharedIntangibleObjectTemplate::testValues();
|
||||
} // SharedMissionObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -154,8 +145,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
|
||||
-5
@@ -45,11 +45,6 @@ public:
|
||||
//@BEGIN TFD
|
||||
public:
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+70
-548
File diff suppressed because it is too large
Load Diff
@@ -339,46 +339,41 @@ public:
|
||||
};
|
||||
|
||||
public:
|
||||
const StringId getObjectName(bool testData = false) const;
|
||||
const StringId getDetailedDescription(bool testData = false) const;
|
||||
const StringId getLookAtText(bool testData = false) const;
|
||||
bool getSnapToTerrain(bool testData = false) const;
|
||||
ContainerType getContainerType(bool testData = false) const;
|
||||
int getContainerVolumeLimit(bool testData = false) const;
|
||||
int getContainerVolumeLimitMin(bool testData = false) const;
|
||||
int getContainerVolumeLimitMax(bool testData = false) const;
|
||||
const std::string & getTintPalette(bool testData = false) const;
|
||||
const std::string & getSlotDescriptorFilename(bool testData = false) const;
|
||||
const std::string & getArrangementDescriptorFilename(bool testData = false) const;
|
||||
const std::string & getAppearanceFilename(bool testData = false) const;
|
||||
const std::string & getPortalLayoutFilename(bool testData = false) const;
|
||||
const std::string & getClientDataFile(bool testData = false) const;
|
||||
float getScale(bool testData = false) const;
|
||||
float getScaleMin(bool testData = false) const;
|
||||
float getScaleMax(bool testData = false) const;
|
||||
GameObjectType getGameObjectType(bool testData = false) const;
|
||||
bool getSendToClient(bool testData = false) const;
|
||||
float getScaleThresholdBeforeExtentTest(bool testData = false) const;
|
||||
float getScaleThresholdBeforeExtentTestMin(bool testData = false) const;
|
||||
float getScaleThresholdBeforeExtentTestMax(bool testData = false) const;
|
||||
float getClearFloraRadius(bool testData = false) const;
|
||||
float getClearFloraRadiusMin(bool testData = false) const;
|
||||
float getClearFloraRadiusMax(bool testData = false) const;
|
||||
SurfaceType getSurfaceType(bool testData = false) const;
|
||||
float getNoBuildRadius(bool testData = false) const;
|
||||
float getNoBuildRadiusMin(bool testData = false) const;
|
||||
float getNoBuildRadiusMax(bool testData = false) const;
|
||||
bool getOnlyVisibleInTools(bool testData = false) const;
|
||||
float getLocationReservationRadius(bool testData = false) const;
|
||||
float getLocationReservationRadiusMin(bool testData = false) const;
|
||||
float getLocationReservationRadiusMax(bool testData = false) const;
|
||||
bool getForceNoCollision(bool testData = false) const;
|
||||
const StringId getObjectName() const;
|
||||
const StringId getDetailedDescription() const;
|
||||
const StringId getLookAtText() const;
|
||||
bool getSnapToTerrain() const;
|
||||
ContainerType getContainerType() const;
|
||||
int getContainerVolumeLimit() const;
|
||||
int getContainerVolumeLimitMin() const;
|
||||
int getContainerVolumeLimitMax() const;
|
||||
const std::string & getTintPalette() const;
|
||||
const std::string & getSlotDescriptorFilename() const;
|
||||
const std::string & getArrangementDescriptorFilename() const;
|
||||
const std::string & getAppearanceFilename() const;
|
||||
const std::string & getPortalLayoutFilename() const;
|
||||
const std::string & getClientDataFile() const;
|
||||
float getScale() const;
|
||||
float getScaleMin() const;
|
||||
float getScaleMax() const;
|
||||
GameObjectType getGameObjectType() const;
|
||||
bool getSendToClient() const;
|
||||
float getScaleThresholdBeforeExtentTest() const;
|
||||
float getScaleThresholdBeforeExtentTestMin() const;
|
||||
float getScaleThresholdBeforeExtentTestMax() const;
|
||||
float getClearFloraRadius() const;
|
||||
float getClearFloraRadiusMin() const;
|
||||
float getClearFloraRadiusMax() const;
|
||||
SurfaceType getSurfaceType() const;
|
||||
float getNoBuildRadius() const;
|
||||
float getNoBuildRadiusMin() const;
|
||||
float getNoBuildRadiusMax() const;
|
||||
bool getOnlyVisibleInTools() const;
|
||||
float getLocationReservationRadius() const;
|
||||
float getLocationReservationRadiusMin() const;
|
||||
float getLocationReservationRadiusMax() const;
|
||||
bool getForceNoCollision() const;
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+3
-12
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "sharedGame/FirstSharedGame.h"
|
||||
#include "SharedPlayerObjectTemplate.h"
|
||||
#include "sharedDebug/DataLint.h"
|
||||
|
||||
#include "sharedFile/Iff.h"
|
||||
#include "sharedMath/Vector.h"
|
||||
#include "sharedObject/ObjectTemplate.h"
|
||||
@@ -104,15 +104,6 @@ Tag SharedPlayerObjectTemplate::getHighestTemplateVersion(void) const
|
||||
} // SharedPlayerObjectTemplate::getHighestTemplateVersion
|
||||
|
||||
//@BEGIN TFD
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedPlayerObjectTemplate::testValues(void) const
|
||||
{
|
||||
SharedIntangibleObjectTemplate::testValues();
|
||||
} // SharedPlayerObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -155,8 +146,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
|
||||
-5
@@ -45,11 +45,6 @@ public:
|
||||
//@BEGIN TFD
|
||||
public:
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+3
-12
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "sharedGame/FirstSharedGame.h"
|
||||
#include "SharedPlayerQuestObjectTemplate.h"
|
||||
#include "sharedDebug/DataLint.h"
|
||||
|
||||
#include "sharedFile/Iff.h"
|
||||
#include "sharedMath/Vector.h"
|
||||
#include "sharedObject/ObjectTemplate.h"
|
||||
@@ -104,15 +104,6 @@ Tag SharedPlayerQuestObjectTemplate::getHighestTemplateVersion(void) const
|
||||
} // SharedPlayerQuestObjectTemplate::getHighestTemplateVersion
|
||||
|
||||
//@BEGIN TFD
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedPlayerQuestObjectTemplate::testValues(void) const
|
||||
{
|
||||
SharedTangibleObjectTemplate::testValues();
|
||||
} // SharedPlayerQuestObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -155,8 +146,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
|
||||
-5
@@ -45,11 +45,6 @@ public:
|
||||
//@BEGIN TFD
|
||||
public:
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+2
-11
@@ -103,15 +103,6 @@ Tag SharedResourceContainerObjectTemplate::getHighestTemplateVersion(void) const
|
||||
} // SharedResourceContainerObjectTemplate::getHighestTemplateVersion
|
||||
|
||||
//@BEGIN TFD
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedResourceContainerObjectTemplate::testValues(void) const
|
||||
{
|
||||
SharedTangibleObjectTemplate::testValues();
|
||||
} // SharedResourceContainerObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -154,8 +145,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
|
||||
-5
@@ -45,11 +45,6 @@ public:
|
||||
//@BEGIN TFD
|
||||
public:
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+11
-76
@@ -13,7 +13,7 @@
|
||||
#include "sharedGame/FirstSharedGame.h"
|
||||
#include "sharedGame/SharedShipObjectTemplate.h"
|
||||
|
||||
#include "sharedDebug/DataLint.h"
|
||||
|
||||
#include "sharedFile/Iff.h"
|
||||
#include "sharedGame/AssetCustomizationManager.h"
|
||||
#include "sharedMath/Vector.h"
|
||||
@@ -147,22 +147,14 @@ void SharedShipObjectTemplate::createCustomizationDataPropertyAsNeeded(Object &o
|
||||
}
|
||||
|
||||
//@BEGIN TFD
|
||||
const std::string & SharedShipObjectTemplate::getCockpitFilename(bool testData) const
|
||||
const std::string & SharedShipObjectTemplate::getCockpitFilename() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
std::string testDataValue = DefaultString;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedShipObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedShipObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getCockpitFilename(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_cockpitFilename.isLoaded())
|
||||
@@ -180,31 +172,18 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
const std::string & value = m_cockpitFilename.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedShipObjectTemplate::getCockpitFilename
|
||||
|
||||
bool SharedShipObjectTemplate::getHasWings(bool testData) const
|
||||
bool SharedShipObjectTemplate::getHasWings() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
bool testDataValue = false;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedShipObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedShipObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getHasWings(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_hasWings.isLoaded())
|
||||
@@ -222,31 +201,18 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
bool value = m_hasWings.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedShipObjectTemplate::getHasWings
|
||||
|
||||
bool SharedShipObjectTemplate::getPlayerControlled(bool testData) const
|
||||
bool SharedShipObjectTemplate::getPlayerControlled() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
bool testDataValue = false;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedShipObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedShipObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getPlayerControlled(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_playerControlled.isLoaded())
|
||||
@@ -264,31 +230,18 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
bool value = m_playerControlled.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedShipObjectTemplate::getPlayerControlled
|
||||
|
||||
const std::string & SharedShipObjectTemplate::getInteriorLayoutFileName(bool testData) const
|
||||
const std::string & SharedShipObjectTemplate::getInteriorLayoutFileName() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
std::string testDataValue = DefaultString;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedShipObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedShipObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getInteriorLayoutFileName(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_interiorLayoutFileName.isLoaded())
|
||||
@@ -306,28 +259,10 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
const std::string & value = m_interiorLayoutFileName.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedShipObjectTemplate::getInteriorLayoutFileName
|
||||
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedShipObjectTemplate::testValues(void) const
|
||||
{
|
||||
IGNORE_RETURN(getCockpitFilename(true));
|
||||
IGNORE_RETURN(getHasWings(true));
|
||||
IGNORE_RETURN(getPlayerControlled(true));
|
||||
IGNORE_RETURN(getInteriorLayoutFileName(true));
|
||||
SharedTangibleObjectTemplate::testValues();
|
||||
} // SharedShipObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -370,8 +305,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,4))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
|
||||
+4
-9
@@ -45,16 +45,11 @@ public:
|
||||
|
||||
//@BEGIN TFD
|
||||
public:
|
||||
const std::string & getCockpitFilename(bool testData = false) const;
|
||||
bool getHasWings(bool testData = false) const;
|
||||
bool getPlayerControlled(bool testData = false) const;
|
||||
const std::string & getInteriorLayoutFileName(bool testData = false) const;
|
||||
const std::string & getCockpitFilename() const;
|
||||
bool getHasWings() const;
|
||||
bool getPlayerControlled() const;
|
||||
const std::string & getInteriorLayoutFileName() const;
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+2
-11
@@ -103,15 +103,6 @@ Tag SharedStaticObjectTemplate::getHighestTemplateVersion(void) const
|
||||
} // SharedStaticObjectTemplate::getHighestTemplateVersion
|
||||
|
||||
//@BEGIN TFD
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedStaticObjectTemplate::testValues(void) const
|
||||
{
|
||||
SharedObjectTemplate::testValues();
|
||||
} // SharedStaticObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -154,8 +145,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
|
||||
-5
@@ -45,11 +45,6 @@ public:
|
||||
//@BEGIN TFD
|
||||
public:
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+48
-417
@@ -262,16 +262,6 @@ void SharedTangibleObjectTemplate::createCustomizationDataPropertyAsNeeded(Objec
|
||||
AssetCustomizationManager::addCustomizationVariablesForAsset(TemporaryCrcString(getAppearanceFilename().c_str(), true), *customizationData, skipSharedOwnerVariables);
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
//-- set up mappings for any variables which need dependent mappings
|
||||
int numVariableMappings = getCustomizationVariableMappingCount();
|
||||
if(numVariableMappings != 0)
|
||||
{
|
||||
//If the object is a wearable, then the dependent variable, which is probably shared, will not exist at the moment the dependency
|
||||
//is set up. For this reason, make sure that you're really doing what you want.
|
||||
DEBUG_WARNING(true, ("Generally, CustomizationVariableMapping should not be set on Wearables or other non-Creature tangibles."));
|
||||
}
|
||||
#endif
|
||||
|
||||
//-- release local reference to the CustomizationData instance
|
||||
customizationData->release();
|
||||
@@ -879,22 +869,14 @@ size_t SharedTangibleObjectTemplate::getSocketDestinationsCount(void) const
|
||||
return count;
|
||||
} // SharedTangibleObjectTemplate::getSocketDestinationsCount
|
||||
|
||||
const std::string & SharedTangibleObjectTemplate::getStructureFootprintFileName(bool testData) const
|
||||
const std::string & SharedTangibleObjectTemplate::getStructureFootprintFileName() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
std::string testDataValue = DefaultString;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getStructureFootprintFileName(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_structureFootprintFileName.isLoaded())
|
||||
@@ -912,31 +894,18 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
const std::string & value = m_structureFootprintFileName.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::getStructureFootprintFileName
|
||||
|
||||
bool SharedTangibleObjectTemplate::getUseStructureFootprintOutline(bool testData) const
|
||||
bool SharedTangibleObjectTemplate::getUseStructureFootprintOutline() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
bool testDataValue = false;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getUseStructureFootprintOutline(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_useStructureFootprintOutline.isLoaded())
|
||||
@@ -954,31 +923,18 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
bool value = m_useStructureFootprintOutline.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::getUseStructureFootprintOutline
|
||||
|
||||
bool SharedTangibleObjectTemplate::getTargetable(bool testData) const
|
||||
bool SharedTangibleObjectTemplate::getTargetable() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
bool testDataValue = false;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getTargetable(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_targetable.isLoaded())
|
||||
@@ -996,11 +952,6 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
bool value = m_targetable.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::getTargetable
|
||||
@@ -1217,22 +1168,14 @@ size_t SharedTangibleObjectTemplate::getCustomizationVariableMappingCount(void)
|
||||
return count;
|
||||
} // SharedTangibleObjectTemplate::getCustomizationVariableMappingCount
|
||||
|
||||
SharedTangibleObjectTemplate::ClientVisabilityFlags SharedTangibleObjectTemplate::getClientVisabilityFlag(bool testData) const
|
||||
SharedTangibleObjectTemplate::ClientVisabilityFlags SharedTangibleObjectTemplate::getClientVisabilityFlag() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
SharedTangibleObjectTemplate::ClientVisabilityFlags testDataValue = static_cast<SharedTangibleObjectTemplate::ClientVisabilityFlags>(0);
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getClientVisabilityFlag(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_clientVisabilityFlag.isLoaded())
|
||||
@@ -1250,28 +1193,10 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
ClientVisabilityFlags value = static_cast<ClientVisabilityFlags>(m_clientVisabilityFlag.getValue());
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::getClientVisabilityFlag
|
||||
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedTangibleObjectTemplate::testValues(void) const
|
||||
{
|
||||
IGNORE_RETURN(getStructureFootprintFileName(true));
|
||||
IGNORE_RETURN(getUseStructureFootprintOutline(true));
|
||||
IGNORE_RETURN(getTargetable(true));
|
||||
IGNORE_RETURN(getClientVisabilityFlag(true));
|
||||
SharedObjectTemplate::testValues();
|
||||
} // SharedTangibleObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -1314,8 +1239,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,1,0))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
@@ -1506,22 +1431,14 @@ Tag SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::getId(void)
|
||||
return _ConstStringCustomizationVariable_tag;
|
||||
} // SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::getId
|
||||
|
||||
const std::string & SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::getVariableName(bool versionOk, bool testData) const
|
||||
const std::string & SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::getVariableName(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
std::string testDataValue = DefaultString;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_ConstStringCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate::_ConstStringCustomizationVariable *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getVariableName(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_variableName.isLoaded())
|
||||
@@ -1539,31 +1456,18 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
const std::string & value = m_variableName.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::getVariableName
|
||||
|
||||
const std::string & SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::getConstValue(bool versionOk, bool testData) const
|
||||
const std::string & SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::getConstValue(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
std::string testDataValue = DefaultString;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_ConstStringCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate::_ConstStringCustomizationVariable *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getConstValue(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_constValue.isLoaded())
|
||||
@@ -1581,25 +1485,10 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
const std::string & value = m_constValue.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::getConstValue
|
||||
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::testValues(void) const
|
||||
{
|
||||
IGNORE_RETURN(getVariableName(true));
|
||||
IGNORE_RETURN(getConstValue(true));
|
||||
} // SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -1679,22 +1568,14 @@ Tag SharedTangibleObjectTemplate::_CustomizationVariableMapping::getId(void) con
|
||||
return _CustomizationVariableMapping_tag;
|
||||
} // SharedTangibleObjectTemplate::_CustomizationVariableMapping::getId
|
||||
|
||||
const std::string & SharedTangibleObjectTemplate::_CustomizationVariableMapping::getSourceVariable(bool versionOk, bool testData) const
|
||||
const std::string & SharedTangibleObjectTemplate::_CustomizationVariableMapping::getSourceVariable(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
std::string testDataValue = DefaultString;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_CustomizationVariableMapping * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate::_CustomizationVariableMapping *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getSourceVariable(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_sourceVariable.isLoaded())
|
||||
@@ -1712,31 +1593,18 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
const std::string & value = m_sourceVariable.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_CustomizationVariableMapping::getSourceVariable
|
||||
|
||||
const std::string & SharedTangibleObjectTemplate::_CustomizationVariableMapping::getDependentVariable(bool versionOk, bool testData) const
|
||||
const std::string & SharedTangibleObjectTemplate::_CustomizationVariableMapping::getDependentVariable(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
std::string testDataValue = DefaultString;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_CustomizationVariableMapping * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate::_CustomizationVariableMapping *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getDependentVariable(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_dependentVariable.isLoaded())
|
||||
@@ -1754,25 +1622,10 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
const std::string & value = m_dependentVariable.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_CustomizationVariableMapping::getDependentVariable
|
||||
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedTangibleObjectTemplate::_CustomizationVariableMapping::testValues(void) const
|
||||
{
|
||||
IGNORE_RETURN(getSourceVariable(true));
|
||||
IGNORE_RETURN(getDependentVariable(true));
|
||||
} // SharedTangibleObjectTemplate::_CustomizationVariableMapping::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -1852,22 +1705,14 @@ Tag SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getId(void
|
||||
return _PaletteColorCustomizationVariable_tag;
|
||||
} // SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getId
|
||||
|
||||
const std::string & SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getVariableName(bool versionOk, bool testData) const
|
||||
const std::string & SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getVariableName(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
std::string testDataValue = DefaultString;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getVariableName(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_variableName.isLoaded())
|
||||
@@ -1885,31 +1730,18 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
const std::string & value = m_variableName.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getVariableName
|
||||
|
||||
const std::string & SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getPalettePathName(bool versionOk, bool testData) const
|
||||
const std::string & SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getPalettePathName(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
std::string testDataValue = DefaultString;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getPalettePathName(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_palettePathName.isLoaded())
|
||||
@@ -1927,31 +1759,18 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
const std::string & value = m_palettePathName.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getPalettePathName
|
||||
|
||||
int SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getDefaultPaletteIndex(bool versionOk, bool testData) const
|
||||
int SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getDefaultPaletteIndex(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int testDataValue = 0;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getDefaultPaletteIndex(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_defaultPaletteIndex.isLoaded())
|
||||
@@ -1991,31 +1810,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getDefaultPaletteIndex
|
||||
|
||||
int SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getDefaultPaletteIndexMin(bool versionOk, bool testData) const
|
||||
int SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getDefaultPaletteIndexMin(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int testDataValue = 0;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getDefaultPaletteIndexMin(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_defaultPaletteIndex.isLoaded())
|
||||
@@ -2055,31 +1861,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getDefaultPaletteIndexMin
|
||||
|
||||
int SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getDefaultPaletteIndexMax(bool versionOk, bool testData) const
|
||||
int SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getDefaultPaletteIndexMax(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int testDataValue = 0;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getDefaultPaletteIndexMax(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_defaultPaletteIndex.isLoaded())
|
||||
@@ -2119,27 +1912,10 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getDefaultPaletteIndexMax
|
||||
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::testValues(void) const
|
||||
{
|
||||
IGNORE_RETURN(getVariableName(true));
|
||||
IGNORE_RETURN(getPalettePathName(true));
|
||||
IGNORE_RETURN(getDefaultPaletteIndexMin(true));
|
||||
IGNORE_RETURN(getDefaultPaletteIndexMax(true));
|
||||
} // SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -2221,22 +1997,14 @@ Tag SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getId(void) c
|
||||
return _RangedIntCustomizationVariable_tag;
|
||||
} // SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getId
|
||||
|
||||
const std::string & SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getVariableName(bool versionOk, bool testData) const
|
||||
const std::string & SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getVariableName(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
std::string testDataValue = DefaultString;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getVariableName(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_variableName.isLoaded())
|
||||
@@ -2254,31 +2022,18 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
const std::string & value = m_variableName.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getVariableName
|
||||
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMinValueInclusive(bool versionOk, bool testData) const
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMinValueInclusive(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int testDataValue = 0;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getMinValueInclusive(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_minValueInclusive.isLoaded())
|
||||
@@ -2318,31 +2073,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMinValueInclusive
|
||||
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMinValueInclusiveMin(bool versionOk, bool testData) const
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMinValueInclusiveMin(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int testDataValue = 0;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getMinValueInclusiveMin(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_minValueInclusive.isLoaded())
|
||||
@@ -2382,31 +2124,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMinValueInclusiveMin
|
||||
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMinValueInclusiveMax(bool versionOk, bool testData) const
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMinValueInclusiveMax(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int testDataValue = 0;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getMinValueInclusiveMax(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_minValueInclusive.isLoaded())
|
||||
@@ -2446,31 +2175,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMinValueInclusiveMax
|
||||
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getDefaultValue(bool versionOk, bool testData) const
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getDefaultValue(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int testDataValue = 0;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getDefaultValue(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_defaultValue.isLoaded())
|
||||
@@ -2510,31 +2226,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getDefaultValue
|
||||
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getDefaultValueMin(bool versionOk, bool testData) const
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getDefaultValueMin(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int testDataValue = 0;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getDefaultValueMin(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_defaultValue.isLoaded())
|
||||
@@ -2574,31 +2277,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getDefaultValueMin
|
||||
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getDefaultValueMax(bool versionOk, bool testData) const
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getDefaultValueMax(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int testDataValue = 0;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getDefaultValueMax(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_defaultValue.isLoaded())
|
||||
@@ -2638,31 +2328,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getDefaultValueMax
|
||||
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMaxValueExclusive(bool versionOk, bool testData) const
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMaxValueExclusive(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int testDataValue = 0;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getMaxValueExclusive(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_maxValueExclusive.isLoaded())
|
||||
@@ -2702,31 +2379,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMaxValueExclusive
|
||||
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMaxValueExclusiveMin(bool versionOk, bool testData) const
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMaxValueExclusiveMin(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int testDataValue = 0;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getMaxValueExclusiveMin(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_maxValueExclusive.isLoaded())
|
||||
@@ -2766,31 +2430,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMaxValueExclusiveMin
|
||||
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMaxValueExclusiveMax(bool versionOk, bool testData) const
|
||||
int SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMaxValueExclusiveMax(bool versionOk, ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int testDataValue = 0;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTangibleObjectTemplate::_RangedIntCustomizationVariable *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getMaxValueExclusiveMax(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_maxValueExclusive.isLoaded())
|
||||
@@ -2830,30 +2481,10 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getMaxValueExclusiveMax
|
||||
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::testValues(void) const
|
||||
{
|
||||
IGNORE_RETURN(getVariableName(true));
|
||||
IGNORE_RETURN(getMinValueInclusiveMin(true));
|
||||
IGNORE_RETURN(getMinValueInclusiveMax(true));
|
||||
IGNORE_RETURN(getDefaultValueMin(true));
|
||||
IGNORE_RETURN(getDefaultValueMax(true));
|
||||
IGNORE_RETURN(getMaxValueExclusiveMin(true));
|
||||
IGNORE_RETURN(getMaxValueExclusiveMax(true));
|
||||
} // SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
|
||||
+23
-48
@@ -97,22 +97,17 @@ protected:
|
||||
virtual Tag getId(void) const;
|
||||
|
||||
public:
|
||||
const std::string & getVariableName(bool versionOk, bool testData = false) const;
|
||||
int getMinValueInclusive(bool versionOk, bool testData = false) const;
|
||||
int getMinValueInclusiveMin(bool versionOk, bool testData = false) const;
|
||||
int getMinValueInclusiveMax(bool versionOk, bool testData = false) const;
|
||||
int getDefaultValue(bool versionOk, bool testData = false) const;
|
||||
int getDefaultValueMin(bool versionOk, bool testData = false) const;
|
||||
int getDefaultValueMax(bool versionOk, bool testData = false) const;
|
||||
int getMaxValueExclusive(bool versionOk, bool testData = false) const;
|
||||
int getMaxValueExclusiveMin(bool versionOk, bool testData = false) const;
|
||||
int getMaxValueExclusiveMax(bool versionOk, bool testData = false) const;
|
||||
const std::string & getVariableName(bool versionOk) const;
|
||||
int getMinValueInclusive(bool versionOk) const;
|
||||
int getMinValueInclusiveMin(bool versionOk) const;
|
||||
int getMinValueInclusiveMax(bool versionOk) const;
|
||||
int getDefaultValue(bool versionOk) const;
|
||||
int getDefaultValueMin(bool versionOk) const;
|
||||
int getDefaultValueMax(bool versionOk) const;
|
||||
int getMaxValueExclusive(bool versionOk) const;
|
||||
int getMaxValueExclusiveMin(bool versionOk) const;
|
||||
int getMaxValueExclusiveMax(bool versionOk) const;
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
@@ -147,17 +142,12 @@ private:
|
||||
virtual Tag getId(void) const;
|
||||
|
||||
public:
|
||||
const std::string & getVariableName(bool versionOk, bool testData = false) const;
|
||||
const std::string & getPalettePathName(bool versionOk, bool testData = false) const;
|
||||
int getDefaultPaletteIndex(bool versionOk, bool testData = false) const;
|
||||
int getDefaultPaletteIndexMin(bool versionOk, bool testData = false) const;
|
||||
int getDefaultPaletteIndexMax(bool versionOk, bool testData = false) const;
|
||||
const std::string & getVariableName(bool versionOk) const;
|
||||
const std::string & getPalettePathName(bool versionOk) const;
|
||||
int getDefaultPaletteIndex(bool versionOk) const;
|
||||
int getDefaultPaletteIndexMin(bool versionOk) const;
|
||||
int getDefaultPaletteIndexMax(bool versionOk) const;
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
@@ -191,14 +181,9 @@ private:
|
||||
virtual Tag getId(void) const;
|
||||
|
||||
public:
|
||||
const std::string & getVariableName(bool versionOk, bool testData = false) const;
|
||||
const std::string & getConstValue(bool versionOk, bool testData = false) const;
|
||||
const std::string & getVariableName(bool versionOk) const;
|
||||
const std::string & getConstValue(bool versionOk) const;
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
@@ -231,14 +216,9 @@ private:
|
||||
virtual Tag getId(void) const;
|
||||
|
||||
public:
|
||||
const std::string & getSourceVariable(bool versionOk, bool testData = false) const;
|
||||
const std::string & getDependentVariable(bool versionOk, bool testData = false) const;
|
||||
const std::string & getSourceVariable(bool versionOk) const;
|
||||
const std::string & getDependentVariable(bool versionOk) const;
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
@@ -270,22 +250,17 @@ public:
|
||||
size_t getConstStringCustomizationVariablesCount(void) const;
|
||||
GameObjectType getSocketDestinations(int index) const;
|
||||
size_t getSocketDestinationsCount(void) const;
|
||||
const std::string & getStructureFootprintFileName(bool testData = false) const;
|
||||
bool getUseStructureFootprintOutline(bool testData = false) const;
|
||||
bool getTargetable(bool testData = false) const;
|
||||
const std::string & getStructureFootprintFileName() const;
|
||||
bool getUseStructureFootprintOutline() const;
|
||||
bool getTargetable() const;
|
||||
const std::string & getCertificationsRequired(int index) const;
|
||||
size_t getCertificationsRequiredCount(void) const;
|
||||
void getCustomizationVariableMapping(CustomizationVariableMapping &data, int index) const;
|
||||
void getCustomizationVariableMappingMin(CustomizationVariableMapping &data, int index) const;
|
||||
void getCustomizationVariableMappingMax(CustomizationVariableMapping &data, int index) const;
|
||||
size_t getCustomizationVariableMappingCount(void) const;
|
||||
ClientVisabilityFlags getClientVisabilityFlag(bool testData = false) const;
|
||||
ClientVisabilityFlags getClientVisabilityFlag() const;
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+11
-82
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "sharedGame/FirstSharedGame.h"
|
||||
#include "SharedTerrainSurfaceObjectTemplate.h"
|
||||
#include "sharedDebug/DataLint.h"
|
||||
|
||||
#include "sharedFile/Iff.h"
|
||||
#include "sharedMath/Vector.h"
|
||||
#include "sharedObject/ObjectTemplateList.h"
|
||||
@@ -103,22 +103,14 @@ Tag SharedTerrainSurfaceObjectTemplate::getHighestTemplateVersion(void) const
|
||||
} // SharedTerrainSurfaceObjectTemplate::getHighestTemplateVersion
|
||||
|
||||
//@BEGIN TFD
|
||||
float SharedTerrainSurfaceObjectTemplate::getCover(bool testData) const
|
||||
float SharedTerrainSurfaceObjectTemplate::getCover() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTerrainSurfaceObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTerrainSurfaceObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getCover(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_cover.isLoaded())
|
||||
@@ -158,33 +150,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
if (testDataValue == value)
|
||||
DEBUG_WARNING(true, ("Template %s, parameter cover is returning same value as base template.", DataResource::getName()));
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTerrainSurfaceObjectTemplate::getCover
|
||||
|
||||
float SharedTerrainSurfaceObjectTemplate::getCoverMin(bool testData) const
|
||||
float SharedTerrainSurfaceObjectTemplate::getCoverMin() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTerrainSurfaceObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTerrainSurfaceObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getCoverMin(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_cover.isLoaded())
|
||||
@@ -224,33 +201,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
if (testDataValue == value)
|
||||
DEBUG_WARNING(true, ("Template %s, parameter cover is returning same value as base template.", DataResource::getName()));
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTerrainSurfaceObjectTemplate::getCoverMin
|
||||
|
||||
float SharedTerrainSurfaceObjectTemplate::getCoverMax(bool testData) const
|
||||
float SharedTerrainSurfaceObjectTemplate::getCoverMax() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTerrainSurfaceObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTerrainSurfaceObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getCoverMax(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_cover.isLoaded())
|
||||
@@ -290,33 +252,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
if (testDataValue == value)
|
||||
DEBUG_WARNING(true, ("Template %s, parameter cover is returning same value as base template.", DataResource::getName()));
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTerrainSurfaceObjectTemplate::getCoverMax
|
||||
|
||||
const std::string & SharedTerrainSurfaceObjectTemplate::getSurfaceType(bool testData) const
|
||||
const std::string & SharedTerrainSurfaceObjectTemplate::getSurfaceType() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
std::string testDataValue = DefaultString;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedTerrainSurfaceObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedTerrainSurfaceObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getSurfaceType(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_surfaceType.isLoaded())
|
||||
@@ -334,28 +281,10 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
const std::string & value = m_surfaceType.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
if (testDataValue == value)
|
||||
DEBUG_WARNING(true, ("Template %s, parameter surfaceType is returning same value as base template.", DataResource::getName()));
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedTerrainSurfaceObjectTemplate::getSurfaceType
|
||||
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedTerrainSurfaceObjectTemplate::testValues(void) const
|
||||
{
|
||||
IGNORE_RETURN(getCoverMin(true));
|
||||
IGNORE_RETURN(getCoverMax(true));
|
||||
IGNORE_RETURN(getSurfaceType(true));
|
||||
} // SharedTerrainSurfaceObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -397,8 +326,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
|
||||
+4
-9
@@ -44,16 +44,11 @@ public:
|
||||
|
||||
//@BEGIN TFD
|
||||
public:
|
||||
float getCover(bool testData = false) const;
|
||||
float getCoverMin(bool testData = false) const;
|
||||
float getCoverMax(bool testData = false) const;
|
||||
const std::string & getSurfaceType(bool testData = false) const;
|
||||
float getCover() const;
|
||||
float getCoverMin() const;
|
||||
float getCoverMax() const;
|
||||
const std::string & getSurfaceType() const;
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+3
-12
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "sharedGame/FirstSharedGame.h"
|
||||
#include "SharedUniverseObjectTemplate.h"
|
||||
#include "sharedDebug/DataLint.h"
|
||||
|
||||
#include "sharedFile/Iff.h"
|
||||
#include "sharedMath/Vector.h"
|
||||
#include "sharedObject/ObjectTemplate.h"
|
||||
@@ -104,15 +104,6 @@ Tag SharedUniverseObjectTemplate::getHighestTemplateVersion(void) const
|
||||
} // SharedUniverseObjectTemplate::getHighestTemplateVersion
|
||||
|
||||
//@BEGIN TFD
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedUniverseObjectTemplate::testValues(void) const
|
||||
{
|
||||
SharedObjectTemplate::testValues();
|
||||
} // SharedUniverseObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -155,8 +146,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
|
||||
-5
@@ -45,11 +45,6 @@ public:
|
||||
//@BEGIN TFD
|
||||
public:
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+38
-293
@@ -250,22 +250,14 @@ float SharedVehicleObjectTemplate::getSpeedMax(MovementTypes index) const
|
||||
return value;
|
||||
} // SharedVehicleObjectTemplate::getSpeedMax
|
||||
|
||||
float SharedVehicleObjectTemplate::getSlopeAversion(bool testData) const
|
||||
float SharedVehicleObjectTemplate::getSlopeAversion() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedVehicleObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getSlopeAversion(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_slopeAversion.isLoaded())
|
||||
@@ -305,31 +297,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedVehicleObjectTemplate::getSlopeAversion
|
||||
|
||||
float SharedVehicleObjectTemplate::getSlopeAversionMin(bool testData) const
|
||||
float SharedVehicleObjectTemplate::getSlopeAversionMin() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedVehicleObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getSlopeAversionMin(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_slopeAversion.isLoaded())
|
||||
@@ -369,31 +348,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedVehicleObjectTemplate::getSlopeAversionMin
|
||||
|
||||
float SharedVehicleObjectTemplate::getSlopeAversionMax(bool testData) const
|
||||
float SharedVehicleObjectTemplate::getSlopeAversionMax() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedVehicleObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getSlopeAversionMax(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_slopeAversion.isLoaded())
|
||||
@@ -433,31 +399,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedVehicleObjectTemplate::getSlopeAversionMax
|
||||
|
||||
float SharedVehicleObjectTemplate::getHoverValue(bool testData) const
|
||||
float SharedVehicleObjectTemplate::getHoverValue() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedVehicleObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getHoverValue(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_hoverValue.isLoaded())
|
||||
@@ -497,31 +450,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedVehicleObjectTemplate::getHoverValue
|
||||
|
||||
float SharedVehicleObjectTemplate::getHoverValueMin(bool testData) const
|
||||
float SharedVehicleObjectTemplate::getHoverValueMin() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedVehicleObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getHoverValueMin(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_hoverValue.isLoaded())
|
||||
@@ -561,31 +501,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedVehicleObjectTemplate::getHoverValueMin
|
||||
|
||||
float SharedVehicleObjectTemplate::getHoverValueMax(bool testData) const
|
||||
float SharedVehicleObjectTemplate::getHoverValueMax() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedVehicleObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getHoverValueMax(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_hoverValue.isLoaded())
|
||||
@@ -625,31 +552,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedVehicleObjectTemplate::getHoverValueMax
|
||||
|
||||
float SharedVehicleObjectTemplate::getTurnRate(bool testData) const
|
||||
float SharedVehicleObjectTemplate::getTurnRate() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedVehicleObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getTurnRate(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_turnRate.isLoaded())
|
||||
@@ -689,31 +603,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedVehicleObjectTemplate::getTurnRate
|
||||
|
||||
float SharedVehicleObjectTemplate::getTurnRateMin(bool testData) const
|
||||
float SharedVehicleObjectTemplate::getTurnRateMin() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedVehicleObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getTurnRateMin(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_turnRate.isLoaded())
|
||||
@@ -753,31 +654,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedVehicleObjectTemplate::getTurnRateMin
|
||||
|
||||
float SharedVehicleObjectTemplate::getTurnRateMax(bool testData) const
|
||||
float SharedVehicleObjectTemplate::getTurnRateMax() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedVehicleObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getTurnRateMax(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_turnRate.isLoaded())
|
||||
@@ -817,31 +705,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedVehicleObjectTemplate::getTurnRateMax
|
||||
|
||||
float SharedVehicleObjectTemplate::getMaxVelocity(bool testData) const
|
||||
float SharedVehicleObjectTemplate::getMaxVelocity() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedVehicleObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getMaxVelocity(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_maxVelocity.isLoaded())
|
||||
@@ -881,31 +756,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedVehicleObjectTemplate::getMaxVelocity
|
||||
|
||||
float SharedVehicleObjectTemplate::getMaxVelocityMin(bool testData) const
|
||||
float SharedVehicleObjectTemplate::getMaxVelocityMin() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedVehicleObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getMaxVelocityMin(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_maxVelocity.isLoaded())
|
||||
@@ -945,31 +807,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedVehicleObjectTemplate::getMaxVelocityMin
|
||||
|
||||
float SharedVehicleObjectTemplate::getMaxVelocityMax(bool testData) const
|
||||
float SharedVehicleObjectTemplate::getMaxVelocityMax() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedVehicleObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getMaxVelocityMax(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_maxVelocity.isLoaded())
|
||||
@@ -1009,31 +858,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedVehicleObjectTemplate::getMaxVelocityMax
|
||||
|
||||
float SharedVehicleObjectTemplate::getAcceleration(bool testData) const
|
||||
float SharedVehicleObjectTemplate::getAcceleration() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedVehicleObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getAcceleration(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_acceleration.isLoaded())
|
||||
@@ -1073,31 +909,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedVehicleObjectTemplate::getAcceleration
|
||||
|
||||
float SharedVehicleObjectTemplate::getAccelerationMin(bool testData) const
|
||||
float SharedVehicleObjectTemplate::getAccelerationMin() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedVehicleObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getAccelerationMin(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_acceleration.isLoaded())
|
||||
@@ -1137,31 +960,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedVehicleObjectTemplate::getAccelerationMin
|
||||
|
||||
float SharedVehicleObjectTemplate::getAccelerationMax(bool testData) const
|
||||
float SharedVehicleObjectTemplate::getAccelerationMax() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedVehicleObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getAccelerationMax(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_acceleration.isLoaded())
|
||||
@@ -1201,31 +1011,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedVehicleObjectTemplate::getAccelerationMax
|
||||
|
||||
float SharedVehicleObjectTemplate::getBraking(bool testData) const
|
||||
float SharedVehicleObjectTemplate::getBraking() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedVehicleObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getBraking(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_braking.isLoaded())
|
||||
@@ -1265,31 +1062,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedVehicleObjectTemplate::getBraking
|
||||
|
||||
float SharedVehicleObjectTemplate::getBrakingMin(bool testData) const
|
||||
float SharedVehicleObjectTemplate::getBrakingMin() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedVehicleObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getBrakingMin(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_braking.isLoaded())
|
||||
@@ -1329,31 +1113,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedVehicleObjectTemplate::getBrakingMin
|
||||
|
||||
float SharedVehicleObjectTemplate::getBrakingMax(bool testData) const
|
||||
float SharedVehicleObjectTemplate::getBrakingMax() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
float testDataValue = 0.0f;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedVehicleObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedVehicleObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getBrakingMax(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_braking.isLoaded())
|
||||
@@ -1393,36 +1164,10 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedVehicleObjectTemplate::getBrakingMax
|
||||
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedVehicleObjectTemplate::testValues(void) const
|
||||
{
|
||||
IGNORE_RETURN(getSlopeAversionMin(true));
|
||||
IGNORE_RETURN(getSlopeAversionMax(true));
|
||||
IGNORE_RETURN(getHoverValueMin(true));
|
||||
IGNORE_RETURN(getHoverValueMax(true));
|
||||
IGNORE_RETURN(getTurnRateMin(true));
|
||||
IGNORE_RETURN(getTurnRateMax(true));
|
||||
IGNORE_RETURN(getMaxVelocityMin(true));
|
||||
IGNORE_RETURN(getMaxVelocityMax(true));
|
||||
IGNORE_RETURN(getAccelerationMin(true));
|
||||
IGNORE_RETURN(getAccelerationMax(true));
|
||||
IGNORE_RETURN(getBrakingMin(true));
|
||||
IGNORE_RETURN(getBrakingMax(true));
|
||||
SharedTangibleObjectTemplate::testValues();
|
||||
} // SharedVehicleObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -1465,8 +1210,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
|
||||
+18
-23
@@ -58,30 +58,25 @@ public:
|
||||
float getSpeed(MovementTypes index) const;
|
||||
float getSpeedMin(MovementTypes index) const;
|
||||
float getSpeedMax(MovementTypes index) const;
|
||||
float getSlopeAversion(bool testData = false) const;
|
||||
float getSlopeAversionMin(bool testData = false) const;
|
||||
float getSlopeAversionMax(bool testData = false) const;
|
||||
float getHoverValue(bool testData = false) const;
|
||||
float getHoverValueMin(bool testData = false) const;
|
||||
float getHoverValueMax(bool testData = false) const;
|
||||
float getTurnRate(bool testData = false) const;
|
||||
float getTurnRateMin(bool testData = false) const;
|
||||
float getTurnRateMax(bool testData = false) const;
|
||||
float getMaxVelocity(bool testData = false) const;
|
||||
float getMaxVelocityMin(bool testData = false) const;
|
||||
float getMaxVelocityMax(bool testData = false) const;
|
||||
float getAcceleration(bool testData = false) const;
|
||||
float getAccelerationMin(bool testData = false) const;
|
||||
float getAccelerationMax(bool testData = false) const;
|
||||
float getBraking(bool testData = false) const;
|
||||
float getBrakingMin(bool testData = false) const;
|
||||
float getBrakingMax(bool testData = false) const;
|
||||
float getSlopeAversion() const;
|
||||
float getSlopeAversionMin() const;
|
||||
float getSlopeAversionMax() const;
|
||||
float getHoverValue() const;
|
||||
float getHoverValueMin() const;
|
||||
float getHoverValueMax() const;
|
||||
float getTurnRate() const;
|
||||
float getTurnRateMin() const;
|
||||
float getTurnRateMax() const;
|
||||
float getMaxVelocity() const;
|
||||
float getMaxVelocityMin() const;
|
||||
float getMaxVelocityMax() const;
|
||||
float getAcceleration() const;
|
||||
float getAccelerationMin() const;
|
||||
float getAccelerationMax() const;
|
||||
float getBraking() const;
|
||||
float getBrakingMin() const;
|
||||
float getBrakingMax() const;
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+2
-11
@@ -103,15 +103,6 @@ Tag SharedWaypointObjectTemplate::getHighestTemplateVersion(void) const
|
||||
} // SharedWaypointObjectTemplate::getHighestTemplateVersion
|
||||
|
||||
//@BEGIN TFD
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedWaypointObjectTemplate::testValues(void) const
|
||||
{
|
||||
SharedIntangibleObjectTemplate::testValues();
|
||||
} // SharedWaypointObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -154,8 +145,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,0))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
|
||||
-5
@@ -45,11 +45,6 @@ public:
|
||||
//@BEGIN TFD
|
||||
public:
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
+12
-90
@@ -103,22 +103,14 @@ Tag SharedWeaponObjectTemplate::getHighestTemplateVersion(void) const
|
||||
} // SharedWeaponObjectTemplate::getHighestTemplateVersion
|
||||
|
||||
//@BEGIN TFD
|
||||
const std::string & SharedWeaponObjectTemplate::getWeaponEffect(bool testData) const
|
||||
const std::string & SharedWeaponObjectTemplate::getWeaponEffect() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
std::string testDataValue = DefaultString;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedWeaponObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedWeaponObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getWeaponEffect(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_weaponEffect.isLoaded())
|
||||
@@ -136,31 +128,18 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
const std::string & value = m_weaponEffect.getValue();
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedWeaponObjectTemplate::getWeaponEffect
|
||||
|
||||
int SharedWeaponObjectTemplate::getWeaponEffectIndex(bool testData) const
|
||||
int SharedWeaponObjectTemplate::getWeaponEffectIndex() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int testDataValue = 0;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedWeaponObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedWeaponObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getWeaponEffectIndex(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_weaponEffectIndex.isLoaded())
|
||||
@@ -200,31 +179,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedWeaponObjectTemplate::getWeaponEffectIndex
|
||||
|
||||
int SharedWeaponObjectTemplate::getWeaponEffectIndexMin(bool testData) const
|
||||
int SharedWeaponObjectTemplate::getWeaponEffectIndexMin() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int testDataValue = 0;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedWeaponObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedWeaponObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getWeaponEffectIndexMin(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_weaponEffectIndex.isLoaded())
|
||||
@@ -264,31 +230,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedWeaponObjectTemplate::getWeaponEffectIndexMin
|
||||
|
||||
int SharedWeaponObjectTemplate::getWeaponEffectIndexMax(bool testData) const
|
||||
int SharedWeaponObjectTemplate::getWeaponEffectIndexMax() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int testDataValue = 0;
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedWeaponObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedWeaponObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getWeaponEffectIndexMax(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_weaponEffectIndex.isLoaded())
|
||||
@@ -328,31 +281,18 @@ UNREF(testData);
|
||||
else if (delta == '_')
|
||||
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedWeaponObjectTemplate::getWeaponEffectIndexMax
|
||||
|
||||
SharedWeaponObjectTemplate::AttackType SharedWeaponObjectTemplate::getAttackType(bool testData) const
|
||||
SharedWeaponObjectTemplate::AttackType SharedWeaponObjectTemplate::getAttackType() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
SharedWeaponObjectTemplate::AttackType testDataValue = static_cast<SharedWeaponObjectTemplate::AttackType>(0);
|
||||
#else
|
||||
UNREF(testData);
|
||||
#endif
|
||||
|
||||
|
||||
const SharedWeaponObjectTemplate * base = nullptr;
|
||||
if (m_baseData != nullptr)
|
||||
{
|
||||
base = dynamic_cast<const SharedWeaponObjectTemplate *>(m_baseData);
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
testDataValue = base->getAttackType(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_attackType.isLoaded())
|
||||
@@ -370,28 +310,10 @@ UNREF(testData);
|
||||
}
|
||||
|
||||
AttackType value = static_cast<AttackType>(m_attackType.getValue());
|
||||
#ifdef _DEBUG
|
||||
if (testData && base != nullptr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
return value;
|
||||
} // SharedWeaponObjectTemplate::getAttackType
|
||||
|
||||
#ifdef _DEBUG
|
||||
/**
|
||||
* Special function used by datalint. Checks for duplicate values in base and derived templates.
|
||||
*/
|
||||
void SharedWeaponObjectTemplate::testValues(void) const
|
||||
{
|
||||
IGNORE_RETURN(getWeaponEffect(true));
|
||||
IGNORE_RETURN(getWeaponEffectIndexMin(true));
|
||||
IGNORE_RETURN(getWeaponEffectIndexMax(true));
|
||||
IGNORE_RETURN(getAttackType(true));
|
||||
SharedTangibleObjectTemplate::testValues();
|
||||
} // SharedWeaponObjectTemplate::testValues
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loads the template data from an iff file. We should already be in the form
|
||||
@@ -434,8 +356,8 @@ char paramName[MAX_NAME_SIZE];
|
||||
}
|
||||
if (getHighestTemplateVersion() != TAG(0,0,0,4))
|
||||
{
|
||||
if (DataLint::isEnabled())
|
||||
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
|
||||
|
||||
|
||||
m_versionOk = false;
|
||||
}
|
||||
|
||||
|
||||
+5
-10
@@ -54,17 +54,12 @@ public:
|
||||
};
|
||||
|
||||
public:
|
||||
const std::string & getWeaponEffect(bool testData = false) const;
|
||||
int getWeaponEffectIndex(bool testData = false) const;
|
||||
int getWeaponEffectIndexMin(bool testData = false) const;
|
||||
int getWeaponEffectIndexMax(bool testData = false) const;
|
||||
AttackType getAttackType(bool testData = false) const;
|
||||
const std::string & getWeaponEffect() const;
|
||||
int getWeaponEffectIndex() const;
|
||||
int getWeaponEffectIndexMin() const;
|
||||
int getWeaponEffectIndexMax() const;
|
||||
AttackType getAttackType() const;
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
// special code used by datalint
|
||||
virtual void testValues(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void load(Iff &file);
|
||||
|
||||
Reference in New Issue
Block a user