コード例 #1
0
void S_RestartMusic(void)
{
    if (ud.recstat != 2 && g_player[myconnectindex].ps->gm&MODE_GAME)
    {
        if (MapInfo[g_musicIndex].musicfn != NULL)
            S_PlayMusic(MapInfo[g_musicIndex].musicfn);
    }
    else if (MapInfo[MUS_INTRO].musicfn != 0 && (G_GetLogoFlags() & LOGO_PLAYMUSIC))
    {
        g_musicIndex = MUS_INTRO;
        S_PlayMusic(MapInfo[MUS_INTRO].musicfn);
    }
}
コード例 #2
0
ファイル: s_music.c プロジェクト: jayschwa/quake2world
/*
 * @brief Plays the next track in the configured playlist.
 */
void S_NextTrack_f(void) {

	if (s_music_volume->value) {
		s_music_t *music = S_NextMusic();

		if (music) {
			S_PlayMusic(music);
		} else {
			Com_Debug("No music available\n");
		}
	} else {
		Com_Debug("Music is muted\n");
	}
}