//	Crash.h - The explosion graphic.
//  ----------------------------------------------------------------------------
//	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 CRASH_H_
#define CRASH_H_

#include "TwoFloats.h"
#include "c0xHeaders.h"
#include "ThreeFloats.h"

#include <stdint.h>

class Drawer;
typedef shared_ptr<Drawer> DrawerPtr;

//------------------------------------------------------------------------------
///	The explosion graphic.
class Crash
{
  public:
	///	Constructor.
	Crash(float x, float y, const ThreeFloats& col);
	///	Destructor.
	~Crash();

	///	Draws the crash, returns true if it can be deleted.
	bool draw(DrawerPtr& d, float timestepInterp, float globalSpeed);
  private:
	///	The crash position.
	TwoFloats position;
	///	The crash colour.
	ThreeFloats colour;

	///	How to scale the image.
	float scale;
};

//------------------------------------------------------------------------------
///	So there's a bit less typing involved.
typedef shared_ptr<Crash> CrashPtr;

#endif
