#include<ultra64.h>

extern Vtx ManLhand_v[];
extern Vtx ManLhand_vmcur[];
extern Tri ManLhand_tri[];
extern Lights1 ManLhand_material[];
extern Mtx ManLhand_matrix[];

extern unsigned short m1hand_b_txt[];
extern unsigned short m1hand_f_txt[];
extern unsigned short m1hand_s_txt[];
extern unsigned short m1hand_t_txt[];
extern unsigned short m1hara_txt[];
extern unsigned short m1jacket_b_txt[];
extern unsigned short m1jacket_f_txt[];
extern unsigned short m1jacket_s_txt[];
extern unsigned short m1jacket_t_txt[];
extern unsigned short m1loarm_txt[];
extern unsigned short m1met_b_txt[];
extern unsigned short m1met_chin_txt[];
extern unsigned short m1met_f_txt[];
extern unsigned short m1met_glass_txt[];
extern unsigned short m1met_s1_txt[];
extern unsigned short m1met_s2_txt[];
extern unsigned short m1met_t_txt[];
extern unsigned short m1momo_txt[];
extern unsigned short m1neck_txt[];
extern unsigned short m1shoes_txt[];
extern unsigned short m1shoes_b_txt[];
extern unsigned short m1sune_txt[];
extern unsigned short m1uparm_txt[];
extern unsigned short m1waist_b_txt[];
extern unsigned short m1waist_f_txt[];
extern unsigned short m1waist_s_txt[];
extern unsigned short shoes_bottom_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 ManLhand_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(m1hand_b_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&ManLhand_v[0], 7, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(1, 3, 2, 0),
	gsSP1Triangle(4, 5, 6, 0),

	gs_Nin_LoadTextureImage(m1hand_f_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&ManLhand_v[7], 3, 0),
	gsSP1Triangle(0, 1, 2, 0),

	gs_Nin_LoadTextureImage(m1hand_s_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&ManLhand_v[10], 4, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(1, 3, 2, 0),

	gs_Nin_LoadTextureImage(m1hand_t_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&ManLhand_v[14], 4, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(2, 3, 0, 0),
	gsSPEndDisplayList(),
};

Gfx *ManLhand_modelT = NULL;

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 18 vertices */

/******************************************************************************
	vertex & texture
******************************************************************************/


/******************************************************************************
	vertex & texture
******************************************************************************/

Vtx ManLhand_v[]={
	{ -14,-17,-3,0, 93, 2,  -102,-59,-11,255 },   /* v0 p1/V1 used 1 times */ 
	{ 24,0,-5,0, 514, 1,  96,-71,-3,255 },   /* v1 p1/V2 used 2 times */ 
	{ -19,-20,56,0, -1, 516,  -2,-108,51,255 },   /* v2 p1/V3 used 2 times */ 
	{ 27,-1,50,0, 505, 477,  87,58,60,255 },   /* v3 p6/V2 used 1 times */ 
	{ -14,-17,-3,0, 165, 136,  -4,0,-119,255 },   /* v4 p3/V1 used 1 times */ 
	{ -14,17,-3,0, 263, -18,  -4,0,-119,255 },   /* v5 p3/V2 used 1 times */ 
	{ 24,0,-5,0, 448, 150,  -4,0,-119,255 },   /* v6 p3/V3 used 1 times */ 
	{ -19,-20,56,0, 33, 269,  -2,-108,51,255 },   /* v7 p4/V1 used 1 times */ 
	{ 27,-1,50,0, 533, 239,  87,58,60,255 },   /* v8 p4/V2 used 1 times */ 
	{ -19,20,56,0, 28, 701,  -91,58,51,255 },   /* v9 p4/V3 used 1 times */ 
	{ -19,-20,56,0, 543, -5,  -2,-108,51,255 },   /* v10 p7/V1 used 1 times */ 
	{ -19,20,56,0, 510, 516,  -91,58,51,255 },   /* v11 p5/V1 used 2 times */ 
	{ -14,-17,-3,0, -2, 36,  -102,-59,-11,255 },   /* v12 p5/V3 used 2 times */ 
	{ -14,17,-3,0, -31, 476,  -10,119,-6,255 },   /* v13 p5/V2 used 1 times */ 
	{ 27,-1,50,0, 7, 441,  87,58,60,255 },   /* v14 p8/V1 used 2 times */ 
	{ 24,0,-5,0, 32, -27,  96,-71,-3,255 },   /* v15 p8/V2 used 1 times */ 
	{ -14,17,-3,0, 445, -38,  -10,119,-6,255 },   /* v16 p8/V3 used 2 times */ 
	{ -19,20,56,0, 510, 468,  -91,58,51,255 },   /* v17 p2/V2 used 1 times */ 
};


/*   0 vertices */
/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short m1hand_b_txt[] = {
	0xcd05, 0xd545, 0xc503, 0xcd05, 0xcd05, 0xc4c3, 0xc4c3, 0xcd03, 0xd503, 0xe583, 0xfe45, 0xfe45, 0xfe41, 0xfe41, 0xfe41, 0xfe41, 
	0xd545, 0xcd03, 0xbc83, 0xb443, 0xb443, 0xbc83, 0xc4c3, 0xcd03, 0xdd83, 0xfe43, 0xfe87, 0xfe45, 0xfe41, 0xfe41, 0xfe41, 0xfe41, 
	0xc4c3, 0xbcc3, 0xac43, 0xa401, 0xa401, 0xb443, 0xc4c3, 0xd543, 0xf603, 0xfe47, 0xfe8d, 0xe5c7, 0xe581, 0xf601, 0xfe41, 0xfe41, 
	0xc4c3, 0xbc83, 0xac01, 0xa401, 0xac41, 0xbc83, 0xd543, 0xedc3, 0xfe47, 0xfed1, 0xf64d, 0xb485, 0xd543, 0xe581, 0xe5c1, 0xedc1, 
	0xcd01, 0xc4c3, 0xc4c3, 0xc4c3, 0xcd01, 0xdd81, 0xedc3, 0xf64b, 0xfed3, 0xfe8b, 0xb481, 0x93c5, 0xbcc7, 0xd545, 0xd543, 0xdd81, 
	0xd541, 0xe5c3, 0xe583, 0xdd81, 0xedc3, 0xf609, 0xfe8f, 0xff13, 0xf649, 0x72c1, 0x3141, 0x8343, 0xac45, 0xbcc7, 0xbcc7, 0xcd49, 
	0xedc1, 0xf603, 0xf601, 0xedc1, 0xf605, 0xfecb, 0xf649, 0xa403, 0x3941, 0x1, 0x1, 0x2901, 0x6a81, 0x8b83, 0x9c07, 0xbcc9, 
	0xedc3, 0xfe01, 0xfe41, 0xf603, 0xa401, 0x8341, 0x3981, 0x1, 0x1, 0x1041, 0x841, 0x1, 0x801, 0x28c1, 0x49c1, 0x5a01, 
	0xddcb, 0xfe8f, 0xfe43, 0xf603, 0x9bc1, 0x1881, 0x1881, 0x1081, 0x2901, 0x20c1, 0x20c1, 0x1041, 0x841, 0x1081, 0x18c1, 0x1881, 
	0xcd4b, 0xff1b, 0xfe85, 0xd541, 0x6a81, 0x49c1, 0x3141, 0x20c1, 0x72c1, 0x9bc5, 0x5a43, 0x1881, 0x5203, 0x6a83, 0x3981, 0x2901, 
	0x8b83, 0xf6d9, 0xf691, 0xe581, 0xdd41, 0xb441, 0x6a81, 0x2901, 0xbcc7, 0xf609, 0xac43, 0x3941, 0xc507, 0xe5cb, 0x8b83, 0x3101, 
	0xac43, 0xc509, 0xfed9, 0xfe91, 0xfe87, 0xfe41, 0xc4c1, 0x5a01, 0xe611, 0xfed3, 0xcd01, 0x5a41, 0xe60d, 0xfed3, 0xc4c1, 0x4181, 
	0xee0b, 0xc4c3, 0xc50d, 0xff63, 0xff1b, 0xfe87, 0xe5c1, 0x6241, 0xde15, 0xfed5, 0xcd01, 0x5a01, 0xde13, 0xfed5, 0xcd01, 0x5201, 
	0xfed3, 0xddc7, 0x9381, 0xac8b, 0xf695, 0xfecf, 0xe5c3, 0x5201, 0xe615, 0xfed5, 0xcd01, 0x5a01, 0xddcf, 0xfed7, 0xcd01, 0x5201, 
	0xfed7, 0xee09, 0xb441, 0x5a41, 0xc4c7, 0xee07, 0xc4c1, 0x49c1, 0xe615, 0xfed5, 0xc4c1, 0x5201, 0xddcf, 0xfed7, 0xc501, 0x5201, 
	0xfe93, 0xee07, 0xac41, 0x6241, 0xddcd, 0xee53, 0xb441, 0x6281, 0xe613, 0xfe93, 0xbc81, 0x6281, 0xe5cf, 0xfe93, 0xbcc1, 0x5a41, 
};

/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short m1hand_f_txt[] = {
	0x49c1, 0xc4c1, 0xfed1, 0xe5cd, 0x5201, 0xbcc1, 0xfed1, 0xe5cd, 0x5201, 0xbc81, 0xf691, 0xd58d, 0x51c1, 0xb441, 0xf651, 0xee0d, 
	0x49c1, 0xbc81, 0xf64f, 0xd58b, 0x51c1, 0xb441, 0xee4f, 0xcd4b, 0x49c1, 0x93c1, 0xc54d, 0xac89, 0x4181, 0x8b41, 0xb4cb, 0xbcc9, 
	0x4181, 0x9bc1, 0xbccb, 0x9c09, 0x3941, 0x8b41, 0xb48b, 0x9c09, 0x3941, 0x7b01, 0x93c9, 0x7b07, 0x2901, 0x5a01, 0x6ac7, 0x7305, 
	0x3941, 0x7301, 0x8349, 0x6285, 0x20c1, 0x5201, 0x7307, 0x6285, 0x2901, 0x5a41, 0x6ac7, 0x5a45, 0x20c1, 0x3981, 0x5203, 0x49c3, 
	0x3141, 0x6281, 0x7307, 0x6285, 0x20c1, 0x49c1, 0x6287, 0x5a45, 0x2901, 0x49c1, 0x5203, 0x49c3, 0x2901, 0x3981, 0x49c3, 0x5203, 
	0x3141, 0x6a81, 0x7b07, 0x7307, 0x3101, 0x49c1, 0x6ac5, 0x6245, 0x3941, 0x4181, 0x5203, 0x5203, 0x3101, 0x3941, 0x4183, 0x5a43, 
	0x3941, 0x6241, 0x7b05, 0x8347, 0x3941, 0x5201, 0x72c5, 0x7305, 0x4181, 0x4181, 0x5203, 0x6243, 0x2901, 0x3101, 0x49c3, 0x6283, 
	0x3141, 0x6281, 0x8b87, 0x8b85, 0x3981, 0x5a01, 0x8347, 0x8b85, 0x4181, 0x5201, 0x7307, 0x7b05, 0x2901, 0x6a81, 0x9c09, 0x93c7, 
	0x3141, 0x6241, 0xac49, 0x9c07, 0x3941, 0x6281, 0xac89, 0xa447, 0x3941, 0x8b41, 0xddcd, 0xac49, 0x3941, 0xa401, 0xe5cd, 0xd58d, 
	0x3101, 0x8b81, 0xe60f, 0xbccb, 0x3141, 0x8b81, 0xe60d, 0xc50b, 0x4181, 0xbcc1, 0xfed1, 0xc50b, 0x49c1, 0xbcc1, 0xfe8f, 0xf64d, 
	0x3101, 0xbc81, 0xfed1, 0xd58d, 0x49c1, 0xb481, 0xfed1, 0xdd8d, 0x5201, 0xc4c1, 0xfed1, 0xddcd, 0x5a01, 0xc4c1, 0xfe91, 0xf64d, 
	0x4181, 0xc501, 0xfe91, 0xe60f, 0x5201, 0xc4c1, 0xfe91, 0xe60f, 0x5a01, 0xc4c1, 0xfe91, 0xe60f, 0x5a01, 0xc4c1, 0xfe91, 0xf64f, 
	0x49c1, 0xcd01, 0xfe91, 0xddcd, 0x5201, 0xc4c1, 0xfe91, 0xddcd, 0x5201, 0xc4c1, 0xfe91, 0xddcd, 0x5201, 0xc4c1, 0xfe91, 0xee4d, 
	0x49c1, 0xc501, 0xfed1, 0xddcb, 0x5a01, 0xc4c1, 0xfed1, 0xddcb, 0x5a01, 0xc4c1, 0xfed1, 0xddcb, 0x5a01, 0xc4c1, 0xfe91, 0xee0b, 
	0x49c1, 0xc4c1, 0xfe91, 0xddcb, 0x5a01, 0xc4c1, 0xfe91, 0xddcb, 0x5a01, 0xc4c1, 0xfe91, 0xddcb, 0x5a01, 0xc4c1, 0xf691, 0xf64b, 
	0x6241, 0xbcc1, 0xee4d, 0xddcb, 0x6281, 0xbcc1, 0xee4d, 0xddcb, 0x6281, 0xbcc1, 0xee4d, 0xddcb, 0x6281, 0xbcc1, 0xee0d, 0xee0d, 
};

/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short m1hand_s_txt[] = {
	0x2901, 0x20c1, 0x2901, 0x3941, 0x5201, 0x6241, 0x7b01, 0xbc81, 0xcd01, 0xe5c3, 0xf5c3, 0x9bc1, 0x8b41, 0xa401, 0xb441, 0xac41, 
	0x3101, 0x49c1, 0x7ac1, 0xa3c1, 0xc481, 0xd501, 0xf5c1, 0xfe01, 0xfe43, 0xfe89, 0xcd03, 0x9381, 0xac41, 0xb441, 0xb441, 0xbc81, 
	0x72c1, 0xac01, 0xbc81, 0xcd01, 0xf5c1, 0xfe41, 0xfe01, 0xf605, 0xfe8b, 0xee07, 0x9bc1, 0xac41, 0xc4c1, 0xd541, 0xd501, 0xc4c1, 
	0xa401, 0xd501, 0xdd41, 0xedc1, 0xfe01, 0xf601, 0xf605, 0xfecd, 0xf649, 0x9bc1, 0xb441, 0xcd01, 0xe581, 0xfe41, 0xfe03, 0xd501, 
	0xd501, 0xedc1, 0xfe01, 0xfe43, 0xf603, 0xfe47, 0xfecb, 0xe5c5, 0x6a81, 0xa3c1, 0xdd81, 0xf5c1, 0xfe41, 0xfe89, 0xfe87, 0xfe41, 
	0xedc1, 0xfe01, 0xfe43, 0xfe03, 0xfe47, 0xfe87, 0xc4c1, 0x3101, 0x1081, 0xbc81, 0xfecb, 0xfecd, 0xfe8b, 0xfe47, 0xcd03, 0xdd41, 
	0xfe41, 0xfe41, 0xfe41, 0xfe87, 0xfe49, 0x7ac1, 0x841, 0x1, 0x1, 0x1081, 0x8343, 0xb443, 0xbc83, 0xa3c1, 0xa3c1, 0xdd41, 
	0xfe41, 0xfe41, 0xfe41, 0xfe89, 0xcd01, 0x1041, 0x1, 0x1, 0x1, 0x1, 0x1, 0x841, 0x7b01, 0xa401, 0xdd81, 0xfe41, 
	0xfe41, 0xfe41, 0xfe45, 0xe5c7, 0x8301, 0x1081, 0x1881, 0x1081, 0x1081, 0x841, 0x1, 0x2901, 0xb441, 0xe585, 0xfe43, 0xfe41, 
	0xfe41, 0xfe41, 0xfe47, 0xe587, 0x8b41, 0x2901, 0x3141, 0x5201, 0x7ac1, 0x6a81, 0x3141, 0x20c1, 0xbcc3, 0xfe49, 0xfe45, 0xfe41, 
	0xfe01, 0xfe41, 0xfe43, 0xfe45, 0xac41, 0x6281, 0xa3c1, 0xc4c1, 0xcd01, 0xccc1, 0xa401, 0x3981, 0x9385, 0xfe8d, 0xfe8d, 0xfe43, 
	0xfe41, 0xfe01, 0xfe41, 0xfe41, 0xd501, 0xac01, 0xedc1, 0xedc1, 0xedc1, 0xe581, 0xdd41, 0xb441, 0x8343, 0xee0b, 0xfed3, 0xfe89, 
	0xfe41, 0xfe41, 0xfe41, 0xfe01, 0xf5c1, 0xe581, 0xf5c1, 0xf5c1, 0xf5c1, 0xf5c1, 0xf5c1, 0xedc1, 0xcd01, 0xc4c5, 0xf64f, 0xfe8f, 
	0xfe41, 0xfe41, 0xfe43, 0xfe41, 0xfe01, 0xfe01, 0xfe01, 0xf5c1, 0xf601, 0xf601, 0xf601, 0xf601, 0xf5c1, 0xcd01, 0xdd83, 0xfe49, 
	0xfe41, 0xfe41, 0xfe43, 0xfe43, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xf601, 0xf601, 0xf601, 0xf601, 0xfe03, 
	0xfe41, 0xfe41, 0xfe43, 0xfe43, 0xfe41, 0xfe41, 0xfe01, 0xfe01, 0xfe01, 0xf601, 0xf601, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe41, 
};

/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short m1hand_t_txt[] = {
	0xfe41, 0xfe41, 0xfe41, 0xee41, 0xe601, 0xe601, 0xe601, 0xee01, 0xee01, 0xee01, 0xee41, 0xe601, 0xee01, 0xfe41, 0xfe41, 0xfe41, 
	0xfe41, 0xfe41, 0xab85, 0x714d, 0x714d, 0x710d, 0x714d, 0x798d, 0x798d, 0x798d, 0x798d, 0x694d, 0x798f, 0xdcc9, 0xfe41, 0xfe41, 
	0xfe41, 0xfe81, 0xab47, 0xd02d, 0xf0b5, 0xf175, 0xf0b3, 0xf033, 0xe831, 0xf031, 0xe831, 0xf033, 0xf0f5, 0xf511, 0xfe41, 0xfe41, 
	0xfe41, 0xfe41, 0xf601, 0xc291, 0xf0b3, 0xfa39, 0xe8af, 0xd82b, 0xe02d, 0xd82b, 0xf033, 0xf937, 0xfcd7, 0xfe81, 0xfe41, 0xfe41, 
	0xfe41, 0xfe41, 0xfe81, 0xe601, 0xba51, 0xf02f, 0xf833, 0xe02d, 0xd029, 0xe02f, 0xf977, 0xfd13, 0xfec1, 0xfe41, 0xfe41, 0xfe41, 
	0xfe41, 0xfe41, 0xfe41, 0xfe81, 0xee41, 0xc291, 0xf031, 0xf031, 0xf031, 0xf9f9, 0xfcd7, 0xfe81, 0xfe41, 0xfe41, 0xfe41, 0xfe41, 
	0xfe41, 0xedc1, 0xf601, 0xfe41, 0xfe81, 0xee01, 0xca93, 0xf833, 0xf977, 0xfcd9, 0xf641, 0xfe41, 0xfe41, 0xfe41, 0xfe41, 0xfe41, 
	0xf601, 0xd501, 0xedc1, 0xfe41, 0xfe41, 0xfe41, 0xe581, 0xec11, 0xfd51, 0xf641, 0xedc1, 0xfe01, 0xfe41, 0xf601, 0xf601, 0xfe41, 
	0xf601, 0xdd41, 0xfe49, 0xfe43, 0xfe41, 0xd541, 0xdd41, 0xfe81, 0xfe81, 0xdd81, 0xd501, 0xf5c1, 0xfe41, 0xdd41, 0xdd41, 0xfe01, 
	0xfe01, 0xee03, 0xfe8b, 0xfe41, 0xfe41, 0xd541, 0xee0b, 0xfe89, 0xfe01, 0xd501, 0xe5c5, 0xfe49, 0xfe41, 0xe5c3, 0xf64d, 0xfe87, 
	0xdd41, 0xfe41, 0xfe41, 0xfe41, 0xfe81, 0xfe01, 0xfe87, 0xfe83, 0xfe41, 0xedc1, 0xfe47, 0xfec7, 0xfe81, 0xfe41, 0xfe8b, 0xfe43, 
	0x8301, 0xedc1, 0xfe85, 0xd543, 0xbc81, 0xf601, 0xf601, 0xdd81, 0xf601, 0xf601, 0xf601, 0xc4c1, 0xcd01, 0xe581, 0xfe01, 0xfe41, 
	0x5201, 0xd541, 0xfecd, 0xcd49, 0x49c1, 0xc4c1, 0xfe89, 0xc4c3, 0x8b41, 0xd541, 0xfe41, 0xbc81, 0x5a01, 0xbcc1, 0xf647, 0xfe45, 
	0x49c1, 0xcd01, 0xfed3, 0xee4d, 0x5201, 0xb481, 0xff15, 0xee09, 0x7b01, 0xdd41, 0xfe4b, 0xedc3, 0x5a01, 0xbcc1, 0xfe8d, 0xfe47, 
	0x49c1, 0xc501, 0xfed3, 0xe60d, 0x4981, 0xac01, 0xfed5, 0xee09, 0x6a81, 0xd543, 0xff13, 0xe583, 0x5201, 0xc4c1, 0xfe8f, 0xfe87, 
	0x49c1, 0xbc81, 0xfe91, 0xe5cd, 0x4181, 0x9341, 0xfe95, 0xe5c9, 0x6241, 0xc4c3, 0xfed1, 0xdd83, 0x49c1, 0xb481, 0xfed3, 0xfe89, 
};

