| 108 | } |
| 109 | |
| 110 | void CUISequenceVideoItem::Update() |
| 111 | { |
| 112 | // deferred start |
| 113 | if (Device.dwTimeContinual >= m_time_start) |
| 114 | { |
| 115 | if (m_flags.test(etiDelayed)) |
| 116 | { |
| 117 | m_owner->MainWnd()->AttachChild(m_wnd); |
| 118 | m_wnd->Show(true); |
| 119 | m_flags.set(etiDelayed, FALSE); |
| 120 | } |
| 121 | } |
| 122 | else |
| 123 | return; |
| 124 | |
| 125 | u32 sync_tm = (0 == m_sounds[0]._handle()) ? Device.dwTimeContinual : (m_sounds[0]._feedback() ? m_sounds[0]._feedback()->play_time() : m_sync_time); |
| 126 | m_sync_time = sync_tm; |
| 127 | // processing A&V |
| 128 | if (m_texture->HasTexture()) |
| 129 | { |
| 130 | const BOOL is_playing = m_sounds[0]._handle() ? !!m_sounds[0]._feedback() : m_texture->video_IsPlaying(); |
| 131 | if (is_playing) |
| 132 | { |
| 133 | m_texture->video_Sync(m_sync_time); |
| 134 | } |
| 135 | else |
| 136 | { |
| 137 | // sync start |
| 138 | if (m_flags.test(etiNeedStart)) |
| 139 | { |
| 140 | if (!stereo) |
| 141 | { |
| 142 | m_sounds[0].play_at_pos(NULL, Fvector().set(-0.5f, 0.f, 0.3f), sm_2D); |
| 143 | m_sounds[1].play_at_pos(NULL, Fvector().set(+0.5f, 0.f, 0.3f), sm_2D); |
| 144 | } |
| 145 | else |
| 146 | m_sounds[0].play_at_pos(NULL, Fvector().set(0.f, 0.f, 0.3f), sm_2D); |
| 147 | m_texture->video_Play(FALSE, m_sync_time); |
| 148 | m_flags.set(etiNeedStart, FALSE); |
| 149 | CUIWindow* w = m_owner->MainWnd()->FindChild("back"); |
| 150 | if (w) |
| 151 | w->Show(!!m_flags.test(etiBackVisible)); |
| 152 | } |
| 153 | else |
| 154 | { |
| 155 | m_flags.set(etiPlaying, FALSE); |
| 156 | } |
| 157 | } |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | void CUISequenceVideoItem::OnRender() |
| 162 | { |
nothing calls this directly
no test coverage detected