#include<ultra64.h>

extern Vtx ManLuarm_1b_v[];
extern Vtx ManLuarm_1b_vmcur[];
extern Tri ManLuarm_1b_tri[];
extern Lights1 ManLuarm_1b_material[];
extern Mtx ManLuarm_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 ManLuarm_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,16,16,0,0,G_TX_CLAMP,4,0,G_TX_CLAMP,4,0),
	gs_Nin_LoadTextureImage(St1farm_b_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&ManLuarm_1b_v[0], 3, 0),
	gsSP1Triangle(0, 1, 2, 0),

	gs_Nin_LoadTextureImage(St1uarm_b_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&ManLuarm_1b_v[3], 5, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(2, 3, 0, 0),
	gsSP1Triangle(4, 0, 3, 0),

	gs_Nin_LoadTextureImage(St1uarm_f_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&ManLuarm_1b_v[8], 6, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(2, 3, 0, 0),
	gsSP1Triangle(2, 4, 3, 0),
	gsSP1Triangle(5, 0, 3, 0),
	gsSPEndDisplayList(),
};

Gfx *ManLuarm_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 ManLuarm_1b_v[]={
	{ 0,16,90,0, 314, 323, 10, 94, 74, 0 },   /* v0 p11/V1 used 1 times */ 
	{ -12,-12,90,0, 549, 512, -86, -56, 60, 0 },   /* v1 p11/V2 used 1 times */ 
	{ 17,-12,90,0, -37, 512, 87, -56, 59, 0 },   /* v2 p11/V3 used 1 times */ 
	{ 0,-16,-18,0, 274, 501, 7, -102, -61, 0 },   /* v3 p10/V3 used 3 times */ 
	{ 22,12,-5,0, 93, 436, 98, 57, -39, 0 },   /* v4 p13/V2 used 1 times */ 
	{ 17,-12,90,0, 133, 0, 87, -56, 59, 0 },   /* v5 p10/V1 used 2 times */ 
	{ -12,-12,90,0, 378, 0, -86, -56, 60, 0 },   /* v6 p10/V2 used 2 times */ 
	{ -25,24,-10,0, 488, 458, -83, 71, -46, 0 },   /* v7 p15/V1 used 1 times */ 
	{ 0,16,90,0, 256, 0, 10, 94, 74, 0 },   /* v8 p9/V2 used 3 times */ 
	{ 17,-12,90,0, 472, 1, 87, -56, 59, 0 },   /* v9 p12/V2 used 1 times */ 
	{ 22,12,-5,0, 533, 442, 98, 57, -39, 0 },   /* v10 p16/V1 used 3 times */ 
	{ -25,24,-10,0, -57, 465, -83, 71, -46, 0 },   /* v11 p16/V3 used 3 times */ 
	{ 0,-16,-18,0, 258, 502, 7, -102, -61, 0 },   /* v12 p16/V2 used 1 times */ 
	{ -12,-12,90,0, 105, 1, -86, -56, 60, 0 },   /* v13 p9/V1 used 1 times */ 
};


/*   0 vertices */
/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short St1farm_b_txt[] = {
	0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 
	0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 
	0x48cb, 0x48cb, 0x48cb, 0x48cb, 0x48cb, 0x48cb, 0x48cb, 0x48cb, 0x48cb, 0x48cb, 0x48cb, 0x48cb, 0x48cb, 0x48cb, 0x48cb, 0x48cb, 
	0xd013, 0xd813, 0xd013, 0xd013, 0xd013, 0xd013, 0xd013, 0xd013, 0xd013, 0xd013, 0xc813, 0xd011, 0xd011, 0xd013, 0xd013, 0xc811, 
	0xe013, 0xe815, 0xe815, 0xe013, 0xe013, 0xd813, 0xc811, 0xc811, 0xc011, 0xc811, 0xc811, 0xd013, 0xd813, 0xe013, 0xd813, 0xd013, 
	0xf815, 0xf815, 0xf815, 0xf815, 0xf015, 0xe815, 0xd813, 0xd013, 0xc811, 0xd013, 0xd813, 0xe815, 0xf815, 0xf815, 0xf015, 0xe815, 
	0xf899, 0xf899, 0xf899, 0xf899, 0xf857, 0xf817, 0xf815, 0xf015, 0xf015, 0xf015, 0xf815, 0xf817, 0xf857, 0xf817, 0xf817, 0xf015, 
	0xf8db, 0xf91d, 0xf91d, 0xf91b, 0xf8db, 0xf899, 0xf859, 0xf859, 0xf857, 0xf817, 0xf859, 0xf8db, 0xf8db, 0xf8db, 0xf899, 0xf817, 
	0xf91b, 0xf95d, 0xf95d, 0xf95d, 0xf95d, 0xf91b, 0xf91d, 0xf91d, 0xf95d, 0xf91d, 0xf95d, 0xf95d, 0xf95d, 0xf91d, 0xf91d, 0xf8db, 
	0xf91b, 0xf95d, 0xf95d, 0xf95d, 0xf95d, 0xf95d, 0xf99f, 0xf99f, 0xf9df, 0xf9df, 0xf99f, 0xf99f, 0xf95d, 0xf95d, 0xf95d, 0xf91b, 
	0xf8db, 0xf95d, 0xf95d, 0xf95d, 0xf95d, 0xf99d, 0xf99f, 0xf99f, 0xf9e1, 0xf9df, 0xf99f, 0xf99f, 0xf95d, 0xf95d, 0xf95d, 0xf91d, 
	0xf8db, 0xf91b, 0xf91d, 0xf95d, 0xf95d, 0xf95d, 0xf99f, 0xf99f, 0xf9df, 0xf9df, 0xf99f, 0xf99f, 0xf95d, 0xf95d, 0xf95d, 0xf91b, 
	0xf8db, 0xf91b, 0xf91d, 0xf91d, 0xf95d, 0xf95f, 0xf95f, 0xf95f, 0xf99f, 0xf99f, 0xf95f, 0xf95d, 0xf95d, 0xf95d, 0xf91d, 0xf8db, 
	0xf899, 0xf8db, 0xf8db, 0xf8dd, 0xf0d9, 0xb893, 0x908f, 0x808f, 0x888f, 0xa091, 0xd097, 0xf8db, 0xf91b, 0xf91b, 0xf8db, 0xf859, 
	0xe815, 0xf817, 0xf817, 0xa80f, 0x2805, 0x843, 0x29cd, 0x639b, 0x4293, 0x214b, 0x803, 0x6009, 0xe857, 0xf859, 0xf817, 0xe815, 
	0xc811, 0xd813, 0xc811, 0x1001, 0x83, 0x39cf, 0x739d, 0xad6b, 0x8c63, 0x4a53, 0x18c7, 0x1, 0x800b, 0xf015, 0xd813, 0xc811, 
};

/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short St1uarm_b_txt[] = {
	0xb5ef, 0xc4a7, 0xf815, 0xf817, 0xf859, 0x800b, 0x1107, 0x94a5, 0x6b9b, 0x43, 0xb811, 0xf817, 0xf813, 0xe199, 0xbdad, 0xb5ef, 
	0xb5ad, 0xb62f, 0xd467, 0xf959, 0xf91d, 0xc919, 0x1845, 0x4293, 0x320f, 0x3847, 0xf017, 0xf815, 0xe21b, 0xbded, 0xbe2f, 0xbdef, 
	0xb5ad, 0xbdef, 0xdf37, 0xeeb5, 0xebe5, 0xf9dd, 0xd115, 0x888f, 0x904f, 0xe855, 0xf159, 0xdbe5, 0xc671, 0xbe31, 0xbdef, 0xb5ad, 
	0xb5ad, 0xd6b5, 0xef7b, 0xf7bd, 0xeffd, 0xe6f7, 0xedaf, 0xf469, 0xfbe7, 0xe469, 0xce31, 0xc6b5, 0xc671, 0xbdef, 0xbdef, 0xb5ad, 
	0xbdef, 0xdef7, 0xefbd, 0xf7bd, 0xef7b, 0xe77b, 0xdf39, 0xdf79, 0xd739, 0xd737, 0xceb5, 0xce73, 0xc631, 0xbdef, 0xbdef, 0xb5ad, 
	0xc631, 0xdef7, 0xef7b, 0xef7b, 0xef7b, 0xe739, 0xdef7, 0xdef7, 0xd6f5, 0xd6b5, 0xce73, 0xce71, 0xbdef, 0xb5ad, 0xb5ad, 0xadad, 
	0xc631, 0xdef7, 0xe77b, 0xef7b, 0xef7b, 0xe739, 0xdef7, 0xd6b5, 0xceb3, 0xce73, 0xc631, 0xbdef, 0xad6b, 0xa529, 0xa529, 0x9ce7, 
	0xc631, 0xd6b5, 0xe739, 0xef79, 0xe739, 0xdef7, 0xd6b5, 0xce73, 0xc631, 0xbdef, 0xad6b, 0x9ce7, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 
	0xd6b5, 0xdef7, 0xe739, 0xdef7, 0xd6b5, 0xce73, 0xbdef, 0xb5ad, 0xad6b, 0xa529, 0x94a5, 0x8c63, 0x8c63, 0x94a5, 0x94a5, 0x94a5, 
	0xe739, 0xef7b, 0xef7b, 0xe739, 0xce73, 0xb5ad, 0xad6b, 0xa529, 0x9ce7, 0x9ce7, 0x94a5, 0x94a5, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 
	0xef7b, 0xf7bd, 0xffbd, 0xf7bd, 0xe739, 0xd6b5, 0xc631, 0xbdef, 0xadad, 0xad6b, 0xa56b, 0xad6b, 0xadad, 0xadad, 0xad6b, 0xa529, 
	0xefbb, 0xf7bd, 0xffff, 0xffff, 0xf7bd, 0xef7b, 0xe739, 0xdef7, 0xd6b5, 0xce73, 0xc631, 0xc631, 0xbe31, 0xbdef, 0xb5ad, 0xa52b, 
	0xf7bd, 0xffff, 0xffff, 0xffff, 0xffff, 0xf7bd, 0xef7b, 0xe739, 0xdf39, 0xd6b5, 0xce73, 0xce73, 0xc631, 0xbdef, 0xb5ad, 0xa529, 
	0xf7bd, 0xffff, 0xffff, 0xffff, 0xffff, 0xf7bd, 0xef7b, 0xe739, 0xdef7, 0xd6b5, 0xce73, 0xc631, 0xbdef, 0xb5ef, 0xad6b, 0xa529, 
	0xd6b5, 0xd6b5, 0xdef7, 0xdef7, 0xdef7, 0xd6b5, 0xce73, 0xc631, 0xbdef, 0xbdad, 0xb5ad, 0xad6b, 0xad6b, 0xa529, 0x9ce7, 0x9ce7, 
	0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0xa4e7, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x94a5, 0x94a5, 0x94a5, 
};

/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short St1uarm_f_txt[] = {
	0xf815, 0xf817, 0xf817, 0xf817, 0xf817, 0xf859, 0xf95d, 0xf9df, 0xf99d, 0xf99d, 0xf9df, 0xfa21, 0xf9df, 0xf8db, 0xf817, 0xf815, 
	0xf897, 0xf897, 0xf097, 0xf097, 0xe8d9, 0xe2e1, 0xecab, 0xedf3, 0xf5b1, 0xf5f1, 0xf5f3, 0xed2f, 0xf3e7, 0xfa1f, 0xf119, 0xe897, 
	0xc5af, 0xc5af, 0xc5af, 0xc5af, 0xc5ef, 0xcef5, 0xdf79, 0xefbd, 0xeffd, 0xf7ff, 0xffff, 0xf7ff, 0xf7bd, 0xf739, 0xe6f7, 0xc5af, 
	0xc631, 0xc631, 0xc631, 0xc631, 0xc671, 0xce73, 0xdef7, 0xef7b, 0xf7bb, 0xf7bd, 0xffff, 0xffff, 0xffff, 0xf7fd, 0xf7bd, 0xd6f7, 
	0xc631, 0xc631, 0xbdef, 0xbe2f, 0xc631, 0xc671, 0xd6b5, 0xe739, 0xef7b, 0xf7bd, 0xffff, 0xffff, 0xffff, 0xf7bd, 0xf7bd, 0xef7b, 
	0xb5ad, 0xb5ef, 0xbdef, 0xbdef, 0xbdef, 0xbe31, 0xc631, 0xd6b5, 0xe739, 0xf7bb, 0xffbd, 0xffff, 0xffff, 0xf7bd, 0xf7bd, 0xf7bd, 
	0x9ce9, 0xa529, 0xa56b, 0xad6b, 0xad6b, 0xadad, 0xb5ad, 0xbdef, 0xceb3, 0xe739, 0xef7b, 0xf7bd, 0xf7bd, 0xf7bd, 0xf7bd, 0xf7bd, 
	0x94a5, 0x94a5, 0x94a5, 0x9ce7, 0x9ce7, 0x9ce7, 0xa529, 0xad6b, 0xb5ad, 0xc631, 0xd6b5, 0xe739, 0xef7b, 0xef7b, 0xf7bd, 0xef7b, 
	0x94a5, 0x94a5, 0x94a5, 0x9ce7, 0xa529, 0xad6b, 0xb5ad, 0xbdef, 0xc631, 0xc631, 0xce73, 0xdef7, 0xe739, 0xe739, 0xe739, 0xdef7, 
	0x9ce7, 0xa529, 0xad6b, 0xb5ad, 0xbdef, 0xc631, 0xce73, 0xd6b5, 0xdef7, 0xdef7, 0xe739, 0xef7b, 0xf7bd, 0xf7bd, 0xef7b, 0xe739, 
	0xad6b, 0xb5ef, 0xbdef, 0xc631, 0xc631, 0xce73, 0xd6b5, 0xdef7, 0xe739, 0xe739, 0xef7b, 0xf7bd, 0xffff, 0xffff, 0xffff, 0xffff, 
	0xbdef, 0xbe31, 0xbe31, 0xc631, 0xc673, 0xce73, 0xd6b5, 0xe6f9, 0xe739, 0xef7b, 0xf7bd, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 
	0xb5ad, 0xbdef, 0xbe31, 0xbe31, 0xc631, 0xc633, 0xce75, 0xdef7, 0xe739, 0xef7b, 0xf7bd, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 
	0xa529, 0xad6b, 0xb5ad, 0xb5ad, 0xb5ef, 0xb5ef, 0xbdef, 0xc631, 0xce73, 0xdef7, 0xef7b, 0xf7fd, 0xffff, 0xffff, 0xffff, 0xffff, 
	0xa529, 0xa529, 0xad6b, 0xa56b, 0xa529, 0xa529, 0xa529, 0xa4e7, 0xad29, 0xb5ad, 0xce71, 0xdef7, 0xef7b, 0xefbd, 0xef7b, 0xe739, 
	0xa529, 0xa529, 0xa529, 0xa529, 0xa529, 0xa529, 0xa4e9, 0x9ce9, 0x9ce7, 0x9ce7, 0xa529, 0xb5ad, 0xc631, 0xce73, 0xce73, 0xce73, 
};

