Exemplo n.º 1
0
void WinGame(){

	while(GetMasterVolume()){
		if(GetMasterVolume() > 4)
			SetMasterVolume(GetMasterVolume()-4);
		else{
			StopSong();
			break;
		}
		WaitVsync(1);
	}
	FadeOut(9,true);
	SetTileTable(font_tiles);
	ClearVram();
	WaitVsync(45);
	SetMasterVolume(BB_MASTER_VOLUME);
	//TriggerNote(4,24,8,255);//StartSong(main_song);
	FadeIn(2,false);
	TextWriter(1,0,epilogue_string);
	while(1){
		WaitVsync(1);
		if(padState & BTN_START && !(oldPadState & BTN_START))
			break;
	}
	FadeOut(7,true);
}
Exemplo n.º 2
0
/*virtual*/ void SoundInstanceCommon::Tick() {
  PROFILE_FUNCTION;

  if (GetSound()->GetIs3D()) {
    Tick3D();
  }

  SetVolume(m_Attenuation * GetBaseVolume() * GetSound()->GetBaseVolume() *
            GetCategoryVolume() * GetMasterVolume());
}
Exemplo n.º 3
0
int digi_init()
{
	OSErr err;
//	CFILE *fp;
	int i;

	if (!use_sounds)
		return -1;
		
	num_sounds = (sizeof(sound_list) / sizeof(short)) - 1;
	
	i = MaxVoiceLoad();
	err = InitSoundMusicSystem(MAX_MUSIC_CHANNELS, 4 + (digi_max_channels/2), digi_max_channels, digi_sound_quality);
//	err = InitSoundMusicSystem(MAX_MUSIC_CHANNELS, 10, 16, digi_sound_quality);
	if (err != noErr)
		return -1;
	master_save = GetMasterVolume();
	if (master_save < 0)
		master_save = 0;
	else if ( master_save > 255 )
		master_save = 255;
		
#ifdef MAC_SHAREWARE
	PurgeSongs(1);
	LockSongs(0);
#else
	init_redbook();
#endif

 	digi_initialized = 1;
	
// set volumes and then out of here..

	digi_set_master_volume(Config_master_volume);
	digi_set_volume(digi_volume, midi_volume);
	digi_reset_digi_sounds();
	atexit(digi_close);

	return 0;
}