mirror of
https://git.checksum.fail/alec/cosmo-engine.git
synced 2026-05-26 17:45:48 +00:00
Add Sound FX priority
This commit is contained in:
@@ -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);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user