aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Murphy <alec@checksum.fail>2020-04-05 15:28:24 -0400
committerAlec Murphy <alec@checksum.fail>2020-04-05 15:28:24 -0400
commit60ded6c7f2aa73c031cab47cd9765e58e30d9327 (patch)
treef772d2cbb7164dc10b0a82ef003e208103d62175
parente503d995233e6bbf7b077ac6aae72b626d36e6e0 (diff)
Add Sound FX priorityHEADmaster
-rw-r--r--Sfx.HC18
1 files changed, 4 insertions, 14 deletions
diff --git a/Sfx.HC b/Sfx.HC
index 7ea0285..cf70289 100644
--- a/Sfx.HC
+++ b/Sfx.HC
@@ -46,6 +46,7 @@ U0 mix_sfx(U32 *buf)
{
sfx_pos = 0;
sfx_num = -1;
+ currently_playing_priority=0;
}
}
@@ -194,20 +195,9 @@ U0 load_sfx()
U0 play_sfx(I64 sfx_number)
{
+ if(sfxs[sfx_number-1].priority < currently_playing_priority)
+ return;
+ currently_playing_priority = sfxs[sfx_number-1].priority;
sfx_pos = 0;
sfx_num = sfx_number;
- /*
- if(sfx_on_flag)
- {
- sfx_number--;
- if(Mix_Playing(0))
- {
- if(sfxs[sfx_number].priority < currently_playing_priority)
- return;
- }
-
- currently_playing_priority = sfxs[sfx_number].priority;
- Mix_PlayChannel(0, sfxs[sfx_number].sample, 0);
- }
- */
}