bool CG3DApp::Update(float timeStep) { if (!m_System->Update()) return false; return UpdateInternal(timeStep); }
bool ReplayLogger::Update(void) { if (!Enabled) return false; Enabled = UpdateInternal(); return Enabled; }
HRESULT CPartEmitter::Start() { for(int i=0; i<m_Particles.GetSize(); i++) { m_Particles[i]->m_IsDead = true; } m_Running = true; m_BatchesGenerated = 0; if(m_OverheadTime > 0) { DWORD Delta = 500; int Steps = m_OverheadTime / Delta; DWORD CurrentTime = Game->m_Timer - m_OverheadTime; for(int i=0; i<Steps; i++) { UpdateInternal(CurrentTime, Delta); CurrentTime += Delta; } m_OverheadTime = 0; } return S_OK; }
void MediaKeyStatusMap::Update(const nsTArray<CDMCaps::KeyStatus>& keys) { // Since we can't leave the map in a partial update state, we need // to remember the error and throw it next time the interface methods // are called. mUpdateError = UpdateInternal(keys); }
/// Resume playback of specific sound type. void Audio::ResumeSoundType(const QString& type) { MutexLock lock(audioMutex_); pausedSoundTypes_.erase(type); // Update sound sources before resuming playback to make sure 3D positions are up to date // Done under mutex to ensure no mixing happens before we are ready UpdateInternal(0.0f); }
void FAnimNode_BlendSpaceEvaluator::Update(const FAnimationUpdateContext& Context) { EvaluateGraphExposedInputs.Execute(Context); InternalTimeAccumulator = NormalizedTime; PlayRate = 0.f; UpdateInternal(Context); }
bool TEffect::ApplyInternal(bass_p pChannel) { if (IsRemoved()) return false; bUpdated = true; iErrorCode = BASS_OK; if (eType == BASS_FX_UNKNOWN) { iErrorCode = BASS_ERROR_ILLPARAM; return false; } if (pChannel == BASS_NULL) { iErrorCode = BASS_ERROR_HANDLE; return false; } bass_p pOldChannel = this->pChannel; if (pOldChannel != pChannel) { this->pChannel = pChannel; if (pOldChannel != BASS_NULL && pFX != BASS_NULL) { BASS_ChannelRemoveFX(pOldChannel, pFX); pFX = BASS_NULL; } } else { if (pFX != BASS_NULL && bEnabled) { return true; } } if (!bEnabled) { RemoveFX(); return true; } pFX = BASS_ChannelSetFX(pChannel, eType, 0); iErrorCode = BASS_ErrorGetCode(); if (iErrorCode != BASS_OK) { RemoveFX(); return false; } UpdateInternal(); ResetInternal(); return true; }
/// Run update on sound sources. Not required for continued playback, but frees unused sound sources & sounds and /// updates 3D positions. void Audio::Update(float timeStep) { if (!playing_) return; if(playing_ && d->context && soundSources_.empty()) { d->Pause(); } UpdateInternal(timeStep); }
void ReplayLogger::Start(void) { if (Enabled) { Stop(); } NumLoggerBuffered = 0; flightstats.Reset(); if (!UpdateInternal()) { MessageBoxX( // LKTOKEN _@M201_ = "Could not open IGC file!" gettext(TEXT("_@M201_")), // LKTOKEN _@M305_ = "Flight replay" gettext(TEXT("_@M305_")), mbOk); } }
void ReplayLogger::Start(void) { if (Enabled) { Stop(); } NumLoggerBuffered = 0; flightstats.Reset(); if (!UpdateInternal()) { MessageBoxX(hWndMapWindow, // LKTOKEN _@M201_ = "Could not open IGC file!" gettext(TEXT("_@M201_")), // LKTOKEN _@M305_ = "Flight replay" gettext(TEXT("_@M305_")), MB_OK| MB_ICONINFORMATION); } }
void FAnimNode_SkeletalControlBase::Update(const FAnimationUpdateContext& Context) { ComponentPose.Update(Context); ActualAlpha = 0.f; if (IsLODEnabled(Context.AnimInstanceProxy, LODThreshold)) { EvaluateGraphExposedInputs.Execute(Context); // Apply the skeletal control if it's valid ActualAlpha = AlphaScaleBias.ApplyTo(Alpha); if (FAnimWeight::IsRelevant(ActualAlpha) && IsValidToEvaluate(Context.AnimInstanceProxy->GetSkeleton(), Context.AnimInstanceProxy->GetRequiredBones())) { UpdateInternal(Context); } } }
/// Restart sound output. bool Audio::Play() { if (playing_) return true; if (!d->context) { URHO3D_LOGERROR("No audio mode set, can not start playback"); return false; } d->Unpause(); // Update sound sources before resuming playback to make sure 3D positions are up to date UpdateInternal(0.0f); playing_ = true; return true; }
void FAnimNode_BlendSpacePlayer::UpdateAssetPlayer(const FAnimationUpdateContext& Context) { EvaluateGraphExposedInputs.Execute(Context); UpdateInternal(Context); }
bool BL_SkinDeformer::Update(void) { return UpdateInternal(false); }
HRESULT CPartEmitter::Update() { if(!m_Running) return S_OK; else return UpdateInternal(Game->m_Timer, Game->m_TimerDelta); }
void Critter::Update(float dt) { UpdateInternal(dt); Accelerate(dt); Inertia(dt); }
/// Resume playback of all sound types. void Audio::ResumeAll() { MutexLock lock(audioMutex_); pausedSoundTypes_.clear(); UpdateInternal(0.0f); }
void TEffect::Update() { lock_guard<mutex> Lock(MutexLock); UpdateInternal(); }