#include<ultra64.h>

extern Vtx ManLthigh_3c_v[];
extern Vtx ManLthigh_3c_vmcur[];
extern Tri ManLthigh_3c_tri[];
extern Lights1 ManLthigh_3c_material[];
extern Mtx ManLthigh_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 ManLthigh_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_CLAMP,4,0,G_TX_CLAMP,4,0),
	gs_Nin_LoadTextureImage(St3thigh_b_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&ManLthigh_3c_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(St3thigh_f_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&ManLthigh_3c_v[10], 6, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(3, 4, 5, 0),
	gsSPEndDisplayList(),
}; /* db */ 

Gfx ManLthigh_3c_modelT[] = {
	gsSPEndDisplayList()
};

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 16 vertices */
Vtx ManLthigh_3c_v[]={
	{ 9,40,14,0, 512, 381,  6,102,-60,255 },   /* v0 used p11/V1 1 times */
	{ -37,-82,-1,0, -133, 807,  -54,-104,-24,255 },   /* v1 used p11/V2 1 times */
	{ -28,0,188,0, 512, 0,  -98,44,54,255 },   /* v2 used p11/V3 1 times */
	{ -37,-82,-1,0, 296, 526,  -54,-104,-24,255 },   /* v3 used p9/V1 2 times */
	{ 48,0,188,0, 6, 0,  85,-45,71,255 },   /* v4 used p9/V3 2 times */
	{ -28,0,188,0, 266, 0,  -98,44,54,255 },   /* v5 used p10/V3 1 times */
	{ 46,-70,9,0, 11, 491,  92,-43,-62,255 },   /* v6 used p9/V2 1 times */
	{ 46,-70,9,0, -3, 783,  92,-43,-62,255 },   /* v7 used p8/V1 1 times */
	{ -37,-82,-1,0, 508, 783,  -54,-104,-24,255 },   /* v8 used p8/V2 1 times */
	{ 9,40,14,0, 120, 3711,  6,102,-60,255 },   /* v9 used p8/V3 1 times */
	{ 48,0,188,0, 443, 10,  85,-45,71,255 },   /* v10 used p12/V1 1 times */
	{ 46,-70,9,0, 515, 418,  92,-43,-62,255 },   /* v11 used p12/V2 1 times */
	{ 9,40,14,0, -105, 341,  6,102,-60,255 },   /* v12 used p12/V3 1 times */
	{ -28,0,188,0, 21, 0,  -98,44,54,255 },   /* v13 used p7/V1 1 times */
	{ 48,0,188,0, 258, 0,  85,-45,71,255 },   /* v14 used p7/V2 1 times */
	{ 9,40,14,0, 136, 385,  6,102,-60,255 },   /* v15 used p7/V3 1 times */
};


/*   0 vertices */
/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short St3thigh_b_txt[] = {
	0x311, 0x311, 0x311, 0x311, 0x311, 0x311, 0x311, 0x311, 0x311, 0x311, 0x311, 0x311, 0x311, 0x311, 0x311, 0x351, 
	0xacf, 0xacf, 0xacf, 0xacf, 0xacf, 0xacf, 0xacf, 0xacf, 0x2cf, 0x28f, 0x291, 0x2d1, 0x311, 0x311, 0x353, 0x395, 
	0xad85, 0xad45, 0xad45, 0xa545, 0xad45, 0xad85, 0xad87, 0xad45, 0xa545, 0x8cc7, 0x7c87, 0x4bc9, 0x230b, 0x2cf, 0x313, 0x3d7, 
	0xce45, 0xce45, 0xce45, 0xce45, 0xd687, 0xde89, 0xdec9, 0xd687, 0xd645, 0xd645, 0xd645, 0xd645, 0xce05, 0xb587, 0x84cb, 0x43cd, 
	0xce45, 0xce45, 0xce45, 0xce47, 0xdec9, 0xdf0b, 0xdf0b, 0xde89, 0xd687, 0xce47, 0xce47, 0xd687, 0xd689, 0xe6cb, 0xf74f, 0xef0f, 
	0xce45, 0xce45, 0xce47, 0xd689, 0xe70b, 0xe70d, 0xe70d, 0xdec9, 0xdec9, 0xd689, 0xd689, 0xd689, 0xdecb, 0xe70d, 0xe70f, 0xef51, 
	0xce45, 0xce47, 0xd6c9, 0xdf0b, 0xe70d, 0xef4f, 0xe70d, 0xdecb, 0xdec9, 0xdec9, 0xdec9, 0xd6c9, 0xdecb, 0xe70f, 0xe70f, 0xe751, 
	0xce47, 0xd689, 0xe70b, 0xe70d, 0xe70f, 0xef51, 0xe711, 0xe70d, 0xdecb, 0xdecb, 0xdec9, 0xdec9, 0xdecb, 0xe70d, 0xe711, 0xef51, 
	0xd687, 0xdecb, 0xe70b, 0xe70d, 0xe70f, 0xef53, 0xef51, 0xe70d, 0xdecb, 0xdecb, 0xdec9, 0xdec9, 0xdecb, 0xe70d, 0xe753, 0xef53, 
	0xdec9, 0xe70b, 0xe70b, 0xe70d, 0xe711, 0xef53, 0xef53, 0xe70d, 0xdecb, 0xdec9, 0xdec9, 0xdecb, 0xdecb, 0xe70f, 0xef53, 0xef53, 
	0xd6c9, 0xdecb, 0xe70b, 0xe70d, 0xe711, 0xef53, 0xe711, 0xe70d, 0xdecb, 0xdec9, 0xdec9, 0xdecb, 0xdecb, 0xdecd, 0xdf0f, 0xe711, 
	0xd687, 0xd689, 0xdec9, 0xdecb, 0xdecf, 0xe70f, 0xdecd, 0xdecb, 0xdec9, 0xdecb, 0xd6c9, 0xd689, 0xd689, 0xce89, 0xd689, 0xdecd, 
	0xce47, 0xd687, 0xd689, 0xd689, 0xd689, 0xd689, 0xd689, 0xd689, 0xd689, 0xd689, 0xd689, 0xce47, 0xce47, 0xce47, 0xce47, 0xd689, 
	0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 
	0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 
	0xce45, 0xce45, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 
};

/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short St3thigh_f_txt[] = {
	0x311, 0x28f, 0x6961, 0xa22f, 0xa26f, 0xa22f, 0x7163, 0xa4f, 0x311, 0x311, 0x311, 0x311, 0x311, 0x311, 0x311, 0x311, 
	0x311, 0x351, 0x1a53, 0x79a7, 0xaa71, 0x79a5, 0x1a53, 0x351, 0x393, 0x353, 0x313, 0x2d1, 0x2d1, 0x2d1, 0xacf, 0xb0f, 
	0x313, 0x395, 0x417, 0x395, 0x2297, 0x353, 0x3d5, 0x395, 0x353, 0x134f, 0x3b8d, 0x644b, 0x84c9, 0x9507, 0xad87, 0xbdc7, 
	0x544b, 0x2b8f, 0xb91, 0x3d5, 0x417, 0x395, 0x1b91, 0x4c0d, 0x8d0b, 0xce4b, 0xe6cb, 0xef0b, 0xe6c9, 0xde87, 0xd687, 0xe709, 
	0xe6cb, 0xe6cf, 0xbe0f, 0x8d0d, 0x6c8f, 0xa58f, 0xde8f, 0xef0d, 0xf74d, 0xef4f, 0xe70f, 0xe70d, 0xdecb, 0xd687, 0xd689, 0xe70b, 
	0xe70f, 0xef53, 0xf795, 0xf795, 0xff95, 0xf795, 0xef53, 0xef4f, 0xe70f, 0xe70f, 0xe70f, 0xe70d, 0xdecb, 0xd689, 0xdec9, 0xe70b, 
	0xef51, 0xef53, 0xef55, 0xef55, 0xef55, 0xef55, 0xef53, 0xef51, 0xe70f, 0xe70f, 0xe70f, 0xe70d, 0xe70b, 0xdec9, 0xdecb, 0xe70b, 
	0xef51, 0xef53, 0xef55, 0xef55, 0xef55, 0xef55, 0xef53, 0xef51, 0xe70f, 0xe70f, 0xe70f, 0xe70d, 0xe70d, 0xdecb, 0xe70b, 0xe70d, 
	0xef51, 0xef55, 0xef55, 0xef55, 0xef55, 0xef55, 0xef53, 0xe711, 0xe70f, 0xe70d, 0xe70d, 0xe70d, 0xe70d, 0xdecb, 0xe70b, 0xe70d, 
	0xef53, 0xef53, 0xef53, 0xef53, 0xef53, 0xef53, 0xe711, 0xe70f, 0xe70d, 0xdecd, 0xdecb, 0xdecb, 0xdecb, 0xdecb, 0xe70b, 0xe70b, 
	0xe711, 0xe711, 0xe711, 0xe753, 0xe713, 0xe711, 0xe70f, 0xdecd, 0xdecb, 0xd68b, 0xd689, 0xd689, 0xd689, 0xdec9, 0xdecb, 0xe70b, 
	0xdecd, 0xdecd, 0xdecd, 0xdecd, 0xdecd, 0xdecd, 0xd68b, 0xd689, 0xd689, 0xce89, 0xd689, 0xd689, 0xd689, 0xd689, 0xdec9, 0xdecb, 
	0xd689, 0xce89, 0xce89, 0xce89, 0xce49, 0xce49, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xd687, 0xd687, 0xdec9, 
	0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xd687, 
	0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 
	0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce45, 0xce45, 0xce45, 0xce45, 
};

