#include<ultra64.h>

extern Vtx ManLuarm_1c_v[];
extern Vtx ManLuarm_1c_vmcur[];
extern Tri ManLuarm_1c_tri[];
extern Lights1 ManLuarm_1c_material[];
extern Mtx ManLuarm_1c_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_1c_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(St1uarm_b_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&ManLuarm_1c_v[0], 5, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(2, 1, 3, 0),
	gsSP1Triangle(4, 1, 0, 0),
	gsSP1Triangle(1, 4, 3, 0),

	gs_Nin_LoadTextureImage(St1uarm_f_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&ManLuarm_1c_v[5], 4, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(2, 3, 0, 0),
	gsSPEndDisplayList(),
};

Gfx *ManLuarm_1c_modelT = NULL;

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 9 vertices */

/******************************************************************************
	vertex & texture
******************************************************************************/


/******************************************************************************
	vertex & texture
******************************************************************************/


/******************************************************************************
	vertex & texture
******************************************************************************/


/******************************************************************************
	vertex & texture
******************************************************************************/


/******************************************************************************
	vertex & texture
******************************************************************************/


/******************************************************************************
	vertex & texture
******************************************************************************/


/******************************************************************************
	vertex & texture
******************************************************************************/

Vtx ManLuarm_1c_v[]={
	{ -26,26,-20,0, 458, 505, -44, 106, -34, 0 },   /* v0 p4/V1 used 2 times */ 
	{ 0,-20,-21,0, 292, 462, 12, -105, -53, 0 },   /* v1 p2/V2 used 4 times */ 
	{ -17,1,85,0, 395, 0, -97, -53, 42, 0 },   /* v2 p2/V1 used 2 times */ 
	{ 26,1,86,0, 116, 0, 89, 51, 63, 0 },   /* v3 p2/V3 used 2 times */ 
	{ 28,25,-8,0, 112, 450, 86, 51, -66, 0 },   /* v4 p3/V2 used 2 times */ 
	{ -26,26,-20,0, 60, 555, -44, 106, -34, 0 },   /* v5 p6/V3 used 2 times */ 
	{ -17,1,85,0, 133, 0, -97, -53, 42, 0 },   /* v6 p1/V2 used 1 times */ 
	{ 26,1,86,0, 451, 0, 89, 51, 63, 0 },   /* v7 p6/V1 used 2 times */ 
	{ 28,25,-8,0, 456, 495, 86, 51, -66, 0 },   /* v8 p6/V2 used 1 times */ 
};


/*   0 vertices */
/* 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, 
};

