#include<ultra64.h>

extern Vtx ManWaist_3c_v[];
extern Vtx ManWaist_3c_vmcur[];
extern Tri ManWaist_3c_tri[];
extern Lights1 ManWaist_3c_material[];
extern Mtx ManWaist_3c_matrix[];

extern unsigned short Sshoes_bottom_txt[];
extern unsigned short St3_hand_txt[];
extern unsigned short St3best_b_txt[];
extern unsigned short St3best_f_txt[];
extern unsigned short St3best_s_txt[];
extern unsigned short St3best_t_txt[];
extern unsigned short St3farm_txt[];
extern unsigned short St3hara_txt[];
extern unsigned short St3met_b_txt[];
extern unsigned short St3met_f_txt[];
extern unsigned short St3met_gl_txt[];
extern unsigned short St3met_s_txt[];
extern unsigned short St3neck_txt[];
extern unsigned short St3shin_txt[];
extern unsigned short St3shoe_txt[];
extern unsigned short St3shoe_b_txt[];
extern unsigned short St3thigh_b_txt[];
extern unsigned short St3thigh_f_txt[];
extern unsigned short St3uarm_b_txt[];
extern unsigned short St3uarm_f_txt[];
extern unsigned short St3waist_b_txt[];
extern unsigned short St3waist_f_txt[];
extern unsigned short St3waist_s_txt[];
extern unsigned short black_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 */


/* ======== g2 ======== */


/* ======== g1 ======== */


/* ======== db ======== */

Gfx ManWaist_3c_model[]={

	gsSPTexture(65535, 65535,0, 0, 1),
	gsDPPipeSync(),
	gsDPSetCombineMode(G_CC_MODULATERGBDECALA,G_CC_PASS2),

	gs_Nin_SetUpTileDescrip(G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,0,G_TX_MIRROR,4,0,G_TX_CLAMP,4,0),
	gs_Nin_LoadTextureImage(St3hara_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&ManWaist_3c_v[0], 4, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(0, 3, 1, 0),

	gs_Nin_LoadTextureImage(St3waist_b_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&ManWaist_3c_v[4], 6, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(2, 3, 0, 0),
	gsSP1Triangle(0, 3, 4, 0),
	gsSP1Triangle(0, 4, 5, 0),
	gsSP1Triangle(5, 1, 0, 0),

	gs_Nin_LoadTextureImage(St3waist_f_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&ManWaist_3c_v[10], 7, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(3, 4, 1, 0),
	gsSP1Triangle(4, 5, 1, 0),
	gsSP1Triangle(1, 0, 3, 0),
	gsSP1Triangle(0, 6, 3, 0),
	gsSPEndDisplayList(),
}; /* db */ 

Gfx ManWaist_3c_modelT[] = {
	gsSPEndDisplayList()
};

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 17 vertices */
Vtx ManWaist_3c_v[]={
	{ -104,-91,-21,0, 27, 0, -81,-40,-77,255 },   /* v0 used p27/V1 2 times */
	{ 61,96,0,0, 794, 505, 40,96,-58,255 },   /* v1 used p27/V2 2 times */
	{ 104,-91,-21,0, 996, 0, 100,-56,-34,255 },   /* v2 used p27/V3 1 times */
	{ -61,96,0,0, 229, 505, -63,85,-53,255 },   /* v3 used p26/V2 1 times */
	{ 0,-95,81,0, 0, 77, 0,-72,96,255 },   /* v4 used p28/V3 5 times */
	{ -82,68,64,0, 420, 182, -64,58,81,255 },   /* v5 used p29/V2 2 times */
	{ -104,-91,-21,0, 532, 512, -81,-40,-77,255 },   /* v6 used p28/V1 2 times */
	{ 104,-91,-21,0, -532, 512, 100,-56,-34,255 },   /* v7 used p28/V2 2 times */
	{ 82,68,64,0, -420, 182, 78,38,83,255 },   /* v8 used p23/V3 2 times */
	{ 0,-12,111,0, 0, -33, 0,0,120,255 },   /* v9 used p29/V1 2 times */
	{ 82,68,64,0, 1037, 255, 78,38,83,255 },   /* v10 used p31/V2 3 times */
	{ -82,68,64,0, -13, 256, -64,58,81,255 },   /* v11 used p31/V1 4 times */
	{ 0,-12,111,0, 511, -19, 0,0,120,255 },   /* v12 used p22/V3 1 times */
	{ 61,96,0,0, 900, 509, 40,96,-58,255 },   /* v13 used p31/V3 3 times */
	{ -61,96,0,0, 123, 509, -63,85,-53,255 },   /* v14 used p32/V2 2 times */
	{ -104,-91,-21,0, -153, 307, -81,-40,-77,255 },   /* v15 used p21/V2 1 times */
	{ 104,-91,-21,0, 1177, 307, 100,-56,-34,255 },   /* v16 used p30/V2 1 times */
};


/*   0 vertices */
/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short St3hara_txt[] = {
	0x8403, 0x9cc5, 0xb585, 0xb585, 0xbdc5, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xce45, 0xce45, 0xce45, 0xce45, 0xce45, 0xce45, 
	0x9cc5, 0xa505, 0xb585, 0xbdc5, 0xbdc5, 0xc605, 0xc605, 0xc605, 0xce45, 0xce45, 0xce45, 0xd685, 0xd687, 0xd687, 0xd685, 0xd685, 
	0xad45, 0xad45, 0xb585, 0xbdc5, 0xc605, 0xc605, 0xc605, 0xce45, 0xce45, 0xce45, 0xce45, 0xd687, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 
	0x9cc5, 0xad45, 0xb585, 0xbdc5, 0xc605, 0xc605, 0xc605, 0xce45, 0xce45, 0xce45, 0xd687, 0xdec7, 0xdec7, 0xe707, 0xe707, 0xe707, 
	0xa505, 0xa505, 0xad45, 0xbdc5, 0xc605, 0xc605, 0xce45, 0xce45, 0xd685, 0xd687, 0xdec7, 0xe707, 0xe707, 0xe707, 0xe707, 0xe707, 
	0xbdc5, 0xbdc5, 0xb585, 0xb585, 0xbdc5, 0xc605, 0xce45, 0xd687, 0xdec7, 0xdec7, 0xe707, 0xe707, 0xe709, 0xe709, 0xe709, 0xe709, 
	0x9485, 0x9485, 0xb585, 0xbdc5, 0xc605, 0xce45, 0xce45, 0xdec7, 0xe707, 0xe707, 0xe709, 0xef49, 0xef4b, 0xef4b, 0xef4b, 0xef4b, 
	0xb585, 0x9cc5, 0x9cc5, 0xbdc5, 0xc605, 0xce45, 0xd687, 0xdec7, 0xe707, 0xe707, 0xef49, 0xef4b, 0xef4d, 0xef4d, 0xef4d, 0xef4d, 
	0x9cc5, 0xad45, 0xad45, 0xb585, 0xc605, 0xce45, 0xd687, 0xe707, 0xe707, 0xef49, 0xef4b, 0xef4d, 0xef4d, 0xef4f, 0xef4f, 0xef4f, 
	0xad45, 0xad45, 0xb585, 0xb585, 0xbdc5, 0xce45, 0xdec7, 0xe707, 0xe707, 0xef4b, 0xef4d, 0xef4f, 0xef4f, 0xef51, 0xef51, 0xef51, 
	0x9cc5, 0xa505, 0xad45, 0xb585, 0xbdc5, 0xce45, 0xdec7, 0xe707, 0xef49, 0xef4b, 0xef4d, 0xef4f, 0xef51, 0xef53, 0xef53, 0xef53, 
	0x9cc5, 0xa505, 0xad45, 0xad45, 0xbdc5, 0xd687, 0xdec7, 0xe707, 0xef49, 0xef4d, 0xef4f, 0xef51, 0xef53, 0xef53, 0xef55, 0xef55, 
	0x8c45, 0x8c45, 0x9cc5, 0xa505, 0xbdc5, 0xd687, 0xdec7, 0xe707, 0xef4b, 0xef4d, 0xef4f, 0xef51, 0xef53, 0xef55, 0xef55, 0xef55, 
	0xa505, 0x9cc5, 0x9cc5, 0xa505, 0xbdc5, 0xd687, 0xdec7, 0xe707, 0xef4b, 0xef4d, 0xef51, 0xef53, 0xef55, 0xef55, 0xef55, 0xef55, 
	0x9485, 0x9485, 0x9485, 0xa505, 0xbdc5, 0xce47, 0xdec7, 0xe707, 0xef4b, 0xef4d, 0xef51, 0xef53, 0xef55, 0xef55, 0xef55, 0xef55, 
	0x8c45, 0x8c45, 0x9485, 0xa505, 0xbdc5, 0xce45, 0xd687, 0xe707, 0xef49, 0xef4d, 0xef4f, 0xef51, 0xef53, 0xef55, 0xef55, 0xef55, 
};

/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short St3waist_b_txt[] = {
	0x8403, 0x8403, 0x8403, 0x8403, 0xad45, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 
	0x8403, 0x8403, 0x8403, 0x8403, 0x9cc5, 0xbdc5, 0xc605, 0xce45, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 
	0x8403, 0x8403, 0x8403, 0x8403, 0x8c45, 0x9cc5, 0xad45, 0xbdc5, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 
	0x8403, 0x8403, 0x8403, 0x9485, 0xa505, 0xb585, 0xb585, 0xbdc5, 0xbdc5, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 
	0x8403, 0x8c43, 0xad45, 0xc605, 0xd687, 0xdec7, 0xdec7, 0xdec7, 0xd687, 0xd685, 0xd685, 0xce45, 0xce45, 0xc605, 0xc605, 0xc605, 
	0x8c43, 0xad45, 0xd687, 0xdec7, 0xe707, 0xe707, 0xe707, 0xdec7, 0xdec7, 0xdec7, 0xd687, 0xd687, 0xd687, 0xce45, 0xc605, 0xc605, 
	0x9cc5, 0xd687, 0xe707, 0xe707, 0xe707, 0xe707, 0xe707, 0xe707, 0xdec7, 0xdec7, 0xdec7, 0xd687, 0xd687, 0xd687, 0xce45, 0xce45, 
	0xbdc5, 0xdec7, 0xe707, 0xe707, 0xe707, 0xe707, 0xe707, 0xe707, 0xe707, 0xdec7, 0xdec7, 0xdec7, 0xd687, 0xd687, 0xce47, 0xce45, 
	0xce45, 0xdec7, 0xe707, 0xe707, 0xe707, 0xe707, 0xe707, 0xe707, 0xe707, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 0xd687, 0xd687, 0xce45, 
	0xce45, 0xdec7, 0xdec7, 0xe707, 0xe707, 0xe707, 0xe707, 0xe707, 0xe707, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 0xd687, 0xd687, 0xce45, 
	0xce45, 0xd687, 0xdec7, 0xe707, 0xe707, 0xe707, 0xe707, 0xe707, 0xe707, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 0xd687, 0xd687, 0xce45, 
	0xce47, 0xd687, 0xdec7, 0xdec7, 0xe707, 0xe707, 0xe707, 0xe707, 0xe707, 0xdec7, 0xdec7, 0xdec7, 0xd687, 0xd687, 0xce45, 0xce45, 
	0xd687, 0xd687, 0xdec7, 0xdec7, 0xe707, 0xe707, 0xe707, 0xe707, 0xe707, 0xdec7, 0xd687, 0xd687, 0xd687, 0xd687, 0xce45, 0xce45, 
	0xd687, 0xd687, 0xd687, 0xd687, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 0xd687, 0xd687, 0xd687, 0xd687, 0xd687, 
	0xdec7, 0xdec7, 0xdec7, 0xd687, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 0xd687, 0xd687, 0xd687, 0xd687, 0xdec7, 0xdec7, 
	0xdec7, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 0xd687, 0xd687, 0xce45, 0xce45, 0xd685, 0xd685, 0xdec7, 0xdec7, 
};

/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short St3waist_f_txt[] = {
	0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xad45, 0x9485, 0x8403, 0x8403, 0x8403, 
	0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xb585, 0x9cc5, 0x8c43, 0x8403, 0x8403, 
	0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xbdc5, 0xad45, 0x9485, 0x8c43, 0x8403, 
	0xc605, 0xce45, 0xce45, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xb585, 0xa505, 0x9485, 0x8c45, 
	0xc605, 0xc605, 0xce45, 0xce45, 0xce45, 0xc605, 0xc605, 0xce45, 0xce45, 0xce45, 0xce45, 0xce45, 0xc605, 0xbdc5, 0xb585, 0xad45, 
	0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xce45, 0xce45, 0xce45, 0xce45, 0xce45, 0xce45, 0xce45, 0xd687, 0xd685, 
	0xce45, 0xc605, 0xc605, 0xc605, 0xce45, 0xce45, 0xce47, 0xd685, 0xd685, 0xd687, 0xd687, 0xd687, 0xd687, 0xdec7, 0xdec7, 0xd687, 
	0xce45, 0xce45, 0xd687, 0xdec7, 0xdec7, 0xdec7, 0xd687, 0xd687, 0xd687, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 0xd687, 0xd687, 
	0xd687, 0xe707, 0xdec7, 0xd687, 0xd687, 0xd687, 0xd687, 0xdec7, 0xdec7, 0xd687, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 
	0xce45, 0xd687, 0xdec7, 0xdec7, 0xd687, 0xce47, 0xd687, 0xd687, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 0xe707, 0xe709, 0xe709, 0xe709, 
	0xce45, 0xdec7, 0xd687, 0xd687, 0xce45, 0xd687, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 0xdec7, 0xe707, 0xe709, 0xe70d, 0xef4f, 0xef4d, 
	0xdec7, 0xdec7, 0xce45, 0xce45, 0xd687, 0xdec7, 0xd687, 0xd687, 0xdec7, 0xdec7, 0xe709, 0xe70d, 0xef4f, 0xef51, 0xef53, 0xef53, 
	0xce45, 0xce45, 0xd685, 0xdec7, 0xd687, 0xd685, 0xd687, 0xdec7, 0xdec7, 0xe707, 0xe70b, 0xef51, 0xef53, 0xef53, 0xef55, 0xef53, 
	0xce45, 0xdec7, 0xdec7, 0xd687, 0xce45, 0xd687, 0xdec7, 0xdec7, 0xdec7, 0xe70b, 0xef4f, 0xef53, 0xef55, 0xef55, 0xef55, 0xef53, 
	0xce47, 0xdec7, 0xdec7, 0xd685, 0xd687, 0xdec7, 0xdec7, 0xdec7, 0xe709, 0xe70d, 0xef51, 0xef53, 0xef55, 0xef55, 0xef55, 0xef53, 
	0xce45, 0xdec7, 0xdec7, 0xdec7, 0xd687, 0xd687, 0xdec7, 0xdec7, 0xe709, 0xef4f, 0xef53, 0xef53, 0xef55, 0xef55, 0xef55, 0xef53, 
};

