{
int music_nr = getLevelMusicNr();
char *curr_music = getCurrentlyPlayingMusicFilename();
- char *next_music = getMusicListEntry(music_nr)->filename;
+ char *next_music = getMusicInfoEntryFilename(music_nr);
if (!strEqual(curr_music, next_music))
FadeMusic();
{
int music_nr = getLevelMusicNr();
char *curr_music = getCurrentlyPlayingMusicFilename();
- char *next_music = getMusicListEntry(music_nr)->filename;
+ char *next_music = getMusicInfoEntryFilename(music_nr);
if (!strEqual(curr_music, next_music))
PlayMusic(music_nr);
return mus_info[list_pos];
}
+char *getMusicInfoEntryFilename(int pos)
+{
+ MusicInfo *mus_info = getMusicInfoEntryFromMusicID(pos);
+
+ if (mus_info == NULL)
+ return NULL;
+
+ return getBaseNamePtr(mus_info->source_filename);
+}
+
char *getCurrentlyPlayingMusicFilename()
{
return currently_playing_music_filename;
int getMusicListSize();
struct FileInfo *getSoundListEntry(int);
struct FileInfo *getMusicListEntry(int);
+char *getMusicInfoEntryFilename(int);
char *getCurrentlyPlayingMusicFilename();
int getSoundListPropertyMappingSize();
int getMusicListPropertyMappingSize();
void PlayMenuMusic()
{
char *curr_music = getCurrentlyPlayingMusicFilename();
- char *next_music = getMusicListEntry(menu.music[game_status])->filename;
+ char *next_music = getMusicInfoEntryFilename(menu.music[game_status]);
if (!strEqual(curr_music, next_music))
PlayMenuMusicExt(menu.music[game_status]);
static void FadeMenuMusic()
{
char *curr_music = getCurrentlyPlayingMusicFilename();
- char *next_music = getMusicListEntry(menu.music[game_status])->filename;
+ char *next_music = getMusicInfoEntryFilename(menu.music[game_status]);
if (!strEqual(curr_music, next_music))
FadeMusic();