#include<ultra64.h>

extern Vtx AC_Boss_FujitsuboR_v[];

extern unsigned char AC_BossTX03_CI8_txt[];
extern unsigned char AC_BossTX05_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 */


/* ======== g21 ======== */

Gfx AC_Boss_FujitsuboR[]={

	gsDPSetTextureLUT(G_TT_RGBA16),
	gsDPLoadTLUT_pal256(&AC_BossTX03_CI8_txt[1024]),
	gsDPLoadTextureBlock(AC_BossTX03_CI8_txt,G_IM_FMT_CI,G_IM_SIZ_8b,32,32,0,G_TX_WRAP,G_TX_CLAMP,5,5,0,0),

	gsSPVertex(&AC_Boss_FujitsuboR_v[0], 14, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(0, 3, 1, 0),
	gsSP1Triangle(4, 5, 6, 0),
	gsSP1Triangle(7, 4, 8, 0),
	gsSP1Triangle(4, 6, 8, 0),
	gsSP1Triangle(7, 8, 9, 0),
	gsSP1Triangle(10, 11, 12, 0),
	gsSP1Triangle(10, 13, 11, 0),
	gsSPVertex(&AC_Boss_FujitsuboR_v[14], 4, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(0, 2, 3, 0),

	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),

	gsSPVertex(&AC_Boss_FujitsuboR_v[18], 15, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(1, 0, 3, 0),
	gsSP1Triangle(4, 0, 2, 0),
	gsSP1Triangle(0, 4, 5, 0),
	gsSP1Triangle(0, 5, 3, 0),
	gsSP1Triangle(4, 6, 5, 0),
	gsSP1Triangle(1, 3, 7, 0),
	gsSP1Triangle(8, 4, 2, 0),
	gsSP1Triangle(4, 8, 6, 0),
	gsSP1Triangle(1, 9, 2, 0),
	gsSP1Triangle(9, 8, 2, 0),
	gsSP1Triangle(8, 10, 6, 0),
	gsSP1Triangle(8, 9, 10, 0),
	gsSP1Triangle(11, 12, 13, 0),
	gsSP1Triangle(12, 14, 13, 0),
	gsSP1Triangle(9, 7, 10, 0),
	gsSP1Triangle(9, 1, 7, 0),
	gsSPVertex(&AC_Boss_FujitsuboR_v[29], 1, 0),
	gsSPVertex(&AC_Boss_FujitsuboR_v[31], 4, 1),
	gsSP1Triangle(2, 3, 1, 0),
	gsSP1Triangle(3, 4, 1, 0),
	gsSP1Triangle(4, 0, 1, 0),
	gsDPPipeSync(),
        gsDPSetTextureLUT(G_TT_NONE),
	gsSPEndDisplayList(),
}; /* g21 */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 35 vertices */
Vtx AC_Boss_FujitsuboR_v[]={
	{ 114,334,156,0, 589, 90, 52,40,99,255 },   /* v0 used p1519/V1 4 times */
	{ 186,517,-61,0, 1259, 1024, 120,-1,-9,255 },   /* v1 used p1519/V3 4 times */
	{ 115,517,159,0, 585, 1024, 46,-1,110,255 },   /* v2 used p1520/V3 2 times */
	{ 184,334,-60,0, 1254, 90, 111,41,-18,255 },   /* v3 used p1519/V2 2 times */
	{ 0,334,-193,0, 877, -106, 17,41,-112,255 },   /* v4 used p1502/V1 3 times */
	{ -184,334,-60,0, 339, -106, -100,41,-51,255 },   /* v5 used p1501/V2 2 times */
	{ -186,517,-61,0, 332, 1138, -101,-1,-63,255 },   /* v6 used p1502/V2 2 times */
	{ 184,334,-60,0, 1415, -106, 111,41,-18,255 },   /* v7 used p1495/V1 4 times */
	{ 0,517,-196,0, 877, 1138, 28,-1,-117,255 },   /* v8 used p1502/V3 3 times */
	{ 186,517,-61,0, 1423, 1138, 120,-1,-9,255 },   /* v9 used p1496/V3 2 times */
	{ -114,334,156,0, 545, -106, -78,41,79,255 },   /* v10 used p1514/V1 2 times */
	{ 115,517,159,0, 1214, 1138, 46,-1,110,255 },   /* v11 used p1514/V2 2 times */
	{ -115,517,159,0, 540, 1138, -90,-1,77,255 },   /* v12 used p1514/V3 2 times */
	{ 114,334,156,0, 1210, -106, 52,40,99,255 },   /* v13 used p1513/V2 2 times */
	{ -184,334,-60,0, 346, 90, -100,41,-51,255 },   /* v14 used p1508/V1 2 times */
	{ -114,334,156,0, 1122, 90, -78,41,79,255 },   /* v15 used p1507/V2 2 times */
	{ -115,517,159,0, 1128, 1023, -90,-1,77,255 },   /* v16 used p1508/V2 2 times */
	{ -186,517,-61,0, 341, 1024, -101,-1,-63,255 },   /* v17 used p1508/V3 2 times */
	{ -210,41,287,0, 173, 402, -39,6,112,255 },   /* v18 used p1512/V1 5 times */
	{ -339,41,-108,0, -511, 365, -82,-66,-55,255 },   /* v19 used p1499/V2 5 times */
	{ 0,-204,0,0, 180, 705, 0,-119,0,255 },   /* v20 used p1510/V3 5 times */
	{ -114,334,156,0, 178, -49, -78,41,79,255 },   /* v21 used p1512/V3 3 times */
	{ 209,41,286,0, 868, 365, 95,6,72,255 },   /* v22 used p1511/V2 5 times */
	{ 114,334,156,0, 556, -69, 52,40,99,255 },   /* v23 used p1512/V2 3 times */
	{ 184,334,-60,0, 414, -101, 111,41,-18,255 },   /* v24 used p1518/V2 3 times */
	{ -184,334,-60,0, -196, -69, -100,41,-51,255 },   /* v25 used p1499/V3 6 times */
	{ 339,41,-110,0, 612, 306, 99,7,-68,255 },   /* v26 used p1517/V2 5 times */
	{ 1,41,-354,0, -241, 306, 45,-90,-63,255 },   /* v27 used p1492/V1 10 times */
	{ 0,334,-193,0, -51, -101, 17,41,-112,255 },   /* v28 used p1494/V2 3 times */
	{ -186,517,-61,0, 60, 169, 61,101,19,255 },   /* v29 used p1509/V1 2 times */
	{ -115,517,159,0, 172, 169, 38,101,-52,255 },   /* v30 used p1515/V1 2 times */
	{ 0,393,0,0, 354, 803, 0,120,0,255 },   /* v31 used p1515/V3 5 times */
	{ 115,517,159,0, 536, 169, -37,101,-52,255 },   /* v32 used p1515/V2 4 times */
	{ 186,517,-61,0, 648, 169, -60,101,19,255 },   /* v33 used p1521/V2 2 times */
	{ 0,517,-196,0, 354, 169, 0,101,63,255 },   /* v34 used p1497/V2 4 times */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
