#include<ultra64.h>

extern Vtx AC_protect_body_v[];

extern unsigned short AC_kabuto_TX_01_txt[];
extern unsigned short AC_protect_TX_02_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_protect_body[]={

	gs_Nin_SetUpTileDescrip(G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,0,G_TX_WRAP,4,0,G_TX_WRAP,4,0),
	gs_Nin_LoadTextureImage(AC_kabuto_TX_01_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&AC_protect_body_v[0], 6, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(3, 4, 5, 0),

	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_protect_TX_02_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,32,32,0,7),

	gsSPVertex(&AC_protect_body_v[6], 16, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(3, 1, 4, 0),
	gsSP1Triangle(5, 6, 7, 0),
	gsSP1Triangle(8, 9, 10, 0),
	gsSP1Triangle(11, 12, 8, 0),
	gsSP1Triangle(13, 14, 15, 0),
	gsSPVertex(&AC_protect_body_v[19], 1, 0),
	gsSPVertex(&AC_protect_body_v[21], 7, 1),
	gsSPVertex(&AC_protect_body_v[30], 8, 8),
	gsSP1Triangle(1, 2, 0, 0),
	gsSP1Triangle(3, 8, 4, 0),
	gsSP1Triangle(4, 8, 9, 0),
	gsSP1Triangle(5, 10, 11, 0),
	gsSP1Triangle(6, 12, 13, 0),
	gsSP1Triangle(7, 14, 15, 0),
	gsSPVertex(&AC_protect_body_v[28], 2, 0),
	gsSPVertex(&AC_protect_body_v[38], 4, 2),
	gsSP1Triangle(0, 2, 3, 0),
	gsSP1Triangle(1, 4, 5, 0),
	gsSPEndDisplayList(),
}; /* DXFdata */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 42 vertices */
Vtx AC_protect_body_v[]={
	{ 10,23,0,0, 0, 512, -60,103,0,255 },   /* v0 used p146/V1 2 times */
	{ -13,-17,0,0, 511, 0, -86,-82,4,255 },   /* v1 used p146/V2 2 times */
	{ 3,0,20,0, 511, 512, -51,45,97,255 },   /* v2 used p146/V3 2 times */
	{ 3,0,-20,0, 512, 511, -53,44,-98,255 },   /* v3 used p139/V1 2 times */
	{ -13,-17,0,0, 511, 0, -100,59,-28,255 },   /* v4 used p139/V2 2 times */
	{ 10,23,0,0, 0, 511, -60,103,0,255 },   /* v5 used p139/V3 2 times */
	{ 3,0,-20,0, -415, 1274, -53,44,-98,255 },   /* v6 used p221/V1 2 times */
	{ 10,23,0,0, 393, 1192, -60,103,0,255 },   /* v7 used p221/V2 4 times */
	{ 50,23,-16,0, 299, 97, 38,83,-78,255 },   /* v8 used p221/V3 2 times */
	{ 50,24,15,0, 299, 97, 39,84,75,255 },   /* v9 used p225/V1 2 times */
	{ 3,0,20,0, -415, 1274, -51,45,97,255 },   /* v10 used p225/V3 2 times */
	{ 45,-20,-38,0, 1419, 1580, 6,-35,-114,255 },   /* v11 used p226/V1 2 times */
	{ 3,0,-20,0, 0, 1024, -53,44,-98,255 },   /* v12 used p226/V2 2 times */
	{ 50,23,-16,0, 1309, 79, 38,83,-78,255 },   /* v13 used p226/V3 2 times */
	{ -13,-17,0,0, 481, 2489, -86,-82,4,255 },   /* v14 used p227/V1 2 times */
	{ 3,0,-20,0, -96, 2130, -53,44,-98,255 },   /* v15 used p227/V2 2 times */
	{ 45,-20,-38,0, 0, 1023, 6,-35,-114,255 },   /* v16 used p227/V3 2 times */
	{ 45,-20,38,0, 0, 1023, 8,-33,114,255 },   /* v17 used p153/V1 2 times */
	{ 3,0,20,0, -96, 2130, -51,45,97,255 },   /* v18 used p153/V2 2 times */
	{ 43,-56,0,0, 1186, 1258, -29,-112,27,255 },   /* v19 used p228/V3 2 times */
	{ 45,-20,38,0, 70, 917, 8,-33,114,255 },   /* v20 used p151/V2 2 times */
	{ -13,-17,0,0, 248, 2452, -86,-82,4,255 },   /* v21 used p228/V1 2 times */
	{ 45,-20,-38,0, 70, 917, 6,-35,-114,255 },   /* v22 used p228/V2 2 times */
	{ 45,-20,-38,0, 1365, 1580, 6,-35,-114,255 },   /* v23 used p229/V1 2 times */
	{ 43,-56,0,0, 1203, 170, 65,-74,-68,255 },   /* v24 used p229/V3 2 times */
	{ 45,-20,38,0, 0, 1023, 8,-33,114,255 },   /* v25 used p247/V1 2 times */
	{ 84,-20,-1,0, -693, -697, 115,17,-28,255 },   /* v26 used p142/V1 2 times */
	{ 50,24,15,0, 326, 146, 39,84,75,255 },   /* v27 used p144/V1 2 times */
	{ 50,23,-16,0, 739, 125, 38,83,-78,255 },   /* v28 used p143/V1 2 times */
	{ 50,24,15,0, 1309, 79, 39,84,75,255 },   /* v29 used p145/V1 2 times */
	{ 84,-20,-1,0, 0, 1024, 115,17,-28,255 },   /* v30 used p229/V2 2 times */
	{ 45,-20,38,0, 1365, 1580, 8,-33,114,255 },   /* v31 used p140/V3 2 times */
	{ 84,-20,-1,0, -589, -117, 115,17,-28,255 },   /* v32 used p247/V2 2 times */
	{ 50,24,15,0, 739, 125, 39,84,75,255 },   /* v33 used p247/V3 2 times */
	{ 50,23,-16,0, 18, 688, 38,83,-78,255 },   /* v34 used p142/V2 2 times */
	{ 50,24,15,0, 627, 128, 39,84,75,255 },   /* v35 used p142/V3 2 times */
	{ 50,23,-16,0, 183, 784, 38,83,-78,255 },   /* v36 used p144/V2 2 times */
	{ 10,23,0,0, 1081, 653, -60,103,0,255 },   /* v37 used p144/V3 2 times */
	{ 84,-20,-1,0, -589, -117, 115,17,-28,255 },   /* v38 used p143/V2 2 times */
	{ 45,-20,-38,0, 0, 1023, 6,-35,-114,255 },   /* v39 used p143/V3 2 times */
	{ 3,0,20,0, 0, 1024, -51,45,97,255 },   /* v40 used p145/V2 2 times */
	{ 45,-20,38,0, 1419, 1580, 8,-33,114,255 },   /* v41 used p145/V3 2 times */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
