From 4d3bd02fc76e7c0b138256af7fb2f18c56952998 Mon Sep 17 00:00:00 2001 From: Marek Moeckel Date: Mon, 14 Mar 2005 00:48:39 +0000 Subject: [PATCH] Made implementation of credits song less stupid, thanks to Matze's suggestions :-) SVN-Revision: 2291 --- lib/audio/sound_manager.h | 3 +-- src/resources.cpp | 2 -- src/resources.h | 1 - src/sector.cpp | 3 --- src/title.cpp | 5 +++-- 5 files changed, 4 insertions(+), 10 deletions(-) diff --git a/lib/audio/sound_manager.h b/lib/audio/sound_manager.h index 5dc7cce08..9eece9c83 100644 --- a/lib/audio/sound_manager.h +++ b/lib/audio/sound_manager.h @@ -38,8 +38,7 @@ namespace SuperTux NO_MUSIC, LEVEL_MUSIC, HURRYUP_MUSIC, - HERRING_MUSIC, - CREDITS_MUSIC + HERRING_MUSIC }; /// Sound manager diff --git a/src/resources.cpp b/src/resources.cpp index d35e1a5cc..fc8c038cb 100644 --- a/src/resources.cpp +++ b/src/resources.cpp @@ -164,8 +164,6 @@ void loadshared() ()->load_music(datadir + "/music/salcon.mod"); level_end_song = SoundManager::get ()->load_music(datadir + "/music/leveldone.mod"); - credits_song = SoundManager::get - ()->load_music(datadir + "/music/credits.ogg"); } /* Free shared data: */ diff --git a/src/resources.h b/src/resources.h index cb5689634..dee4ee003 100644 --- a/src/resources.h +++ b/src/resources.h @@ -66,7 +66,6 @@ extern Surface* img_super_bkgd; extern MusicRef herring_song; extern MusicRef level_end_song; -extern MusicRef credits_song; extern SpriteManager* sprite_manager; extern TileManager* tile_manager; diff --git a/src/sector.cpp b/src/sector.cpp index 01c4ea674..96f7f3491 100644 --- a/src/sector.cpp +++ b/src/sector.cpp @@ -804,9 +804,6 @@ Sector::play_music(int type) case HERRING_MUSIC: SoundManager::get()->play_music(herring_song); break; - case CREDITS_MUSIC: - SoundManager::get()->play_music(credits_song); - break; default: SoundManager::get()->halt_music(); break; diff --git a/src/title.cpp b/src/title.cpp index 291431e5d..3f0f3a5e0 100644 --- a/src/title.cpp +++ b/src/title.cpp @@ -286,6 +286,7 @@ void title(void) { walking = true; LevelEditor* leveleditor; + MusicRef credits_music; Ticks::pause_init(); @@ -385,10 +386,10 @@ void title(void) break; case MNID_CREDITS: fadeout(500); - titlesession->get_current_sector()->play_music(CREDITS_MUSIC); + credits_music = SoundManager::get()->load_music(datadir + "/music/credits.ogg"); + SoundManager::get()->play_music(credits_music); display_text_file("credits.txt", SCROLL_SPEED_CREDITS, white_big_text , white_text, white_small_text, blue_text ); fadeout(500); - //titlesession->get_current_sector()->play_music(LEVEL_MUSIC); //not needed Menu::set_current(main_menu); break; case MNID_QUITMAINMENU: -- 2.11.0