#ifndef _NIFF2_TAGS_H_
#define _NIFF2_TAGS_H_
/* $Id: niff2tags.h,v 1.7 1998/12/24 03:14:55 yoshino Exp $ */
/**************************************************************************
 *	NIFF 2.0 TAG Definitions	 				  *
 *									  *
 *		Copyright (C) 1998, NINTENDO Co.,Ltd.			  *
 *		Copyright (C) 1998, MONEGI CORPORATION			  *
 *									  *
 **************************************************************************/
#define TAG_CI_IMG_LIST		0x00200000
#define TAG_CI_IMG		0x00200100
#define TAG_COLOR_PALETTE_LIST	0x00210000
#define TAG_COLOR_PALETTE	0x00210100
#define TAG_ENVELOPE_LIST	0x00220000
#define TAG_ENVELOPE		0x00220100
#define TAG_FULL_WEIGHTED_PART	0x00220110
#define TAG_WEIGHTED_PART	0x00220120
#define TAG_MORPH_PART		0x00220130
#define TAG_ENVELOPE_TRI	0x00220180
#define TAG_CLUSTER_LIST	0x00280000
#define TAG_CLUSTER_SHAPE	0x00280100
#define TAG_CLUSTER		0x00280110
#define TAG_CLUSTER_TRI		0x00280180
#define TAG_WEIGHT_LIST		0x00230000
#define TAG_WEIGHT_GROUP	0x00230100
#define TAG_CHAIN_ROOT_LIST	0x00240000
#define TAG_CHAIN_ROOT		0x00240100
#define TAG_JOINT_LIST		0x00250000
#define TAG_JOINT		0x00250100
#define TAG_EFFECTOR_LIST	0x00260000
#define TAG_EFFECTOR		0x00260100
#define TAG_EXTERNAL_NAME_LIST	0x00270000
#define TAG_EXTERNAL_NAME	0x00270100

/* ObjList -> obj_render_* */
enum{
    OBJ_RENDER_FLAG_NIFF   = 0x00,
    OBJ_RENDER_FLAG_N64GBI = 0x04
};

enum{
    OBJ_RENDER_TYPE0_OPA_SURF     = 0x100,
    OBJ_RENDER_TYPE0_XLU_SURF     = 0x101,
    OBJ_RENDER_TYPE0_OPA_DECAL    = 0x102,
    OBJ_RENDER_TYPE0_XLU_DECAL    = 0x103,
    OBJ_RENDER_TYPE0_OPA_INTER    = 0x104,
    OBJ_RENDER_TYPE0_XLU_INTER    = 0x105,
    OBJ_RENDER_TYPE0_TEX_EDGE     = 0x106,
    OBJ_RENDER_TYPE0_TEX_INTER    = 0x107,
    OBJ_RENDER_TYPE0_SUB_SURF     = 0x108,
    OBJ_RENDER_TYPE0_PCL_SURF     = 0x109,
    OBJ_RENDER_TYPE0_OPA_TERR     = 0x10a,
    OBJ_RENDER_TYPE0_TEX_TERR     = 0x10b,
    OBJ_RENDER_TYPE0_SUB_TERR     = 0x10c,
    OBJ_RENDER_TYPE0_CLD_SURF     = 0x10d,
    OBJ_RENDER_TYPE0_OVL_SURF     = 0x10e,
    OBJ_RENDER_TYPE0_ADD          = 0x10f,
    OBJ_RENDER_TYPE0_NOOP         = 0x110,
    OBJ_RENDER_TYPE0_PASS         = 0x111,
    OBJ_RENDER_TYPE0_FOG_SHADE_A  = 0x112,
    OBJ_RENDER_TYPE0_FOG_PRIM_A   = 0x113,

    OBJ_RENDER_TYPE1_OPA_SURF     = 0x200,
    OBJ_RENDER_TYPE1_XLU_SURF     = 0x201,
    OBJ_RENDER_TYPE1_OPA_DECAL    = 0x202,
    OBJ_RENDER_TYPE1_XLU_DECAL    = 0x203,
    OBJ_RENDER_TYPE1_OPA_INTER    = 0x204,
    OBJ_RENDER_TYPE1_XLU_INTER    = 0x205,
    OBJ_RENDER_TYPE1_TEX_EDGE     = 0x206,
    OBJ_RENDER_TYPE1_TEX_INTER    = 0x207,
    OBJ_RENDER_TYPE1_SUB_SURF     = 0x208,
    OBJ_RENDER_TYPE1_PCL_SURF     = 0x209,
    OBJ_RENDER_TYPE1_OPA_TERR     = 0x20a,
    OBJ_RENDER_TYPE1_TEX_TERR     = 0x20b,
    OBJ_RENDER_TYPE1_SUB_TERR     = 0x20c,
    OBJ_RENDER_TYPE1_CLD_SURF     = 0x20d,
    OBJ_RENDER_TYPE1_OVL_SURF     = 0x20e,
    OBJ_RENDER_TYPE1_ADD          = 0x20f,
    OBJ_RENDER_TYPE1_NOOP         = 0x210
};

/* Tex Node */
enum{
    NIFF2_TEX_FILTER_POINT   = 0x00000000,
    NIFF2_TEX_FILTER_BILERP  = 0x00000001,
    NIFF2_TEX_FILTER_AVERAGE = 0x00000002
};

enum{
    NIFF2_NO_PERSPECTIVE_CORRECTION  = 0x00000000,
    NIFF2_PERSPECTIVE_CORRECTION     = 0x00000001
};

#define    NIFF2_NO_MIPMAP	0x00000000

enum{
    NIFF2_NO_USE_COLOR_PALETTE = 0x00000000,
    NIFF2_USE_COLOR_PALETTE    = 0x00000001
};

/* AnimList -> AnimGroup */

enum{
    NIFF2_ANIM_CHANNEL_NO_USE = 0x00000000,
    NIFF2_ANIM_CHANNEL_ROTATE_AXIS = 0x00000001,
    NIFF2_ANIM_CHANNEL_ROTATE_X = 0x00000002,
    NIFF2_ANIM_CHANNEL_ROTATE_Y = 0x00000004,
    NIFF2_ANIM_CHANNEL_ROTATE_Z = 0x00000008,
    NIFF2_ANIM_CHANNEL_ORIENTATION_XY = 0x00000010,
    NIFF2_ANIM_CHANNEL_TRANSLATION = 0x00000020,
    NIFF2_ANIM_CHANNEL_UNIQUE_SCALE = 0x00000040,
    NIFF2_ANIM_CHANNEL_CLASSICAL_SCALE = 0x00000080,
    NIFF2_ANIM_CHANNEL_ORIENTATION_CONSTRAINT = 0x00000100,
    NIFF2_ANIM_CHANNEL_DIRECTION_CONSTRAINT = 0x00000200,
    NIFF2_ANIM_CHANNEL_UPVECTOR_CONSTRAINT = 0x00000400,
    NIFF2_ANIM_CHANNEL_PREFERRED_AXIS_CONSTRAINT = 0x00000800,
    NIFF2_ANIM_CHANNEL_POSITION_CONSTRAINT = 0x00001000,
    NIFF2_ANIM_CHANNEL_UNIQUE_SCALE_CONSTRAINT = 0x00002000,
    NIFF2_ANIM_CHANNEL_CLASSICAL_SCALE_CONSTRAINT = 0x00004000
};

enum{
    NIFF2_INTERPOLATION_TYPE_CONST   =   0x00000000,
    NIFF2_INTERPOLATION_TYPE_FULL    =   0x00000001,
    NIFF2_INTERPOLATION_TYPE_LINEAR  =   0x00000002,
    NIFF2_INTERPOLATION_TYPE_HERMITE =   0x00000003
};

/* CiImgList -> CiImg */

enum{
    NIFF2_CI_PIXEL_DEPTH_4  =  0x00000004,
    NIFF2_CI_PIXEL_DEPTH_8  =  0x00000008
};

/* ColorPaletteList -> ColorPalette */

enum{
    NIFF2_PALETTE_COLOR_16   =  0x00000010,
    NIFF2_PALETTE_COLOR_256  =  0x00000100
};

enum{
    NIFF2_PALETTE_RGBA16     =  0x00000000,
    NIFF2_PALETTE_IA16       =  0x00000001
};
/* JointList -> Joint */

enum{
    NIFF2_1ST_JOINT = 0x00000000,
    NIFF2_2ND_JOINT = 0x00000001,
    NIFF2_JOINT_UP  = 0x00000000,
    NIFF2_JOINT_DOWN = 0x00010000
};

#define NIFF2_NO_LINK_TO_JOINT                0xffffffff
#define NIFF2_NO_LINK_TO_EFFECTOR             0xffffffff

#endif /* ! _NIFF2_TAGS_H_ */
