/*---------------------------------------------------------------------------

    NN text format macro for DXG20

    Copyright (C) 2002 - 2004 SEGA Corporation Creative Center Graphics Sect.
    All Rights Reserved.

    Module  : NN text format macro for DXG20
    File    : nntxe.h
    Create  : 2003/06/05
    Modify  : 2003/10/24 新フォーマット、頂点形式に対応
    Modify  : 2003/10/30 ちょっと見直し
    Modify  : 2003/11/04 ボーンマトリックス数に関する手直し
    Modify  : 2003/11/20 変換マクロのXbox、PC切り分け
    Modify  : 2003/12/02 モーフ用頂点データマクロの修正
    Modify  : 2003/12/05 カスタムシェーダーファイルリスト用のマクロ追加、
                         シェーダーインデックスリスト用のマクロ名称を変更
    Modify  : 2004/04/05 VTXDESC,SLISTDESC修正、VTX_FVF追加
    Modify  : 2004/06/16 DX8,DX9版統合
    Modify  : 2004/07/20 POS_U32,NRM_U32,ST0_U32,ST1_U32,ST2_U32,ST3_U32追加
    Modify  : 2004/08/05 NND_PLATFORM_XENON追加
    Modify  : 2004/09/13 MAT_TEXDESC2追加
    Modify  : 2004/10/07 エフェクトリスト関係追加
    Modify  : 2004/12/24 VTXDESC,PRIMTYPEの修正、PLIMLIST,VTXLISTTYPE,VTXLISTの追加
    Version : 1.18.00
    Note    : 

---------------------------------------------------------------------------*/

#ifndef	__NNTDXG20_H__
#define	__NNTDXG20_H__

// Meshset
#define	MSST_SHADERLIST( _index )		( _index )

// Custom Shader File List
#define	VSHADERFILE( _type, _idx, _user, _decl, _file )	\
										{ (_type), (_idx), (_user), (_decl), (_file) }
#define	VS_TYPE( _type )				(_type)
#define	VS_GLOBALINDEX( _idx )			(_idx)
#define	VS_USERDATA( _user )			(_user)
#define	VS_DECLARATION( _decl )			(_decl)
#define	VS_FILENAME( _file )			(_file)

#define	PSHADERFILE( _type, _idx, _user, _file )		\
										{ (_type), (_idx), (_user), (_file) }
#define	PS_TYPE( _type )				(_type)
#define	PS_GLOBALINDEX( _idx )			(_idx)
#define	PS_USERDATA( _user )			(_user)
#define	PS_FILENAME( _file )			(_file)

#define	CUSTOMSHADER_FILELIST( _vsnum, _vslist, _psnum, _pslist )	\
										{ (_vsnum), (_vslist), (_psnum), (_pslist) }
#define	CSFLIST_N_VSHADER( _vsnum )		(_vsnum)
#define	CSFLIST_VSHADER_LIST( _vslist )	(_vslist)
#define	CSFLIST_N_PSHADER( _psnum )		(_psnum)
#define	CSFLIST_PSHADER_LIST( _pslist )	(_pslist)

// Shader Index List
#define	SHADERIDX( _type, _vs, _ps )	{ (_type), 0, (_vs), (_ps) }
#define	SIDX_TYPE( _type )				(_type)
#define	SIDX_VSIDX( _idx )				(_idx)
#define	SIDX_PSIDX( _idx )				(_idx)

#define	SHADERDESC( _num, _ptr )		{ (_num), 0, (_ptr) }
#define	SDESC_N_IDX( _num )				(_num)
#define	SDESC_IDXLIST( _ptr )			(_ptr)

#define	SHADERLIST( _num, _ptr )		{ (_num), 0, (_ptr) }
#define	SLIST_N_LIST( _num )			(_num)
#define	SLIST_DESCLIST( _ptr )			(_ptr)

// Vertex data
#define	POS_F32( _x, _y, _z )				( _x ), ( _y ), ( _z )
#define	POS_U32( _x, _y, _z )				( _x ), ( _y ), ( _z )
#define	NRM_F32( _x, _y, _z )				( _x ), ( _y ), ( _z )
#define	NRM_U32( _x, _y, _z )				( _x ), ( _y ), ( _z )

//D3DDECLTYPE_DEC3N 符号付 10:10:10
#define	NRM_PACK( _x, _y, _z )				((Uint32)((_x) * 511) & 0x3ff), ((Uint32)((_y) * 511) & 0x3ff), ((Uint32)((_z) * 511)  & 0x3ff)
#define	NRM_PACK_BIN( _x, _y, _z )			(Uint32)(((Uint32)(_z * 511) & 0x3ff) << 20)	\
										  | (Uint32)(((Uint32)(_y * 511) & 0x3ff) << 10)	\
										  | (Uint32)(((Uint32)(_x * 511) & 0x3ff) <<  0)

// ARGBの順に格納する
#define	RGBA8888( _r, _g, _b, _a )			( (Uint32)((_a)<<24)	\
											| (Uint32)((_r)<<16)	\
											| (Uint32)((_g)<<8)		\
											| (_b) )

/* Float point to fixed */
#define	F32_S16_8( _val )					((Sint16)(  256.f * (_val) + (((_val)>0.f)?0.5f:-0.5f) ))
#define	F32_S16_10( _val )					((Sint16)( 1024.f * (_val) + (((_val)>0.f)?0.5f:-0.5f) ))

#define	ST0_F16( _s, _t )					( (Uint32)((_t) << 16) | (_s) )
#define	ST0_F32( _s, _t )					( _s ), ( _t )
#define	ST0_U32( _s, _t )					( _s ), ( _t )
#define	ST0_S16_8( _s, _t )					(((Uint32)F32_S16_8(_t))  << 16) | (((Uint32)F32_S16_8(_s))  & 0xFFFF)
#define	ST0_S16_10( _s, _t )				(((Uint32)F32_S16_10(_t)) << 16) | (((Uint32)F32_S16_10(_s)) & 0xFFFF)
#define	ST0_PACK( _s, _t )					( _s ), ( _t )
#define	ST0_PACK_BIN( _s, _t )				( (Uint32)((_t) << 16) | (_s) )

#define	ST1_F16( _s, _t )					ST0_F16(_s, _t)
#define	ST1_F32( _s, _t )					ST0_F32(_s, _t)
#define	ST1_U32( _s, _t )					ST0_U32(_s, _t)
#define	ST1_S16_8( _s, _t )					ST0_S16_8(_s, _t)
#define	ST1_S16_10( _s, _t )				ST0_S16_10(_s, _t)
#define	ST1_PACK( _s, _t )					ST0_PACK(_s, _t)
#define	ST1_PACK_BIN( _s, _t )				ST0_PACK_BIN(_s, _t)

#define	ST2_F16( _s, _t )					ST0_F16(_s, _t)
#define	ST2_F32( _s, _t )					ST0_F32(_s, _t)
#define	ST2_U32( _s, _t )					ST0_U32(_s, _t)
#define	ST2_S16_8( _s, _t )					ST0_S16_8(_s, _t)
#define	ST2_S16_10( _s, _t )				ST0_S16_10(_s, _t)
#define	ST2_PACK( _s, _t )					ST0_PACK(_s, _t)
#define	ST2_PACK_BIN( _s, _t )				ST0_PACK_BIN(_s, _t)

#define	ST3_F16( _s, _t )					ST0_F16(_s, _t)
#define	ST3_F32( _s, _t )					ST0_F32(_s, _t)
#define	ST3_U32( _s, _t )					ST0_U32(_s, _t)
#define	ST3_S16_8( _s, _t )					ST0_S16_8(_s, _t)
#define	ST3_S16_10( _s, _t )				ST0_S16_10(_s, _t)
#define	ST3_PACK( _s, _t )					ST0_PACK(_s, _t)
#define	ST3_PACK_BIN( _s, _t )				ST0_PACK_BIN(_s, _t)

// Short Index( * 3 : Constレジスタを3行ずつ設定)
#define	MTXIDX_I16( _i0, _i1 )				( (Uint32)((((_i0 + (_i0>=NND_SKINNING_DX_LIMITBONE_NUM?1:0)) * 3) & 0xFFFF))		\
											| (Uint32)((((_i1 + (_i1>=NND_SKINNING_DX_LIMITBONE_NUM?1:0)) * 3) & 0xFFFF)<<16) )
#define	MTXIDX2_I16( _i0, _i1 )				MTXIDX_I16(_i0, _i1)
#define	MTXIDX3_I16( _i0, _i1, _i2 )		MTXIDX_I16(_i0, _i1), MTXIDX_I16(_i2,   0)	// 4つ目をダミーとしている
#define	MTXIDX4_I16( _i0, _i1, _i2, _i3 )	MTXIDX_I16(_i0, _i1), MTXIDX_I16(_i2, _i3)

// Byte Index (D3DCOLORによる１データ8ビット表現)
#define	MTXIDX_I8( _i0, _i1, _i2, _i3 )		( (Uint32)(((_i3 * 3 + 36)&0xff)<<24)	\
											| (Uint32)(((_i0 * 3 + 36)&0xff)<<16)	\
											| (Uint32)(((_i1 * 3 + 36)&0xff)<< 8)	\
											|          ((_i2 * 3 + 36)&0xff)    )

#define	MTXIDX2_I8( _i0, _i1 )				MTXIDX_I8(_i0, _i1,   0,   0)
#define	MTXIDX3_I8( _i0, _i1, _i2 )			MTXIDX_I8(_i0, _i1, _i2,   0)
#define	MTXIDX4_I8( _i0, _i1, _i2, _i3 )	MTXIDX_I8(_i0, _i1, _i2, _i3)

// 32bit Float Weight
#define	WEIGHT2_F32( _w0, _w1 )				(_w0), (_w1)
#define	WEIGHT3_F32( _w0, _w1, _w2 )		(_w0), (_w1), (_w2)
#define	WEIGHT4_F32( _w0, _w1, _w2, _w3 )	(_w0), (_w1), (_w2), (_w3)

// 16bit Float Weight
#define	WEIGHT2_F16( _w0, _w1 )				(_w0), (_w1)
#define	WEIGHT3_F16( _w0, _w1, _w2 )		(_w0), (_w1), (_w2)
#define	WEIGHT4_F16( _w0, _w1, _w2, _w3 )	(_w0), (_w1), (_w2), (_w3)

// 32bit (10:10:10) Pack Weight D3DDECLTYPE_DEC3N 符号ありだけど0 〜1.0の範囲
#define	WEIGHT2_PACK( _w0, _w1 )			((Uint32)((_w0) * 512) & 0x3ff), ((Uint32)((_w1) * 512) & 0x3ff), 0, 0
#define	WEIGHT3_PACK( _w0, _w1, _w2 )		((Uint32)((_w0) * 512) & 0x3ff), ((Uint32)((_w1) * 512) & 0x3ff), ((Uint32)((_w2) * 512) & 0x3ff), 0
#define	WEIGHT4_PACK( _w0, _w1, _w2, _w3 )	((Uint32)((_w0) * 512) & 0x3ff), ((Uint32)((_w1) * 512) & 0x3ff), ((Uint32)((_w2) * 512) & 0x3ff), ((Uint32)((_w3) * 512) & 0x3ff)
#define	WEIGHT2_PACK_BIN( _x, _y, _z )		(Uint32)(((Uint32)(_y * 512) & 0x3ff) << 10)	\
										  | (Uint32)(((Uint32)(_x * 512) & 0x3ff) <<  0)
#define	WEIGHT3_PACK_BIN( _x, _y, _z )		(Uint32)(((Uint32)(_z * 512) & 0x3ff) << 20)	\
										  | (Uint32)(((Uint32)(_y * 512) & 0x3ff) << 10)	\
										  | (Uint32)(((Uint32)(_x * 512) & 0x3ff) <<  0)


#define	TAN_F32( _x, _y, _z )				( _x ), ( _y ), ( _z )
#define	TAN_U32( _x, _y, _z )				( _x ), ( _y ), ( _z )

// ※D3DDECLTYPE_DEC3N（ビット位置はこれでいいのか？？？）
#define	TAN_PACK( _x, _y, _z )				NRM_PACK( _x, _y, _z )
#define	TAN_PACK_BIN( _x, _y, _z )			NRM_PACK_BIN( _x, _y, _z )

#define	BNRM_F32( _x, _y, _z )				( _x ), ( _y ), ( _z )
#define	BNRM_U32( _x, _y, _z )				( _x ), ( _y ), ( _z )

// ※D3DDECLTYPE_DEC3N（ビット位置はこれでいいのか？？？）
#define	BNRM_PACK( _x, _y, _z )				NRM_PACK( _x, _y, _z )
#define	BNRM_PACK_BIN( _x, _y, _z )			NRM_PACK_BIN( _x, _y, _z )


// Vertex descriptor
#define	VTXDESC( _fmt, _fvf, _stride, _num, _ptr, _nbone, _boneptr, _common, _data, _lock )	\
				{ (_fmt), (_fvf), (_stride), (_num), (_ptr), (_nbone), (_boneptr),  (_common), (_data), (_lock) ,  0,{ 0} }
#define	VTX_FORMAT( _fmt )					( _fmt )
#define	VTX_FVF( _fvf )						( _fvf )
#define	VTX_STRIDE( _stride )				( _stride )
#define	VTX_NUM( _num )						( _num )
#define	VTX_LISTPTR( _ptr )					( _ptr )
#define	VTX_BLEND_NUM( _num )				( _num )
#define	VTX_MTX_PTR( _ptr )					( _ptr )
#define	VTX_HDR_COMMON( _common )			(_common)
#define	VTX_HDR_DATA( _data )				(_data)
#define	VTX_HDR_LOCK( _lock )				(_lock)
#define	VTX_BUFFER( _ptr )					(_ptr)
#define	VTX_DECL( _ptr )					(_ptr)
#define	VTX_MORPHDECL( _ptr	)				(_ptr)

/* Morph target vertex descriptor */
#define	MTVTX_DESC( _vfmt, _mfmt, _stride, _num, _ptr, _nbone, _boneptr, _common, _data, _lock )	\
				{ (_vfmt), (_mfmt), (_stride), (_num), (_ptr), (_nbone), (_boneptr),  (_common), (_data), (_lock) ,  0,{  0} }
#define	MRPH_FORMAT( _fmt )					( _fmt )
#define	MTGT( _type, _ptr )					{ ( _type ), ( _ptr ) }
#define	MTGTTYPE( _type )					( _type )
#define	MTGTVTXLIST( _ptr )					( _ptr )

// Primitive descriptor
#define	SLISTDESC( _fmt, _idxnum, _primnum, _lenptr, _primptr, _index )	\
				{ (_fmt), (_idxnum), (_primnum), (_lenptr), (_primptr), (_index) }

#define	SLIST_FORMAT( _fmt )				(_fmt)
#define	SLIST_INDEX_NUM( _num )				(_num)
#define	SLIST_STRIP_NUM( _num )				(_num)
#define	SLIST_LENPTR( _ptr )				(_ptr)
#define	SLIST_IDXPTR( _ptr )				(_ptr)
#define	SLIST_IDXBUF( _ptr )				(_ptr)

#define	DLISTDESC( _fmt, _size, _ptr, _common, _data, _lock, _dsize, _asize, _intid )	\
				{ (_fmt), (_size), (_ptr), { (_common), (_data), (_lock), (_dsize), (_asize), (_intid) } }

#define	DLIST_FORMAT( _fmt )				(_fmt)
#define	DLIST_SIZE( _size )					(_size)
#define	DLIST_LISTPTR( _ptr )				(_ptr)
#define	DLIST_HDR_COMMON( _common )			(_common)
#define	DLIST_HDR_DATA( _data )				(_data)
#define	DLIST_HDR_LOCK( _lock )				(_lock)
#define	DLIST_HDR_SIZE( _size )				(_size)
#define	DLIST_HDR_ASIZE( _asize )			(_asize)
#define	DLIST_HDR_INTID( _intid )			(_intid)

// Pointer list
#define	MATLISTPTR( _type, _ptr )			{ (_type), (_ptr) }
#define	MAT_TYPE( _type )					(_type)
#define	MAT_PTR( _ptr )						(_ptr)

#define	PRIMLISTPTR( _type, _ptr )			{ (_type), (_ptr) }
#define	PRIM_TYPE( _type )					(_type)
#define	PRIM_LIST( _ptr )					(_ptr)
#define	PRIMTYPE( _type )					(_type)
#define	PRIMLIST( _ptr )					(_ptr)

#define	VTXLISTPTR( _type, _ptr )			{ (_type), (_ptr) }
#define	VTX_TYPE( _type )					(_type)
#define	VTX_LIST( _ptr )					(_ptr)
#define	VTXLISTTYPE( _type )				(_type)
#define	VTXLIST( _ptr )						(_ptr)

// Material
#define	MAT_COLOR( _diff, _ambi, _spe, _emi, _pwr )\
					{ _diff, _ambi, _spe, _emi, _pwr, 0, 0, 0}

#define	MAT_LOGIC( _benb, _src, _dst, _fac, _bop, _lop, _balpha, _afunc, _aref, _bzcomp, _zfunc, _bzupdate )	\
					{ _benb, _src, _dst, _fac, _bop, _lop, _balpha, _afunc, _aref, _bzcomp, _zfunc, _bzupdate, 0, 0, 0, 0}

#define	MAT_DESC( _flag, _user, _cptr, _lptr, _tptr )	\
					{ _flag, _user, _cptr, _lptr, _tptr, 0, 0, 0 }


#define	MAT_TEXTURE( _texmap0 )				{ _texmap0 }
#define	MAT_TEXTURE2( _texmap0, _texmap1 )	{ _texmap0 , _texmap1 }
#define	MAT_TEXTURE3( _texmap0, _texmap1, _texmap2 )	\
											{ _texmap0, _texmap1, _texmap2 }
#define	MAT_TEXTURE4( _texmap0, _texmap1, _texmap2, _texmap3 )	\
											{ _texmap0, _texmap1, _texmap2, _texmap3 }

#define	MAT_DIFFUSE( _r, _g, _b, _a )		{ (_r), (_g), (_b), (_a) }
#define	MAT_AMBIENT( _r, _g, _b, _a )		{ (_r), (_g), (_b), (_a) }
#define	MAT_SPECULAR( _r, _g, _b, _a )		{ (_r), (_g), (_b), (_a) }
#define	MAT_EMISSIVE( _r, _g, _b, _a )		{ (_r), (_g), (_b), (_a) }
#define	MAT_POWER( _power )					(_power)

#define	MAT_BLENDENABLE( _benb )			(_benb)
#define	MAT_SRCBLEND( _blend )				(_blend)
#define	MAT_DSTBLEND( _blend )				(_blend)
#define	MAT_BLENDFACTOR( _factor )			(_factor)
#define	MAT_BLENDOP( _op )					(_op)
#define	MAT_LOGICOP( _logic )				(_logic)
#define	MAT_ALPHAENABLE( _balpha )			(_balpha)
#define	MAT_ALPHAFUNC( _afunc )				(_afunc)
#define	MAT_ALPHAREF( _aref )				(_aref)
#define	MAT_ZCOMPENABLE( _zcomp )			(_zcomp)
#define	MAT_ZFUNC( _zfunc )					(_zfunc)
#define	MAT_ZUPDATEENABLE( _zupdate )		(_zupdate)

#define MAT_USER( _param )					(_param)
#define	MAT_FLAG( _flag )					(_flag)
#define	MAT_COLOR_PTR( _ptr )				(_ptr)
#define	MAT_LOGIC_PTR( _ptr )				(_ptr)
#define MAT_TEXDESC_PTR( _ptr )				(_ptr)

/* Texture map desc */
#define	MAT_TEXDESC( _flag, _idx, _offset, _blend , _pinfo)	\
					{ _flag, _idx, _offset, _blend, _pinfo, 0, 0}
#define	TEXMAP_TYPE( _type )				(_type)
#define	TEX_IDX( _idx )						(_idx)
#define	TEX_OFFSET( _u, _v )				{ (_u), (_v) }
#define	TEX_BLEND( _ratio )					(_ratio)
#define TEX_INFO_PTR( _pinfo )				( _pinfo )

#define	MAT_TEXDESC2( _flag, _idx, _offset, _blend , _pinfo, _minfil, _magfil, _mipbias, _maxmiplevel )	\
					{ _flag, _idx, _offset, _blend, _pinfo, _minfil, _magfil, _mipbias, _maxmiplevel, 0, 0, 0}

#define TEX_MINFILTER( _filter )			( _filter )
#define TEX_MAGFILTER( _filter )			( _filter )
#define TEX_MIPMAPBIAS( _bias )				( _bias )
#define TEX_MAXMIPLEVEL( _level )			( _level )

/* Effect */
#define EFFFILE( _ftype, _filename )			{ _ftype, _filename }
#define EFFFILE_TYPE( _ftype )					( _ftype )
#define EFFFILE_FILENAME( _filename )			( _filename )
#define TECHNAME( _ftype, _idx, _techname )		{ _ftype, _idx, _techname }
#define TECHNAME_TYPE( _ftype )					( _ftype )
#define TECHNAME_EFFFILE_IDX( _idx )			( _idx )
#define TECHNAME_NAME( _techname )				( _techname )

#define EFFLIST( _ftype, _neffect, _efffilelist, _ntechname, _technamelist, _nidx, _techidxlist )	\
							{ _ftype, _neffect, _efffilelist, _ntechname, _technamelist, _nidx, _techidxlist }
#define EFFLIST_TYPE( _ftype )						( _ftype )
#define EFFLIST_N_EFFFILE( _neffect )				( _neffect )
#define EFFLIST_EFFFILELIST( _efffilelist )			( _efffilelist )
#define EFFLIST_N_TECHNAME( _ntechname )			( _ntechname )
#define EFFLIST_TECHNAMELIST( _technamelist )		( _technamelist )
#define EFFLIST_N_TECHIDX( _nidx )					( _nidx )
#define EFFLIST_TECHIDXLIST( _techidxlist )			( _techidxlist )

// Material color for standard shader
#define	MAT_STD_COLOR( _flag, _ambi, _diff, _spec, _emis, _shin, _sinten )\
					 { _flag, _ambi, _diff, _spec, _emis, _shin, _sinten }

#define	MAT_STD_COLFLAG( _f )					( _f )
#define	MAT_STD_AMBIENT( _r, _g, _b, _a )		{ ( _r ), ( _g ), ( _b ), ( _a ) }
#define	MAT_STD_DIFFUSE( _r, _g, _b, _a )		{ ( _r ), ( _g ), ( _b ), ( _a ) }
#define	MAT_STD_SPECULAR( _r, _g, _b, _a )		{ ( _r ), ( _g ), ( _b ), ( _a ) }
#define	MAT_STD_EMISSION( _r, _g, _b, _a )		{ ( _r ), ( _g ), ( _b ), ( _a ) }
#define	MAT_STD_SHININESS( _shin )				( _shin )
#define	MAT_STD_SPECINTEN( _inten )				( _inten )


/*------ Standerd Shader --------------------------------------------------*/

// Material logic
#define MAT_STD_LOGIC( _flag, _srgb, _drgb, _sa, _da, _bcol, _bop, _lop, _afunc, _dfunc, _aref )	\
				{ _flag, _srgb, _drgb, _sa, _da, _bcol, _bop, _lop, _afunc, _dfunc, _aref }

#define MAT_STD_LOGFLAG( _flag )				( _flag )
#define MAT_STD_SRC_FACTOR_RGB( _sfactor )		( _sfactor )
#define MAT_STD_DST_FACTOR_RGB( _dfactor )		( _dfactor )
#define MAT_STD_SRC_FACTOR_ALPHA( _sfactor )	( _sfactor )
#define MAT_STD_DST_FACTOR_ALPHA( _dfactor )	( _dfactor )
// #define	MAT_STD_BLENDCOL( _r, _g, _b, _a )		D3DCOLOR_RGBA(_r,_g,_b,_a)
#define	MAT_STD_BLENDCOL( _argb )				( _argb )
#define MAT_STD_BLENDOP( _op )					( _op )
#define MAT_STD_LOGICOP( _op )					( _op )
#define MAT_STD_ALPHAFUNC( _func )				( _func )
#define MAT_STD_DEPTHFUNC( _func )				( _func )
#define MAT_STD_ALPHAREF( _ref )				( _ref )


// Texture mapping descriptor for standard shader
#define	TEX_STD_DESC( _type, _idx, _coord, _blend, _offset, _scl,				\
				_wraps, _wrapt, _bcol,	_fmode, _lod, _tinfo, _rsv2, _rsv1, _rsv0 )	\
					{ _type, _idx, _coord, _blend, _offset, _scl,				\
				_wraps, _wrapt, _bcol, _fmode, _lod, _tinfo, _rsv2, _rsv1, _rsv0 }

#define TEX_STD_MAPTYPE( _type )					( _type )
#define TEX_STD_INDEX( _idx )						( _idx )
#define TEX_STD_TEXCOORD( _coord )					( _coord )
#define TEX_STD_BLEND( _blend )						( _blend )
#define TEX_STD_OFFSET( _s, _t )					{ ( _s ), ( _t ) }
#define TEX_STD_SCALE( _s, _t )						{ ( _s ), ( _t ) }
#define TEX_STD_WRAP_S( _wmode )					( _wmode )
#define TEX_STD_WRAP_T( _wmode )					( _wmode )
#define TEX_STD_BORDER_COLOR( _r, _g, _b, _a )		D3DCOLOR_RGBA(_r,_g,_b,_a)
#define TEX_STD_P_FILTER_MODE( _ptr )				( _ptr )
#define TEX_STD_P_LOD_PARAM( _ptr )					( _ptr )
#define TEX_STD_P_TEX_INFO( _ptr )					( _ptr )
#define TEX_STD_RESERVED2( _rsv )					( _rsv )
#define TEX_STD_RESERVED1( _rsv )					( _rsv )
#define TEX_STD_RESERVED0( _rsv )					( _rsv )

// Material descriptor for standard shader
#define	MAT_STD_DESC( _flag, _user, _pcol, _plog, _ttype, _ntex, _ptex )	\
					{ _flag, _user, _pcol, _plog, _ttype, _ntex, _ptex }

#define	MAT_STD_FLAG( _flag )				( _flag )
#define MAT_STD_USER( _user )				( _user )
#define	MAT_STD_P_COLOR( _ptr )				( _ptr )
#define	MAT_STD_P_LOGIC( _ptr )				( _ptr )
#define	MAT_STD_TEXTYPE( _ttype )			( _ttype )
#define MAT_STD_N_TEX( _num )				( _num )
#define MAT_STD_P_TEXDESC( _ptr )			( _ptr )

#endif	//__NNTDXG20_H__

/* End of file */
