From 897802f67d502c070eac0c14b43113d521a711ef Mon Sep 17 00:00:00 2001
From: Clyne Sullivan <tullivan99@gmail.com>
Date: Thu, 3 Dec 2015 20:06:19 -0500
Subject: fixed sounds

---
 main.cpp | 27 +--------------------------
 1 file changed, 1 insertion(+), 26 deletions(-)

(limited to 'main.cpp')

diff --git a/main.cpp b/main.cpp
index 1ce6049..a273f0c 100644
--- a/main.cpp
+++ b/main.cpp
@@ -123,14 +123,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
-						}
 
 					}
 				}
-- 
cgit v1.2.3