#include<ultra64.h>

extern Vtx VS_Minifalco_kosi_v[];
extern Vtx VS_Minifalco_kosi_vmcur[];
extern Tri VS_Minifalco_kosi_tri[];
extern Mtx VS_Minifalco_kosi_matrix[];

extern unsigned short VS_MinifalcoTX_04_txt[];
extern unsigned short VS_MinifalcoTX_01_txt[];
extern unsigned short VS_MinifalcoTX_03_txt[];
extern unsigned short VS_MinifoxTX_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 */


/* ======== o1 ======== */

Gfx VS_Minifalco_kosi[]={

	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_kosi_v[0],4,0),
	gsSP2Triangles(0, 1, 2, 0, 3, 1, 0, 0),
	gsSP1Triangle(2, 1, 3, 0),
	gs_Nin_SetUpTileDescrip(G_IM_FMT_RGBA,G_IM_SIZ_16b,8,8,0,0,G_TX_MIRROR,3,0,G_TX_MIRROR,3,0),
	gs_Nin_LoadTextureImage(VS_MinifalcoTX_04_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,8,8,0,7),

	gsSPVertex(&VS_Minifalco_kosi_v[4],10,0),
	gsSP2Triangles(0, 1, 2, 0, 1, 3, 2, 0),
	gsSP2Triangles(4, 1, 0, 0, 3, 1, 4, 0),
	gsSP2Triangles(3, 5, 2, 0, 6, 5, 3, 0),
	gsSP2Triangles(5, 0, 2, 0, 0, 5, 6, 0),
	gsSP1Triangle(7, 8, 9, 0),
	gsSPEndDisplayList(),
}; /* o1 */ 

/* 14 vertices */
Vtx VS_Minifalco_kosi_v[]={
	{     0,     0,     0,     0,   -24,   279,   -51,  -107,     4,     0},	/* 0 */
	{    -1,     0,   -21,     0,   501,   534,   -27,  -116,     1,     0},	/* 1 */
	{     7,    -2,    -5,     0,     0,   512,   -19,  -113,   -30,     0},	/* 2 */
	{     7,     2,    -5,     0,   -10,   534,    19,   106,   -52,     0},	/* 3 */
	{    12,     0,     0,     0,   127,   309,    84,   -67,   -51,     0},	/* 4 */
	{     6,     7,     0,     0,     0,   256,   -36,   104,    46,     0},	/* 5 */
	{     7,     0,     5,     0,   128,   345,    35,    32,   109,     0},	/* 6 */
	{     0,     0,     0,     0,   128,   195,   -51,   108,     4,     0},	/* 7 */
	{     7,     2,    -5,     0,    92,   188,    19,   106,   -52,     0},	/* 8 */
	{     6,    -7,     0,     0,   256,   256,    84,   -67,   -51,     0},	/* 9 */
	{     7,    -2,    -5,     0,   163,   188,   -19,  -113,   -30,     0},	/* 10 */
	{    12,     0,     0,     0,  -256,   256,   114,    25,    29,     0},	/* 11 */
	{     7,    -2,    -5,     0,     0,   256,   101,     0,   -65,     0},	/* 12 */
	{     7,     2,    -5,     0,   -38,   121,    19,   106,   -52,     0},	/* 13 */
};


/*   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_04_txt[] = {
	0xd945, 0xd945, 0xd945, 0xd945, 0xd945, 0xd945, 0xd945, 0xf187, 
	0xd945, 0xf187, 0xf187, 0xf187, 0xd945, 0xe20b, 0xe20b, 0xf187, 
	0xf187, 0xc145, 0xb105, 0xc9cb, 0xf20d, 0xf187, 0xf187, 0xf187, 
	0xf187, 0xe20b, 0xf187, 0xc9cb, 0xc145, 0xd945, 0xf187, 0xd945, 
	0xf187, 0xd945, 0xf187, 0xf187, 0xe20b, 0xc9cb, 0xf187, 0xd945, 
	0xf187, 0xd945, 0xf187, 0xf20d, 0xd945, 0xf187, 0xc9cb, 0xf20d, 
	0xf187, 0xd945, 0xc145, 0xc9cb, 0xe20b, 0xc9cb, 0xb9cb, 0xe20b, 
	0xd945, 0xd945, 0xd945, 0xd945, 0xc145, 0xc145, 0xc145, 0xd945, 
};

/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short VS_MinifalcoTX_01_txt[] = {
	0xa1, 0xa1, 0xa1, 0x1859, 0x5805, 0x5805, 0x5805, 0x8845, 0x8845, 0x9085, 0x5805, 0x5805, 0x1859, 0xa1, 0xa1, 0xa1, 
	0xa1, 0xa1, 0x1859, 0x5805, 0x5805, 0x8845, 0xf187, 0xf187, 0xf187, 0xf187, 0xa8c5, 0x5805, 0x5805, 0x1859, 0xa1, 0xa1, 
	0xa1, 0x1859, 0x5805, 0x7045, 0x1, 0x1, 0x1, 0x4843, 0xf187, 0xf187, 0xf187, 0x8845, 0x5805, 0x5805, 0x1859, 0xa1, 
	0xa1, 0x1859, 0x5805, 0x2001, 0xb5ad, 0xb5ad, 0x1, 0x1, 0x1, 0x1, 0xa905, 0xf187, 0x8845, 0x5805, 0x1859, 0xa1, 
	0xa1, 0x1859, 0x3803, 0x2001, 0xcdad, 0xe739, 0x1, 0x81, 0xb5ad, 0x6319, 0x1, 0x1, 0x6991, 0x5805, 0x1859, 0xa1, 
	0xa1, 0x1859, 0x5805, 0x5805, 0x9299, 0xffff, 0xef7b, 0xb5ad, 0xffff, 0xffff, 0xf77b, 0xcdad, 0x8191, 0x5805, 0x1859, 0xa1, 
	0xa1, 0x1859, 0x5805, 0x5805, 0x5805, 0x9299, 0xffff, 0xffff, 0xffff, 0xf77b, 0xcdad, 0x8191, 0x5805, 0x5805, 0x1859, 0xa1, 
	0xa1, 0x1859, 0x5805, 0x5805, 0x5805, 0x5805, 0x794f, 0x81d3, 0x9299, 0xabe1, 0x710d, 0x5805, 0x5805, 0x5805, 0x3053, 0xa1, 
	0xa1, 0xa1, 0x1859, 0x5805, 0x5805, 0x5805, 0x5805, 0x5805, 0x5805, 0x5805, 0x5805, 0x5805, 0x5805, 0x1859, 0xa1, 0xa1, 
	0xa1, 0xa1, 0xa1, 0x1859, 0x5805, 0x5805, 0x5805, 0x5805, 0x5805, 0x5805, 0x5805, 0x5805, 0x1859, 0xa1, 0xa1, 0xa1, 
	0xa1, 0x9d, 0xa1, 0xa1, 0xa1, 0x5805, 0x5805, 0x5805, 0x5805, 0x5805, 0x5805, 0x3053, 0x89f, 0xa1, 0xa1, 0xa1, 
	0xa1, 0x9b, 0x9d, 0xa1, 0xa1, 0xa1, 0xa1, 0x5805, 0x5805, 0x3053, 0x109b, 0xa1, 0xa1, 0xa1, 0x9b, 0xa1, 
	0xa1, 0xa1, 0x9d, 0x9d, 0xa1, 0xa1, 0xa1, 0xa1, 0xa1, 0xa1, 0xa1, 0xa1, 0xa1, 0x9d, 0x59, 0xa1, 
	0xa1, 0xa1, 0xa1, 0x9b, 0x9d, 0x9d, 0xa1, 0x9d, 0x9d, 0x9d, 0x9d, 0x9d, 0x9b, 0x55, 0x59, 0xa1, 
	0xa1, 0xa1, 0x9d, 0x9d, 0x59, 0x9d, 0x9b, 0x9b, 0x9b, 0x9b, 0x59, 0x55, 0x9b, 0x9d, 0x9d, 0xa1, 
	0xa1, 0xa1, 0xa1, 0xa1, 0x9d, 0x9d, 0x9d, 0x9d, 0x9d, 0x9d, 0x9d, 0x9b, 0xa1, 0xa1, 0xa1, 0xa1, 
};

