예제 #1
0
파일: App.cpp 프로젝트: anhlehoang410/G3D
bool CG3DApp::Update(float timeStep)
{
	if (!m_System->Update())
		return false;

	return UpdateInternal(timeStep);
}
예제 #2
0
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;
}
예제 #4
0
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);
}
예제 #5
0
/// 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);
}
예제 #7
0
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;
}
예제 #8
0
/// 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);
}
예제 #9
0
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);
  }
}
예제 #10
0
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);
		}
	}
}
예제 #12
0
/// 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);
}
예제 #14
0
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);
}
예제 #16
0
void Critter::Update(float dt) {
  UpdateInternal(dt);
  Accelerate(dt);
  Inertia(dt);
}
예제 #17
0
/// Resume playback of all sound types.
void Audio::ResumeAll()
{
    MutexLock lock(audioMutex_);
    pausedSoundTypes_.clear();
    UpdateInternal(0.0f);
}
예제 #18
0
void TEffect::Update()
{
	lock_guard<mutex> Lock(MutexLock);
	UpdateInternal();
}