datablock-temp-clone -- Implements creation of temporary datablock clones to allow late substitution of datablock fields.

This commit is contained in:
Marc Chapman 2017-07-26 21:10:43 +01:00
parent 0b84fccdd2
commit f9f05f154f
24 changed files with 865 additions and 11 deletions

View file

@ -20,6 +20,10 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
// Arcane-FX for MIT Licensed Open Source version of Torque 3D from GarageGames
// Copyright (C) 2015 Faust Logic, Inc.
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
#include "platform/platform.h"
#include "sfx/sfxDescription.h"
@ -176,6 +180,37 @@ SFXDescription::SFXDescription( const SFXDescription& desc )
//-----------------------------------------------------------------------------
SFXDescription::SFXDescription(const SFXDescription& other, bool temp_clone)
: SimDataBlock(other, temp_clone),
mVolume( other.mVolume ),
mPitch( other.mPitch ),
mIsLooping( other.mIsLooping ),
mIsStreaming( other.mIsStreaming ),
mIs3D( other.mIs3D ),
mUseHardware( other.mUseHardware ),
mMinDistance( other.mMinDistance ),
mMaxDistance( other.mMaxDistance ),
mConeInsideAngle( other.mConeInsideAngle ),
mConeOutsideAngle( other.mConeOutsideAngle ),
mConeOutsideVolume( other.mConeOutsideVolume ),
mRolloffFactor( other.mRolloffFactor ),
mSourceGroup( other.mSourceGroup ),
mFadeInTime( other.mFadeInTime ),
mFadeOutTime( other.mFadeOutTime ),
mFadeInEase( other.mFadeInEase ),
mFadeOutEase( other.mFadeOutEase ),
mFadeLoops( other.mFadeLoops ),
mStreamPacketSize( other.mStreamPacketSize ),
mStreamReadAhead( other.mStreamReadAhead ),
mUseReverb( other.mUseReverb ),
mReverb( other.mReverb ),
mPriority( other.mPriority ),
mScatterDistance( other.mScatterDistance )
{
for( U32 i = 0; i < MaxNumParameters; ++ i )
mParameters[ i ] = other.mParameters[ i ];
}
void SFXDescription::initPersistFields()
{
addGroup( "Playback" );