//	TankYouGlobalData.h - Tank You!'s global data.
//  ----------------------------------------------------------------------------
//	This file is part of 'NiallsAVLib', base code for any kind of audiovisual
//	apps.
//	Copyright (C) 2012  Niall Moody
//	
//	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 3 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, see <http://www.gnu.org/licenses/>.
//	----------------------------------------------------------------------------

#ifndef TANKYOUGLOBALDATA_H_
#define TANKYOUGLOBALDATA_H_

#include "ModifierFactory.h"
#include "OSCDispatcher.h"
#include "GlobalData.h"

#include <string>

class PickupGenerator;

///	Tank You!'s global data.
class TankYouGlobalData : public GlobalData
{
  public:
	///	Constructor.
	TankYouGlobalData();
	///	Destructor.
	~TankYouGlobalData();

	///	Sets the amount of screen shake to apply.
	void setScreenShake(float val);
	///	Sets the amount to flash the background by.
	void setBackgroundFlash(float val);
	///	Sets the amount to flash the border by.
	void setBorderFlash(float val);
	///	Sets the number of snowflakes to draw.
	void setSnowflakes(float val);
	///	Sets the pickup generator to use.
	void setPickupGenerator(const std::wstring& val);
	///	Sets the maximum number of pickups to display on screen.
	void setMaxPickups(int val);
	///	Sets the number of players.
	void setNumPlayers(int val);
	///	Toggles the music.
	void setMusic(bool val);

	///	Sets whether to send OSC messages or not (default is no).
	void setOSCOutput(bool val);

	///	Returns the amount of screen shake to apply.
	float getScreenShake() const {return screenShake;};
	///	Returns the amount to flash the background by.
	float getBackgroundFlash() const {return backgroundFlash;};
	///	Returns the amount to flash the border by.
	float getBorderFlash() const {return borderFlash;};
	///	Returns the number of snowflakes to draw.
	float getSnowflakes() const {return snowflakes;};
	///	Returns the pickup generator to use.
	const std::wstring& getPickupGeneratorName() const {return generator;};
	///	Returns the maximum number of pickups to display on screen.
	int getMaxPickups() const {return maxPickups;};
	///	Returns the number of players.
	int getNumPlayers() const {return numPlayers;};
	///	Returns whether the music should play or not.
	bool getMusic() const {return music;};

	///	Returns true if OSC messages are to be sent.
	bool getOSCOutput() const {return oscOutput;};

	///	Returns the game's ModifierFactory.
	ModifierFactory& getModifierFactory() {return modifierFactory;};
	///	Creates and returns this match's PickupGenerator.
	shared_ptr<PickupGenerator> getPickupGenerator();
	///	Returns the game's OSCDispatcher.
	OSCDispatcher& getOSCDispatcher() {return oscDispatcher;};
  private:
	///	The game's ModifierFactory.
	ModifierFactory modifierFactory;
	///	The game's OSCDispatcher.
	OSCDispatcher oscDispatcher;

	///	The amount of screen shake to apply.
	float screenShake;
	///	The amount to flash the background by.
	float backgroundFlash;
	///	The amount to flash the border by.
	float borderFlash;
	///	The number of snowflakes to draw.
	float snowflakes;
	///	The pickup generator to use.
	std::wstring generator;
	///	The maximum number of pickups to display on screen.
	int maxPickups;
	///	The number of players.
	int numPlayers;
	///	Whether or not the music should play.
	bool music;

	///	Whether or not OSC messages should be sent.
	bool oscOutput;
};

#endif
