aboutsummaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2015-12-03 20:06:19 -0500
committerClyne Sullivan <tullivan99@gmail.com>2015-12-03 20:06:19 -0500
commit897802f67d502c070eac0c14b43113d521a711ef (patch)
treeae3314c8c98bbd66277205a5a6415cf8d333f4a4 /main.cpp
parentdcd2d1e9ed9df2b67a48acc442c9e816b677b208 (diff)
fixed sounds
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp27
1 files changed, 1 insertions, 26 deletions
diff --git a/main.cpp b/main.cpp
index 1ce6049..a273f0c 100644
--- a/main.cpp
+++ b/main.cpp
@@ -124,14 +124,6 @@ GLuint shaderProgram;
FILE *names;
/*
- * These variables are used by SDL_mixer to create sound.
- * horn is not currently used, although it may be set.
-*/
-
-Mix_Music *music;
-Mix_Chunk *horn;
-
-/*
* loops is used for texture animation. It is believed to be passed to entity
* draw functions, although it may be externally referenced instead.
*/
@@ -415,18 +407,6 @@ int main(/*int argc, char *argv[]*/){
*/
fadeIntensity = 250;
initEverything();
-
- /*
- * Open a test background music file and sound. The background music is then played indefinitely
- * while the sound is never referenced again.
- *
- */
-
- music = Mix_LoadMUS("assets/BennyHillTheme.wav"); // as in gamedev/assets/<sound>
- horn = Mix_LoadWAV("assets/air-horn-club-sample_1.wav"); //
-
- Mix_VolumeMusic(15); // Set the volume
- //Mix_PlayMusic( music, -1 ); // Play music forever
/*
* Load sprites used in the inventory menu. See src/inventory.cpp
@@ -454,9 +434,6 @@ int main(/*int argc, char *argv[]*/){
*/
Mix_HaltMusic();
- Mix_FreeMusic(music);
-
- Mix_FreeChunk(horn);
fclose(names);
@@ -901,10 +878,8 @@ void logic(){
if(SDL_GetMouseState(NULL, NULL) & SDL_BUTTON(SDL_BUTTON_RIGHT)){
- if(!ui::dialogBoxExists){
+ if(!ui::dialogBoxExists)
n->interact();
- Mix_PlayChannel( -1, horn, 0); // Audio feedback
- }
}
}