#include<ultra64.h>

extern Vtx AC_protect_head_v[];

extern unsigned short AC_ankou_TX_015_txt[];
extern unsigned short AC_kabuto_TX_01_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_head[]={

	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_ankou_TX_015_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,32,32,0,7),

	gsSPVertex(&AC_protect_head_v[0], 15, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(3, 4, 5, 0),
	gsSP1Triangle(6, 7, 8, 0),
	gsSP1Triangle(9, 10, 11, 0),
	gsSP1Triangle(12, 13, 14, 0),
	gsSPVertex(&AC_protect_head_v[15], 15, 0),
	gsSP1Triangle(0, 5, 6, 0),
	gsSP1Triangle(1, 7, 8, 0),
	gsSP1Triangle(2, 9, 10, 0),
	gsSP1Triangle(3, 11, 12, 0),
	gsSP1Triangle(4, 13, 14, 0),

	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_head_v[30], 15, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(3, 4, 5, 0),
	gsSP1Triangle(6, 7, 8, 0),
	gsSP1Triangle(9, 10, 11, 0),
	gsSP1Triangle(12, 13, 14, 0),
	gsSPVertex(&AC_protect_head_v[45], 6, 0),
	gsSP1Triangle(0, 2, 3, 0),
	gsSP1Triangle(1, 4, 5, 0),
	gsSPEndDisplayList(),
}; /* DXFdata */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 51 vertices */
Vtx AC_protect_head_v[]={
	{ 38,-1,0,0, 509, -16, 114,-36,0,255 },   /* v0 used p129FuhE[2].HN[0]Frp134/V1 2 times */*B
	{ 35,18,-9,0, 0, 1024, 56,25,-103,255 },   /* v1 used p129FuhE[2].HN[0]Frp134/V2 2 times */*B
	{ 35,18,9,0, 1024, 1024, 70,11,96,255 },   /* v2 used p129FuhE[2].HN[0]Frp134/V3 2 times */*B
	{ 35,18,9,0, 0, 1024, 70,11,96,255 },   /* v3 used p131/V1 2 times */
	{ 4,2,15,0, 1024, 0, 7,30,115,255 },   /* v4 used p131/V2 2 times */
	{ 15,-34,16,0, 1024, 1023, 68,-18,96,255 },   /* v5 used p131/V3 2 times */
	{ 4,2,15,0, 1024, 0, 7,30,115,255 },   /* v6 used p134/V1 2 times */
	{ 35,18,9,0, 0, 1023, -19,74,91,255 },   /* v7 used p134/V2 2 times */
	{ 23,26,0,0, 1024, 1023, -117,19,0,255 },   /* v8 used p134/V3 2 times */
	{ 23,26,0,0, 514, 240, 73,96,0,255 },   /* v9 used p135/V1 2 times */
	{ 35,18,9,0, 0, 1024, 70,11,96,255 },   /* v10 used p135/V2 2 times */
	{ 35,18,-9,0, 1024, 1024, 56,25,-103,255 },   /* v11 used p135/V3 2 times */
	{ 38,-1,0,0, 0, 1024, 114,-36,0,255 },   /* v12 used p137/V1 2 times */
	{ 15,-34,16,0, 1023, 0, 68,-18,96,255 },   /* v13 used p137/V2 2 times */
	{ 17,-41,0,0, 1023, 1024, 107,-54,0,255 },   /* v14 used p137/V3 2 times */
	{ 35,18,-9,0, 1024, 1024, 56,25,-103,255 },   /* v15 used p130/V1 2 times */
	{ 38,-1,0,0, 0, 1023, 114,-36,0,255 },   /* v16 used p132/V1 2 times */
	{ 17,-41,0,0, 1023, 1023, 107,-54,0,255 },   /* v17 used p125/V1 2 times */
	{ 35,18,-9,0, 0, 1024, 56,25,-103,255 },   /* v18 used p127/V1 2 times */
	{ 35,18,-9,0, 0, 1023, 56,25,-103,255 },   /* v19 used p126/V1 2 times */
	{ 38,-1,0,0, 0, 1023, 114,-36,0,255 },   /* v20 used p130/V2 2 times */
	{ 15,-34,-16,0, 1024, 0, 68,-18,-97,255 },   /* v21 used p130/V3 2 times */
	{ 35,18,9,0, 1023, 1024, 70,11,96,255 },   /* v22 used p132/V2 2 times */
	{ 15,-34,16,0, 1023, 0, 68,-18,96,255 },   /* v23 used p132/V3 2 times */
	{ 15,-34,-16,0, 1023, 0, 68,-18,-97,255 },   /* v24 used p125/V2 2 times */
	{ 38,-1,0,0, 0, 1023, 114,-36,0,255 },   /* v25 used p125/V3 2 times */
	{ 4,2,-15,0, 1024, 0, 8,29,-116,255 },   /* v26 used p127/V2 2 times */
	{ 23,26,0,0, 1024, 1024, -117,19,0,255 },   /* v27 used p127/V3 2 times */
	{ 15,-34,-16,0, 1024, 1023, 68,-18,-97,255 },   /* v28 used p126/V2 2 times */
	{ 4,2,-15,0, 1024, 0, 8,29,-116,255 },   /* v29 used p126/V3 2 times */
	{ 12,4,-13,0, 512, 512, -29,74,-90,255 },   /* v30 used p230/V1 2 times */
	{ 3,16,0,0, 312, 199, -29,74,-90,255 },   /* v31 used p230/V2 2 times */
	{ 25,25,0,0, 0, 512, -29,74,-90,255 },   /* v32 used p230/V3 2 times */
	{ 23,26,0,0, 0, 512, -117,19,0,255 },   /* v33 used p249/V1 2 times */
	{ 15,-34,-16,0, 512, 0, -96,-4,69,255 },   /* v34 used p249/V2 2 times */
	{ 17,-41,0,0, 512, 512, -118,11,0,255 },   /* v35 used p249/V3 2 times */
	{ 23,26,0,0, 0, 511, -117,19,0,255 },   /* v36 used p248/V1 2 times */
	{ 4,2,-15,0, 512, 512, -56,-18,103,255 },   /* v37 used p248/V2 2 times */
	{ 15,-34,-16,0, 512, 0, -96,-4,69,255 },   /* v38 used p248/V3 2 times */
	{ 17,-41,0,0, 512, 512, -118,11,0,255 },   /* v39 used p122/V1 2 times */
	{ 15,-34,16,0, 512, 0, -96,-4,-70,255 },   /* v40 used p122/V2 2 times */
	{ 23,26,0,0, 0, 512, -117,19,0,255 },   /* v41 used p122/V3 2 times */
	{ 12,4,-13,0, 0, 512, -93,-74,0,255 },   /* v42 used p138/V1 2 times */
	{ 12,4,13,0, 512, 512, -93,-74,0,255 },   /* v43 used p138/V2 2 times */
	{ 3,16,0,0, 255, 211, -93,-74,0,255 },   /* v44 used p138/V3 2 times */
	{ 15,-34,16,0, 512, 0, -96,-4,-70,255 },   /* v45 used p136/V1 2 times */
	{ 3,16,0,0, 312, 226, -29,74,89,255 },   /* v46 used p124/V1 2 times */
	{ 4,2,15,0, 512, 512, -56,-18,-104,255 },   /* v47 used p136/V2 2 times */
	{ 23,26,0,0, 0, 511, -117,19,0,255 },   /* v48 used p136/V3 2 times */
	{ 12,4,13,0, 102, 503, -29,74,89,255 },   /* v49 used p124/V2 2 times */
	{ 25,25,0,0, 605, 552, -29,74,89,255 },   /* v50 used p124/V3 2 times */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
