float temptexdetail;
environment=which;
-/*
- OPENAL_SetPaused(channels[music1snow], true);
- OPENAL_SetPaused(channels[music1grass], true);
- OPENAL_SetPaused(channels[music1desert], true);
- OPENAL_SetPaused(channels[wind], true);
- OPENAL_SetPaused(channels[desertambient], true);
-*/
- OPENAL_SetPaused(channels[stream_music1snow], true);
- OPENAL_SetPaused(channels[stream_music1grass], true);
- OPENAL_SetPaused(channels[stream_music1desert], true);
- OPENAL_SetPaused(channels[stream_wind], true);
- OPENAL_SetPaused(channels[stream_desertambient], true);
+
+ pause_sound(stream_music1snow);
+ pause_sound(stream_music1grass);
+ pause_sound(stream_music1desert);
+ pause_sound(stream_wind);
+ pause_sound(stream_desertambient);
if(environment==snowyenvironment){
if(!firstload){
oldlevel=50;
}
- OPENAL_SetPaused(channels[whooshsound], true);
- OPENAL_SetPaused(channels[stream_firesound], true);
+ pause_sound(whooshsound);
+ pause_sound(stream_firesound);
// Change the map filename into something that is os specific
char *FixedFN = ConvertFileName(name);
tfile=fopen( FixedFN, "rb" );
if(tfile)
{
- OPENAL_SetPaused(channels[stream_firesound], true);
+ pause_sound(stream_firesound);
scoreadded=0;
if(mainmenu==1||mainmenu==2||mainmenu==100){
OPENAL_SetFrequency(OPENAL_ALL, 0.001);
emit_stream_np(stream_music3);
- OPENAL_SetPaused(channels[music1], true);
+ pause_sound(music1);
}
}
if(!mainmenu){
- OPENAL_SetPaused(channels[stream_music3], true);
+ pause_sound(stream_music3);
resume_stream(music1);
}
}
{
//resume
mainmenu=0;
- OPENAL_SetPaused(channels[stream_music3], true);
+ pause_sound(stream_music3);
resume_stream(music1);
}
}
if(!gameon){
//quit
tryquit=1;
- OPENAL_SetPaused(channels[stream_music3], true);
+ pause_sound(stream_music3);
}
else{
//end game
musictoggle=1-musictoggle;
if(!musictoggle){
- OPENAL_SetPaused(channels[music1], true);
- OPENAL_SetPaused(channels[stream_music2], true);
- OPENAL_SetPaused(channels[stream_music3], true);
+ pause_sound(music1);
+ pause_sound(stream_music2);
+ pause_sound(stream_music3);
for(i=0;i<4;i++){
oldmusicvolume[i]=0;
mainmenu=0;
gameon=1;
- OPENAL_SetPaused(channels[stream_music3], true);
+ pause_sound(stream_music3);
}
if(Input::Button()&&!oldbutton&&(selected-7>=accountactive->getCampaignChoicesMade())){
fireSound();
campaign=1;
mainmenu=0;
gameon=1;
- OPENAL_SetPaused(channels[stream_music3], true);
+ pause_sound(stream_music3);
}
if(Input::Button()&&!oldbutton&&selected==4){
fireSound();
mainmenu=0;
gameon=1;
- OPENAL_SetPaused(channels[stream_music3], true);
+ pause_sound(stream_music3);
}
if(Input::Button()&&!oldbutton&&selected==numchallengelevels){
fireSound();
player[k].targetanimation=walljumpleftanim;
player[k].targetframe=0;
emit_sound_at(movewhooshsound, player[k].coords);
- if(k==0)OPENAL_SetPaused(channels[whooshsound], true);
+ if(k==0)pause_sound(whooshsound);
lowpointtarget=DoRotation(objects.model[i].facenormals[whichhit],0,objects.rotation[i],0);
player[k].rotation=-asin(0-lowpointtarget.x);
player[k].targetanimation=walljumprightanim;
player[k].targetframe=0;
emit_sound_at(movewhooshsound, player[k].coords);
- if(k==0)OPENAL_SetPaused(channels[whooshsound], true);
+ if(k==0)pause_sound(whooshsound);
lowpointtarget=DoRotation(objects.model[i].facenormals[whichhit],0,objects.rotation[i],0);
player[k].rotation=-asin(0-lowpointtarget.x);
player[k].targetanimation=walljumpbackanim;
player[k].targetframe=0;
emit_sound_at(movewhooshsound, player[k].coords);
- if(k==0)OPENAL_SetPaused(channels[whooshsound], true);
+ if(k==0)pause_sound(whooshsound);
lowpointtarget=DoRotation(objects.model[i].facenormals[whichhit],0,objects.rotation[i],0);
player[k].rotation=-asin(0-lowpointtarget.x);
player[k].targetanimation=walljumpfrontanim;
player[k].targetframe=0;
emit_sound_at(movewhooshsound, player[k].coords);
- if(k==0)OPENAL_SetPaused(channels[whooshsound], true);
+ if(k==0)pause_sound(whooshsound);
lowpointtarget=DoRotation(objects.model[i].facenormals[whichhit],0,objects.rotation[i],0);
player[k].rotation=-asin(0-lowpointtarget.x);
player[k].onterrain=1;
if(player[k].id==0){
- OPENAL_SetPaused(channels[whooshsound], true);
+ pause_sound(whooshsound);
OPENAL_SetVolume(channels[whooshsound], 0);
}
if(j>10||!player[k].isRun()){
if(player[k].targetanimation==jumpdownanim||player[k].targetanimation==jumpupanim){
- if(k==0)OPENAL_SetPaused(channels[whooshsound], true);
+ if(k==0)pause_sound(whooshsound);
}
emit_sound_at(jumpsound, player[k].coords, 128.);
}
}
if(!directing){
- OPENAL_SetPaused(channels[whooshsound], true);
+ pause_sound(whooshsound);
viewer=dialoguecamera[whichdialogue][indialogue];
if(viewer.y<terrain.getHeight(viewer.x,viewer.z)+.1){
viewer.y=terrain.getHeight(viewer.x,viewer.z)+.1;
}
if(!player[0].onfire){
emit_sound_at(fireendsound, player[0].coords);
- OPENAL_SetPaused(channels[stream_firesound], true);
+ pause_sound(stream_firesound);
}
slomotogglekeydown=1;
}
//player[0].DoDamage(1000);
emit_sound_at(whooshsound, player[0].coords, 128.);
- //OPENAL_SetPaused(channels[whooshsound], true);
texturesizetogglekeydown=1;
}
if(musicvolume[2]>0&&oldmusicvolume[2]<=0)
emit_stream_np(stream_music3, musicvolume[2]);
if(musicvolume[0]<=0&&oldmusicvolume[0]>0){
- OPENAL_SetPaused(channels[music1], true);
+ pause_sound(music1);
}
if(musicvolume[1]<=0&&oldmusicvolume[1]>0){
- OPENAL_SetPaused(channels[stream_music2], true);
+ pause_sound(stream_music2);
}
if(musicvolume[2]<=0&&oldmusicvolume[2]>0){
- OPENAL_SetPaused(channels[stream_music3], true);
+ pause_sound(stream_music3);
}
if(musicvolume[0]!=oldmusicvolume[0]){
oldmusicvolume[i]=musicvolume[i];
}
} else {
- OPENAL_SetPaused(channels[music1], true);
- OPENAL_SetPaused(channels[stream_music2], true);
- OPENAL_SetPaused(channels[stream_music3], true);
+ pause_sound(music1);
+ pause_sound(stream_music2);
+ pause_sound(stream_music3);
for(i=0;i<4;i++){
oldmusicvolume[i]=0;
campaign=1;
mainmenu=0;
gameon=1;
- OPENAL_SetPaused(channels[stream_music3], true);
+ pause_sound(stream_music3);
stealthloading=0;
}
if(targetanimation==rollanim&&targetframe==3&&onfire){
onfire=0;
emit_sound_at(fireendsound, coords);
- OPENAL_SetPaused(channels[stream_firesound], true);
+ pause_sound(stream_firesound);
deathbleeding=0;
}
escapednum++;
targetanimation=rollanim;
coords+=facing;
- if(id==0)OPENAL_SetPaused(channels[whooshsound], true);
+ if(id==0)pause_sound(whooshsound);
}
lastfeint=0;
}
escapednum++;
targetanimation=rollanim;
coords+=facing*2;
- if(id==0)OPENAL_SetPaused(channels[whooshsound], true);
+ if(id==0)pause_sound(whooshsound);
}
lastfeint=0;
}
}
if(skeleton.free==1){
- if(id==0)OPENAL_SetPaused(channels[whooshsound], true);
+ if(id==0)pause_sound(whooshsound);
if(!dead){
//If knocked over, open hands and close mouth
skeleton.longdead+=(2000-findLength(&average))*multiplier+multiplier;
if(skeleton.longdead>2000){
if(skeleton.longdead>6000){
- if(id==0)OPENAL_SetPaused(channels[whooshsound], true);
+ if(id==0)pause_sound(whooshsound);
skeleton.free=3;
DrawSkeleton();
skeleton.free=2;
if(findLength(&average)<10&&!dead&&skeleton.free){
skeleton.longdead+=(2000-findLength(&average))*multiplier+multiplier;
if(skeleton.longdead>(damage+500)*1.5){
- if(id==0)OPENAL_SetPaused(channels[whooshsound], true);
+ if(id==0)pause_sound(whooshsound);
skeleton.free=0;
velocity=0;
XYZ middle;
onterrain=1;
if(id==0){
- OPENAL_SetPaused(channels[whooshsound], true);
+ pause_sound(whooshsound);
OPENAL_SetVolume(channels[whooshsound], 0);
}
onterrain=1;
if(id==0){
- OPENAL_SetPaused(channels[whooshsound], true);
+ pause_sound(whooshsound);
OPENAL_SetVolume(channels[whooshsound], 0);
}