Added Marek music to cvs and play it in the main menu.
authorRicardo Cruz <rick2@aeiou.pt>
Wed, 21 Apr 2004 17:43:26 +0000 (17:43 +0000)
committerRicardo Cruz <rick2@aeiou.pt>
Wed, 21 Apr 2004 17:43:26 +0000 (17:43 +0000)
SVN-Revision: 613

data/music/theme.mod [new file with mode: 0644]
src/title.cpp

diff --git a/data/music/theme.mod b/data/music/theme.mod
new file mode 100644 (file)
index 0000000..fc9b809
Binary files /dev/null and b/data/music/theme.mod differ
index 1700e44..edfd1a7 100644 (file)
@@ -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