code duplication prune. should aid in stability

This commit is contained in:
AzaezelX 2021-10-03 02:56:26 -05:00
parent 10f2453cee
commit 98a079a797
123 changed files with 632 additions and 966 deletions

View file

@ -116,7 +116,7 @@ FlyingVehicleData::FlyingVehicleData()
jetEmitter[j] = 0;
for (S32 i = 0; i < MaxSounds; i++)
INIT_SOUNDASSET_ARRAY(FlyingSounds, i);
INIT_ASSET_ARRAY(FlyingSounds, i);
vertThrustMultiple = 1.0;
}
@ -241,7 +241,7 @@ void FlyingVehicleData::packData(BitStream* stream)
for (S32 i = 0; i < MaxSounds; i++)
{
PACKDATA_SOUNDASSET_ARRAY(FlyingSounds, i);
PACKDATA_ASSET_ARRAY(FlyingSounds, i);
}
for (S32 j = 0; j < MaxJetEmitters; j++)
@ -276,7 +276,7 @@ void FlyingVehicleData::unpackData(BitStream* stream)
for (S32 i = 0; i < MaxSounds; i++)
{
UNPACKDATA_SOUNDASSET_ARRAY(FlyingSounds, i);
UNPACKDATA_ASSET_ARRAY(FlyingSounds, i);
}
for (S32 j = 0; j < MaxJetEmitters; j++) {

View file

@ -46,7 +46,7 @@ struct FlyingVehicleData: public VehicleData {
MaxSounds,
};
DECLARE_SOUNDASSET_ARRAY(FlyingVehicleData, FlyingSounds, Sounds::MaxSounds);
DECLARE_SOUNDASSET_ARRAY_SETGET(FlyingVehicleData, FlyingSounds);
DECLARE_ASSET_ARRAY_SETGET(FlyingVehicleData, FlyingSounds);
SFXProfile* getFlyingSoundProfile(U32 id)
{
if (mFlyingSoundsAsset[id] != NULL)

View file

@ -162,7 +162,7 @@ HoverVehicleData::HoverVehicleData()
jetEmitter[j] = 0;
for (S32 i = 0; i < MaxSounds; i++)
INIT_SOUNDASSET_ARRAY(HoverSounds, i);
INIT_ASSET_ARRAY(HoverSounds, i);
}
HoverVehicleData::~HoverVehicleData()
@ -370,7 +370,7 @@ void HoverVehicleData::packData(BitStream* stream)
for (S32 i = 0; i < MaxSounds; i++)
{
PACKDATA_SOUNDASSET_ARRAY(HoverSounds, i);
PACKDATA_ASSET_ARRAY(HoverSounds, i);
}
for (S32 j = 0; j < MaxJetEmitters; j++)
@ -419,7 +419,7 @@ void HoverVehicleData::unpackData(BitStream* stream)
for (S32 i = 0; i < MaxSounds; i++)
{
UNPACKDATA_SOUNDASSET_ARRAY(HoverSounds, i);
UNPACKDATA_ASSET_ARRAY(HoverSounds, i);
}
for (S32 j = 0; j < MaxJetEmitters; j++) {

View file

@ -47,7 +47,7 @@ class HoverVehicleData : public VehicleData
MaxSounds
};
DECLARE_SOUNDASSET_ARRAY(HoverVehicleData, HoverSounds, Sounds::MaxSounds);
DECLARE_SOUNDASSET_ARRAY_SETGET(HoverVehicleData, HoverSounds);
DECLARE_ASSET_ARRAY_SETGET(HoverVehicleData, HoverSounds);
SFXProfile* getHoverSoundProfile(U32 id)
{
if (mHoverSoundsAsset[id] != NULL)

View file

@ -189,7 +189,7 @@ VehicleData::VehicleData()
for (S32 i = 0; i < Body::MaxSounds; i++)
{
INIT_SOUNDASSET_ARRAY(VehicleBodySounds, i);
INIT_ASSET_ARRAY(VehicleBodySounds, i);
}
dustEmitter = NULL;
@ -214,7 +214,7 @@ VehicleData::VehicleData()
hardSplashSoundVel = 3.0;
for (S32 i = 0; i < Sounds::MaxSounds; i++)
INIT_SOUNDASSET_ARRAY(VehicleWaterSounds, i);
INIT_ASSET_ARRAY(VehicleWaterSounds, i);
collDamageThresholdVel = 20;
collDamageMultiplier = 0.05f;
@ -302,7 +302,7 @@ void VehicleData::packData(BitStream* stream)
stream->write(body.friction);
for (i = 0; i < Body::MaxSounds; i++)
{
PACKDATA_SOUNDASSET_ARRAY(VehicleBodySounds, i);
PACKDATA_ASSET_ARRAY(VehicleBodySounds, i);
}
stream->write(minImpactSpeed);
@ -346,7 +346,7 @@ void VehicleData::packData(BitStream* stream)
// write the water sound profiles
for (i = 0; i < MaxSounds; i++)
{
PACKDATA_SOUNDASSET_ARRAY(VehicleWaterSounds, i);
PACKDATA_ASSET_ARRAY(VehicleWaterSounds, i);
}
if (stream->writeFlag( dustEmitter ))
@ -398,7 +398,7 @@ void VehicleData::unpackData(BitStream* stream)
S32 i;
for (i = 0; i < Body::MaxSounds; i++)
{
UNPACKDATA_SOUNDASSET_ARRAY(VehicleBodySounds, i);
UNPACKDATA_ASSET_ARRAY(VehicleBodySounds, i);
}
stream->read(&minImpactSpeed);
@ -442,7 +442,7 @@ void VehicleData::unpackData(BitStream* stream)
// write the water sound profiles
for (i = 0; i < Sounds::MaxSounds; i++)
{
UNPACKDATA_SOUNDASSET_ARRAY(VehicleWaterSounds, i);
UNPACKDATA_ASSET_ARRAY(VehicleWaterSounds, i);
}
if( stream->readFlag() )

View file

@ -50,7 +50,7 @@ struct VehicleData : public RigidShapeData
} body;
DECLARE_SOUNDASSET_ARRAY(VehicleData, VehicleBodySounds, Body::Sounds::MaxSounds)
DECLARE_SOUNDASSET_ARRAY_SETGET(VehicleData, VehicleBodySounds);
DECLARE_ASSET_ARRAY_SETGET(VehicleData, VehicleBodySounds);
SFXProfile* getVehicleBodySoundProfile(U32 id)
{
@ -82,7 +82,7 @@ struct VehicleData : public RigidShapeData
};
DECLARE_SOUNDASSET_ARRAY(VehicleData, VehicleWaterSounds, Sounds::MaxSounds)
DECLARE_SOUNDASSET_ARRAY_SETGET(VehicleData, VehicleWaterSounds);
DECLARE_ASSET_ARRAY_SETGET(VehicleData, VehicleWaterSounds);
SFXProfile* getVehicleWaterSoundProfile(U32 id)
{

View file

@ -75,7 +75,7 @@ ConsoleDocClass( WheeledVehicleTire,
WheeledVehicleTire::WheeledVehicleTire()
{
INIT_SHAPEASSET(Shape);
INIT_ASSET(Shape);
staticFriction = 1;
kineticFriction = 0.5f;
@ -177,7 +177,7 @@ void WheeledVehicleTire::packData(BitStream* stream)
{
Parent::packData(stream);
PACKDATA_SHAPEASSET(Shape);
PACKDATA_ASSET(Shape);
stream->write(mass);
stream->write(staticFriction);
@ -196,7 +196,7 @@ void WheeledVehicleTire::unpackData(BitStream* stream)
{
Parent::unpackData(stream);
UNPACKDATA_SHAPEASSET(Shape);
UNPACKDATA_ASSET(Shape);
stream->read(&mass);
stream->read(&staticFriction);
@ -312,7 +312,7 @@ WheeledVehicleData::WheeledVehicleData()
wheelCount = 0;
dMemset(&wheel, 0, sizeof(wheel));
for (S32 i = 0; i < MaxSounds; i++)
INIT_SOUNDASSET_ARRAY(WheeledVehicleSounds, i);
INIT_ASSET_ARRAY(WheeledVehicleSounds, i);
}
@ -483,7 +483,7 @@ void WheeledVehicleData::packData(BitStream* stream)
for (S32 i = 0; i < MaxSounds; i++)
{
PACKDATA_SOUNDASSET_ARRAY(WheeledVehicleSounds, i);
PACKDATA_ASSET_ARRAY(WheeledVehicleSounds, i);
}
stream->write(maxWheelSpeed);
@ -502,7 +502,7 @@ void WheeledVehicleData::unpackData(BitStream* stream)
for (S32 i = 0; i < MaxSounds; i++)
{
UNPACKDATA_SOUNDASSET_ARRAY(WheeledVehicleSounds, i);
UNPACKDATA_ASSET_ARRAY(WheeledVehicleSounds, i);
}
stream->read(&maxWheelSpeed);

View file

@ -44,7 +44,7 @@ struct WheeledVehicleTire: public SimDataBlock
typedef SimDataBlock Parent;
DECLARE_SHAPEASSET(WheeledVehicleTire, Shape, onShapeChanged);
DECLARE_SHAPEASSET_SETGET(WheeledVehicleTire, Shape);
DECLARE_ASSET_SETGET(WheeledVehicleTire, Shape);
// Physical properties
F32 mass; // Mass of the whole wheel
@ -120,7 +120,7 @@ struct WheeledVehicleData: public VehicleData
};
DECLARE_SOUNDASSET_ARRAY(WheeledVehicleData, WheeledVehicleSounds, Sounds::MaxSounds);
DECLARE_SOUNDASSET_ARRAY_SETGET(WheeledVehicleData, WheeledVehicleSounds);
DECLARE_ASSET_ARRAY_SETGET(WheeledVehicleData, WheeledVehicleSounds);
SFXProfile* getWheeledVehicleSound(U32 id)
{