From 56709f0e5630a2874ccd133d08604a99f6095157 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Thu, 2 May 2013 10:58:38 +0200 Subject: Small changes to looping main menu music --- src/ui/maindialog.cpp | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'src/ui/maindialog.cpp') diff --git a/src/ui/maindialog.cpp b/src/ui/maindialog.cpp index 050f87a..0b0b848 100644 --- a/src/ui/maindialog.cpp +++ b/src/ui/maindialog.cpp @@ -742,6 +742,23 @@ pb->SetState(STATE_SHADOW); CameraPerso(); } + if ( m_phase != PHASE_SIMUL && + m_phase != PHASE_WIN && + m_phase != PHASE_LOST && + m_phase != PHASE_WRITE && + m_phase != PHASE_READs && + m_phase != PHASE_WRITEs && + m_phase != PHASE_SETUPds && + m_phase != PHASE_SETUPgs && + m_phase != PHASE_SETUPps && + m_phase != PHASE_SETUPcs && + m_phase != PHASE_SETUPss ) + { + if (!m_sound->IsPlayingMusic()) { + m_sound->PlayMusic("Intro1.ogg", false); + } + } + if ( m_phase == PHASE_TRAINER || m_phase == PHASE_DEFI || m_phase == PHASE_MISSION || @@ -750,10 +767,6 @@ pb->SetState(STATE_SHADOW); m_phase == PHASE_USER || m_phase == PHASE_PROTO ) { - if (!m_sound->IsPlayingMusic()) { - m_sound->PlayMusic("Intro1.ogg", false); - } - if ( m_phase == PHASE_TRAINER ) m_index = 0; if ( m_phase == PHASE_DEFI ) m_index = 1; if ( m_phase == PHASE_MISSION ) m_index = 2; @@ -1745,9 +1758,6 @@ pos.y -= 0.048f; if ( m_phase == PHASE_WELCOME1 ) { - m_sound->StopMusic(); - m_sound->PlayMusic("Intro1.ogg", false); - pos.x = 0.0f; pos.y = 0.0f; ddim.x = 0.0f; -- cgit v1.2.3-1-g7c22