#include<ultra64.h>

extern Vtx AC_ryugu_head_v[];

extern unsigned short AC_kabuto_TX_01_txt[];
extern unsigned short AC_ryugu_TX_06_txt[];
extern unsigned short AC_ryugu_TX_11_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_ryugu_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_ryugu_TX_06_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,32,32,0,7),

	gsSPVertex(&AC_ryugu_head_v[0], 16, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(2, 3, 4, 0),
	gsSP1Triangle(0, 2, 5, 0),
	gsSP1Triangle(5, 2, 4, 0),
	gsSP1Triangle(5, 4, 6, 0),
	gsSP1Triangle(7, 8, 9, 0),
	gsSP1Triangle(10, 11, 12, 0),
	gsSP1Triangle(13, 14, 15, 0),
	gsSPVertex(&AC_ryugu_head_v[16], 16, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(1, 3, 2, 0),
	gsSP1Triangle(2, 3, 7, 0),
	gsSP1Triangle(1, 8, 3, 0),
	gsSP1Triangle(3, 9, 7, 0),
	gsSP1Triangle(4, 10, 11, 0),
	gsSP1Triangle(5, 12, 13, 0),
	gsSP1Triangle(6, 14, 15, 0),

	gs_Nin_SetUpTileDescrip(G_IM_FMT_RGBA,G_IM_SIZ_16b,32,32,0,0,G_TX_CLAMP,5,0,G_TX_CLAMP,5,0),
	gs_Nin_LoadTextureImage(AC_ryugu_TX_11_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,32,32,0,7),

	gsSPVertex(&AC_ryugu_head_v[32], 6, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(3, 4, 5, 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_ryugu_head_v[38], 6, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(3, 4, 5, 0),
	gsSPEndDisplayList(),
}; /* DXFdata */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 44 vertices */
Vtx AC_ryugu_head_v[]={
	{ 151,-34,0,0, 1324, 1022, 21,-117,0,255 },   /* v0 used p221/V1 2 times */
	{ -30,-48,0,0, 61, 1328, -5,-73,-94,255 },   /* v1 used p220/V2 2 times */
	{ -32,-13,-27,0, -3, 1023, -4,-6,-120,255 },   /* v2 used p223/V1 4 times */
	{ -32,34,0,0, -14, 872, -15,58,-104,255 },   /* v3 used p223/V2 2 times */
	{ 38,46,0,0, 466, 716, 1,49,-110,255 },   /* v4 used p223/V3 3 times */
	{ 153,-1,-16,0, 1292, 766, 19,18,-117,255 },   /* v5 used p222/V1 3 times */
	{ 147,38,0,0, 1239, 622, 3,46,-111,255 },   /* v6 used p219/V3 2 times */
	{ -30,-48,0,0, -969, 562, -5,-73,-94,255 },   /* v7 used p227/V1 2 times */
	{ -124,-10,0,0, 0, 1024, -31,-48,-105,255 },   /* v8 used p227/V2 2 times */
	{ -32,-13,-27,0, -1024, 1024, -4,-6,-120,255 },   /* v9 used p227/V3 2 times */
	{ -32,-13,-27,0, -1321, 1026, -4,-6,-120,255 },   /* v10 used p236/V1 2 times */
	{ -80,13,0,0, -742, 1156, -21,62,-100,255 },   /* v11 used p236/V2 2 times */
	{ -32,34,0,0, -1225, 1264, -15,58,-104,255 },   /* v12 used p236/V3 2 times */
	{ -124,-10,0,0, 1945, 1030, -31,-48,-105,255 },   /* v13 used p234/V1 2 times */
	{ -112,6,0,0, 1825, 1149, -24,47,-108,255 },   /* v14 used p234/V2 2 times */
	{ -32,-13,-27,0, 921, 1030, -4,-6,-120,255 },   /* v15 used p234/V3 2 times */
	{ 147,38,0,0, 1239, 622, 35,48,103,255 },   /* v16 used p157/V1 2 times */
	{ 38,46,0,0, 466, 716, 1,49,109,255 },   /* v17 used p158/V1 3 times */
	{ 153,-1,16,0, 1292, 766, 19,18,116,255 },   /* v18 used p233/V1 3 times */
	{ -32,-13,27,0, -3, 1023, -4,-6,119,255 },   /* v19 used p233/V2 4 times */
	{ -32,34,0,0, -1225, 1264, -15,58,103,255 },   /* v20 used p232/V1 2 times */
	{ -32,-13,27,0, 921, 1030, -4,-6,119,255 },   /* v21 used p155/V1 2 times */
	{ -32,-13,27,0, -1024, 1024, -4,-6,119,255 },   /* v22 used p161/V1 2 times */
	{ 151,-34,0,0, 1324, 1022, 21,-117,0,255 },   /* v23 used p233/V3 2 times */
	{ -32,34,0,0, -14, 872, -15,58,103,255 },   /* v24 used p158/V2 2 times */
	{ -30,-48,0,0, 61, 1328, -5,-73,93,255 },   /* v25 used p162/V2 2 times */
	{ -80,13,0,0, -742, 1156, -21,62,99,255 },   /* v26 used p232/V2 2 times */
	{ -32,-13,27,0, -1321, 1026, -4,-6,119,255 },   /* v27 used p232/V3 2 times */
	{ -112,6,0,0, 1825, 1149, -24,47,107,255 },   /* v28 used p155/V2 2 times */
	{ -124,-10,0,0, 1945, 1030, -31,-48,104,255 },   /* v29 used p155/V3 2 times */
	{ -124,-10,0,0, 0, 1024, -31,-48,104,255 },   /* v30 used p161/V2 2 times */
	{ -30,-48,0,0, -969, 562, -5,-73,93,255 },   /* v31 used p161/V3 2 times */
	{ -80,13,0,0, 340, 44, -21,62,99,255 },   /* v32 used p170/V1 2 times */
	{ -112,6,0,0, -832, 853, -24,47,107,255 },   /* v33 used p170/V2 2 times */
	{ -32,-13,27,0, 2925, 634, -4,-6,119,255 },   /* v34 used p170/V3 2 times */
	{ -32,-13,-27,0, 2925, 634, -4,-6,-120,255 },   /* v35 used p235/V1 2 times */
	{ -112,6,0,0, -832, 853, -24,47,-108,255 },   /* v36 used p235/V2 2 times */
	{ -80,13,0,0, 340, 44, -21,62,-100,255 },   /* v37 used p235/V3 2 times */
	{ 147,38,0,0, 511, 512, 35,48,103,255 },   /* v38 used p166/V1 2 times */
	{ 153,-1,16,0, 0, 512, 19,18,116,255 },   /* v39 used p166/V2 2 times */
	{ 153,-1,-16,0, 512, 0, 19,18,-117,255 },   /* v40 used p166/V3 2 times */
	{ 153,-1,-16,0, 511, 0, 19,18,-117,255 },   /* v41 used p163/V1 2 times */
	{ 153,-1,16,0, 0, 512, 19,18,116,255 },   /* v42 used p163/V2 2 times */
	{ 151,-34,0,0, 511, 512, 21,-117,0,255 },   /* v43 used p163/V3 2 times */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
