//	Pickup2xSpeed.h - 2x speed Pickup.
//  ----------------------------------------------------------------------------
//	This file is part of 'GameTemplate', template code for a game.
//	Copyright (C) 2011  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 PICKUP2XSPEED_H_
#define PICKUP2XSPEED_H_

#include "../Pickup.h"
#include "../OverrideBehaviour.h"

class Override2xSpeed;

//------------------------------------------------------------------------------
///	2x speed Pickup.
class Pickup2xSpeed : public Pickup
{
  public:
	///	Constructor.
	Pickup2xSpeed();
	///	Destructor.
	~Pickup2xSpeed();

	///	Constructs and returns this Pickup's OverrideBehaviour.
	shared_ptr<OverrideBehaviour> getBehaviour() const;

	///	So subclasses can load and return their icon.
	const std::wstring getIcon() const {return L"pickup-2xSpeed";};
};

//------------------------------------------------------------------------------
///	2x speed behaviour.
class Behaviour2xSpeed : public OverrideBehaviour
{
  public:
	///	Constructor.
	Behaviour2xSpeed(const std::wstring& icon);
	///	Destructor.
	~Behaviour2xSpeed();

	///	Moves the associated Tone.
	/*!
		\return True if this behaviour should be deleted on return.
	 */
	bool moveTone(Tone& tone,
				  std::vector<TonePtr>& allTones,
				  float globalSpeed);
	///	Draws any extra information on top of the tone image.
	void drawExtraInformation(DrawerPtr& d, float timestepInterp, const Tone& tone);
  private:
	///	The id for the pickup's icon.
	std::wstring pickupIcon;
};

#endif
