#include<ultra64.h>

extern Vtx ManLthigh_2c_v[];
extern Vtx ManLthigh_2c_vmcur[];
extern Tri ManLthigh_2c_tri[];
extern Lights1 ManLthigh_2c_material[];
extern Mtx ManLthigh_2c_matrix[];

extern unsigned short Sshoes_bottom_txt[];
extern unsigned short St2_hand_txt[];
extern unsigned short St2best_b_txt[];
extern unsigned short St2best_f_txt[];
extern unsigned short St2best_s_txt[];
extern unsigned short St2best_t_txt[];
extern unsigned short St2farm_b_txt[];
extern unsigned short St2farm_f_txt[];
extern unsigned short St2hara_txt[];
extern unsigned short St2met_b_txt[];
extern unsigned short St2met_f_txt[];
extern unsigned short St2met_gl_txt[];
extern unsigned short St2met_s_txt[];
extern unsigned short St2neck_txt[];
extern unsigned short St2shin_txt[];
extern unsigned short St2shoe_txt[];
extern unsigned short St2shoe_b_txt[];
extern unsigned short St2thigh_b_txt[];
extern unsigned short St2thigh_f_txt[];
extern unsigned short St2uarm_b_txt[];
extern unsigned short St2uarm_f_txt[];
extern unsigned short St2waist_b_txt[];
extern unsigned short St2waist_f_txt[];
extern unsigned short St2waist_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
******************************************************************************/

Gfx ManLthigh_2c_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_CLAMP,4,0,G_TX_CLAMP,4,0),
	gs_Nin_LoadTextureImage(St2thigh_b_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&ManLthigh_2c_v[0], 10, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(3, 4, 5, 0),
	gsSP1Triangle(3, 6, 4, 0),
	gsSP1Triangle(7, 8, 9, 0),

	gs_Nin_LoadTextureImage(St2thigh_f_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&ManLthigh_2c_v[10], 6, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(3, 4, 5, 0),
	gsSPEndDisplayList(),
};

Gfx *ManLthigh_2c_modelT = NULL;

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 16 vertices */

/******************************************************************************
	vertex & texture
******************************************************************************/


/******************************************************************************
	vertex & texture
******************************************************************************/

Vtx ManLthigh_2c_v[]={
	{ -3,45,5,0, 681, 406,  6,102,-59,255 },   /* v0 p11/V1 used 1 times */ 
	{ -30,-52,4,0, 279, 484,  -53,-103,-30,255 },   /* v1 p11/V2 used 1 times */ 
	{ -28,-1,184,0, 380, 3,  -105,29,50,255 },   /* v2 p11/V3 used 1 times */ 
	{ -30,-52,4,0, 267, 505,  -53,-103,-30,255 },   /* v3 p9/V1 used 2 times */ 
	{ 28,-1,183,0, 8, 0,  82,-58,64,255 },   /* v4 p9/V3 used 2 times */ 
	{ -28,-1,184,0, 270, 0,  -105,29,50,255 },   /* v5 p10/V3 used 1 times */ 
	{ 29,-52,11,0, -8, 485,  84,-55,-64,255 },   /* v6 p9/V2 used 1 times */ 
	{ 29,-52,11,0, -17, 558,  84,-55,-64,255 },   /* v7 p8/V1 used 1 times */ 
	{ -30,-52,4,0, 492, 558,  -53,-103,-30,255 },   /* v8 p8/V2 used 1 times */ 
	{ -3,45,5,0, 256, 2218,  6,102,-59,255 },   /* v9 p8/V3 used 1 times */ 
	{ 28,-1,183,0, 512, 0,  82,-58,64,255 },   /* v10 p12/V1 used 1 times */ 
	{ 29,-52,11,0, 488, 489,  84,-55,-64,255 },   /* v11 p12/V2 used 1 times */ 
	{ -3,45,5,0, 21, 498,  6,102,-59,255 },   /* v12 p12/V3 used 1 times */ 
	{ -28,-1,184,0, 8, 0,  -105,29,50,255 },   /* v13 p7/V1 used 1 times */ 
	{ 28,-1,183,0, 270, 0,  82,-58,64,255 },   /* v14 p7/V2 used 1 times */ 
	{ -3,45,5,0, 138, 481,  6,102,-59,255 },   /* v15 p7/V3 used 1 times */ 
};


/*   0 vertices */
/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short St2thigh_b_txt[] = {
	0x318d, 0x318d, 0x318d, 0x39cf, 0x39cf, 0x398d, 0x318d, 0x318d, 0x318d, 0x318d, 0x318d, 0x318d, 0x318d, 0x318d, 0x318d, 0x39cf, 
	0x318d, 0x39cf, 0x39cf, 0x4211, 0x4a13, 0x4211, 0x4211, 0x4211, 0x39cf, 0x39cf, 0x39cf, 0x39cf, 0x39cf, 0x39cf, 0x39cf, 0x4211, 
	0x39cf, 0x4211, 0x4a53, 0x5255, 0x5295, 0x5295, 0x5295, 0x5295, 0x5295, 0x5295, 0x5295, 0x4a53, 0x4211, 0x4211, 0x4211, 0x4251, 
	0x4211, 0x4a53, 0x5a97, 0x5ad7, 0x5ad7, 0x5ad7, 0x5ad7, 0x5ad7, 0x5ad7, 0x5ad9, 0x5ad9, 0x5ad7, 0x5295, 0x4a53, 0x4a53, 0x4a53, 
	0x5255, 0x5a97, 0x5ad7, 0x5ad9, 0x6319, 0x6319, 0x6319, 0x6319, 0x6319, 0x6319, 0x6319, 0x5ad7, 0x5295, 0x5295, 0x5293, 0x5291, 
	0x5297, 0x5ad9, 0x5ad9, 0x5ad9, 0x6319, 0x631b, 0x631b, 0x6319, 0x6319, 0x6319, 0x5ad7, 0x52d5, 0x5295, 0x5293, 0x4a57, 0x39e3, 
	0x5ad7, 0x5ad9, 0x5ad9, 0x5ad9, 0x6319, 0x631b, 0x631b, 0x631b, 0x6319, 0x6319, 0x5ad7, 0x5297, 0x5293, 0x4a19, 0x3171, 0x39bf, 
	0x5ad7, 0x5ad9, 0x5ad9, 0x6319, 0x6b5b, 0x635b, 0x631b, 0x631b, 0x631b, 0x6319, 0x6319, 0x5ad5, 0x4a5b, 0x2973, 0x39bd, 0x527f, 
	0x5ad7, 0x5ad9, 0x5ad9, 0x631b, 0x739d, 0x6b5b, 0x631b, 0x631b, 0x631b, 0x6319, 0x6357, 0x529d, 0x2973, 0x317b, 0x4a3f, 0x5abf, 
	0x5295, 0x5ad7, 0x6319, 0x6b5d, 0x739f, 0x6b5b, 0x635b, 0x631b, 0x6319, 0x6b59, 0x529f, 0x2973, 0x2979, 0x39bb, 0x4a3f, 0x5abf, 
	0x5295, 0x5ad7, 0x6b5b, 0x739d, 0x7bdf, 0x739d, 0x6b5b, 0x6b59, 0x6b57, 0x52a1, 0x2975, 0x2939, 0x31b9, 0x41fd, 0x4a7f, 0x5abf, 
	0x5295, 0x5b19, 0x6b5b, 0x7bdf, 0x7be1, 0x73dd, 0x6b59, 0x52a1, 0x4a65, 0x2975, 0x2939, 0x31b9, 0x39fd, 0x4a3f, 0x527f, 0x62ff, 
	0x5295, 0x6317, 0x739b, 0x7bdf, 0x841f, 0x7c1d, 0x52a5, 0x2975, 0x2937, 0x2937, 0x31b9, 0x39bb, 0x41fd, 0x4a3f, 0x52bf, 0x62ff, 
	0x31b1, 0x4a65, 0x6b5f, 0x7bdf, 0x73a1, 0x526b, 0x2937, 0x2937, 0x2977, 0x3179, 0x39bb, 0x39fb, 0x41fd, 0x4a3f, 0x527f, 0x62bf, 
	0x2939, 0x2939, 0x2975, 0x31b3, 0x2975, 0x2137, 0x2937, 0x2937, 0x2977, 0x31b9, 0x39bb, 0x39fd, 0x41fd, 0x4a3f, 0x4a3f, 0x527f, 
	0x2931, 0x2933, 0x2937, 0x2937, 0x2937, 0x2937, 0x2937, 0x2937, 0x2977, 0x31b7, 0x31b7, 0x39b9, 0x39b9, 0x39bb, 0x41fd, 0x41ff, 
};

/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short St2thigh_f_txt[] = {
	0x3199, 0x39b1, 0x52bf, 0x737f, 0x7bbf, 0x6b3f, 0x4a7b, 0x39e3, 0x4211, 0x4211, 0x41d1, 0x39d1, 0x4211, 0x39cf, 0x398f, 0x318d, 
	0x4a51, 0x4215, 0x4227, 0x4a31, 0x5275, 0x4a6f, 0x4a5d, 0x5293, 0x5293, 0x4a53, 0x4a53, 0x5295, 0x5297, 0x5295, 0x4a53, 0x4211, 
	0x4a53, 0x5293, 0x6317, 0x739d, 0x739f, 0x739b, 0x6b59, 0x6319, 0x5ad7, 0x5ad7, 0x5ad7, 0x5ad9, 0x5ad9, 0x5ad9, 0x5ad7, 0x5295, 
	0x4a53, 0x5295, 0x6b5b, 0x8c61, 0x8c61, 0x7bdf, 0x739d, 0x6b5b, 0x6319, 0x62d9, 0x5ad9, 0x5ad9, 0x5ad9, 0x5ad9, 0x5ad9, 0x5ad9, 
	0x4a51, 0x5ad5, 0x739d, 0x94a5, 0x94a5, 0x8421, 0x7bdf, 0x739d, 0x631b, 0x62d9, 0x5ad9, 0x5ad9, 0x5ad9, 0x5ad9, 0x5ad9, 0x5ad9, 
	0x39e5, 0x529d, 0x739d, 0x94a3, 0x94a3, 0x8421, 0x7bdf, 0x739b, 0x635b, 0x62d9, 0x5ad9, 0x5ad9, 0x5ad9, 0x5ad9, 0x5ad9, 0x5ad9, 
	0x41ff, 0x4a7d, 0x52b5, 0x6b2d, 0x7be5, 0x7bdd, 0x739b, 0x6b5b, 0x6319, 0x5ad9, 0x5ad9, 0x5ad9, 0x5ad9, 0x5ad9, 0x5ad9, 0x5ad9, 
	0x5abf, 0x733f, 0x733f, 0x6b3f, 0x62fb, 0x52b1, 0x5ae3, 0x631b, 0x6317, 0x62d9, 0x5ad9, 0x5ad9, 0x5ad9, 0x5ad9, 0x5ad9, 0x5ad9, 
	0x62ff, 0x737f, 0x83bf, 0x943f, 0x83ff, 0x6b3f, 0x527f, 0x4235, 0x4a63, 0x5ad9, 0x62d7, 0x62d9, 0x5ad9, 0x5ad9, 0x5ad9, 0x5ad9, 
	0x62ff, 0x733f, 0x8bff, 0x9c7f, 0x947f, 0x8c3f, 0x83bf, 0x6aff, 0x4a3f, 0x41f3, 0x4a63, 0x5ad9, 0x62d7, 0x5ad9, 0x5ad9, 0x5ad7, 
	0x62ff, 0x737f, 0x8bff, 0x9cbf, 0x9c7f, 0x943f, 0x8bff, 0x83bf, 0x737f, 0x5abf, 0x423f, 0x39b3, 0x4a21, 0x5ad5, 0x5ad7, 0x5ad7, 
	0x62ff, 0x737f, 0x8bff, 0x9cbf, 0x947f, 0x943f, 0x8bff, 0x83bf, 0x737f, 0x6b3f, 0x62ff, 0x4a3f, 0x31bd, 0x39ab, 0x5299, 0x5ad5, 
	0x62ff, 0x7b7f, 0x83ff, 0x947f, 0x947f, 0x8c3f, 0x83ff, 0x7bbf, 0x737f, 0x6b3f, 0x62ff, 0x52bf, 0x4a3f, 0x31bf, 0x2975, 0x425f, 
	0x62ff, 0x733f, 0x7b7f, 0x8bff, 0x8c3f, 0x83ff, 0x7b7f, 0x733f, 0x6b3f, 0x62ff, 0x5abf, 0x527f, 0x423f, 0x41ff, 0x39bf, 0x2979, 
	0x5a7f, 0x5abf, 0x62ff, 0x6b3f, 0x737f, 0x6b3f, 0x62ff, 0x527f, 0x4a3f, 0x423f, 0x41ff, 0x41ff, 0x39ff, 0x39bf, 0x31bd, 0x297d, 
	0x41ff, 0x41ff, 0x4a3f, 0x4a3f, 0x4a3f, 0x423f, 0x41ff, 0x39bf, 0x31bd, 0x297b, 0x297b, 0x297b, 0x297b, 0x297b, 0x297b, 0x297b, 
};

