#include<ultra64.h>

extern Vtx AC_Boss_MabutaU_v[];

extern unsigned char AC_BossTX05_CI8_txt[];
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_MabutaU[]={

	gsDPLoadTLUT_pal256(&AC_BossTX05_CI8_txt[256]),
	gsDPLoadTextureBlock(AC_BossTX05_CI8_txt,G_IM_FMT_CI,G_IM_SIZ_8b,16,16,0,G_TX_WRAP,G_TX_CLAMP,4,4,0,0),
	gsDPSetTextureLUT(G_TT_RGBA16),


	gsSPVertex(&AC_Boss_MabutaU_v[0],12,0),
	gsSP2Triangles(0, 1, 2, 0, 2, 1, 3, 0),
	gsSP2Triangles(4, 5, 2, 0, 2, 5, 6, 0),
	gsSP2Triangles(7, 8, 9, 0, 10, 7, 11, 0),
	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),

	gsSPVertex(&AC_Boss_MabutaU_v[12],16,0),
	gsSP2Triangles(0, 1, 2, 0, 2, 3, 0, 0),
	gsSP2Triangles(4, 5, 0, 0, 0, 3, 4, 0),
	gsSP2Triangles(6, 3, 2, 0, 7, 4, 3, 0),
	gsSP2Triangles(3, 6, 7, 0, 7, 5, 4, 0),
	gsSP2Triangles(7, 6, 8, 0, 6, 9, 8, 0),
	gsSP2Triangles(6, 2, 10, 0, 10, 9, 6, 0),
	gsSP2Triangles(11, 5, 7, 0, 8, 11, 7, 0),
	gsSP2Triangles(12, 5, 11, 0, 11, 8, 12, 0),
	gsSP2Triangles(12, 8, 9, 0, 9, 13, 12, 0),
	gsSP2Triangles(10, 2, 14, 0, 15, 9, 10, 0),
	gsSP2Triangles(10, 14, 15, 0, 15, 13, 9, 0),
	gsSP1Triangle(2, 1, 14, 0),
	gsDPPipeSync(),
        gsDPSetTextureLUT(G_TT_NONE),
	gsSPEndDisplayList(),
}; /* DXFdata */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 29 vertices */
Vtx AC_Boss_MabutaU_v[]={
	{   280,     0,     0,     0,    73,   336,    39,  -109,   -28,   255},	/* 0 */
	{   219,   -32,   188,     0,   246,   288,   -36,  -113,    -8,   255},	/* 1 */
	{     0,    40,   172,     0,   407,   575,     0,  -119,     5,   255},	/* 2 */
	{    88,    40,   296,     0,   431,   371,   -21,  -116,    14,   255},	/* 3 */
	{   -88,    40,   296,     0,   431,   371,    22,  -116,    14,   255},	/* 4 */
	{  -219,   -32,   188,     0,   246,   288,    37,  -113,    -8,   255},	/* 5 */
	{  -280,     0,     0,     0,    73,   336,   -38,  -109,   -28,   255},	/* 6 */
	{     0,    40,   172,     0,   450,   561,     0,  -119,     5,   255},	/* 7 */
	{  -280,     0,     0,     0,  -123,   921,   -38,  -109,   -28,   255},	/* 8 */
	{   280,     0,     0,     0,  1023,   921,    39,  -109,   -28,   255},	/* 9 */
	{   -88,    40,   296,     0,   269,   309,    22,  -116,    14,   255},	/* 10 */
	{    88,    40,   296,     0,   630,   309,   -21,  -116,    14,   255},	/* 11 */
	{  -280,     0,     0,     0,   -11,   302,  -113,    34,    11,   255},	/* 12 */
	{  -219,   -32,   188,     0,    51,   512,   -98,    34,    58,   255},	/* 13 */
	{  -181,   168,   136,     0,    89,   362,   -79,    72,    52,   255},	/* 14 */
	{  -218,   201,   -34,     0,    51,   171,   -82,    85,   -12,   255},	/* 15 */
	{  -175,   152,  -208,     0,    96,    15,   -86,    21,   -80,   255},	/* 16 */
	{     0,   -88,  -344,     0,   275,   -10,     0,    -3,  -120,   255},	/* 17 */
	{     0,   312,   -40,     0,   274,   111,     0,   120,    10,   255},	/* 18 */
	{     0,   240,  -240,     0,   275,   -59,     0,    87,   -82,   255},	/* 19 */
	{   218,   201,   -34,     0,   498,   170,    83,    85,   -12,   255},	/* 20 */
	{   181,   168,   136,     0,   460,   362,    80,    72,    52,   255},	/* 21 */
	{     0,   224,   216,     0,   275,   418,     0,    93,    74,   255},	/* 22 */
	{   175,   152,  -208,     0,   453,    15,    87,    21,   -80,   255},	/* 23 */
	{   280,     0,     0,     0,   561,   302,    39,  -109,   -28,   255},	/* 24 */
	{   219,   -32,   188,     0,   499,   512,    99,    34,    58,   255},	/* 25 */
	{   -88,    40,   296,     0,   185,   589,   -49,    53,    94,   255},	/* 26 */
	{    88,    40,   296,     0,   365,   588,    50,    53,    94,   255},	/* 27 */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
