#include<ultra64.h>

extern Vtx ManLshin_3c_v[];
extern Vtx ManLshin_3c_vmcur[];
extern Tri ManLshin_3c_tri[];
extern Lights1 ManLshin_3c_material[];
extern Mtx ManLshin_3c_matrix[];

extern unsigned short Sshoes_bottom_txt[];
extern unsigned short St3_hand_txt[];
extern unsigned short St3best_b_txt[];
extern unsigned short St3best_f_txt[];
extern unsigned short St3best_s_txt[];
extern unsigned short St3best_t_txt[];
extern unsigned short St3farm_txt[];
extern unsigned short St3hara_txt[];
extern unsigned short St3met_b_txt[];
extern unsigned short St3met_f_txt[];
extern unsigned short St3met_gl_txt[];
extern unsigned short St3met_s_txt[];
extern unsigned short St3neck_txt[];
extern unsigned short St3shin_txt[];
extern unsigned short St3shoe_txt[];
extern unsigned short St3shoe_b_txt[];
extern unsigned short St3thigh_b_txt[];
extern unsigned short St3thigh_f_txt[];
extern unsigned short St3uarm_b_txt[];
extern unsigned short St3uarm_f_txt[];
extern unsigned short St3waist_b_txt[];
extern unsigned short St3waist_f_txt[];
extern unsigned short St3waist_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 */


/* ======== g2 ======== */


/* ======== g1 ======== */


/* ======== db ======== */

Gfx ManLshin_3c_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(St3shin_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&ManLshin_3c_v[0], 7, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(3, 4, 5, 0),
	gsSP1Triangle(6, 3, 5, 0),

	gs_Nin_LoadTextureImage(St3thigh_f_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&ManLshin_3c_v[7], 3, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSPEndDisplayList(),
}; /* db */ 

Gfx ManLshin_3c_modelT[] = {
	gsSPEndDisplayList()
};

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 10 vertices */
Vtx ManLshin_3c_v[]={
	{ 47,27,8,0, 261, 512,  87,50,-63,255 },   /* v0 used p5/V1 1 times */
	{ -26,31,8,0, -5, 512,  -84,51,-67,255 },   /* v1 used p5/V2 1 times */
	{ 10,0,185,0, 133, -80,  11,58,104,255 },   /* v2 used p5/V3 1 times */
	{ 12,-59,13,0, 383, 446,  0,-88,-80,255 },   /* v3 used p6/V1 2 times */
	{ 47,27,8,0, 268, 512,  87,50,-63,255 },   /* v4 used p6/V2 1 times */
	{ 10,0,185,0, 397, -100,  11,58,104,255 },   /* v5 used p6/V3 2 times */
	{ -26,31,8,0, 535, 512,  -84,51,-67,255 },   /* v6 used p8/V1 1 times */
	{ 12,-59,13,0, 165, 109,  0,-88,-80,255 },   /* v7 used p7/V1 1 times */
	{ -26,31,8,0, 12, 0,  -84,51,-67,255 },   /* v8 used p7/V2 1 times */
	{ 47,27,8,0, 279, 0,  87,50,-63,255 },   /* v9 used p7/V3 1 times */
};


/*   0 vertices */
/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short St3shin_txt[] = {
	0x28f, 0x2cf, 0x311, 0x393, 0x353, 0x2d1, 0x28f, 0x28f, 0x24d, 0x28f, 0x2cf, 0x2cf, 0x2cf, 0x2d1, 0x28f, 0x28f, 
	0x2d1, 0x353, 0x393, 0x3d5, 0x395, 0x353, 0x311, 0x2d1, 0x2cf, 0x2d1, 0x311, 0x353, 0x353, 0x353, 0x311, 0x2d1, 
	0x311, 0x353, 0x395, 0x415, 0x415, 0x393, 0x353, 0x311, 0x311, 0x311, 0x353, 0x353, 0x393, 0x353, 0x353, 0x311, 
	0x311, 0x353, 0x3d5, 0xb95, 0xb15, 0x393, 0x353, 0x311, 0x311, 0x311, 0x353, 0x353, 0x353, 0x353, 0x353, 0x311, 
	0x311, 0x393, 0x3d3, 0x4a5f, 0x71a3, 0x353, 0x393, 0x311, 0x311, 0x353, 0x353, 0x393, 0x395, 0x393, 0x393, 0x353, 
	0x311, 0x3d5, 0x393, 0x8a29, 0xa9ef, 0x1a95, 0x3d3, 0x353, 0x311, 0x353, 0x393, 0x3d5, 0x3d7, 0x3d5, 0x395, 0x353, 
	0x353, 0x3d3, 0x3299, 0xaa31, 0xb273, 0x521f, 0x393, 0x393, 0x353, 0x393, 0x3d5, 0x417, 0x457, 0x417, 0x3d5, 0x353, 
	0x395, 0x3d3, 0x6221, 0xb273, 0xaab3, 0x89a9, 0xb13, 0x3d5, 0x393, 0x3d5, 0x417, 0x457, 0x499, 0x499, 0x417, 0x393, 
	0x3d5, 0xb15, 0x89e9, 0xaab3, 0xaab3, 0xa1ed, 0x2a99, 0x3d3, 0x393, 0x3d5, 0x417, 0x459, 0x49b, 0x49b, 0x459, 0x3d5, 
	0x3d5, 0x22d7, 0xa1ad, 0xaab3, 0xaab3, 0xa9ef, 0x425d, 0x3d3, 0x395, 0x3d7, 0x417, 0x459, 0x49b, 0x49b, 0x459, 0x3d5, 
	0x3d5, 0xb55, 0x91a9, 0xb2b3, 0xaab3, 0xa1ad, 0x2a99, 0x415, 0x395, 0x417, 0x457, 0x499, 0x4db, 0x4db, 0x499, 0x3d5, 
	0x3d5, 0x3d5, 0x3a5b, 0x99ed, 0xa1ef, 0x521f, 0x3d5, 0x3d5, 0x395, 0x417, 0x457, 0x499, 0x4db, 0x4db, 0x499, 0x3d5, 
	0x395, 0x417, 0x351, 0x71a3, 0x99ab, 0x1315, 0x417, 0x3d5, 0x395, 0x3d5, 0x417, 0x459, 0x49b, 0x4db, 0x459, 0x395, 
	0x353, 0x393, 0x3217, 0xa1ed, 0xaa31, 0x3a19, 0x391, 0x393, 0x353, 0x395, 0x3d5, 0x417, 0x457, 0x457, 0x3d5, 0x353, 
	0x30f, 0x1251, 0x91eb, 0xb337, 0xb335, 0x91eb, 0x1a53, 0x30f, 0x311, 0x353, 0x353, 0x395, 0x393, 0x353, 0x351, 0x311, 
	0x30f, 0x51dd, 0xaa31, 0xaa2f, 0xa22f, 0xaa31, 0x71a3, 0x2d1, 0x311, 0x2d1, 0x311, 0x311, 0x311, 0x311, 0x2d1, 0x2d1, 
};

/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short St3thigh_f_txt[] = {
	0x311, 0x28f, 0x6961, 0xa22f, 0xa26f, 0xa22f, 0x7163, 0xa4f, 0x311, 0x311, 0x311, 0x311, 0x311, 0x311, 0x311, 0x311, 
	0x311, 0x351, 0x1a53, 0x79a7, 0xaa71, 0x79a5, 0x1a53, 0x351, 0x393, 0x353, 0x313, 0x2d1, 0x2d1, 0x2d1, 0xacf, 0xb0f, 
	0x313, 0x395, 0x417, 0x395, 0x2297, 0x353, 0x3d5, 0x395, 0x353, 0x134f, 0x3b8d, 0x644b, 0x84c9, 0x9507, 0xad87, 0xbdc7, 
	0x544b, 0x2b8f, 0xb91, 0x3d5, 0x417, 0x395, 0x1b91, 0x4c0d, 0x8d0b, 0xce4b, 0xe6cb, 0xef0b, 0xe6c9, 0xde87, 0xd687, 0xe709, 
	0xe6cb, 0xe6cf, 0xbe0f, 0x8d0d, 0x6c8f, 0xa58f, 0xde8f, 0xef0d, 0xf74d, 0xef4f, 0xe70f, 0xe70d, 0xdecb, 0xd687, 0xd689, 0xe70b, 
	0xe70f, 0xef53, 0xf795, 0xf795, 0xff95, 0xf795, 0xef53, 0xef4f, 0xe70f, 0xe70f, 0xe70f, 0xe70d, 0xdecb, 0xd689, 0xdec9, 0xe70b, 
	0xef51, 0xef53, 0xef55, 0xef55, 0xef55, 0xef55, 0xef53, 0xef51, 0xe70f, 0xe70f, 0xe70f, 0xe70d, 0xe70b, 0xdec9, 0xdecb, 0xe70b, 
	0xef51, 0xef53, 0xef55, 0xef55, 0xef55, 0xef55, 0xef53, 0xef51, 0xe70f, 0xe70f, 0xe70f, 0xe70d, 0xe70d, 0xdecb, 0xe70b, 0xe70d, 
	0xef51, 0xef55, 0xef55, 0xef55, 0xef55, 0xef55, 0xef53, 0xe711, 0xe70f, 0xe70d, 0xe70d, 0xe70d, 0xe70d, 0xdecb, 0xe70b, 0xe70d, 
	0xef53, 0xef53, 0xef53, 0xef53, 0xef53, 0xef53, 0xe711, 0xe70f, 0xe70d, 0xdecd, 0xdecb, 0xdecb, 0xdecb, 0xdecb, 0xe70b, 0xe70b, 
	0xe711, 0xe711, 0xe711, 0xe753, 0xe713, 0xe711, 0xe70f, 0xdecd, 0xdecb, 0xd68b, 0xd689, 0xd689, 0xd689, 0xdec9, 0xdecb, 0xe70b, 
	0xdecd, 0xdecd, 0xdecd, 0xdecd, 0xdecd, 0xdecd, 0xd68b, 0xd689, 0xd689, 0xce89, 0xd689, 0xd689, 0xd689, 0xd689, 0xdec9, 0xdecb, 
	0xd689, 0xce89, 0xce89, 0xce89, 0xce49, 0xce49, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xd687, 0xd687, 0xdec9, 
	0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xd687, 
	0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 
	0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce47, 0xce45, 0xce45, 0xce45, 0xce45, 
};

