#include<ultra64.h>

extern Vtx AC_Boss_EyeDodai_v[];

extern unsigned char AC_BossTX06_CI8_txt[];



#define gs_Nin_LoadTextureImage(timg,fmt,siz,width,height,tmem,tt)	\
	gsDPSetTextureImage(fmt,siz,1,timg),	\
	gsDPTileSync(),	\
	gsDPSetTile(fmt,siz,0,tmem,tt,0,0,0,0,0,0,0),	\
	gsDPLoadSync(),	\
	gsDPLoadBlock(tt,0,0,width*height-1,CALC_DXT(width,siz##_BYTES))

#define gs_Nin_SetUpTileDescrip(fmt,siz,width,height,tmem,tt,cs,ms,ss,ct,mt,st)	\
	gsDPTileSync(),	\
	gsDPSetTile(fmt,siz,((((width)*siz##_LINE_BYTES)+7)>>3),tmem,tt,0,ct,mt,st,cs,ms,ss),	\
	gsDPSetTileSize(tt,0,0,(width-1)<<G_TEXTURE_IMAGE_FRAC,(height-1)<<G_TEXTURE_IMAGE_FRAC)

#define G_CC_PRIMSHADE PRIMITIVE,0,SHADE,0,0,0,0,SHADE

/* main display list */


/* ======== DXFdata ======== */

Gfx AC_Boss_EyeDodai[]={

	gsDPLoadTLUT_pal256(&AC_BossTX06_CI8_txt[256]),
	gsDPLoadTextureBlock(AC_BossTX06_CI8_txt,G_IM_FMT_CI,G_IM_SIZ_8b,16,16,0,G_TX_WRAP,G_TX_WRAP,4,4,0,0),
	gsDPSetTextureLUT(G_TT_RGBA16),

	gsSPVertex(&AC_Boss_EyeDodai_v[0],21,0),
	gsSP2Triangles(0, 1, 2, 0, 1, 0, 3, 0),
	gsSP2Triangles(2, 1, 4, 0, 5, 0, 2, 0),
	gsSP2Triangles(5, 6, 0, 0, 3, 0, 6, 0),
	gsSP2Triangles(7, 8, 9, 0, 7, 10, 8, 0),
	gsSP2Triangles(10, 11, 8, 0, 8, 12, 9, 0),
	gsSP2Triangles(12, 8, 11, 0, 13, 6, 5, 0),
	gsSP2Triangles(14, 15, 16, 0, 17, 15, 12, 0),
	gsSP2Triangles(9, 15, 14, 0, 15, 17, 16, 0),
	gsSP2Triangles(9, 12, 15, 0, 18, 19, 20, 0),
	gsDPPipeSync(),
        gsDPSetTextureLUT(G_TT_NONE),
	gsSPEndDisplayList(),
}; /* DXFdata */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 21 vertices */
Vtx AC_Boss_EyeDodai_v[]={
	{     0,  -120,   208,     0,   244,   600,     0,  -103,    58,   255},	/* 0 */
	{   216,   -56,    80,     0,   521,   663,    88,   -76,    27,   255},	/* 1 */
	{    97,   174,   263,     0,   368,   161,    54,   -32,   101,   255},	/* 2 */
	{     0,   -64,  -256,     0,   244,  1053,    20,   -91,   -74,   255},	/* 3 */
	{   280,   320,   160,     0,   602,    92,   117,     2,    26,   255},	/* 4 */
	{   -97,   174,   263,     0,   120,   161,   -53,   -33,   101,   255},	/* 5 */
	{  -211,   -56,    80,     0,   -25,   663,   -87,   -76,    27,   255},	/* 6 */
	{   115,   472,   -40,     0,  -555,   211,    76,    67,   -65,   255},	/* 7 */
	{   291,   136,   -79,     0,    82,   336,    96,     5,   -71,   255},	/* 8 */
	{     0,   392,  -180,     0,  -335,    69,     0,    39,  -113,   255},	/* 9 */
	{   280,   320,   160,     0,  -381,   553,   117,     2,    26,   255},	/* 10 */
	{   216,   -56,    80,     0,   351,   646,    88,   -76,    27,   255},	/* 11 */
	{     0,   -64,  -256,     0,   542,   209,   -52,    18,  -106,   255},	/* 12 */
	{  -280,   320,   160,     0,  -114,    92,  -116,     1,    27,   255},	/* 13 */
	{  -115,   472,   -40,     0,  -555,   211,   -75,    67,   -65,   255},	/* 14 */
	{  -291,   136,   -79,     0,    82,   336,   -96,     4,   -71,   255},	/* 15 */
	{  -280,   320,   160,     0,  -381,   553,  -116,     1,    27,   255},	/* 16 */
	{  -211,   -56,    80,     0,   351,   646,   -87,   -76,    27,   255},	/* 17 */
	{  -115,   472,   -40,     0,   290,   426,   -75,    67,   -65,   255},	/* 18 */
	{   115,   472,   -40,     0,    63,   529,    76,    67,   -65,   255},	/* 19 */
	{     0,   392,  -180,     0,   220,   608,     0,    39,  -113,   255},	/* 20 */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
