#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),
	gsSP2Triangles(0, 1, 2, 0, 2, 1, 3, 0),
	gsSP2Triangles(4, 1, 0, 0, 1, 4, 3, 0),
	gsSP2Triangles(5, 6, 7, 0, 6, 5, 8, 0),
	gsSP2Triangles(9, 6, 8, 0, 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],16,0),
	gsSP2Triangles(0, 1, 2, 0, 2, 3, 4, 0),
	gsSP2Triangles(2, 4, 0, 0, 5, 6, 7, 0),
	gsSP2Triangles(8, 5, 7, 0, 7, 9, 8, 0),
	gsSP2Triangles(10, 9, 11, 0, 11, 12, 10, 0),
	gsSP2Triangles(13, 1, 14, 0, 14, 15, 13, 0),
	gsSPEndDisplayList(),
}; /* o2 */ 

/* 28 vertices */
Vtx VS_Minifalco_head_v[]={
	{    12,     0,     7,     0,    87,   -10,    85,    82,    21,     0},	/* 0 */
	{    21,     0,     0,     0,   591,   -29,    40,   112,    12,     0},	/* 1 */
	{     7,     5,    -1,     0,    68,   508,     5,   119,   -17,     0},	/* 2 */
	{    18,     0,   -11,     0,   787,   521,     6,   110,   -48,     0},	/* 3 */
	{     7,    -5,    -1,     0,    68,   508,    13,  -117,   -14,     0},	/* 4 */
	{     7,     5,    -1,     0,   512,   512,     5,   119,   -17,     0},	/* 5 */
	{    -3,     0,    -3,     0,   647,   778,   -43,   102,   -45,     0},	/* 6 */
	{     3,     0,     4,     0,   655,   495,  -108,    32,    38,     0},	/* 7 */
	{    18,     0,   -11,     0,    -5,   509,     6,   110,   -48,     0},	/* 8 */
	{     7,    -5,    -1,     0,   408,   523,    13,  -117,   -14,     0},	/* 9 */
	{    12,     0,    12,     0,    52,   170,    64,   -94,    34,     0},	/* 10 */
	{     8,     0,    16,     0,     0,   256,   -51,   -91,    56,     0},	/* 11 */
	{     6,    -7,     3,     0,   255,   256,    88,   -81,     0,     0},	/* 12 */
	{     7,    -5,    -1,     0,   302,   209,    13,  -117,   -14,     0},	/* 13 */
	{    12,     0,     7,     0,   125,   133,    85,    82,    21,     0},	/* 14 */
	{    12,     0,     7,     0,   130,   133,    85,    82,    21,     0},	/* 15 */
	{     7,     5,    -1,     0,   -46,   209,     5,   119,   -17,     0},	/* 16 */
	{     6,     7,     3,     0,     0,   256,    10,   112,    41,     0},	/* 17 */
	{    12,     0,    12,     0,   203,   170,    64,    95,    34,     0},	/* 18 */
	{     8,     0,    16,     0,   256,   256,   -51,    92,    56,     0},	/* 19 */
	{     3,     0,     4,     0,    63,   376,  -108,    32,    38,     0},	/* 20 */
	{     6,     7,     3,     0,     0,   256,  -102,    43,   -44,     0},	/* 21 */
	{     7,     5,    -1,     0,   -46,   299,     5,   119,   -17,     0},	/* 22 */
	{     6,    -7,     3,     0,   256,   256,   -68,   -89,    38,     0},	/* 23 */
	{     3,     0,     4,     0,   192,   367,  -108,    32,    38,     0},	/* 24 */
	{     7,    -5,    -1,     0,   302,   317,  -102,   -42,   -44,     0},	/* 25 */
};


/*   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, 
};

