From 15afca9070b3eca896db35c4a9204c5f8570ee4a Mon Sep 17 00:00:00 2001 From: sf17k Date: Tue, 10 May 2011 01:07:38 -0400 Subject: [PATCH] rename music1, music2, music3 --- Source/GameDraw.cpp | 2 +- Source/GameInitDispose.cpp | 2 +- Source/GameTick.cpp | 98 +++++++++++++++++++------------------- Source/Sounds.cpp | 2 +- Source/Sounds.def | 10 ++-- 5 files changed, 57 insertions(+), 57 deletions(-) diff --git a/Source/GameDraw.cpp b/Source/GameDraw.cpp index 9ecf62b..de401b3 100644 --- a/Source/GameDraw.cpp +++ b/Source/GameDraw.cpp @@ -442,7 +442,7 @@ int Game::DrawGLScene(StereoSide side) } } - if(!cameramode&&musictype==stream_music2)playerdist=findDistancefastflat(&player[0].coords,&viewer); + if(!cameramode&&musictype==stream_fighttheme)playerdist=findDistancefastflat(&player[0].coords,&viewer); else playerdist=-100; glPushMatrix(); glCullFace(GL_BACK); diff --git a/Source/GameInitDispose.cpp b/Source/GameInitDispose.cpp index f87d6ee..2b6b672 100644 --- a/Source/GameInitDispose.cpp +++ b/Source/GameInitDispose.cpp @@ -839,7 +839,7 @@ void Game::InitGame() loadAllSounds(); if(musictoggle) - emit_stream_np(stream_music3); + emit_stream_np(stream_menutheme); LoadTexture(":Data:Textures:Cursor.png",&cursortexture,0,1); diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index b98ab4e..4d4747c 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -78,7 +78,7 @@ extern bool keyboardfrozen; extern bool loadingstuff; extern XYZ windvector; extern bool debugmode; -static int music1; +static int leveltheme; extern int mainmenu; extern bool visibleloading; extern XYZ envsound[30]; @@ -1272,9 +1272,9 @@ void Game::Setenvironment(int which) float temptexdetail; environment=which; - pause_sound(stream_music1snow); - pause_sound(stream_music1grass); - pause_sound(stream_music1desert); + pause_sound(stream_snowtheme); + pause_sound(stream_grasstheme); + pause_sound(stream_deserttheme); pause_sound(stream_wind); pause_sound(stream_desertambient); @@ -2160,8 +2160,8 @@ void Game::MenuTick(){ }else{ //resume mainmenu=0; - pause_sound(stream_music3); - resume_stream(music1); + pause_sound(stream_menutheme); + resume_stream(leveltheme); } } @@ -2188,7 +2188,7 @@ void Game::MenuTick(){ }else{ //quit tryquit=1; - pause_sound(stream_music3); + pause_sound(stream_menutheme); } } break; @@ -2255,9 +2255,9 @@ void Game::MenuTick(){ musictoggle=1-musictoggle; if(!musictoggle){ - pause_sound(music1); - pause_sound(stream_music2); - pause_sound(stream_music3); + pause_sound(leveltheme); + pause_sound(stream_fighttheme); + pause_sound(stream_menutheme); for(int i=0;i<4;i++){ oldmusicvolume[i]=0; @@ -2266,7 +2266,7 @@ void Game::MenuTick(){ } if(musictoggle) - emit_stream_np(stream_music3); + emit_stream_np(stream_menutheme); break; case 7: flash(); @@ -2357,7 +2357,7 @@ void Game::MenuTick(){ campaign=1; mainmenu=0; gameon=1; - pause_sound(stream_music3); + pause_sound(stream_menutheme); } if(selected>=1 && selected<=5){ fireSound(); @@ -2378,7 +2378,7 @@ void Game::MenuTick(){ mainmenu=0; gameon=1; - pause_sound(stream_music3); + pause_sound(stream_menutheme); break; case 2: mainmenu=9; @@ -2459,7 +2459,7 @@ void Game::MenuTick(){ mainmenu=0; gameon=1; - pause_sound(stream_music3); + pause_sound(stream_menutheme); } if(Input::MouseClicked()&&selected==numchallengelevels){ fireSound(); @@ -2525,7 +2525,7 @@ void Game::MenuTick(){ loaddistrib=0; } } - OPENAL_SetFrequency(channels[stream_music3], 22050); + OPENAL_SetFrequency(channels[stream_menutheme], 22050); if(entername) { inputText(displaytext[0],&displayselected,&displaychars[0]); @@ -4645,7 +4645,7 @@ void Game::doAttacks(){ player[i].skeleton.longdead<300&& player[k].lastattack!=spinkickanim&& player[i].skeleton.free)&& - (!player[i].dead||musictype!=stream_music2)){ + (!player[i].dead||musictype!=stream_fighttheme)){ player[k].targetanimation=dropkickanim; for(int j=0;j0) - musictype=stream_music2; + musictype=stream_fighttheme; } if(loading==2){ - musictype=stream_music3; + musictype=stream_menutheme; musicvolume[2]=512; musicvolume[0]=0; musicvolume[1]=0; @@ -7680,19 +7680,19 @@ void Game::TickOnceAfter(){ } if(musictoggle) - if(musictype!=oldmusictype&&musictype==stream_music2) + if(musictype!=oldmusictype&&musictype==stream_fighttheme) emit_sound_np(alarmsound); musicselected=musictype; - if(musicselected==music1) + if(musicselected==leveltheme) musicvolume[0]+=multiplier*450; else musicvolume[0]-=multiplier*450; - if(musicselected==stream_music2) + if(musicselected==stream_fighttheme) musicvolume[1]+=multiplier*450; else musicvolume[1]-=multiplier*450; - if(musicselected==stream_music3) + if(musicselected==stream_menutheme) musicvolume[2]+=multiplier*450; else musicvolume[2]-=multiplier*450; @@ -7709,31 +7709,31 @@ void Game::TickOnceAfter(){ if(musictoggle){ if(musicvolume[0]>0&&oldmusicvolume[0]<=0) - emit_stream_np(music1, musicvolume[0]); + emit_stream_np(leveltheme, musicvolume[0]); if(musicvolume[1]>0&&oldmusicvolume[1]<=0) - emit_stream_np(stream_music2, musicvolume[1]); + emit_stream_np(stream_fighttheme, musicvolume[1]); if(musicvolume[2]>0&&oldmusicvolume[2]<=0) - emit_stream_np(stream_music3, musicvolume[2]); + emit_stream_np(stream_menutheme, musicvolume[2]); if(musicvolume[0]<=0&&oldmusicvolume[0]>0) - pause_sound(music1); + pause_sound(leveltheme); if(musicvolume[1]<=0&&oldmusicvolume[1]>0) - pause_sound(stream_music2); + pause_sound(stream_fighttheme); if(musicvolume[2]<=0&&oldmusicvolume[2]>0) - pause_sound(stream_music3); + pause_sound(stream_menutheme); if(musicvolume[0]!=oldmusicvolume[0]) - OPENAL_SetVolume(channels[music1], musicvolume[0]); + OPENAL_SetVolume(channels[leveltheme], musicvolume[0]); if(musicvolume[1]!=oldmusicvolume[1]) - OPENAL_SetVolume(channels[stream_music2], musicvolume[1]); + OPENAL_SetVolume(channels[stream_fighttheme], musicvolume[1]); if(musicvolume[2]!=oldmusicvolume[2]) - OPENAL_SetVolume(channels[stream_music3], musicvolume[2]); + OPENAL_SetVolume(channels[stream_menutheme], musicvolume[2]); for(int i=0;i<3;i++) oldmusicvolume[i]=musicvolume[i]; } else { - pause_sound(music1); - pause_sound(stream_music2); - pause_sound(stream_music3); + pause_sound(leveltheme); + pause_sound(stream_fighttheme); + pause_sound(stream_menutheme); for(int i=0;i<4;i++){ oldmusicvolume[i]=0; @@ -7968,7 +7968,7 @@ void Game::TickOnceAfter(){ campaign=1; mainmenu=0; gameon=1; - pause_sound(stream_music3); + pause_sound(stream_menutheme); stealthloading=0; } diff --git a/Source/Sounds.cpp b/Source/Sounds.cpp index c853553..f5c3398 100644 --- a/Source/Sounds.cpp +++ b/Source/Sounds.cpp @@ -69,7 +69,7 @@ void loadAllSounds() footstepsound4 = footstepst2; // Huh? // OPENAL_Sample_SetMode(samp[whooshsound], OPENAL_LOOP_NORMAL); - for (int i = stream_firesound; i <= stream_music3; i++) + for (int i = stream_firesound; i <= stream_menutheme; i++) OPENAL_Stream_SetMode(samp[i], OPENAL_LOOP_NORMAL); } diff --git a/Source/Sounds.def b/Source/Sounds.def index c85ab84..78ce42f 100644 --- a/Source/Sounds.def +++ b/Source/Sounds.def @@ -83,10 +83,10 @@ DECLARE_SOUND(staffbreaksound, "staffbreak.ogg") DECLARE_SOUND(firestartsound, "firestart.ogg") DECLARE_SOUND(fireendsound, "fireend.ogg") DECLARE_SOUND(stream_firesound, "fire.ogg") -DECLARE_SOUND(stream_music1grass, "music1grass.ogg") -DECLARE_SOUND(stream_music1snow, "music1snow.ogg") -DECLARE_SOUND(stream_music1desert, "music1desert.ogg") +DECLARE_SOUND(stream_grasstheme, "music1grass.ogg") +DECLARE_SOUND(stream_snowtheme, "music1snow.ogg") +DECLARE_SOUND(stream_deserttheme, "music1desert.ogg") DECLARE_SOUND(stream_wind, "wind.ogg") DECLARE_SOUND(stream_desertambient, "desertambient.ogg") -DECLARE_SOUND(stream_music2, "music2.ogg") -DECLARE_SOUND(stream_music3, "music3.ogg") +DECLARE_SOUND(stream_fighttheme, "music2.ogg") +DECLARE_SOUND(stream_menutheme, "music3.ogg") -- 2.39.5