Further adjusted amplification difference, fixed makefile problems.
This commit is contained in:
parent
8241e13d77
commit
50989a83e7
|
@ -6,12 +6,12 @@
|
|||
musicdir = $(pkgdatadir)/music
|
||||
|
||||
nobase_dist_music_DATA = \
|
||||
death.ogg \
|
||||
frozen_jam.ogg \
|
||||
last_cyber_dance.ogg \
|
||||
orbital_colossus.ogg \
|
||||
railjet_short.ogg \
|
||||
RE.ogg \
|
||||
reremix.ogg \
|
||||
rise_of_spirit.ogg \
|
||||
sound_and_silence.ogg \
|
||||
space_dimensions.ogg \
|
||||
|
|
|
@ -66,7 +66,7 @@ void audio_playSound(int sid, float x, float y)
|
|||
int angle = atanf((x - (screen->w / 2)) / (screen->w / 2)) * 180 / M_PI;
|
||||
int attenuation = fabsf(x - (screen->w / 2)) / (screen->w / 20);
|
||||
float distance = sqrtf(powf(fabsf(x - (screen->w / 2)), 2) + powf(fabsf(y - (screen->h / 2)), 2));
|
||||
const int max_volume = MIX_MAX_VOLUME / 2;
|
||||
const int max_volume = MIX_MAX_VOLUME / 4;
|
||||
int volume = max_volume - (max_volume * distance / (3 * screen->w));
|
||||
|
||||
if ((!engine.useSound) || (!engine.useAudio) || (volume <= 0))
|
||||
|
@ -177,7 +177,7 @@ void audio_playMusic(const char *filename, int loops, int amplified)
|
|||
{
|
||||
audio_haltMusic();
|
||||
music = Mix_LoadMUS(filename);
|
||||
audio_setMusicVolume(amplified ? MIX_MAX_VOLUME : MIX_MAX_VOLUME / 2);
|
||||
audio_setMusicVolume(amplified ? MIX_MAX_VOLUME : MIX_MAX_VOLUME / 4);
|
||||
Mix_PlayMusic(music, loops);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue