#include<ultra64.h>

extern Vtx AC_Boss_Nenmaku_v[];

extern unsigned char AC_BossTX07_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_Nenmaku[]={

	gsDPLoadTLUT_pal256(&AC_BossTX07_CI8_txt[1024]),
	gsDPLoadTextureBlock(AC_BossTX07_CI8_txt,G_IM_FMT_CI,G_IM_SIZ_8b,32,32,0,G_TX_WRAP,G_TX_CLAMP,5,5,0,0),
	gsDPSetTextureLUT(G_TT_RGBA16),

	gsSPVertex(&AC_Boss_Nenmaku_v[0],17,0),
	gsSP2Triangles(0, 1, 2, 0, 2, 3, 0, 0),
	gsSP2Triangles(3, 4, 0, 0, 5, 0, 6, 0),
	gsSP2Triangles(5, 1, 0, 0, 0, 4, 6, 0),
	gsSP2Triangles(7, 4, 8, 0, 6, 4, 7, 0),
	gsSP2Triangles(8, 4, 3, 0, 9, 6, 7, 0),
	gsSP2Triangles(6, 9, 5, 0, 10, 5, 9, 0),
	gsSP2Triangles(1, 5, 10, 0, 2, 1, 11, 0),
	gsSP2Triangles(11, 1, 10, 0, 11, 12, 13, 0),
	gsSP2Triangles(13, 12, 8, 0, 13, 2, 11, 0),
	gsSP2Triangles(13, 3, 2, 0, 8, 3, 13, 0),
	gsSP2Triangles(11, 14, 12, 0, 11, 10, 14, 0),
	gsSP2Triangles(14, 10, 15, 0, 15, 16, 14, 0),
	gsSP2Triangles(14, 16, 12, 0, 12, 16, 8, 0),
	gsSP2Triangles(7, 8, 16, 0, 15, 7, 16, 0),
	gsSP2Triangles(15, 10, 9, 0, 9, 7, 15, 0),
	gsDPPipeSync(),
        gsDPSetTextureLUT(G_TT_NONE),
	gsSPEndDisplayList(),
}; /* DXFdata */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 17 vertices */
Vtx AC_Boss_Nenmaku_v[]={
	{     0,  -318,  1062,     0,  1024,  1777,     0,  -114,    33,   255},	/* 0 */
	{  -422,   -51,  1030,     0,  -417,  1230,  -103,   -48,    33,   255},	/* 1 */
	{  -287,  -300,   512,     0,    45,  1740,   -53,  -103,   -27,   255},	/* 2 */
	{   287,  -300,   512,     0,  2002,  1740,    54,  -103,   -27,   255},	/* 3 */
	{   418,   -51,  1030,     0,  2449,  1230,   104,   -48,    34,   255},	/* 4 */
	{  -165,   -45,  1443,     0,   459,  1219,   -75,   -32,    86,   255},	/* 5 */
	{   164,   -45,  1443,     0,  1582,  1219,    76,   -32,    86,   255},	/* 6 */
	{   338,   392,  1008,     0,  2178,   323,    96,    63,    33,   255},	/* 7 */
	{   478,    76,   512,     0,  2655,   970,   112,    17,   -40,   255},	/* 8 */
	{     0,   256,  1456,     0,  1024,   602,     0,    65,   100,   255},	/* 9 */
	{  -338,   392,  1008,     0,  -130,   323,   -95,    64,    33,   255},	/* 10 */
	{  -478,    76,   512,     0,  -607,   970,  -111,    17,   -41,   255},	/* 11 */
	{     0,   251,    10,     0,  1023,   613,     0,    79,   -90,   255},	/* 12 */
	{     0,    -3,   -78,     0,  1024,  1131,    61,   -68,   -77,   255},	/* 13 */
	{  -156,   488,   480,     0,   490,   126,   -58,   100,   -32,   255},	/* 14 */
	{     0,   552,  1136,     0,  1024,    -4,     0,   117,    26,   255},	/* 15 */
	{   156,   488,   480,     0,  1557,   126,    59,   100,   -32,   255},	/* 16 */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
