#include<ultra64.h>

extern Vtx ManLshin_2c_v[];
extern Vtx ManLshin_2c_vmcur[];
extern Tri ManLshin_2c_tri[];
extern Lights1 ManLshin_2c_material[];
extern Mtx ManLshin_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 ManLshin_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(St2shin_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&ManLshin_2c_v[0], 7, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(1, 3, 2, 0),
	gsSP1Triangle(4, 5, 6, 0),

	gs_Nin_LoadTextureImage(St2thigh_f_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&ManLshin_2c_v[7], 3, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSPEndDisplayList(),
};

Gfx *ManLshin_2c_modelT = NULL;

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 10 vertices */

/******************************************************************************
	vertex & texture
******************************************************************************/


/******************************************************************************
	vertex & texture
******************************************************************************/

Vtx ManLshin_2c_v[]={
	{ -29,29,-3,0, 504, 511,  -80,52,-70,255 },   /* v0 p8/V1 used 1 times */ 
	{ -2,-43,1,0, 371, 479,  -1,-83,-85,255 },   /* v1 p6/V1 used 2 times */ 
	{ -1,5,190,0, 377, -11,  11,77,90,255 },   /* v2 p6/V3 used 2 times */ 
	{ 27,26,-3,0, 263, 511,  84,48,-68,255 },   /* v3 p6/V2 used 1 times */ 
	{ 27,26,-3,0, 248, 511,  84,48,-68,255 },   /* v4 p5/V1 used 1 times */ 
	{ -29,29,-3,0, 7, 511,  -80,52,-70,255 },   /* v5 p5/V2 used 1 times */ 
	{ -1,5,190,0, 134, -11,  11,77,90,255 },   /* v6 p5/V3 used 1 times */ 
	{ -2,-43,1,0, 153, 201,  -1,-83,-85,255 },   /* v7 p7/V1 used 1 times */ 
	{ -29,29,-3,0, 8, 0,  -80,52,-70,255 },   /* v8 p7/V2 used 1 times */ 
	{ 27,26,-3,0, 271, 0,  84,48,-68,255 },   /* v9 p7/V3 used 1 times */ 
};


/*   0 vertices */
/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short St2shin_txt[] = {
	0x89d7, 0x89d7, 0x9a19, 0xb29b, 0xb29d, 0xa219, 0x91d7, 0x89d7, 0x89d7, 0x89d7, 0x91d9, 0x9a19, 0x9a19, 0x91d9, 0x89d7, 0x89d7, 
	0x4221, 0x4a21, 0x5225, 0x5aab, 0x5aab, 0x5265, 0x4a21, 0x4a21, 0x41e1, 0x4a21, 0x5263, 0x5265, 0x5265, 0x5263, 0x4a23, 0x4a21, 
	0x4a91, 0x5295, 0x39ef, 0x6a6d, 0x6a6d, 0x4231, 0x5295, 0x4a91, 0x4a51, 0x5293, 0x5ad5, 0x5ad5, 0x5ad5, 0x5ad5, 0x5ad5, 0x52d5, 
	0x5293, 0x4a5b, 0x49f7, 0xaa9d, 0xb29d, 0x5279, 0x4a5d, 0x5293, 0x4a53, 0x5295, 0x5ad7, 0x5ad5, 0x5ad5, 0x5ad5, 0x5ad7, 0x52d5, 
	0x5291, 0x3a1f, 0x5a35, 0xbadb, 0xbb1b, 0x6277, 0x4263, 0x5291, 0x4a53, 0x5295, 0x52d5, 0x5ad5, 0x5ad7, 0x5ad5, 0x5ad5, 0x5295, 
	0x5291, 0x31e9, 0x726f, 0xc31b, 0xc31b, 0x7ab1, 0x422d, 0x4a51, 0x4a53, 0x5295, 0x52d5, 0x5ad7, 0x6319, 0x6319, 0x5ad7, 0x5295, 
	0x4a53, 0x39f1, 0x8a67, 0xc35b, 0xc35d, 0x92a7, 0x4235, 0x4a53, 0x4a53, 0x5295, 0x5ad7, 0x6b5b, 0x739d, 0x739d, 0x6319, 0x5295, 
	0x4259, 0x39f5, 0xa29f, 0xc35d, 0xc35d, 0xa29f, 0x4a37, 0x4219, 0x4a51, 0x5295, 0x6319, 0x739d, 0x7bdf, 0x7bdf, 0x735b, 0x5ad5, 
	0x421f, 0x49f7, 0xaa9b, 0xc35f, 0xc35d, 0xaa9b, 0x5237, 0x421d, 0x4a51, 0x5295, 0x6b59, 0x739d, 0x7be1, 0x7be1, 0x739d, 0x5ad7, 
	0x4a5b, 0x4a39, 0xaa9f, 0xcb5d, 0xcb5d, 0xa29f, 0x4a37, 0x4a59, 0x4a51, 0x5ad7, 0x6b5b, 0x739f, 0x7c21, 0x7be1, 0x739d, 0x5ad7, 
	0x5295, 0x4235, 0x8aa7, 0xbad9, 0xbad9, 0x8aa7, 0x4235, 0x5295, 0x4a53, 0x5ad7, 0x6b5b, 0x73df, 0x7bdf, 0x7bdf, 0x6b5b, 0x5ad7, 
	0x5293, 0x4227, 0x5237, 0x6ab1, 0x72b3, 0x5a37, 0x4a6b, 0x5a93, 0x5253, 0x5ad7, 0x6b5b, 0x739d, 0x73df, 0x739d, 0x6b5b, 0x5ad5, 
	0x5293, 0x529b, 0x52ad, 0x73a5, 0x73a7, 0x52ad, 0x631f, 0x5ad5, 0x5293, 0x5ad7, 0x6319, 0x6b5b, 0x739d, 0x6b9d, 0x6319, 0x5ad5, 
	0x5293, 0x5b17, 0x5ae1, 0x4a6d, 0x4a6d, 0x5ae1, 0x6b59, 0x5ad5, 0x4a53, 0x5ad7, 0x5ad7, 0x6319, 0x6b5b, 0x6319, 0x6319, 0x5ad7, 
	0x5295, 0x422b, 0x4a3d, 0x62ff, 0x62ff, 0x4a3d, 0x422d, 0x4a55, 0x5293, 0x5ad7, 0x5ad7, 0x5ad7, 0x5ad7, 0x5ad7, 0x5b17, 0x5ad7, 
	0x31af, 0x527f, 0x7bbf, 0x8c3f, 0x8c3f, 0x7bbf, 0x527f, 0x31ad, 0x4a53, 0x5295, 0x5295, 0x5295, 0x5295, 0x5295, 0x5295, 0x5ad5, 
};

/* 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, 
};

