From: Ricardo Cruz Date: Wed, 21 Apr 2004 17:43:26 +0000 (+0000) Subject: Added Marek music to cvs and play it in the main menu. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=429f907ea198ca019d018f37abdb0ee119902c89;p=supertux.git Added Marek music to cvs and play it in the main menu. SVN-Revision: 613 --- diff --git a/data/music/theme.mod b/data/music/theme.mod new file mode 100644 index 000000000..fc9b809ce Binary files /dev/null and b/data/music/theme.mod differ diff --git a/src/title.cpp b/src/title.cpp index 1700e4493..edfd1a7db 100644 --- a/src/title.cpp +++ b/src/title.cpp @@ -248,6 +248,9 @@ void title(void) update_time = st_get_ticks(); random_timer.start(rand() % 2000 + 2000); + Mix_Music* music = load_song(datadir + "/music/theme.mod"); + play_music(music, 1); + Menu::set_current(main_menu); while (Menu::current()) { @@ -305,6 +308,7 @@ void title(void) generate_contrib_menu(); break; case 3: + halt_music(); leveleditor(1); Menu::set_current(main_menu); break; @@ -354,11 +358,14 @@ void title(void) frame++; SDL_Delay(25); + if(!playing_music) + play_music(music, 1); } /* Free surfaces: */ delete bkg_title; delete logo; + free_music(music); } #define MAX_VEL 10