#include<ultra64.h>

extern Vtx VS_Minifalco_head_v[];
extern Vtx VS_Minifalco_head_vmcur[];
extern Tri VS_Minifalco_head_tri[];
extern Mtx VS_Minifalco_head_matrix[];

extern unsigned short VS_MinifalcoTX_01_txt[];
extern unsigned short VS_MinifalcoTX_02_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)

/* main display list */


/* ======== o2 ======== */

Gfx VS_Minifalco_head[]={

	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(VS_MinifalcoTX_01_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&VS_Minifalco_head_v[0], 10, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(2, 1, 3, 0),
	gsSP1Triangle(4, 1, 0, 0),
	gsSP1Triangle(1, 4, 3, 0),
	gsSP1Triangle(5, 6, 7, 0),
	gsSP1Triangle(6, 5, 8, 0),
	gsSP1Triangle(9, 6, 8, 0),
	gsSP1Triangle(7, 6, 9, 0),

	gs_Nin_SetUpTileDescrip(G_IM_FMT_RGBA,G_IM_SIZ_16b,8,8,0,0,G_TX_WRAP,3,0,G_TX_WRAP,3,0),
	gs_Nin_LoadTextureImage(VS_MinifalcoTX_02_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,8,8,0,7),

	gsSPVertex(&VS_Minifalco_head_v[10], 14, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(2, 3, 4, 0),
	gsSP1Triangle(2, 4, 0, 0),
	gsSP1Triangle(5, 6, 7, 0),
	gsSP1Triangle(8, 5, 7, 0),
	gsSP1Triangle(7, 9, 8, 0),
	gsSP1Triangle(10, 11, 12, 0),
	gsSP1Triangle(12, 13, 10, 0),
	gsSPVertex(&VS_Minifalco_head_v[24], 4, 0),
	gsSP1Triangle(0, 2, 1, 0),
	gsSP1Triangle(1, 3, 0, 0),
	gsSPEndDisplayList(),
}; /* o2 */ 

/* 28 vertices */
Vtx VS_Minifalco_head_v[]={
	{ 12,0,7,0, 87, -10, 85, 82, 21, 0 },   /* v0 p28/V1 used 2 times */ 
	{ 21,0,0,0, 591, -29, 40, 112, 12, 0 },   /* v1 p24/V2 used 4 times */ 
	{ 7,5,-1,0, 68, 508, 5, 119, -17, 0 },   /* v2 p24/V1 used 2 times */ 
	{ 18,0,-11,0, 787, 521, 6, 110, -48, 0 },   /* v3 p24/V3 used 2 times */ 
	{ 7,-5,-1,0, 68, 508, 13, -117, -14, 0 },   /* v4 p20/V2 used 2 times */ 
	{ 7,5,-1,0, 512, 512, 5, 119, -17, 0 },   /* v5 p25/V1 used 2 times */ 
	{ -3,0,-3,0, 647, 778, -43, 102, -45, 0 },   /* v6 p25/V2 used 4 times */ 
	{ 3,0,4,0, 655, 495, -108, 32, 38, 0 },   /* v7 p25/V3 used 2 times */ 
	{ 18,0,-11,0, -5, 509, 6, 110, -48, 0 },   /* v8 p26/V3 used 2 times */ 
	{ 7,-5,-1,0, 408, 523, 13, -117, -14, 0 },   /* v9 p30/V3 used 2 times */ 
	{ 12,0,12,0, 52, 170, 64, -94, 34, 0 },   /* v10 p36/V3 used 2 times */ 
	{ 8,0,16,0, 0, 256, -51, -91, 56, 0 },   /* v11 p27/V2 used 1 times */ 
	{ 6,-7,3,0, 255, 256, 88, -81, 0, 0 },   /* v12 p32/V1 used 3 times */ 
	{ 7,-5,-1,0, 302, 209, 13, -117, -14, 0 },   /* v13 p32/V2 used 1 times */ 
	{ 12,0,7,0, 125, 133, 85, 82, 21, 0 },   /* v14 p32/V3 used 2 times */ 
	{ 12,0,7,0, 130, 133, 85, 82, 21, 0 },   /* v15 p33/V1 used 2 times */ 
	{ 7,5,-1,0, -46, 209, 5, 119, -17, 0 },   /* v16 p33/V2 used 1 times */ 
	{ 6,7,3,0, 0, 256, 10, 112, 41, 0 },   /* v17 p33/V3 used 3 times */ 
	{ 12,0,12,0, 203, 170, 64, 95, 34, 0 },   /* v18 p35/V1 used 2 times */ 
	{ 8,0,16,0, 256, 256, -51, 92, 56, 0 },   /* v19 p23/V2 used 1 times */ 
	{ 3,0,4,0, 63, 376, -108, 32, 38, 0 },   /* v20 p34/V3 used 2 times */ 
	{ 8,0,16,0, 256, 256, -51, 92, 56, 0 },   /* v21 p29/V2 used 1 times */ 
	{ 6,7,3,0, 0, 256, -102, 43, -44, 0 },   /* v22 p34/V1 used 2 times */ 
	{ 7,5,-1,0, -46, 299, 5, 119, -17, 0 },   /* v23 p34/V2 used 1 times */ 
	{ 6,-7,3,0, 256, 256, -68, -89, 38, 0 },   /* v24 p21/V1 used 2 times */ 
	{ 3,0,4,0, 192, 367, -108, 32, 38, 0 },   /* v25 p21/V3 used 2 times */ 
	{ 8,0,16,0, 0, 256, -51, -91, 56, 0 },   /* v26 p21/V2 used 1 times */ 
	{ 7,-5,-1,0, 302, 317, -102, -42, -44, 0 },   /* v27 p31/V2 used 1 times */ 
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
/* 8 x 8  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short VS_MinifalcoTX_02_txt[] = {
	0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 
	0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 
	0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 
	0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 
	0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 
	0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 
	0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 
	0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 0xfe81, 
};

