mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-23 05:15:34 +00:00
code duplication prune. should aid in stability
This commit is contained in:
parent
10f2453cee
commit
98a079a797
123 changed files with 632 additions and 966 deletions
|
|
@ -141,7 +141,7 @@ U32 Projectile::smProjectileWarpTicks = 5;
|
|||
//
|
||||
afxMagicMissileData::afxMagicMissileData()
|
||||
{
|
||||
INIT_SHAPEASSET(ProjectileShape);
|
||||
INIT_ASSET(ProjectileShape);
|
||||
|
||||
sound = NULL;
|
||||
|
||||
|
|
@ -246,7 +246,7 @@ afxMagicMissileData::afxMagicMissileData()
|
|||
|
||||
afxMagicMissileData::afxMagicMissileData(const afxMagicMissileData& other, bool temp_clone) : GameBaseData(other, temp_clone)
|
||||
{
|
||||
CLONE_SHAPEASSET(ProjectileShape);
|
||||
CLONE_ASSET(ProjectileShape);
|
||||
projectileShape = other.projectileShape; // -- TSShape loads using projectileShapeName
|
||||
sound = other.sound;
|
||||
splash = other.splash;
|
||||
|
|
@ -599,7 +599,7 @@ void afxMagicMissileData::packData(BitStream* stream)
|
|||
{
|
||||
Parent::packData(stream);
|
||||
|
||||
PACKDATA_SHAPEASSET(ProjectileShape);
|
||||
PACKDATA_ASSET(ProjectileShape);
|
||||
|
||||
/* From stock Projectile code...
|
||||
stream->writeFlag(faceViewer);
|
||||
|
|
@ -710,7 +710,7 @@ void afxMagicMissileData::unpackData(BitStream* stream)
|
|||
{
|
||||
Parent::unpackData(stream);
|
||||
|
||||
UNPACKDATA_SHAPEASSET(ProjectileShape);
|
||||
UNPACKDATA_ASSET(ProjectileShape);
|
||||
/* From stock Projectile code...
|
||||
faceViewer = stream->readFlag();
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public:
|
|||
// variables set in datablock definition:
|
||||
// Shape related
|
||||
DECLARE_SHAPEASSET(afxMagicMissileData, ProjectileShape, onShapeChanged);
|
||||
DECLARE_SHAPEASSET_SETGET(afxMagicMissileData, ProjectileShape);
|
||||
DECLARE_ASSET_SETGET(afxMagicMissileData, ProjectileShape);
|
||||
//StringTableEntry projectileShapeName;
|
||||
|
||||
//bool hasLight;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ ConsoleDocClass( afxBillboardData,
|
|||
afxBillboardData::afxBillboardData()
|
||||
{
|
||||
color.set(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
INIT_IMAGEASSET(Texture);
|
||||
INIT_ASSET(Texture);
|
||||
dimensions.set(1.0f, 1.0f);
|
||||
texCoords[0].set(0.0f, 0.0f);
|
||||
texCoords[1].set(0.0f, 1.0f);
|
||||
|
|
@ -66,7 +66,7 @@ afxBillboardData::afxBillboardData(const afxBillboardData& other, bool temp_clon
|
|||
: GameBaseData(other, temp_clone)
|
||||
{
|
||||
color = other.color;
|
||||
CLONE_IMAGEASSET(Texture);
|
||||
CLONE_ASSET(Texture);
|
||||
dimensions = other.dimensions;
|
||||
texCoords[0] = other.texCoords[0];
|
||||
texCoords[1] = other.texCoords[1];
|
||||
|
|
@ -123,7 +123,7 @@ void afxBillboardData::packData(BitStream* stream)
|
|||
Parent::packData(stream);
|
||||
|
||||
stream->write(color);
|
||||
PACKDATA_IMAGEASSET(Texture);
|
||||
PACKDATA_ASSET(Texture);
|
||||
|
||||
mathWrite(*stream, dimensions);
|
||||
mathWrite(*stream, texCoords[0]);
|
||||
|
|
@ -140,7 +140,7 @@ void afxBillboardData::unpackData(BitStream* stream)
|
|||
Parent::unpackData(stream);
|
||||
|
||||
stream->read(&color);
|
||||
UNPACKDATA_IMAGEASSET(Texture);
|
||||
UNPACKDATA_ASSET(Texture);
|
||||
mathRead(*stream, &dimensions);
|
||||
mathRead(*stream, &texCoords[0]);
|
||||
mathRead(*stream, &texCoords[1]);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public:
|
|||
|
||||
public:
|
||||
DECLARE_IMAGEASSET(afxBillboardData, Texture, onChangeTexture, GFXStaticTextureSRGBProfile);
|
||||
DECLARE_IMAGEASSET_SETGET(afxBillboardData, Texture);
|
||||
DECLARE_ASSET_SETGET(afxBillboardData, Texture);
|
||||
|
||||
|
||||
LinearColorF color;
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ ConsoleDocClass( afxModelData,
|
|||
|
||||
afxModelData::afxModelData()
|
||||
{
|
||||
INIT_SHAPEASSET(Shape);
|
||||
INIT_ASSET(Shape);
|
||||
sequence = ST_NULLSTRING;
|
||||
seq_rate = 1.0f;
|
||||
seq_offset = 0.0f;
|
||||
|
|
@ -84,7 +84,7 @@ afxModelData::afxModelData()
|
|||
|
||||
afxModelData::afxModelData(const afxModelData& other, bool temp_clone) : GameBaseData(other, temp_clone)
|
||||
{
|
||||
CLONE_SHAPEASSET(Shape);
|
||||
CLONE_ASSET(Shape);
|
||||
sequence = other.sequence;
|
||||
seq_rate = other.seq_rate;
|
||||
seq_offset = other.seq_offset;
|
||||
|
|
@ -253,7 +253,7 @@ void afxModelData::packData(BitStream* stream)
|
|||
{
|
||||
Parent::packData(stream);
|
||||
|
||||
PACKDATA_SHAPEASSET(Shape);
|
||||
PACKDATA_ASSET(Shape);
|
||||
stream->writeString(sequence);
|
||||
stream->write(seq_rate);
|
||||
stream->write(seq_offset);
|
||||
|
|
@ -285,7 +285,7 @@ void afxModelData::unpackData(BitStream* stream)
|
|||
{
|
||||
Parent::unpackData(stream);
|
||||
|
||||
UNPACKDATA_SHAPEASSET(Shape);
|
||||
UNPACKDATA_ASSET(Shape);
|
||||
sequence = stream->readSTString();
|
||||
stream->read(&seq_rate);
|
||||
stream->read(&seq_offset);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ struct afxModelData : public GameBaseData
|
|||
typedef GameBaseData Parent;
|
||||
|
||||
DECLARE_SHAPEASSET(afxModelData, Shape, onShapeChanged);
|
||||
DECLARE_SHAPEASSET_SETGET(afxModelData, Shape);
|
||||
DECLARE_ASSET_SETGET(afxModelData, Shape);
|
||||
|
||||
StringTableEntry sequence;
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ bool afxZodiacData::sPreferDestinationGradients = false;
|
|||
|
||||
afxZodiacData::afxZodiacData()
|
||||
{
|
||||
INIT_IMAGEASSET(Texture);
|
||||
INIT_ASSET(Texture);
|
||||
|
||||
radius_xy = 1;
|
||||
vert_range.set(0.0f, 0.0f);
|
||||
|
|
@ -120,7 +120,7 @@ afxZodiacData::afxZodiacData()
|
|||
|
||||
afxZodiacData::afxZodiacData(const afxZodiacData& other, bool temp_clone) : GameBaseData(other, temp_clone)
|
||||
{
|
||||
CLONE_IMAGEASSET(Texture);
|
||||
CLONE_ASSET(Texture);
|
||||
|
||||
radius_xy = other.radius_xy;
|
||||
vert_range = other.vert_range;
|
||||
|
|
@ -269,7 +269,7 @@ void afxZodiacData::packData(BitStream* stream)
|
|||
|
||||
merge_zflags();
|
||||
|
||||
PACKDATA_IMAGEASSET(Texture);
|
||||
PACKDATA_ASSET(Texture);
|
||||
stream->write(radius_xy);
|
||||
stream->write(vert_range.x);
|
||||
stream->write(vert_range.y);
|
||||
|
|
@ -294,7 +294,7 @@ void afxZodiacData::unpackData(BitStream* stream)
|
|||
{
|
||||
Parent::unpackData(stream);
|
||||
|
||||
UNPACKDATA_IMAGEASSET(Texture);
|
||||
UNPACKDATA_ASSET(Texture);
|
||||
stream->read(&radius_xy);
|
||||
stream->read(&vert_range.x);
|
||||
stream->read(&vert_range.y);
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public:
|
|||
|
||||
public:
|
||||
DECLARE_IMAGEASSET(afxZodiacData, Texture, onImageChanged, AFX_GFXZodiacTextureProfile);
|
||||
DECLARE_IMAGEASSET_SETGET(afxZodiacData, Texture);
|
||||
DECLARE_ASSET_SETGET(afxZodiacData, Texture);
|
||||
|
||||
F32 radius_xy;
|
||||
Point2F vert_range;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ ConsoleDocClass( afxZodiacPlaneData,
|
|||
|
||||
afxZodiacPlaneData::afxZodiacPlaneData()
|
||||
{
|
||||
INIT_IMAGEASSET(Texture);
|
||||
INIT_ASSET(Texture);
|
||||
|
||||
radius_xy = 1;
|
||||
start_ang = 0;
|
||||
|
|
@ -71,7 +71,7 @@ afxZodiacPlaneData::afxZodiacPlaneData()
|
|||
afxZodiacPlaneData::afxZodiacPlaneData(const afxZodiacPlaneData& other, bool temp_clone)
|
||||
: GameBaseData(other, temp_clone)
|
||||
{
|
||||
CLONE_IMAGEASSET(Texture);
|
||||
CLONE_ASSET(Texture);
|
||||
|
||||
radius_xy = other.radius_xy;
|
||||
start_ang = other.start_ang;
|
||||
|
|
@ -165,7 +165,7 @@ void afxZodiacPlaneData::packData(BitStream* stream)
|
|||
|
||||
merge_zflags();
|
||||
|
||||
PACKDATA_IMAGEASSET(Texture);
|
||||
PACKDATA_ASSET(Texture);
|
||||
|
||||
stream->write(radius_xy);
|
||||
stream->write(start_ang);
|
||||
|
|
@ -184,7 +184,7 @@ void afxZodiacPlaneData::unpackData(BitStream* stream)
|
|||
{
|
||||
Parent::unpackData(stream);
|
||||
|
||||
UNPACKDATA_IMAGEASSET(Texture);
|
||||
UNPACKDATA_ASSET(Texture);
|
||||
|
||||
stream->read(&radius_xy);
|
||||
stream->read(&start_ang);
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public:
|
|||
|
||||
public:
|
||||
DECLARE_IMAGEASSET(afxZodiacPlaneData, Texture, onImageChanged, AFX_GFXZodiacTextureProfile);
|
||||
DECLARE_IMAGEASSET_SETGET(afxZodiacPlaneData, Texture);
|
||||
DECLARE_ASSET_SETGET(afxZodiacPlaneData, Texture);
|
||||
|
||||
F32 radius_xy;
|
||||
F32 start_ang;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue