mirror of
https://github.com/stevenhowes/CTheEscape.git
synced 2026-05-27 20:13:31 +01:00
Explosion sound, and direct calling of sound API outside of composition
This commit is contained in:
@@ -451,6 +451,9 @@ void game_collider_tick()
|
||||
{
|
||||
NPCS[i].sprite = explode_shp1;
|
||||
NPCS[i].explodenextframe = tick + 4;
|
||||
sound_play(1,-5,0,100);
|
||||
sound_play(3,-15,0,1000);
|
||||
sound_play(2,-10,1,100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,15 +38,22 @@ void sound_set_voice(int voicenum, char* voicename)
|
||||
_kernel_swi(Sound_AttachNamedVoice,&inreg,&outreg);
|
||||
}
|
||||
|
||||
void sound_composition_element_play(struct CompositionElement element)
|
||||
void sound_play(unsigned char Channel, signed char Volume, unsigned char Note, unsigned short int Length)
|
||||
{
|
||||
inreg.r[0] = element.Channel;
|
||||
inreg.r[1] = element.Volume;
|
||||
inreg.r[2] = element.Note;
|
||||
inreg.r[3] = element.Length;
|
||||
inreg.r[0] = Channel;
|
||||
inreg.r[1] = Volume;
|
||||
inreg.r[2] = Note;
|
||||
inreg.r[3] = Length;
|
||||
_kernel_swi(Sound_Control,&inreg,&outreg);
|
||||
}
|
||||
|
||||
|
||||
void sound_composition_element_play(struct CompositionElement element)
|
||||
{
|
||||
sound_play(element.Channel, element.Volume, element.Note, element.Length);
|
||||
}
|
||||
|
||||
|
||||
void sound_composition_init()
|
||||
{
|
||||
int i;
|
||||
|
||||
Reference in New Issue
Block a user