From c1db140ad36402271914be8d993413aa5f4676bc Mon Sep 17 00:00:00 2001 From: krzys-h Date: Thu, 2 May 2013 10:44:07 +0200 Subject: Updated Main Mnu music For now only code - we need to wait for PiXeL to give us new music :) --- src/object/objman.h | 2 +- src/sound/sound.h | 3 ++- src/ui/maindialog.cpp | 21 +++++++++++++++++++-- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/object/objman.h b/src/object/objman.h index 3bdf1a2..c776a86 100644 --- a/src/object/objman.h +++ b/src/object/objman.h @@ -15,7 +15,7 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. /** - * \file common/objman.h + * \file object/objman.h * \brief Instance manager for objects */ diff --git a/src/sound/sound.h b/src/sound/sound.h index e6a97df..360f0de 100644 --- a/src/sound/sound.h +++ b/src/sound/sound.h @@ -178,7 +178,8 @@ class CSoundInterface /** Function called to add all music files to list */ inline void AddMusicFiles(std::string path) { m_soundPath = path; - CacheMusic("Intro.ogg"); + CacheMusic("Intro1.ogg"); + CacheMusic("Intro2.ogg"); CacheMusic("music010.ogg"); CacheMusic("music011.ogg"); }; diff --git a/src/ui/maindialog.cpp b/src/ui/maindialog.cpp index 2a8bb42..050f87a 100644 --- a/src/ui/maindialog.cpp +++ b/src/ui/maindialog.cpp @@ -751,7 +751,7 @@ pb->SetState(STATE_SHADOW); m_phase == PHASE_PROTO ) { if (!m_sound->IsPlayingMusic()) { - m_sound->PlayMusic("Intro.ogg", false); + m_sound->PlayMusic("Intro1.ogg", false); } if ( m_phase == PHASE_TRAINER ) m_index = 0; @@ -1746,7 +1746,7 @@ pos.y -= 0.048f; if ( m_phase == PHASE_WELCOME1 ) { m_sound->StopMusic(); - m_sound->PlayMusic("Intro.ogg", false); + m_sound->PlayMusic("Intro1.ogg", false); pos.x = 0.0f; pos.y = 0.0f; @@ -2005,6 +2005,23 @@ bool CMainDialog::EventProcess(const Event &event) //? else welcomeLength = WELCOME_LENGTH; welcomeLength = WELCOME_LENGTH; + 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("Intro2.ogg", true); + } + } + if ( m_phase == PHASE_WELCOME1 || m_phase == PHASE_WELCOME2 || m_phase == PHASE_WELCOME3 ) -- cgit v1.2.3-1-g7c22