#include<ultra64.h>

extern Vtx ManLthigh_2b_v[];
extern Vtx ManLthigh_2b_vmcur[];
extern Tri ManLthigh_2b_tri[];
extern Lights1 ManLthigh_2b_material[];
extern Mtx ManLthigh_2b_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_2b_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_2b_v[0], 10, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(3, 2, 1, 0),
	gsSP1Triangle(4, 5, 6, 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_2b_v[10], 10, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(1, 0, 3, 0),
	gsSP1Triangle(4, 5, 6, 0),
	gsSP1Triangle(7, 8, 9, 0),
	gsSPEndDisplayList(),
};

Gfx *ManLthigh_2b_modelT = NULL;

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 20 vertices */

/******************************************************************************
	vertex & texture
******************************************************************************/


/******************************************************************************
	vertex & texture
******************************************************************************/

Vtx ManLthigh_2b_v[]={
	{ -3,46,5,0, 505, 509,  8,95,-70,255 },   /* v0 p22/V1 used 1 times */ 
	{ -30,-52,4,0, 242, 498,  -94,-57,-47,255 },   /* v1 p22/V2 used 2 times */ 
	{ -28,30,185,0, 515, -1,  -94,44,59,255 },   /* v2 p22/V3 used 2 times */ 
	{ -2,-46,181,0, 312, 0,  -1,-95,74,255 },   /* v3 p21/V1 used 1 times */ 
	{ 29,-52,11,0, 0, 512,  96,-54,-44,255 },   /* v4 p20/V1 used 1 times */ 
	{ -30,-52,4,0, 511, 512,  -94,-57,-47,255 },   /* v5 p20/V2 used 1 times */ 
	{ -3,46,5,0, 276, 1514,  8,95,-70,255 },   /* v6 p20/V3 used 1 times */ 
	{ -30,-52,4,0, 247, 517,  -94,-57,-47,255 },   /* v7 p23/V1 used 1 times */ 
	{ 29,-52,11,0, -6, 512,  96,-54,-44,255 },   /* v8 p23/V2 used 1 times */ 
	{ -2,-46,181,0, 127, 21,  -1,-95,74,255 },   /* v9 p23/V3 used 1 times */ 
	{ 29,-52,11,0, 513, 508,  96,-54,-44,255 },   /* v10 p24/V2 used 2 times */ 
	{ 28,27,184,0, 259, 15,  95,42,58,255 },   /* v11 p24/V1 used 2 times */ 
	{ -2,-46,181,0, 508, 25,  -1,-95,74,255 },   /* v12 p19/V3 used 1 times */ 
	{ -3,46,5,0, 179, 524,  8,95,-70,255 },   /* v13 p24/V3 used 1 times */ 
	{ 28,27,184,0, 8, 0,  95,42,58,255 },   /* v14 p17/V1 used 1 times */ 
	{ -28,30,185,0, 270, 0,  -94,44,59,255 },   /* v15 p17/V2 used 1 times */ 
	{ -2,-46,181,0, 134, 200,  -1,-95,74,255 },   /* v16 p17/V3 used 1 times */ 
	{ -28,30,185,0, -16, 0,  -94,44,59,255 },   /* v17 p18/V1 used 1 times */ 
	{ 28,27,184,0, 272, 0,  95,42,58,255 },   /* v18 p18/V2 used 1 times */ 
	{ -3,46,5,0, 123, 516,  8,95,-70,255 },   /* v19 p18/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, 
};

