/***************************************************************************
 *   Copyright (C) 2004-2005 by                                            *
 *     Paolo Sacconier   <axa1981@tin.it>                                  *
 *     Francesco Tamagni <minchiahead@hacari.org>                          *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#ifndef GILLOSOUND_H
#define GILLOSOUND_H

#include "main.h"

// should be more than the possible effects in the enum
#define MAX_SAMPLES 14

namespace gillo {

/**
A simple ball

@author ,,,
*/
class Sound
{
	bool		enabled;
	slScheduler	sched;
	slSample*	samples[MAX_SAMPLES];

public:
	enum Effect {
		BOING,
		GOAL,
		TIEGOAL,
		FIRE,
		END,
		ENDTIE,
		MENUSEL,
		PWRUP_CHARGE_INVERTER,
		PWRUP_GRAVITY_ROTATOR,
		PWRUP_BALL_INFLATE,
		PWRUP_BALL_DEFLATE,
		PWRUP_BALL_ADD,
		PWRUP_NEW,
		POWERSHOOT,
	};

	enum Music {
		MENU,
		GAME1,
		TRAINING
	};

	Sound();
	~Sound();
	
	void play(Effect e);
	void music(Music m);
	void update(double t);
	inline void toggle() { enabled = !enabled; };
};
};

#endif
