#include<ultra64.h>

extern Vtx AC_Boss_PearlGunL_v[];

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 */


/* ======== DXFdata ======== */

Gfx AC_Boss_PearlGunL[]={

	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_PearlGunL_v[0],21,0),
	gsSP2Triangles(0, 1, 2, 0, 3, 0, 4, 0),
	gsSP2Triangles(2, 5, 0, 0, 5, 4, 0, 0),
	gsSP2Triangles(6, 0, 3, 0, 0, 6, 1, 0),
	gsSP2Triangles(7, 1, 6, 0, 7, 6, 8, 0),
	gsSP2Triangles(8, 6, 3, 0, 4, 9, 10, 0),
	gsSP2Triangles(5, 9, 4, 0, 4, 10, 3, 0),
	gsSP2Triangles(3, 10, 9, 0, 9, 11, 3, 0),
	gsSP2Triangles(3, 11, 12, 0, 3, 12, 8, 0),
	gsSP2Triangles(11, 5, 2, 0, 11, 9, 5, 0),
	gsSP2Triangles(13, 12, 11, 0, 2, 13, 11, 0),
	gsSP2Triangles(12, 13, 14, 0, 8, 12, 14, 0),
	gsSP2Triangles(14, 7, 8, 0, 15, 16, 17, 0),
	gsSP2Triangles(17, 18, 15, 0, 18, 19, 15, 0),
	gsSP2Triangles(20, 16, 15, 0, 15, 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_PearlGunL_v[]={
	{   287,   118,    37,     0,    61,   286,    55,  -102,    26,   255},	/* 0 */
	{   199,   296,   451,     0,   768,   410,    91,   -61,    46,   255},	/* 1 */
	{    70,   304,   458,     0,   782,   527,   -81,   -78,    38,   255},	/* 2 */
	{   144,   155,  -246,     0,  -311,   214,    68,   -72,   -66,   255},	/* 3 */
	{   -56,   -63,    98,     0,    12,   848,    49,  -108,     6,   255},	/* 4 */
	{    46,   176,   149,     0,   257,   513,   -46,   -67,    86,   255},	/* 5 */
	{   355,   242,   -60,     0,    15,    27,   119,   -17,    -1,   255},	/* 6 */
	{   240,   411,   407,     0,   790,   216,   114,    30,    21,   255},	/* 7 */
	{   310,   389,   -96,     0,    69,  -117,    82,    79,   -37,   255},	/* 8 */
	{  -159,    28,    68,     0,    33,   824,  -106,    11,   -53,   255},	/* 9 */
	{   -65,   -26,   -88,     0,  -221,   706,    67,   -96,   -22,   255},	/* 10 */
	{    12,   364,   -44,     0,   119,   222,  -108,    44,   -21,   255},	/* 11 */
	{   156,   420,  -118,     0,    58,   -19,   -23,   109,   -43,   255},	/* 12 */
	{    57,   423,   409,     0,   798,   377,   -78,    90,    -3,   255},	/* 13 */
	{   177,   468,   389,     0,   803,   202,    15,   119,    -7,   255},	/* 14 */
	{   151,   342,   298,     0,   263,   676,   -66,    72,    68,   255},	/* 15 */
	{   199,   296,   451,     0,   348,   163,   -48,   100,    44,   255},	/* 16 */
	{   240,   411,   407,     0,     0,   203,   -95,    13,    69,   255},	/* 17 */
	{   177,   468,   389,     0,   -31,   176,    -3,   -69,    97,   255},	/* 18 */
	{    57,   423,   409,     0,   276,   103,    83,   -18,    83,   255},	/* 19 */
	{    70,   304,   458,     0,   546,    69,    63,    88,    52,   255},	/* 20 */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
