#include<ultra64.h>

extern Vtx ManLfarm_1c_v[];
extern Vtx ManLfarm_1c_vmcur[];
extern Tri ManLfarm_1c_tri[];
extern Lights1 ManLfarm_1c_material[];
extern Mtx ManLfarm_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 ManLfarm_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(St1farm_b_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&ManLfarm_1c_v[0], 6, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(3, 4, 5, 0),

	gs_Nin_LoadTextureImage(St1farm_f_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&ManLfarm_1c_v[6], 4, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(1, 3, 2, 0),
	gsSPEndDisplayList(),
};

Gfx *ManLfarm_1c_modelT = NULL;

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 10 vertices */

/******************************************************************************
	vertex & texture
******************************************************************************/


/******************************************************************************
	vertex & texture
******************************************************************************/


/******************************************************************************
	vertex & texture
******************************************************************************/


/******************************************************************************
	vertex & texture
******************************************************************************/


/******************************************************************************
	vertex & texture
******************************************************************************/


/******************************************************************************
	vertex & texture
******************************************************************************/


/******************************************************************************
	vertex & texture
******************************************************************************/

Vtx ManLfarm_1c_v[]={
	{ -1,-1,114,0, 262, -41, -17, -64, 99, 0 },   /* v0 p2/V1 used 1 times */ 
	{ -16,-23,-14,0, 513, 511, -81, -52, -68, 0 },   /* v1 p2/V2 used 1 times */ 
	{ 24,-23,-12,0, -1, 511, 87, -44, -68, 0 },   /* v2 p2/V3 used 1 times */ 
	{ 24,-23,-12,0, -1, 512, 87, -44, -68, 0 },   /* v3 p3/V1 used 1 times */ 
	{ -16,-23,-14,0, 513, 512, -81, -52, -68, 0 },   /* v4 p3/V2 used 1 times */ 
	{ 0,24,-10,0, 301, 293, -1, 85, -84, 0 },   /* v5 p3/V3 used 1 times */ 
	{ 24,-23,-12,0, 513, 512, 87, -44, -68, 0 },   /* v6 p1/V1 used 1 times */ 
	{ 0,24,-10,0, 210, 463, -1, 85, -84, 0 },   /* v7 p4/V1 used 2 times */ 
	{ -1,-1,114,0, 249, -41, -17, -64, 99, 0 },   /* v8 p4/V3 used 2 times */ 
	{ -16,-23,-14,0, -1, 512, -81, -52, -68, 0 },   /* v9 p4/V2 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 St1farm_f_txt[] = {
	0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x801, 0x1085, 0x1085, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 
	0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x1107, 0x1909, 0x1907, 0x885, 0x43, 0x83, 0x83, 0x83, 0x83, 0x83, 
	0x48cb, 0x48cb, 0x48cb, 0x48cb, 0x50cb, 0x58cd, 0x6991, 0x69d3, 0x6991, 0x614f, 0x58cd, 0x50cb, 0x50cb, 0x48cb, 0x48cb, 0x48cb, 
	0xd813, 0xd813, 0xd813, 0xd813, 0xf015, 0xf899, 0xf95d, 0xf95d, 0xf91d, 0xf91d, 0xf8db, 0xf817, 0xf015, 0xe013, 0xe013, 0xe013, 
	0xe013, 0xe815, 0xf015, 0xf015, 0xf859, 0xf91d, 0xf99f, 0xf99f, 0xf99d, 0xf95d, 0xf95d, 0xf8db, 0xf857, 0xf015, 0xe815, 0xe815, 
	0xf815, 0xf857, 0xf899, 0xf89b, 0xf91b, 0xf99f, 0xf9df, 0xf99f, 0xf99f, 0xf99f, 0xf99f, 0xf95d, 0xf8db, 0xf899, 0xf857, 0xf817, 
	0xf899, 0xf8db, 0xf91d, 0xf95d, 0xf99f, 0xf9df, 0xf99f, 0xf99f, 0xf99f, 0xf99f, 0xf99f, 0xf99f, 0xf95d, 0xf91b, 0xf8db, 0xf859, 
	0xf91b, 0xf95d, 0xf95d, 0xf99f, 0xf9e1, 0xf9e1, 0xf99f, 0xf99f, 0xf99f, 0xf99f, 0xf99f, 0xf9e1, 0xf99f, 0xf95d, 0xf91b, 0xf899, 
	0xf95d, 0xf99f, 0xf99f, 0xf9df, 0xfa21, 0xfa21, 0xf99f, 0xf99f, 0xf99f, 0xf99f, 0xf99f, 0xfa21, 0xf9df, 0xf95d, 0xf95d, 0xf8db, 
	0xf95d, 0xf99f, 0xf9df, 0xf9df, 0xfa21, 0xfa21, 0xf99f, 0xf99f, 0xf99f, 0xf99f, 0xf99f, 0xfa21, 0xfa21, 0xf99f, 0xf95d, 0xf91b, 
	0xf91d, 0xf99f, 0xf9df, 0xf9df, 0xfa21, 0xf9e1, 0xf99f, 0xf99f, 0xf99f, 0xf99f, 0xf99f, 0xf9e1, 0xf9e1, 0xf99f, 0xf99d, 0xf91b, 
	0xf8db, 0xf91d, 0xf95d, 0xf99f, 0xf9e1, 0xf99f, 0xf99d, 0xf99d, 0xf95d, 0xf95d, 0xf99d, 0xf99f, 0xf99f, 0xf99f, 0xf95d, 0xf91b, 
	0xf899, 0xf8db, 0xf91b, 0xf95d, 0xf95d, 0xf95d, 0xf91b, 0xf91d, 0xf95d, 0xf91d, 0xf95d, 0xf95d, 0xf95d, 0xf91d, 0xf91b, 0xf899, 
	0xf815, 0xf817, 0xf8db, 0xf91b, 0xf91b, 0xf899, 0xf859, 0xf859, 0xf899, 0xf899, 0xf899, 0xf8db, 0xf91b, 0xf8db, 0xf899, 0xf817, 
	0xf015, 0xf815, 0xf859, 0xf8db, 0xf8db, 0xf817, 0xe815, 0xe013, 0xe013, 0xe815, 0xf015, 0xf899, 0xf8db, 0xf899, 0xf817, 0xf815, 
	0xe815, 0xf815, 0xf817, 0xf8db, 0xf899, 0xf817, 0xe013, 0xc811, 0xc811, 0xc811, 0xe815, 0xf899, 0xf8db, 0xf857, 0xf815, 0xe815, 
};

