#include<ultra64.h>

extern Vtx ManLhand_1b_v[];
extern Vtx ManLhand_1b_vmcur[];
extern Tri ManLhand_1b_tri[];
extern Lights1 ManLhand_1b_material[];
extern Mtx ManLhand_1b_matrix[];

extern unsigned short Sshoes_bottom_txt[];
extern unsigned short St1best_b_txt[];
extern unsigned short St1best_f_txt[];
extern unsigned short St1best_s_txt[];
extern unsigned short St1best_t_txt[];
extern unsigned short St1farm_b_txt[];
extern unsigned short St1farm_f_txt[];
extern unsigned short St1hand_b_txt[];
extern unsigned short St1hand_f_txt[];
extern unsigned short St1hand_s_txt[];
extern unsigned short St1hand_t_txt[];
extern unsigned short St1hara_txt[];
extern unsigned short St1met_b_txt[];
extern unsigned short St1met_f_txt[];
extern unsigned short St1met_gl_txt[];
extern unsigned short St1met_s_txt[];
extern unsigned short St1met_t_txt[];
extern unsigned short St1neck_txt[];
extern unsigned short St1shin_b_txt[];
extern unsigned short St1shin_f_txt[];
extern unsigned short St1shoe_txt[];
extern unsigned short St1shoe_b_txt[];
extern unsigned short St1thigh_b_txt[];
extern unsigned short St1thigh_f_txt[];
extern unsigned short St1uarm_b_txt[];
extern unsigned short St1uarm_f_txt[];
extern unsigned short St1waist_b_txt[];
extern unsigned short St1waist_f_txt[];
extern unsigned short St1waist_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 ManLhand_1b_model[]={

	gsSPTexture(65535, 65535,0, 0, 1),
	gsDPPipeSync(),
	gsDPSetCombineMode(G_CC_MODULATERGBA,G_CC_PASS2),

	gs_Nin_SetUpTileDescrip(G_IM_FMT_RGBA,G_IM_SIZ_16b,8,8,0,0,G_TX_CLAMP,3,0,G_TX_CLAMP,3,0),
	gs_Nin_LoadTextureImage(St1hand_b_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,8,8,0,7),

	gsSPVertex(&ManLhand_1b_v[0], 4, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(2, 3, 0, 0),

	gs_Nin_LoadTextureImage(St1hand_f_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,8,8,0,7),

	gsSPVertex(&ManLhand_1b_v[4], 3, 0),
	gsSP1Triangle(0, 1, 2, 0),

	gs_Nin_LoadTextureImage(St1hand_s_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,8,8,0,7),

	gsSPVertex(&ManLhand_1b_v[7], 3, 0),
	gsSP1Triangle(0, 1, 2, 0),

	gs_Nin_LoadTextureImage(St1hand_t_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,8,8,0,7),

	gsSPVertex(&ManLhand_1b_v[10], 4, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(2, 3, 0, 0),
	gsSPEndDisplayList(),
};

Gfx *ManLhand_1b_modelT = NULL;

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 14 vertices */

/******************************************************************************
	vertex & texture
******************************************************************************/


/******************************************************************************
	vertex & texture
******************************************************************************/


/******************************************************************************
	vertex & texture
******************************************************************************/


/******************************************************************************
	vertex & texture
******************************************************************************/


/******************************************************************************
	vertex & texture
******************************************************************************/


/******************************************************************************
	vertex & texture
******************************************************************************/


/******************************************************************************
	vertex & texture
******************************************************************************/

Vtx ManLhand_1b_v[]={
	{ -18,-20,56,0, -20, 255, -26, -113, 28, 0 },   /* v0 p12/V1 used 2 times */ 
	{ -9,0,-4,0, 108, -59, -94, 0, -73, 0 },   /* v1 p12/V2 used 1 times */ 
	{ 19,0,-5,0, 250, -43, 87, 0, -82, 0 },   /* v2 p12/V3 used 2 times */ 
	{ 27,-1,50,0, 247, 255, 89, 0, 81, 0 },   /* v3 p7/V2 used 1 times */ 
	{ -18,-20,56,0, 17, 160, -26, -113, 28, 0 },   /* v4 p9/V1 used 1 times */ 
	{ 27,-1,50,0, 280, 184, 89, 0, 81, 0 },   /* v5 p9/V2 used 1 times */ 
	{ -18,20,56,0, 28, 315, -26, 113, 30, 0 },   /* v6 p9/V3 used 1 times */ 
	{ -9,0,-4,0, -131, 129, -94, 0, -73, 0 },   /* v7 p10/V1 used 1 times */ 
	{ -18,-20,56,0, 256, 0, -26, -113, 28, 0 },   /* v8 p10/V2 used 1 times */ 
	{ -18,20,56,0, 256, 260, -26, 113, 30, 0 },   /* v9 p10/V3 used 1 times */ 
	{ 19,0,-5,0, 12, -94, 87, 0, -82, 0 },   /* v10 p11/V1 used 2 times */ 
	{ -9,0,-4,0, 137, -112, -94, 0, -73, 0 },   /* v11 p11/V2 used 1 times */ 
	{ -18,20,56,0, 256, 256, -26, 113, 30, 0 },   /* v12 p11/V3 used 2 times */ 
	{ 27,-1,50,0, 12, 256, 89, 0, 81, 0 },   /* v13 p8/V2 used 1 times */ 
};


/*   0 vertices */
/* 8 x 8  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short St1hand_b_txt[] = {
	0x1, 0x2805, 0x784b, 0xb893, 0xe8d7, 0xf19b, 0xe8d7, 0xe8d9, 
	0x1803, 0x684b, 0xb893, 0xe097, 0xf99d, 0xd959, 0xc895, 0xe0d7, 
	0x904d, 0xd095, 0xe8d9, 0xf99d, 0xb957, 0x5809, 0xa04f, 0xc895, 
	0xf19b, 0xe919, 0xa893, 0x608b, 0x1, 0x1, 0x2003, 0x6049, 
	0xfb65, 0xe19b, 0x3805, 0x1, 0x3805, 0x1803, 0x1803, 0x801, 
	0xb997, 0xf261, 0xc8d5, 0x5809, 0xc959, 0x804d, 0xc117, 0x5049, 
	0xc917, 0xb9d9, 0xfa61, 0x988f, 0xe25f, 0x888f, 0xe21d, 0x784d, 
	0xea1f, 0x7009, 0xc957, 0x888d, 0xda1d, 0x888d, 0xd9dd, 0x784d, 
};

/* 8 x 8  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short St1hand_f_txt[] = {
	0x704b, 0xd159, 0x784b, 0xc957, 0x6049, 0xa8d3, 0x5007, 0xc0d5, 
	0x3005, 0x5807, 0x2803, 0x5809, 0x2803, 0x4807, 0x1001, 0x4005, 
	0x801, 0x801, 0x801, 0x1001, 0x801, 0x1801, 0x801, 0x3805, 
	0x801, 0x1001, 0x801, 0x1, 0x1, 0x801, 0x801, 0x6009, 
	0x1803, 0x5007, 0x1803, 0x5009, 0x3805, 0x804d, 0x3805, 0xd117, 
	0x4807, 0xb8d5, 0x6049, 0xc917, 0x704b, 0xd159, 0x784d, 0xf1df, 
	0x684b, 0xd959, 0x888d, 0xd99b, 0x888d, 0xd99b, 0x888d, 0xf1df, 
	0x704b, 0xd959, 0x888f, 0xd999, 0x884f, 0xd999, 0x884d, 0xf19d, 
};

/* 8 x 8  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short St1hand_s_txt[] = {
	0x2805, 0x5849, 0xa891, 0xd959, 0xfaa3, 0x988f, 0x784b, 0xa091, 
	0xa891, 0xe119, 0xf9df, 0xfc2d, 0xdae1, 0x980d, 0xd0d5, 0xd0d5, 
	0xe8d9, 0xf11b, 0xfaa3, 0xa219, 0x684b, 0xe95b, 0xe95b, 0xd0d5, 
	0xe8d9, 0xf95b, 0x88cf, 0x1, 0x1, 0x4889, 0x684b, 0xb893, 
	0xf0d9, 0xe117, 0x3005, 0x1803, 0x3005, 0x1, 0xa8d3, 0xf91b, 
	0xe8d9, 0xe919, 0x904f, 0xb091, 0xd095, 0x784b, 0xb115, 0xfa1f, 
	0xe8d9, 0xe8d9, 0xe0d7, 0xe8d7, 0xe095, 0xd853, 0xb851, 0xe95b, 
	0xe8d9, 0xe919, 0xf0d9, 0xe897, 0xba5d, 0xc467, 0xb29d, 0xd895, 
};

/* 8 x 8  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short St1hand_t_txt[] = {
	0xa8d1, 0xd0d5, 0xe8d9, 0xe8d9, 0xe8d9, 0xe8d9, 0xe0d7, 0xd095, 
	0xa8d1, 0xc893, 0xe055, 0xe055, 0xe055, 0xe055, 0xe897, 0xd895, 
	0x908f, 0xa217, 0xc3e5, 0xbc25, 0xbc25, 0xb3a3, 0xb21b, 0xc8d5, 
	0x6a55, 0xef7b, 0xe77b, 0xefbb, 0xefbb, 0xf7fd, 0xdf39, 0xd631, 
	0x7bdf, 0xf7ff, 0xef7b, 0xef7b, 0xf7bd, 0xffff, 0xef7b, 0xffff, 
	0x5849, 0xb361, 0x9b9f, 0x9a9b, 0xac23, 0xabe3, 0xad6b, 0x931d, 
	0x784b, 0xd199, 0x7009, 0xc957, 0x880b, 0xc0d3, 0x5807, 0xd095, 
	0x704b, 0xda1d, 0x688b, 0xda1d, 0x908f, 0xd99b, 0x784b, 0xfa1f, 
};

