#include<ultra64.h>

extern Vtx AC_ankou_tail_v[];

extern unsigned short AC_ankou_TX_002_txt[];
extern unsigned short AC_ankou_TX_06_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_ankou_tail[]={

	gs_Nin_SetUpTileDescrip(G_IM_FMT_RGBA,G_IM_SIZ_16b,32,32,0,0,G_TX_WRAP,5,0,G_TX_WRAP,5,0),
	gs_Nin_LoadTextureImage(AC_ankou_TX_06_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,32,32,0,7),


	gsSPVertex(&AC_ankou_tail_v[0],12,0),
	gsSP2Triangles(0, 1, 2, 0, 3, 4, 5, 0),
	gsSP2Triangles(6, 7, 8, 0, 9, 10, 11, 0),
	gs_Nin_LoadTextureImage(AC_ankou_TX_002_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,32,32,0,7),

	gsSPVertex(&AC_ankou_tail_v[12],17,0),
	gsSP2Triangles(0, 1, 2, 0, 0, 3, 4, 0),
	gsSP2Triangles(5, 6, 7, 0, 8, 9, 10, 0),
	gsSP2Triangles(11, 12, 13, 0, 14, 15, 16, 0),
	gsSPEndDisplayList(),
}; /* DXFdata */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 29 vertices */
Vtx AC_ankou_tail_v[]={
	{    71,    25,     0,     0,   511,   -41,    72,    96,     0,   255},	/* 0 */
	{    71,   -34,    26,     0,     0,  1024,    88,   -32,    73,   255},	/* 1 */
	{    71,   -34,   -26,     0,  1023,  1024,    49,  -109,     0,   255},	/* 2 */
	{   -55,     0,     0,     0,   411,   444,   -45,    53,   -97,   255},	/* 3 */
	{     2,    50,     0,     0,     0,  1023,   -10,    57,  -105,   255},	/* 4 */
	{     2,   -45,   -51,     0,  1023,  1023,     0,    55,  -107,   255},	/* 5 */
	{   -55,     0,     0,     0,   512,   303,   -74,   -92,     0,   255},	/* 6 */
	{     2,   -45,   -51,     0,     0,  1024,   -30,  -115,     0,   255},	/* 7 */
	{     2,   -45,    51,     0,  1024,  1024,   -20,  -117,     0,   255},	/* 8 */
	{     2,   -45,    51,     0,     0,  1024,     0,    55,   106,   255},	/* 9 */
	{     2,    50,     0,     0,  1024,  1024,   -10,    57,   104,   255},	/* 10 */
	{   -55,     0,     0,     0,   612,   444,   -45,    53,    96,   255},	/* 11 */
	{     2,   -45,    51,     0,  6615,  9271,     0,    55,   106,   255},	/* 12 */
	{    71,   -34,    26,     0,  7835, 10801,    88,   -32,    73,   255},	/* 13 */
	{    71,    25,     0,     0,  9386, 10159,    72,    96,     0,   255},	/* 14 */
	{     2,   -45,   -51,     0,  9306,  9271,   -30,  -115,     0,   255},	/* 15 */
	{    71,   -34,   -26,     0,  8633,  7434,    49,  -109,     0,   255},	/* 16 */
	{    71,   -34,   -26,     0,  7983,  8318,    49,  -109,     0,   255},	/* 17 */
	{    71,   -34,    26,     0,  6637,  8318,    88,   -32,    73,   255},	/* 18 */
	{     2,   -45,    51,     0,  5964, 10155,   -20,  -117,     0,   255},	/* 19 */
	{    71,    25,     0,     0,  7680,  7300,    72,    96,     0,   255},	/* 20 */
	{    71,   -34,   -26,     0,  8159,  8909,    32,    46,  -106,   255},	/* 21 */
	{     2,   -45,   -51,     0, 10116,  8892,     0,    55,  -107,   255},	/* 22 */
	{     2,   -45,   -51,     0,  8744,  9271,     0,    55,  -107,   255},	/* 23 */
	{     2,    50,     0,     0,  7378, 11739,   -10,    57,  -105,   255},	/* 24 */
	{    71,    25,     0,     0,  9260, 12136,    72,    96,     0,   255},	/* 25 */
	{    71,    25,     0,     0,  7679,  7300,    72,    96,     0,   255},	/* 26 */
	{     2,    50,     0,     0,  7680,  9224,   -10,    57,   104,   255},	/* 27 */
	{     2,   -45,    51,     0, 10376,  8396,     0,    55,   106,   255},	/* 28 */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
