#include<ultra64.h>

extern Vtx ManLfoot_2b_v[];
extern Vtx ManLfoot_2b_vmcur[];
extern Tri ManLfoot_2b_tri[];
extern Lights1 ManLfoot_2b_material[];
extern Mtx ManLfoot_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 ManLfoot_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,32,0,0,G_TX_CLAMP,4,0,G_TX_CLAMP,5,0),
	gs_Nin_LoadTextureImage(St2shoe_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,32,0,7),

	gsSPVertex(&ManLfoot_2b_v[0], 5, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(3, 0, 2, 0),
	gsSP1Triangle(2, 4, 3, 0),

	gs_Nin_SetUpTileDescrip(G_IM_FMT_RGBA,G_IM_SIZ_16b,8,16,0,0,G_TX_MIRROR,3,0,G_TX_CLAMP,4,0),
	gs_Nin_LoadTextureImage(St2shoe_b_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,8,16,0,7),

	gsSPVertex(&ManLfoot_2b_v[5], 3, 0),
	gsSP1Triangle(0, 1, 2, 0),

	gs_Nin_SetUpTileDescrip(G_IM_FMT_RGBA,G_IM_SIZ_16b,8,32,0,0,G_TX_CLAMP,3,0,G_TX_CLAMP,5,0),
	gs_Nin_LoadTextureImage(Sshoes_bottom_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,8,32,0,7),

	gsSPVertex(&ManLfoot_2b_v[8], 4, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(0, 2, 3, 0),
	gsSPEndDisplayList(),
};

Gfx *ManLfoot_2b_modelT = NULL;

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 12 vertices */

/******************************************************************************
	vertex & texture
******************************************************************************/

Vtx ManLfoot_2b_v[]={
	{ 23,-28,101,0, 529, -9,  106,33,43,255 },   /* v0 p15/V1 used 2 times */ 
	{ 22,-27,-25,0, 510, 1024,  51,-91,-58,255 },   /* v1 p15/V2 used 1 times */ 
	{ 0,26,-21,0, 267, 993,  7,113,-36,255 },   /* v2 p13/V1 used 3 times */ 
	{ -27,-27,107,0, 21, -59,  -92,-65,41,255 },   /* v3 p13/V3 used 2 times */ 
	{ -27,-26,-26,0, 1, 1024,  -76,-39,-83,255 },   /* v4 p13/V2 used 1 times */ 
	{ 22,-27,-25,0, 1, 0,  51,-91,-58,255 },   /* v5 p16/V1 used 1 times */ 
	{ -27,-26,-26,0, 510, 0,  -76,-39,-83,255 },   /* v6 p16/V2 used 1 times */ 
	{ 0,26,-21,0, 244, 773,  7,113,-36,255 },   /* v7 p16/V3 used 1 times */ 
	{ 22,-27,-25,0, 255, 0,  51,-91,-58,255 },   /* v8 p18/V1 used 2 times */ 
	{ 23,-28,101,0, 256, 991,  106,33,43,255 },   /* v9 p17/V2 used 1 times */ 
	{ -27,-27,107,0, 0, 1036,  -92,-65,41,255 },   /* v10 p18/V2 used 2 times */ 
	{ -27,-26,-26,0, -2, -3,  -76,-39,-83,255 },   /* v11 p18/V3 used 1 times */ 
};


/*   0 vertices */
/* 8 x 32  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short Sshoes_bottom_txt[] = {
	0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 
	0x1, 0x1, 0x41, 0x3203, 0x2a03, 0x881, 0x1, 0x1, 
	0x1, 0x843, 0x3205, 0x3285, 0x19c3, 0x1101, 0x843, 0x1, 
	0x1, 0x883, 0x3245, 0x5b87, 0x5347, 0x3245, 0x843, 0x1, 
	0x1, 0x1905, 0x4b47, 0x5387, 0x5bc7, 0x3245, 0x843, 0x1, 
	0x1, 0x10c5, 0x42c7, 0x7c89, 0x7449, 0x4b07, 0x18c3, 0x1, 
	0x1, 0x3a07, 0x63c9, 0x6c09, 0x6c09, 0x3285, 0x10c3, 0x1, 
	0x1, 0x1905, 0x3245, 0x63c7, 0x5b87, 0x6c0b, 0x31c7, 0x1, 
	0x1, 0x3a47, 0x744d, 0x42c5, 0x3a85, 0x2a05, 0x2145, 0x1, 
	0x1, 0x1905, 0x4303, 0x4b07, 0x42c7, 0x9d8f, 0x3207, 0x1, 
	0x1, 0x3a47, 0x6c0b, 0x63c9, 0x5347, 0x3a87, 0x3207, 0x1, 
	0x1, 0x881, 0x3a85, 0x3a85, 0x6c49, 0x958f, 0x5309, 0x1, 
	0x1, 0x10c1, 0x5b89, 0x640b, 0x5309, 0x3a87, 0x4287, 0x1, 
	0x1, 0x41, 0x3a85, 0x3a85, 0x7c4d, 0x954f, 0x63cb, 0x1945, 
	0x1, 0x10c1, 0x5b87, 0x63cb, 0x4ac7, 0x3a45, 0x42c7, 0x2949, 
	0x1, 0x881, 0x3a85, 0x3a85, 0x744d, 0x954f, 0x63cb, 0x2149, 
	0x1, 0x31c5, 0x6409, 0x6389, 0x4ac7, 0x3a45, 0x42c7, 0x320b, 
	0x1, 0x1943, 0x3a85, 0x3a85, 0x744d, 0x954f, 0x640b, 0x2989, 
	0x1, 0x6c0b, 0x744b, 0x63c9, 0x4b07, 0x3205, 0x42c7, 0x42cd, 
	0x883, 0x2a05, 0x3a85, 0x5b89, 0x744b, 0x954d, 0x6c0b, 0x324b, 
	0x1905, 0x954d, 0x5bc7, 0x63cb, 0x4b09, 0x3205, 0x42c7, 0x534f, 
	0x10c5, 0x2a45, 0x3a85, 0x4b07, 0x744d, 0x954f, 0x6409, 0x324b, 
	0x3a07, 0x958d, 0x5bc9, 0x4b05, 0x42c5, 0x3a47, 0x42c7, 0x534f, 
	0x1905, 0x3245, 0x3a85, 0x5347, 0x6c09, 0x8d4d, 0x63c9, 0x298b, 
	0x3a47, 0x954d, 0x63c9, 0x3a85, 0x42c7, 0x3245, 0x42c7, 0x298b, 
	0x1905, 0x3245, 0x3a85, 0x5b87, 0x744d, 0x954f, 0x5b49, 0x1143, 
	0x3a47, 0x84cb, 0x63c9, 0x3a85, 0x4ac7, 0x3a85, 0x1943, 0x1, 
	0x881, 0x2185, 0x3a85, 0x5b47, 0x744b, 0x8d4d, 0x2985, 0x1, 
	0x1, 0x52c9, 0x63c9, 0x3a85, 0x4ac7, 0x3a47, 0x841, 0x1, 
	0x1, 0x843, 0x63cb, 0x5b87, 0x7c8b, 0x2985, 0x1, 0x1, 
	0x1, 0x1, 0x883, 0x530b, 0x2987, 0x841, 0x1, 0x1, 
	0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 
};

/* 16 x 32  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short St2shoe_txt[] = {
	0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 
	0x1, 0x1, 0x1, 0x1, 0x1, 0x84b, 0x2915, 0x2915, 0x1891, 0x5, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 
	0x1, 0x1, 0x1, 0x3, 0x399b, 0x83ef, 0xa4b7, 0x9c77, 0x83b3, 0x5227, 0x1091, 0x1, 0x1, 0x1, 0x1, 0x1, 
	0x1, 0x1, 0x3, 0x41df, 0xa4b7, 0xacfb, 0x8bf9, 0x7337, 0x7337, 0x7b77, 0x5aaf, 0x1893, 0x1, 0x1, 0x1, 0x1, 
	0x1, 0x1, 0x1091, 0x7bb3, 0xa4bb, 0x7335, 0x5267, 0x52a3, 0x41e1, 0x39ab, 0x62b7, 0x5aaf, 0x104f, 0x1, 0x1, 0x1, 
	0x1, 0x3, 0x39a3, 0x93f9, 0x8375, 0x6b65, 0x8421, 0x841f, 0x739b, 0x5299, 0x3167, 0x62b7, 0x41e7, 0x5, 0x1, 0x1, 
	0x1, 0x9, 0x5a6f, 0x83b9, 0x6b2b, 0x8c61, 0x8421, 0x739d, 0x6b5b, 0x6b59, 0x4219, 0x316b, 0x5ab5, 0x1897, 0x1, 0x1, 
	0x1, 0x1095, 0x62b5, 0x62b5, 0x6323, 0x8c61, 0x7bdf, 0x739d, 0x6b5b, 0x6b5b, 0x6359, 0x295f, 0x5235, 0x3169, 0x5, 0x1, 
	0x1, 0x20e1, 0x62b7, 0x49ef, 0x631f, 0x841f, 0x739d, 0x739d, 0x6b5b, 0x6b5b, 0x739b, 0x41db, 0x39b1, 0x49f1, 0x84f, 0x1, 
	0x5, 0x292b, 0x5a77, 0x41e9, 0x631b, 0x739d, 0x739d, 0x739d, 0x739d, 0x739d, 0x739b, 0x5299, 0x292b, 0x4a35, 0x1099, 0x1, 
	0xd, 0x292f, 0x4a35, 0x31a7, 0x631b, 0x739d, 0x739d, 0x739d, 0x739d, 0x739d, 0x739d, 0x6319, 0x2127, 0x41f5, 0x20e1, 0x3, 
	0xf, 0x20f1, 0x41b5, 0x3163, 0x6b5b, 0x7bdf, 0x8421, 0x7bdf, 0x739d, 0x739d, 0x739d, 0x6b5b, 0x2923, 0x3975, 0x2927, 0x7, 
	0x9, 0x106b, 0x20f3, 0x319f, 0x7bdd, 0x8421, 0x8421, 0x8421, 0x739d, 0x739d, 0x739d, 0x739b, 0x31a1, 0x2935, 0x20eb, 0xb, 
	0x1, 0x13, 0x18db, 0x5299, 0x7bdf, 0x8421, 0x8c63, 0x8c63, 0x8421, 0x7bdf, 0x739d, 0x739b, 0x39db, 0x18ad, 0x10a7, 0x7, 
	0x1, 0x1083, 0x39cd, 0x6319, 0x7bdf, 0x8421, 0x8c63, 0x94a5, 0x8c63, 0x8421, 0x739d, 0x6b5b, 0x5ad7, 0x3195, 0x188d, 0x1, 
	0x1, 0x843, 0x294b, 0x5295, 0x739d, 0x841f, 0x7be1, 0x7be3, 0x7be3, 0x739f, 0x7bdd, 0x739b, 0x5ad7, 0x4a51, 0x2109, 0x1, 
	0x1, 0x1, 0x18c7, 0x4211, 0x4a57, 0x4a21, 0x5aab, 0x6af3, 0x62f3, 0x526f, 0x4a25, 0x529b, 0x5ad5, 0x4211, 0x2109, 0x1, 
	0x1, 0x1, 0x1087, 0x18d3, 0x2127, 0x5ab5, 0x7b79, 0x7b77, 0x7b77, 0x7b77, 0x6af7, 0x41ed, 0x295d, 0x318f, 0x18c5, 0x1, 
	0x1, 0x1, 0x19, 0x10ab, 0x39b3, 0x62b5, 0x7b77, 0x83b7, 0x83f7, 0x83b7, 0x7335, 0x5ab5, 0x3171, 0x109f, 0x847, 0x1, 
	0x1, 0x1, 0x21, 0x18f1, 0x2971, 0x4a33, 0x6b35, 0x9437, 0x9c77, 0x83f7, 0x62f5, 0x4a33, 0x39b1, 0x20ef, 0x15, 0x1, 
	0x1, 0x1, 0x1b, 0x10b1, 0x2131, 0x39b1, 0x62b3, 0x8c37, 0xa4b9, 0x83b7, 0x5ab3, 0x41f3, 0x3171, 0x212f, 0x1b, 0x1, 
	0x1, 0x1, 0x1b, 0x18f1, 0x2931, 0x39b1, 0x62b5, 0x8c39, 0xad39, 0x8c39, 0x5ab5, 0x41f1, 0x3171, 0x2931, 0x863, 0x1, 
	0x1, 0x1, 0x21, 0x2931, 0x316f, 0x39b1, 0x5271, 0x736f, 0x9473, 0x7bb1, 0x5ab3, 0x41f3, 0x39b1, 0x3173, 0x867, 0x3, 
	0x1, 0x5, 0x867, 0x39b3, 0x3171, 0x2965, 0x5add, 0x7be1, 0x8425, 0x7be3, 0x52a1, 0x316d, 0x3171, 0x39b3, 0x10a9, 0x7, 
	0x1, 0x7, 0x10a9, 0x39b3, 0x2925, 0x5297, 0x5ad5, 0x420f, 0x39cf, 0x5293, 0x6317, 0x319d, 0x292f, 0x39b3, 0x10a3, 0x5, 
	0x1, 0x3, 0x189f, 0x2971, 0x39db, 0x52d3, 0x31cf, 0x318d, 0x318d, 0x318d, 0x4a51, 0x4a55, 0x2127, 0x39b3, 0x109d, 0x3, 
	0x1, 0x1, 0x1099, 0x2129, 0x4a59, 0x420f, 0x294b, 0x318d, 0x39cf, 0x318d, 0x318d, 0x5293, 0x2961, 0x3171, 0x1099, 0x1, 
	0x1, 0x1, 0x857, 0x18a5, 0x4a57, 0x318d, 0x294b, 0x318d, 0x39cf, 0x318d, 0x290b, 0x4211, 0x319d, 0x292d, 0x857, 0x1, 
	0x1, 0x1, 0xf, 0x109d, 0x4213, 0x2909, 0x210b, 0x318d, 0x318d, 0x314d, 0x2109, 0x39cd, 0x39dd, 0x20e9, 0x813, 0x1, 
	0x1, 0x1, 0x7, 0x1093, 0x398f, 0x18c7, 0x2109, 0x318d, 0x318d, 0x294b, 0x2109, 0x294b, 0x3999, 0x109f, 0x9, 0x1, 
	0x1, 0x1, 0x3, 0x84b, 0x294d, 0x18c7, 0x18c7, 0x294b, 0x318d, 0x294b, 0x2109, 0x2109, 0x2953, 0x11, 0x3, 0x1, 
	0x1, 0x1, 0x1, 0x849, 0x294b, 0x18c7, 0x2109, 0x318d, 0x398d, 0x294b, 0x18c9, 0x2109, 0x2111, 0xb, 0x1, 0x1, 
};

/* 8 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short St2shoe_b_txt[] = {
	0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 
	0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 
	0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x3, 
	0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x3, 0x7, 
	0x1, 0x1, 0x1, 0x1, 0x3, 0x5, 0x84b, 0x108f, 
	0x1, 0x1, 0x1, 0x1, 0x847, 0x108f, 0x2119, 0x315f, 
	0x1, 0x1, 0x1, 0x5, 0x108f, 0x211b, 0x39a7, 0x526d, 
	0x1, 0x1, 0x3, 0x84b, 0x18d7, 0x31a5, 0x526f, 0x62f3, 
	0x1, 0x1, 0x3, 0x1051, 0x20dd, 0x39a7, 0x5ab1, 0x6b35, 
	0x1, 0x1, 0x3, 0x1053, 0x20df, 0x39e9, 0x5ab3, 0x6b35, 
	0x1, 0x1, 0x1, 0x851, 0x20df, 0x31a7, 0x526f, 0x62f5, 
	0x1, 0x1, 0x1, 0x849, 0x1099, 0x2123, 0x41eb, 0x5271, 
	0x1, 0x1, 0x1, 0x843, 0x294d, 0x2115, 0x2119, 0x315d, 
	0x1, 0x1, 0x1, 0x1, 0x2109, 0x4a51, 0x5ad7, 0x6b59, 
	0x1, 0x1, 0x1, 0x1, 0x1085, 0x294b, 0x4211, 0x5ad7, 
	0x1, 0x1, 0x1, 0x1, 0x1083, 0x2109, 0x318d, 0x4a53, 
};

