Exemple #1
0
/**
 * Initialises the MT-32.
 * @param index The index of the music to play.
 */
void Music_InitMT32(void)
{
	uint16 left = 0;

	Driver_Music_LoadFile("DUNEINIT");

	Driver_Music_Play(0, 0xFF);

	GUI_DrawText(String_Get_ByIndex(15), 0, 0, 15, 12); /* "Initializing the MT-32" */

	while (Driver_Music_IsPlaying()) {
		Timer_Sleep(60);

		left += 6;
		GUI_DrawText(".", left, 10, 15, 12);
	}
}
Exemple #2
0
/**
 * Plays a music.
 * @param index The index of the music to play.
 */
void Music_Play(uint16 musicID)
{
	if (musicID == 0xFFFF || musicID >= 38) return;

	if (g_table_musics[musicID].string != s_currentMusic) {
		s_currentMusic = g_table_musics[musicID].string;

		Driver_Music_Stop();
		Driver_Voice_Play(NULL, 0xFF);
		Driver_Music_LoadFile(NULL);
		Driver_Sound_LoadFile(NULL);
		Driver_Music_LoadFile(s_currentMusic);
		Driver_Sound_LoadFile(s_currentMusic);
	}

	Driver_Music_Play(g_table_musics[musicID].variable_04, 0xFF);
}
Exemple #3
0
/**
 * Plays a music.
 * @param index The index of the music to play.
 */
void Music_Play(uint16 musicID)
{
	static uint16 currentMusicID = 0;

	if (musicID == 0xFFFF || musicID >= 38 || musicID == currentMusicID) return;

	currentMusicID = musicID;

	if (g_table_musics[musicID].string != s_currentMusic) {
		s_currentMusic = g_table_musics[musicID].string;

		Driver_Music_Stop();
		Driver_Voice_Play(NULL, 0xFF);
		Driver_Music_LoadFile(NULL);
		Driver_Sound_LoadFile(NULL);
		Driver_Music_LoadFile(s_currentMusic);
		Driver_Sound_LoadFile(s_currentMusic);
	}

	Driver_Music_Play(g_table_musics[musicID].index, 0xFF);
}