Replaced death music with a simple remix of RE.
This is meant to help connect RE to something. I figured that by using a similar kind of music for both it and the game over screen, it would create a bit of a connection there and musically communicate that it's game over, except for Kline instead of you.
This commit is contained in:
parent
1116a1a4d3
commit
8241e13d77
9
LICENSES
9
LICENSES
|
@ -675,11 +675,12 @@ Changes: Amplified -1 dB and slowed down 5% with Audacity
|
|||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
music/death.ogg
|
||||
music/reremix.ogg
|
||||
|
||||
Author: Jan125 <http://opengameart.org/users/jan125>
|
||||
License: CC BY 3.0 <http://creativecommons.org/licenses/by/3.0/>
|
||||
Source: http://opengameart.org/content/stereotypical-90s-space-shooter-music
|
||||
Author: The Diligent Circle <https://onpon4.github.io>
|
||||
License: CC BY-SA 4.0 <https://creativecommons.org/licenses/by-sa/4.0/>
|
||||
Details:
|
||||
Remix of RE.ogg. RE.ogg is composed by WeskerHunter.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
|
BIN
music/death.ogg
BIN
music/death.ogg
Binary file not shown.
Binary file not shown.
Binary file not shown.
23
src/audio.c
23
src/audio.c
|
@ -66,7 +66,8 @@ 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));
|
||||
int volume = MIX_MAX_VOLUME - (MIX_MAX_VOLUME * distance / (3 * screen->w));
|
||||
const int max_volume = MIX_MAX_VOLUME / 2;
|
||||
int volume = max_volume - (max_volume * distance / (3 * screen->w));
|
||||
|
||||
if ((!engine.useSound) || (!engine.useAudio) || (volume <= 0))
|
||||
return;
|
||||
|
@ -109,8 +110,8 @@ void audio_playSound(int sid, float x, float y)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (Mix_Playing(channel) && (volume <= MIX_MAX_VOLUME / 4)
|
||||
&& (channelVolume[channel] >= MIX_MAX_VOLUME * 3 / 4))
|
||||
if (Mix_Playing(channel) && (volume <= max_volume / 4)
|
||||
&& (channelVolume[channel] >= max_volume * 3 / 4))
|
||||
return;
|
||||
else
|
||||
channelVolume[channel] = volume;
|
||||
|
@ -169,14 +170,14 @@ void audio_setMusicVolume(int volume)
|
|||
#endif
|
||||
}
|
||||
|
||||
void audio_playMusic(const char *filename, int loops)
|
||||
void audio_playMusic(const char *filename, int loops, int amplified)
|
||||
{
|
||||
#ifndef NOSOUND
|
||||
if (engine.useMusic && engine.useAudio)
|
||||
{
|
||||
audio_haltMusic();
|
||||
music = Mix_LoadMUS(filename);
|
||||
audio_setMusicVolume(100);
|
||||
audio_setMusicVolume(amplified ? MIX_MAX_VOLUME : MIX_MAX_VOLUME / 2);
|
||||
Mix_PlayMusic(music, loops);
|
||||
}
|
||||
#endif
|
||||
|
@ -223,7 +224,7 @@ void audio_playRandomTrack()
|
|||
{
|
||||
#ifndef OLD_MUSIC
|
||||
case MISN_START:
|
||||
audio_playMusic("music/railjet_short.ogg", -1);
|
||||
audio_playMusic("music/railjet_short.ogg", -1, 0);
|
||||
break;
|
||||
#endif
|
||||
case MISN_MOEBO:
|
||||
|
@ -231,20 +232,20 @@ void audio_playRandomTrack()
|
|||
case MISN_ELLESH:
|
||||
case MISN_EARTH:
|
||||
#ifdef OLD_MUSIC
|
||||
audio_playMusic("music/HardTranceDub.mod", -1);
|
||||
audio_playMusic("music/HardTranceDub.mod", -1, 0);
|
||||
#else
|
||||
audio_playMusic("music/orbital_colossus.ogg", -1);
|
||||
audio_playMusic("music/orbital_colossus.ogg", -1, 0);
|
||||
#endif
|
||||
break;
|
||||
case MISN_VENUS:
|
||||
#ifdef OLD_MUSIC
|
||||
audio_playMusic("music/LoopsAndTings.mod", -1);
|
||||
audio_playMusic("music/LoopsAndTings.mod", -1, 0);
|
||||
#else
|
||||
audio_playMusic("music/RE.ogg", -1);
|
||||
audio_playMusic("music/RE.ogg", -1, 0);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
audio_playMusic(track[rand() % tracks], -1);
|
||||
audio_playMusic(track[rand() % tracks], -1, 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ void audio_haltMusic();
|
|||
void audio_pauseMusic();
|
||||
void audio_resumeMusic();
|
||||
void audio_setMusicVolume(int volume);
|
||||
void audio_playMusic(const char *filename, int loops);
|
||||
void audio_playMusic(const char *filename, int loops, int amplified);
|
||||
void audio_playRandomTrack();
|
||||
void audio_free();
|
||||
|
||||
|
|
|
@ -2449,9 +2449,9 @@ static void game_showGameOver()
|
|||
SDL_Delay(1000);
|
||||
|
||||
#ifdef OLD_MUSIC
|
||||
audio_playMusic("music/Wybierak.mod", -1);
|
||||
audio_playMusic("music/Wybierak.mod", -1, 0);
|
||||
#else
|
||||
audio_playMusic("music/death.ogg", -1);
|
||||
audio_playMusic("music/reremix.ogg", -1, 1);
|
||||
#endif
|
||||
|
||||
int x = (screen->w - gameover->w) / 2;
|
||||
|
|
|
@ -1319,9 +1319,9 @@ static void intermission_doOptions(SDL_Surface *optionsSurface, int x, int y)
|
|||
{
|
||||
engine.useMusic = 1;
|
||||
#ifdef OLD_MUSIC
|
||||
audio_playMusic("music/3DParadise.mod", -1);
|
||||
audio_playMusic("music/3DParadise.mod", -1, 0);
|
||||
#else
|
||||
audio_playMusic("music/through_space.ogg", -1);
|
||||
audio_playMusic("music/through_space.ogg", -1, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1505,9 +1505,9 @@ int intermission()
|
|||
|
||||
if ((engine.useAudio) && (engine.useMusic))
|
||||
#ifdef OLD_MUSIC
|
||||
audio_playMusic("music/3DParadise.mod", -1);
|
||||
audio_playMusic("music/3DParadise.mod", -1, 0);
|
||||
#else
|
||||
audio_playMusic("music/through_space.ogg", -1);
|
||||
audio_playMusic("music/through_space.ogg", -1, 0);
|
||||
#endif
|
||||
|
||||
/// Retain "%s" as-is. It is replaced with the current system name.
|
||||
|
|
|
@ -925,9 +925,9 @@ static int mission_revealObjectives()
|
|||
aliens[ALIEN_KLINE].flags |= FL_IMMORTAL | FL_NOFIRE;
|
||||
player_setTarget(ALIEN_KLINE);
|
||||
#ifdef OLD_MUSIC
|
||||
audio_playMusic("music/TranceGeneration.mod", -1);
|
||||
audio_playMusic("music/TranceGeneration.mod", -1, 0);
|
||||
#else
|
||||
audio_playMusic("music/last_cyber_dance.ogg", -1);
|
||||
audio_playMusic("music/last_cyber_dance.ogg", -1, 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
12
src/title.c
12
src/title.c
|
@ -314,9 +314,9 @@ int title_show()
|
|||
engine.keyState[KEY_FIRE] = engine.keyState[KEY_ALTFIRE] = 0;
|
||||
|
||||
#ifdef OLD_MUSIC
|
||||
audio_playMusic("music/Platinum.mod", 1);
|
||||
audio_playMusic("music/Platinum.mod", 1, 0);
|
||||
#else
|
||||
audio_playMusic("music/walking_among_androids.ogg", 1);
|
||||
audio_playMusic("music/walking_among_androids.ogg", 1, 0);
|
||||
#endif
|
||||
|
||||
while (!engine.done)
|
||||
|
@ -515,9 +515,9 @@ int title_show()
|
|||
if (engine.useMusic)
|
||||
{
|
||||
#ifdef OLD_MUSIC
|
||||
audio_playMusic("music/Platinum.mod", 1);
|
||||
audio_playMusic("music/Platinum.mod", 1, 0);
|
||||
#else
|
||||
audio_playMusic("music/walking_among_androids.ogg", 1);
|
||||
audio_playMusic("music/walking_among_androids.ogg", 1, 0);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
@ -652,9 +652,9 @@ void title_showCredits()
|
|||
screen_drawBackground();
|
||||
|
||||
#ifdef OLD_MUSIC
|
||||
audio_playMusic("music/Solace.s3m", 1);
|
||||
audio_playMusic("music/Solace.s3m", 1, 0);
|
||||
#else
|
||||
audio_playMusic("music/rise_of_spirit.ogg", 1);
|
||||
audio_playMusic("music/rise_of_spirit.ogg", 1, 0);
|
||||
#endif
|
||||
|
||||
fp = fopen("data/credits.txt", "rb");
|
||||
|
|
Loading…
Reference in New Issue