mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
Merge pull request #1413 from Azaezel/alpha41/validValidators
consolidate addfieldV method contents to avoid duplication
This commit is contained in:
commit
1ebe48edbd
25 changed files with 84 additions and 97 deletions
|
|
@ -91,7 +91,7 @@ DecalData::DecalData()
|
|||
|
||||
matInst = NULL;
|
||||
|
||||
renderPriority = 10;
|
||||
mRenderPriority = 10;
|
||||
clippingMasks = STATIC_COLLISION_TYPEMASK;
|
||||
clippingAngle = 89.0f;
|
||||
|
||||
|
|
@ -169,7 +169,7 @@ void DecalData::initPersistFields()
|
|||
"fully faded out.\n\n"
|
||||
"This should be a smaller value than #fadeStartPixelSize." );
|
||||
|
||||
addField( "renderPriority", TypeS8, Offset( renderPriority, DecalData ),
|
||||
addField( "renderPriority", TypeS16, Offset( mRenderPriority, DecalData ),
|
||||
"Default renderPriority for decals of this type (determines draw "
|
||||
"order when decals overlap)." );
|
||||
|
||||
|
|
@ -235,7 +235,7 @@ void DecalData::onStaticModified( const char *slotName, const char *newValue )
|
|||
}
|
||||
else if ( dStricmp( slotName, "renderPriority" ) == 0 )
|
||||
{
|
||||
renderPriority = getMax( renderPriority, (U8)1 );
|
||||
mRenderPriority = getMax(mRenderPriority, (S16)1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -270,7 +270,7 @@ void DecalData::packData( BitStream *stream )
|
|||
|
||||
stream->write( fadeStartPixelSize );
|
||||
stream->write( fadeEndPixelSize );
|
||||
stream->write( renderPriority );
|
||||
stream->write( mRenderPriority );
|
||||
stream->write( clippingMasks );
|
||||
stream->write( clippingAngle );
|
||||
|
||||
|
|
@ -300,7 +300,7 @@ void DecalData::unpackData( BitStream *stream )
|
|||
|
||||
stream->read( &fadeStartPixelSize );
|
||||
stream->read( &fadeEndPixelSize );
|
||||
stream->read( &renderPriority );
|
||||
stream->read( &mRenderPriority);
|
||||
stream->read( &clippingMasks );
|
||||
stream->read( &clippingAngle );
|
||||
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class DecalData : public SimDataBlock
|
|||
|
||||
String lookupName;
|
||||
|
||||
U8 renderPriority;
|
||||
S16 mRenderPriority;
|
||||
|
||||
S32 clippingMasks;
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class DecalInstance
|
|||
|
||||
U8 getRenderPriority() const
|
||||
{
|
||||
return mRenderPriority == 0 ? mDataBlock->renderPriority : mRenderPriority;
|
||||
return mRenderPriority == 0 ? mDataBlock->mRenderPriority : mRenderPriority;
|
||||
}
|
||||
|
||||
/// Calculates the size of this decal onscreen in pixels, used for LOD.
|
||||
|
|
|
|||
|
|
@ -138,11 +138,11 @@ ParticleData::ParticleData()
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
FRangeValidator dragCoefFValidator(0.f, 5.f);
|
||||
FRangeValidator gravCoefFValidator(-10.f, 10.f);
|
||||
FRangeValidator spinRandFValidator(-1000.f, 1000.f);
|
||||
FRangeValidator particleTimeFValidator(0.0f, 1.0f, 1<<8);
|
||||
FRangeValidator particleSizeFValidator(0.0f, MaxParticleSize, 1<<16);
|
||||
FRangeValidator dragCoefFValidator(0.f, 5.f, BIT(10));
|
||||
FRangeValidator gravCoefFValidator(-10.f, 10.f, BIT(12));
|
||||
FRangeValidator spinRandFValidator(-1000.f, 1000.f, BIT(11));
|
||||
FRangeValidator particleTimeFValidator(0.0f, 1.0f, BIT(8));
|
||||
FRangeValidator particleSizeFValidator(0.0f, MaxParticleSize, BIT(16));
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// initPersistFields
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue