本文整理汇总了C++中Shuttle类的典型用法代码示例。如果您正苦于以下问题:C++ Shuttle类的具体用法?C++ Shuttle怎么用?C++ Shuttle使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Shuttle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
void ShuttleFactory::handleDatabaseJobComplete(void* ref,DatabaseResult* result)
{
QueryContainerBase* asyncContainer = reinterpret_cast<QueryContainerBase*>(ref);
switch(asyncContainer->mQueryType)
{
case SHFQuery_MainData:
{
Shuttle* shuttle = _createShuttle(result);
if(shuttle->getLoadState() == LoadState_Loaded && asyncContainer->mOfCallback)
{
asyncContainer->mOfCallback->handleObjectReady(shuttle,asyncContainer->mClient);
}
else
{
}
}
break;
default:
break;
}
mQueryContainerPool.free(asyncContainer);
}
示例2: TransferParameters
bool EffectFindClipping::TransferParameters(Shuttle & shuttle)
{
shuttle.TransferInt(wxT("Start"), mStart, 3);
shuttle.TransferInt(wxT("Stop"), mStop, 3);
return true;
}
示例3: TransferParameters
bool EffectTruncSilence::TransferParameters( Shuttle & shuttle )
{
shuttle.TransferEnum(wxT("Db"), mTruncDbChoiceIndex, Enums::NumDbChoices, Enums::GetDbChoices());
shuttle.TransferInt(wxT("Minimum"), mTruncInitialAllowedSilentMs, 200);
shuttle.TransferInt(wxT("Duration"), mTruncLongestAllowedSilentMs, 1000);
shuttle.TransferDouble(wxT("Compress"), mSilenceCompressRatio, 4.0f);
return true;
}
示例4: TransferParameters
bool EffectNormalize::TransferParameters( Shuttle & shuttle )
{
shuttle.TransferBool( wxT("ApplyGain"), mGain, true );
shuttle.TransferBool( wxT("RemoveDcOffset"), mDC, true );
shuttle.TransferDouble( wxT("Level"), mLevel, 0.0);
shuttle.TransferBool( wxT("StereoIndependent"), mStereoInd, false );
return true;
}
示例5: TransferParameters
bool EffectTruncSilence::TransferParameters( Shuttle & shuttle )
{
shuttle.TransferEnum(wxT("Db"), mTruncDbChoiceIndex, Enums::NumDbChoices, Enums::GetDbChoices());
shuttle.TransferInt(wxT("Action"), mProcessIndex, 0);
shuttle.TransferDouble(wxT("Minimum"), mInitialAllowedSilence, 0.5);
shuttle.TransferDouble(wxT("Truncate"), mTruncLongestAllowedSilence, 0.5);
shuttle.TransferDouble(wxT("Compress"), mSilenceCompressPercent, 50.0);
return true;
}
示例6: TransferParameters
bool EffectPhaser::TransferParameters( Shuttle & shuttle )
{
shuttle.TransferInt(wxT("Stages"),stages,2);
shuttle.TransferInt(wxT("Wet"),drywet,128);
shuttle.TransferFloat(wxT("Freq"),freq,0.4f);
shuttle.TransferInt(wxT("Depth"),depth,100);
shuttle.TransferFloat(wxT("Feedback"),fb,0.0f);
return true;
}
示例7: TransferParameters
bool EffectBassTreble::TransferParameters(Shuttle & shuttle)
{
shuttle.TransferDouble(wxT("Bass"),dB_bass,0.0);
shuttle.TransferDouble(wxT("Treble"),dB_treble,0.0);
shuttle.TransferDouble(wxT("Level"),dB_level,0.0);
shuttle.TransferBool( wxT("Normalize"), mbNormalize, true );
return true;
}
示例8: TransferParameters
bool EffectWahwah::TransferParameters( Shuttle & shuttle )
{
shuttle.TransferFloat(wxT("Freq"),freq,1.5f);
shuttle.TransferFloat(wxT("Phase"),startphase,0.0f);
shuttle.TransferFloat(wxT("Depth"),depth,0.7f);
shuttle.TransferFloat(wxT("Resonance"),res,2.5f);
shuttle.TransferFloat(wxT("Offset"),freqofs,0.3f);
return true;
}
示例9: TransferParameters
bool EffectTimeScale::TransferParameters( Shuttle & shuttle )
{
shuttle.TransferDouble(wxT("RatePercentChangeStart"),m_RatePercentChangeStart,0.0);
shuttle.TransferDouble(wxT("RatePercentChangeEnd"),m_RatePercentChangeEnd,0.0);
shuttle.TransferDouble(wxT("PitchHalfStepsStart"),m_PitchHalfStepsStart,0.0);
shuttle.TransferDouble(wxT("PitchHalfStepsEnd"),m_PitchHalfStepsEnd,0.0);
shuttle.TransferDouble(wxT("PitchPercentChangeStart"),m_PitchPercentChangeStart,0.0);
shuttle.TransferDouble(wxT("PitchPercentChangeEnd"),m_PitchPercentChangeEnd,0.0);
shuttle.TransferBool(wxT("PreAnalyze"),m_PreAnalyze,false);
return true;
}
示例10: TransferParameters
bool EffectAutoDuck::TransferParameters( Shuttle & shuttle )
{
shuttle.TransferDouble(wxT("DuckAmountDb"), mDuckAmountDb,
PARAM_DEFAULT_DUCK_AMOUNT_DB);
shuttle.TransferDouble(wxT("InnerFadeDownLen"), mInnerFadeDownLen,
PARAM_DEFAULT_INNER_FADE_DOWN_LEN);
shuttle.TransferDouble(wxT("InnerFadeUpLen"), mInnerFadeUpLen,
PARAM_DEFAULT_INNER_FADE_UP_LEN);
shuttle.TransferDouble(wxT("OuterFadeDownLen"), mOuterFadeDownLen,
PARAM_DEFAULT_OUTER_FADE_DOWN_LEN);
shuttle.TransferDouble(wxT("OuterFadeUpLen"), mOuterFadeUpLen,
PARAM_DEFAULT_OUTER_FADE_UP_LEN);
shuttle.TransferDouble(wxT("ThresholdDb"), mThresholdDb,
PARAM_DEFAULT_THRESHOLD_DB);
shuttle.TransferDouble(wxT("MaximumPause"), mMaximumPause,
PARAM_DEFAULT_MAXIMUM_PAUSE);
return true;
}
示例11: TransferParameters
bool EffectChangeSpeed::TransferParameters(Shuttle& shuttle)
{
shuttle.TransferDouble(wxT("Percentage"), mPercentChange, 0.0);
return true;
}
示例12: TransferParameters
bool EffectNoiseRemoval::TransferParameters( Shuttle & shuttle )
{
shuttle.TransferInt(wxT("Level"),mLevel,1);
return true;
}
示例13: Shuttle
Shuttle* ShuttleFactory::_createShuttle(DatabaseResult* result)
{
Shuttle* shuttle = new Shuttle();
Inventory* shuttleInventory = new Inventory();
shuttleInventory->setParent(shuttle);
uint64 count = result->getRowCount();
result->GetNextRow(mShuttleBinding,(void*)shuttle);
shuttle->mHam.mBattleFatigue = 0;
shuttle->mHam.mHealth.setCurrentHitPoints(500);
shuttle->mHam.mAction.setCurrentHitPoints(500);
shuttle->mHam.mMind.setCurrentHitPoints(500);
shuttle->mHam.calcAllModifiedHitPoints();
// inventory
shuttleInventory->setId(shuttle->mId + INVENTORY_OFFSET);
shuttleInventory->setParentId(shuttle->mId);
shuttleInventory->setModelString("object/tangible/inventory/shared_creature_inventory.iff");
shuttleInventory->setName("inventory");
shuttleInventory->setNameFile("item_n");
shuttleInventory->setTangibleGroup(TanGroup_Inventory);
shuttleInventory->setTangibleType(TanType_CreatureInventory);
shuttle->mEquipManager.addEquippedObject(CreatureEquipSlot_Inventory,shuttleInventory);
shuttle->setLoadState(LoadState_Loaded);
shuttle->mPosture = 0;
shuttle->mScale = 1.0;
shuttle->setFaction("neutral");
shuttle->mTypeOptions = 0x100;
// Here we can handle the initializing of shuttle states
// First, a dirty test for the shuttles in Theed Spaceport.
// No need to randomize departure times, since we can always travel from there.
// We wan't them to go in sync, so one of them always are in the spaceport.
// if (shuttle->mParentId == 1692104)
#if defined(_MSC_VER)
if (shuttle->mId == 47781511212)
#else
if (shuttle->mId == 47781511212LLU)
#endif
{
shuttle->setShuttleState(ShuttleState_InPort);
shuttle->setInPortTime(0);
}
#if defined (_MSC_VER)
else if (shuttle->mId == 47781511214) // This is the "extra" shuttle.
#else
else if (shuttle->mId == 47781511214LLU) // This is the "extra" shuttle.
#endif
{
shuttle->setShuttleState(ShuttleState_Away);
shuttle->setAwayTime(0);
}
else
{
// Get a randowm value in the range [0 <-> InPortInterval + AwayInterval] in ticks.
// The rand value will land in either the InPort or in the Away part of the values.
// Use that state as initial state and set the value as time that have already expired.
uint32 maxInPortAndAwayIntervalTime = shuttle->getInPortInterval() + shuttle->getAwayInterval();
uint32 shuttleTimeExpired = static_cast<uint32>(gRandom->getRand() / RAND_MAX) * (maxInPortAndAwayIntervalTime);
if (shuttleTimeExpired <= shuttle->getInPortInterval())
{
// gLogger->log(LogManager::DEBUG,"Shuttle start InPort, time expired %u", shuttleTimeExpired);
shuttle->setShuttleState(ShuttleState_InPort);
shuttle->setInPortTime(shuttleTimeExpired);
}
else
{
// gLogger->log(LogManager::DEBUG,"Shuttle start Away, time expired %u", shuttleTimeExpired - shuttle->getInPortInterval());
shuttle->setShuttleState(ShuttleState_Away);
shuttle->setAwayTime(shuttleTimeExpired - shuttle->getInPortInterval()); // Set the part corresponding to this state only.
}
}
return shuttle;
}
示例14: TransferParameters
bool EffectRepeat::TransferParameters( Shuttle & shuttle )
{
shuttle.TransferInt(wxT("Count"),repeatCount,1);
return true;
}
示例15: TransferParameters
bool EffectChangePitch::TransferParameters( Shuttle & shuttle )
{
shuttle.TransferDouble(wxT("Percentage"),m_PercentChange,0.0);
m_SemitonesChange = (12.0 * log((100.0 + m_PercentChange) / 100.0)) / log(2.0);
return true;
}