#include<ultra64.h>

extern Vtx AC_ryugu_body_v[];

extern unsigned short AC_kabuto_TX_01_txt[];
extern unsigned short AC_ryugu_TX_06_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_body[]={

	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_body_v[0], 12, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(2, 1, 3, 0),
	gsSP1Triangle(4, 1, 0, 0),
	gsSP1Triangle(0, 5, 4, 0),
	gsSP1Triangle(6, 7, 8, 0),
	gsSP1Triangle(9, 7, 6, 0),
	gsSP1Triangle(8, 7, 10, 0),
	gsSP1Triangle(10, 11, 8, 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_body_v[12], 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_ryugu_body_v[27], 3, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSPEndDisplayList(),
}; /* DXFdata */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 30 vertices */
Vtx AC_ryugu_body_v[]={
	{ 173,2,-10,0, 2459, 562, 13,-22,-117,255 },   /* v0 used p217/V1 3 times */
	{ 8,-1,-16,0, 1292, 766, -3,11,-119,255 },   /* v1 used p218/V2 3 times */
	{ 173,30,0,0, 2446, 448, 3,44,-112,255 },   /* v2 used p218/V1 2 times */
	{ 2,38,0,0, 1239, 622, -6,45,-111,255 },   /* v3 used p218/V3 2 times */
	{ 6,-34,0,0, 1324, 1022, -8,-55,-106,255 },   /* v4 used p215/V3 4 times */
	{ 173,-22,0,0, 2489, 739, 3,-45,-111,255 },   /* v5 used p215/V2 2 times */
	{ 173,30,0,0, 2446, 448, 8,44,110,255 },   /* v6 used p190/V1 2 times */
	{ 8,-1,16,0, 1292, 766, -3,11,118,255 },   /* v7 used p190/V2 3 times */
	{ 173,2,10,0, 2459, 562, 13,-22,116,255 },   /* v8 used p190/V3 3 times */
	{ 2,38,0,0, 1239, 622, -6,45,110,255 },   /* v9 used p189/V1 2 times */
	{ 6,-34,0,0, 1324, 1022, 5,-50,108,255 },   /* v10 used p187/V1 2 times */
	{ 173,-22,0,0, 2489, 739, 17,-45,109,255 },   /* v11 used p187/V2 2 times */
	{ -12,3,0,0, 356, 241, -76,-3,91,255 },   /* v12 used p233/V1 2 times */
	{ 8,-1,16,0, 511, 511, -3,11,118,255 },   /* v13 used p233/V2 2 times */
	{ 2,38,0,0, 0, 511, -6,45,110,255 },   /* v14 used p233/V3 2 times */
	{ -12,3,0,0, 55, 151, -76,-3,91,255 },   /* v15 used p234/V1 2 times */
	{ 6,-34,0,0, 512, 512, -8,-55,-106,255 },   /* v16 used p234/V2 2 times */
	{ 8,-1,16,0, 0, 511, -3,11,118,255 },   /* v17 used p234/V3 2 times */
	{ 2,38,0,0, 0, 511, -6,45,-111,255 },   /* v18 used p192/V1 2 times */
	{ 8,-1,-16,0, 511, 511, -3,11,-119,255 },   /* v19 used p192/V2 2 times */
	{ -12,3,0,0, 356, 241, -76,-3,-92,255 },   /* v20 used p192/V3 2 times */
	{ 173,30,0,0, 511, 512, 8,44,110,255 },   /* v21 used p191/V1 2 times */
	{ 173,2,10,0, 0, 512, 13,-22,116,255 },   /* v22 used p191/V2 2 times */
	{ 173,2,-10,0, 511, 0, 13,-22,-117,255 },   /* v23 used p191/V3 2 times */
	{ 173,2,-10,0, 511, 0, 13,-22,-117,255 },   /* v24 used p184/V1 2 times */
	{ 173,2,10,0, 0, 512, 13,-22,116,255 },   /* v25 used p184/V2 2 times */
	{ 173,-22,0,0, 511, 512, 17,-45,109,255 },   /* v26 used p184/V3 2 times */
	{ 8,-1,-16,0, 0, 511, -3,11,-119,255 },   /* v27 used p182/V1 2 times */
	{ 6,-34,0,0, 512, 512, -8,-55,-106,255 },   /* v28 used p182/V2 2 times */
	{ -12,3,0,0, 55, 151, -76,-3,-92,255 },   /* v29 used p182/V3 2 times */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
