Sounds for hail and tractor beam. Also sound sample for combadge. Todo un-loading/checking load of sound files.

This commit is contained in:
stevenhowes
2021-05-17 22:39:34 +01:00
parent efc2e685e4
commit 64a7ce0d53
7 changed files with 19 additions and 3 deletions
+14 -1
View File
@@ -95,7 +95,8 @@ struct Player_s Player;
extern void game_respawn_npc(int id);
extern int tick;
extern int lasttick;
unsigned char tractorstart = 0;
unsigned char hailstart = 0;
enum debugs_e{dbbase,dbhitbox,dbweapons,dbinput,dbperformance,dbnpcs,dbprojectiles,dbmax};
int debugs[dbmax];
@@ -803,6 +804,8 @@ void game_setup_audio()
sound_pcm_loadsample(PCMSAMPLE_DURNOTORPEDO,"sounds.torpedo");
sound_pcm_loadsample(PCMSAMPLE_PHASER,"sounds.phaser");
sound_pcm_loadsample(PCMSAMPLE_SHIPEXPLODE,"sounds.shpexp");
sound_pcm_loadsample(PCMSAMPLE_TRACTOR,"sounds.tractor");
sound_pcm_loadsample(PCMSAMPLE_HAIL,"sounds.hail");
}
void game_draw_hud()
{
@@ -1031,6 +1034,11 @@ int game1_tick()
if(Player.remainingdistance <= 80000)
{
PROFILE(game_draw_tractor());
if(!tractorstart)
{
tractorstart = 1;
sound_pcm_playsample(PCMCHANNEL_AMBIENT,PCMSAMPLE_TRACTOR);
}
}
game_tick_endingcentre();
@@ -1043,6 +1051,11 @@ int game1_tick()
PROFILE(game_draw_player());
PROFILE(game_draw_npcs());
PROFILE(game_draw_projectiles());
if(!hailstart)
{
hailstart = 1;
sound_pcm_playsample(PCMCHANNEL_AMBIENT,PCMSAMPLE_HAIL);
}
game_draw_comms("shuttlepod phoebe - this is the USS Archimedes.\npower down your engines and stand by for\nimmediate tractor beam recovery.");
return 0;
}
+1 -1
View File
@@ -255,7 +255,7 @@ void sound_pcm_loadsample(enum pcmsample_e sample, char* filename)
// Length will be in R4 if it exists
length = outreg.r[4];
if(length > 100000)
if(length > 96000)
{
screen_nobuffer();
while (1)