/****************************************************************************************************

		MCGCTypes.h
		Copyright: (c) 2001 Eovia Corp. All rights reserved.

		MOVED FROM MCCore\Include

		Author:	Arnaud
		Date:	10/1/2003

****************************************************************************************************/

#ifndef __MCGCTypes__
#define __MCGCTypes__

#if CP_PRAGMA_ONCE
#pragma once
#endif


#include "MCBasicTypes.h"
#include "MCPublicGCTypes.h"
#include "MCStream.h"
#include "MCOSCOnfig.h"
#include "MCRGBColor.h"

class TMCRect;

/// 16 bits precision color with 4 channels (alpha, red, green, blue).
/// Values are between 0 and 65535
///
class TMCARGBColor
{
	public:
		TMCARGBColor(void) { rr=0;gg=0;bb=0;}
		TMCARGBColor(uint16 alpha, uint16 red, uint16 green, uint16 blue) : 
			rr(red),gg(green),bb(blue),aa(alpha){};

		uint16	aa;
		uint16	rr;
		uint16	gg;
		uint16	bb;
};

/// platform dependant 8 bits precision color with 4 channels (alpha, red, green, blue).
///
class TMCARGBColor32
{
	public:
		TMCARGBColor32(void);
		TMCARGBColor32(uint32 v)	{ Set(v); }
		TMCARGBColor32(uint8 alpha, uint8 red, uint8 green, uint8 blue) : 
			aa(alpha),rr(red),gg(green),bb(blue){};

		uint32	UInt32(void)	{ return *((uint32*)this); }
		uint32	Get(void)		{ return *((uint32*)this); }
		void	Set(uint32 v)	{ (*(uint32*)this) = v; }

#if MC_LITTLE_ENDIAN
		uint8	bb;
		uint8	gg;
		uint8	rr;
		uint8	aa;
#elif MC_BIG_ENDIAN 
		uint8	aa;
		uint8	rr;
		uint8	gg;
		uint8	bb;
#endif
};


/// Deprecated, do not use
///
class TMCRGBPattern
{
	public:
		TMCRGBPattern(void);

		TMCRGBColor c11, c12;
		TMCRGBColor c21, c22;
};


typedef float FastFloat;
#define Qsin sin
#define Qcos cos
#endif
