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

		PMapTypes.h

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

		PMap Types

		Author:	Emil
		Date:	12/11/98

		Revision History

		when		who			what & why
		==========	==========	======================================================
		10/01/99	EricB		Added kRGBColorParamType - should be prefered to kColorValueType,
								because it does NOT generate accuracy errors when used in PMaps
		07/30/99	Brice		added IsVisible into TPMapElement
		05/24/99	Frh			added kIMCUnknownParamType
		02/21/99	del			Added kActionNumberParamType
		01/18/99	Nba			added rect and point pmap entry type

*****************************************************************************************/
#ifndef __PMapTypes__
#define __PMapTypes__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#ifndef __MCBasicTypes__
#include "MCBasicTypes.h"
#endif

// Parameter Format Definitions

const int32 kPMapNameStringSize = 32;
const int32 kPMapInfoStringSize = 256;

/// Stores information about a pmap entry
///
class TPMapElement : public TMCObject
{  
public:
	TPMapElement();
	boolean IsInterpolable() const {return  (boolean) (fFlags & 0x00000001);}
	boolean IsReadOnly()	 const {return  (boolean) (fFlags & 0x00000002);}
	boolean DontSave()		 const {return  (boolean) (fFlags & 0x00000004);}
	boolean IsVisible()		 const {return !(boolean)((fFlags & 0x00000008)==0x00000008);}

	IDType  fPartID;						///< The ID of the parameter (same ID than the associated part in the UI)
	IDType  fParamType;						///< The type of the parameter (eg kReal32ParamType, kVector3ParamType)
	uint32 	fFlags;							///< Animation flags
	int8 	fName[kPMapNameStringSize];		///< The name of the parameter (Language dependent)
	int8 	fInfo[kPMapInfoStringSize];		///< Extra info/data
};


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

// Parameter Type Constants

#define kBooleanParamType 			'bool' // auto pmap is a CheckboxPart
#define kInt16ParamType 			'in16' // auto pmap is a int32 EditTextPart
#define kInt32ParamType 			'in32' // auto pmap is a int32 EditTextPart
#define kReal32ParamType 			're32' // auto pmap is a real32 EditTextPart
#define kReal64ParamType 			're64' // auto pmap is a real32 EditTextPart
#define kColorParamType 			'colo' // data is a TMCColorRGBA; auto pmap is color part
#define kColorRGB214ParamType		'colF' // fixed color RGB 2.14
#define kColorRGBAIndexParamType	'colI' // a colorRGBA and an associated index (real32)
#define kGradientParamType			'grad' // an array of ColorRGBAIndex
#define kRectParamType				'rect'
#define kPointParamType				'poit'
#define kMCString255ParamType		's255' // data is a TMCString255; auto pmap is an EditTextPart
#define kMCDynamicStringParamType	'Dstr' // data is a TMCDynamicString; auto pmap is an EditTextPart
#define kVector2ParamType			'vec2'
#define kVector3ParamType			'vec3'
#define kDirectionParamType			'dire'
#define kMatrix33ParamType			'mx33' // TMatrix33
#define kComponentParamType			'comp' // TSingleComponentChooser
#define kComponentListParamType		'cmp#' // TMultipleComponentChooser
#define kComponentListSCCParamType	'scc#' // TMultiCompChooserWithSCC
#define kActionNumberParamType		'actn' // auto pmap is a int32 EditTextPart
#define kIMCUnknownParamType		'iunk' // data is an IMCUnknown ptr
#define kIDTypeParamType			'id32'

// Old Parameter Type Constants (from Ray Dream 5.0 and earlier)

#define kRGBColorParamType 			'RGBc' // Do not use in PMAPs !!!! data is a TMCRGBColor; auto pmap is color part
#define kShortParamType 			'shrt' // now use kInt16ParamType
#define kLongParamType 				'long' // now use kInt32ParamType
#define kQuickFix16ParamType 		'qf16' // now use kReal32ParamType
#define kQuickFixParamType 			'qfix' // now use kReal32ParamType
#define kQFVector2ParamType			'qfv2' // now use kVector2ParamType
#define kQFVector3ParamType			'qfv3' // now use kVector3ParamType
#define kQFMatrix33ParamType		'ROTA' // now use kMatrix33ParamType or kMatrixQuaternionParamType

#endif

