mirror of
https://github.com/stevenhowes/CTheEscape.git
synced 2026-05-26 15:53:29 +01:00
Explosion sound, and direct calling of sound API outside of composition
This commit is contained in:
Binary file not shown.
+15
-22
@@ -25,34 +25,27 @@ Linkflags = -aif -o $@
|
|||||||
cc $(ccflags) -o @.o.Input @.c.Input
|
cc $(ccflags) -o @.o.Input @.c.Input
|
||||||
|
|
||||||
# Dynamic dependencies:
|
# Dynamic dependencies:
|
||||||
|
|
||||||
|
o.CTheEscape: c.CTheEscape
|
||||||
|
o.CTheEscape: C:h.swis
|
||||||
|
o.CTheEscape: C:h.kernel
|
||||||
|
o.CTheEscape: C:h.kernel
|
||||||
|
o.CTheEscape: h.Sound
|
||||||
|
o.CTheEscape: c.CTheEscape
|
||||||
|
o.CTheEscape: C:h.swis
|
||||||
|
o.CTheEscape: C:h.kernel
|
||||||
|
o.CTheEscape: C:h.kernel
|
||||||
|
o.CTheEscape: h.Sound
|
||||||
|
o.Graphics: c.Graphics
|
||||||
|
o.Graphics: C:h.swis
|
||||||
|
o.Graphics: C:h.kernel
|
||||||
|
o.Graphics: C:h.kernel
|
||||||
o.Sound: c.Sound
|
o.Sound: c.Sound
|
||||||
o.Sound: C:h.swis
|
o.Sound: C:h.swis
|
||||||
o.Sound: C:h.kernel
|
o.Sound: C:h.kernel
|
||||||
o.Sound: C:h.kernel
|
o.Sound: C:h.kernel
|
||||||
o.Sound: h.Sound
|
o.Sound: h.Sound
|
||||||
o.Graphics: c.Graphics
|
|
||||||
o.Graphics: C:h.swis
|
|
||||||
o.Graphics: C:h.kernel
|
|
||||||
o.Graphics: C:h.kernel
|
|
||||||
o.Graphics: c.Graphics
|
|
||||||
o.Graphics: C:h.swis
|
|
||||||
o.Graphics: C:h.kernel
|
|
||||||
o.Graphics: C:h.kernel
|
|
||||||
o.Input: c.Input
|
o.Input: c.Input
|
||||||
o.Input: C:h.swis
|
o.Input: C:h.swis
|
||||||
o.Input: C:h.kernel
|
o.Input: C:h.kernel
|
||||||
o.Input: C:h.kernel
|
o.Input: C:h.kernel
|
||||||
o.Input: c.Input
|
|
||||||
o.Input: C:h.swis
|
|
||||||
o.Input: C:h.kernel
|
|
||||||
o.Input: C:h.kernel
|
|
||||||
o.CTheEscape: c.CTheEscape
|
|
||||||
o.CTheEscape: C:h.swis
|
|
||||||
o.CTheEscape: C:h.kernel
|
|
||||||
o.CTheEscape: C:h.kernel
|
|
||||||
o.CTheEscape: h.Sound
|
|
||||||
o.CTheEscape: c.CTheEscape
|
|
||||||
o.CTheEscape: C:h.swis
|
|
||||||
o.CTheEscape: C:h.kernel
|
|
||||||
o.CTheEscape: C:h.kernel
|
|
||||||
o.CTheEscape: h.Sound
|
|
||||||
|
|||||||
@@ -451,6 +451,9 @@ void game_collider_tick()
|
|||||||
{
|
{
|
||||||
NPCS[i].sprite = explode_shp1;
|
NPCS[i].sprite = explode_shp1;
|
||||||
NPCS[i].explodenextframe = tick + 4;
|
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);
|
_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[0] = Channel;
|
||||||
inreg.r[1] = element.Volume;
|
inreg.r[1] = Volume;
|
||||||
inreg.r[2] = element.Note;
|
inreg.r[2] = Note;
|
||||||
inreg.r[3] = element.Length;
|
inreg.r[3] = Length;
|
||||||
_kernel_swi(Sound_Control,&inreg,&outreg);
|
_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()
|
void sound_composition_init()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|||||||
Reference in New Issue
Block a user