//------------------------------------------------------------------------------
// Lamp : Open source game middleware
// Copyright (C) 2004  Junpei Ohtani ( Email : junpee@users.sourceforge.jp )
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library 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
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//------------------------------------------------------------------------------

/** @file
 * 色スプライトステートヘッダ
 * @author Junpee
 */

#ifndef COLOR_SPRITE_STATE_H_
#define COLOR_SPRITE_STATE_H_

#include "Graphics2D/SpriteState/SpriteState.h"

namespace Lamp{

//------------------------------------------------------------------------------
/**
 * 色スプライトステート
 */
class ColorSpriteState : public SpriteState{
public:
	//--------------------------------------------------------------------------
	// テンプレートステート
	//--------------------------------------------------------------------------
	/// 白
	static const ColorSpriteState whiteState;

	/// 灰色
	static const ColorSpriteState grayState;

	/// 黒
	static const ColorSpriteState blackState;

	/// 赤
	static const ColorSpriteState redState;

	/// 緑
	static const ColorSpriteState greenState;

	/// 青
	static const ColorSpriteState blueState;

	/// 黄
	static const ColorSpriteState yellowState;

	/// 青緑
	static const ColorSpriteState cyanState;

	/// 赤紫
	static const ColorSpriteState magentaState;

	/// デフォルト
	static const ColorSpriteState defaultState;

	//--------------------------------------------------------------------------
	// 生成、破棄
	//--------------------------------------------------------------------------
	/**
	 * コンストラクタ
	 */
	ColorSpriteState();

	/**
	 * コンストラクタ
	 * @param color 色
	 */
	ColorSpriteState(const Color4f& color);

	/**
	 * デストラクタ
	 */
	virtual ~ColorSpriteState();

	//--------------------------------------------------------------------------
	// デフォルトステート
	//--------------------------------------------------------------------------
	/**
	 * デフォルトステートの取得
	 * @return デフォルトステート
	 */
	virtual const SpriteRequest* getDefaultState() const{
		return &defaultState;
	}

	//--------------------------------------------------------------------------
	// 描画
	//--------------------------------------------------------------------------
	/**
	 * 適用
	 * @param renderState レンダーステート
	 */
	virtual void apply(SpriteRenderState* renderState);

	//--------------------------------------------------------------------------
	// 色
	//--------------------------------------------------------------------------
	/**
	 * 色の設定
	 * @param color 色
	 */
	virtual void setColor(const Color4f& color){ color_ = color; }

	/**
	 * 色の取得
	 * @return 色
	 */
	virtual const Color4f& getColor() const{ return color_; }

private:
	//--------------------------------------------------------------------------
	// 色
	Color4f color_;

};

//------------------------------------------------------------------------------
} // End of namespace Lamp
#endif // End of COLOR_SPRITE_STATE_H_
//------------------------------------------------------------------------------
