Mono battle sounds.

This commit is contained in:
Steve 2017-05-16 08:11:54 +01:00
parent 9938d60f7d
commit 53ab37f0e7
18 changed files with 2 additions and 3 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -78,9 +78,8 @@ void playSound(int id)
void playBattleSound(int id, int x, int y) void playBattleSound(int id, int x, int y)
{ {
float distance; float distance, bearing, vol;
int channel; int channel;
float vol;
if (player->alive == ALIVE_ALIVE) if (player->alive == ALIVE_ALIVE)
{ {
@ -101,7 +100,7 @@ void playBattleSound(int id, int x, int y)
if (distance >= MIN_BATTLE_SOUND_DISTANCE) if (distance >= MIN_BATTLE_SOUND_DISTANCE)
{ {
float bearing = 360 - getAngle(x, y, lastPlayerX, lastPlayerY); bearing = 360 - getAngle(x, y, lastPlayerX, lastPlayerY);
Mix_SetPosition(channel, (Sint16)bearing, (Uint8)distance); Mix_SetPosition(channel, (Sint16)bearing, (Uint8)distance);
} }
else else