#include<ultra64.h>

extern Vtx VS_Minislippy_head_v[];
extern Vtx VS_Minislippy_head_vmcur[];
extern Tri VS_Minislippy_head_tri[];
extern Mtx VS_Minislippy_head_matrix[];

extern unsigned short VS_Minislippy_cap_txt[];
extern unsigned short VS_Minislippy_eye_txt[];
extern unsigned short VS_Minislippy_green_txt[];
extern unsigned short VS_MinifoxTX_03_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_Minislippy_head[]={

	gs_Nin_SetUpTileDescrip(G_IM_FMT_RGBA,G_IM_SIZ_16b,8,8,0,0,G_TX_CLAMP,3,0,G_TX_CLAMP,3,0),
	gs_Nin_LoadTextureImage(VS_MinifoxTX_03_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,8,8,0,7),


	gsSPVertex(&VS_Minislippy_head_v[0],18,0),
	gsSP2Triangles(0, 1, 2, 0, 3, 4, 5, 0),
	gsSP2Triangles(6, 7, 8, 0, 9, 10, 11, 0),
	gsSP2Triangles(12, 13, 14, 0, 15, 16, 17, 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_Minislippy_cap_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,8,8,0,7),


	gsSPVertex(&VS_Minislippy_head_v[18],13,0),
	gsSP2Triangles(0, 1, 2, 0, 2, 1, 3, 0),
	gsSP2Triangles(4, 5, 6, 0, 4, 7, 8, 0),
	gsSP2Triangles(6, 5, 9, 0, 8, 7, 9, 0),
	gsSP1Triangle(10, 11, 12, 0),
	gs_Nin_SetUpTileDescrip(G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,0,G_TX_MIRROR,4,0,G_TX_MIRROR,4,0),
	gs_Nin_LoadTextureImage(VS_Minislippy_eye_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),


	gsSPVertex(&VS_Minislippy_head_v[31],8,0),
	gsSP1Quadrangle(0, 1, 2, 3, 0),
	gsSP1Quadrangle(4, 5, 6, 7, 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_Minislippy_green_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,8,8,0,7),

	gsSPVertex(&VS_Minislippy_head_v[39],19,0),
	gsSP2Triangles(0, 1, 2, 0, 2, 3, 0, 0),
	gsSP2Triangles(4, 2, 1, 0, 5, 6, 2, 0),
	gsSP2Triangles(2, 4, 5, 0, 7, 8, 9, 0),
	gsSP2Triangles(9, 10, 7, 0, 8, 11, 9, 0),
	gsSP2Triangles(9, 12, 13, 0, 10, 9, 14, 0),
	gsSP2Triangles(9, 15, 12, 0, 16, 10, 14, 0),
	gsSP2Triangles(13, 17, 9, 0, 14, 9, 17, 0),
	gsSP1Triangle(17, 18, 14, 0),
	gsSPEndDisplayList(),
}; /* o1 */ 

/* 58 vertices */
Vtx VS_Minislippy_head_v[]={
	{     2,     0,     8,     0,   705,  -899,   -85,     0,    83,     0},	/* 0 */
	{     9,     0,    12,     0,     0,   256,    74,    43,    83,     0},	/* 1 */
	{     5,    11,     1,     0,  2848,   256,   -70,    67,    68,     0},	/* 2 */
	{     2,     0,     8,     0,   -50,   105,   -85,     0,    83,     0},	/* 3 */
	{    -2,     0,     1,     0,   -89,    19,  -116,     0,   -26,     0},	/* 4 */
	{     5,   -11,     1,     0,  -211,  -115,   -83,   -85,    -4,     0},	/* 5 */
	{     5,   -11,     1,     0, -2824,   256,   -83,   -85,    -4,     0},	/* 6 */
	{     9,     0,    12,     0,     0,   255,   -12,   -81,    86,     0},	/* 7 */
	{     2,     0,     8,     0,  -699,  -889,   -85,     0,    83,     0},	/* 8 */
	{     5,   -11,     1,     0,   -13,   -14,   -83,   -85,    -4,     0},	/* 9 */
	{    -2,     0,     1,     0,   141,   164,  -116,     0,   -26,     0},	/* 10 */
	{     5,     0,    -8,     0,   242,   -14,   -26,     0,  -117,     0},	/* 11 */
	{    -2,     0,     1,     0,   157,   127,  -116,     0,   -26,     0},	/* 12 */
	{     5,    11,     1,     0,   413,   127,   -41,    96,   -59,     0},	/* 13 */
	{     5,     0,    -8,     0,   231,   -81,   -26,     0,  -117,     0},	/* 14 */
	{     5,    11,     1,     0,   612,    40,   -70,    67,    68,     0},	/* 15 */
	{    -2,     0,     1,     0,   356,    40,  -116,     0,   -26,     0},	/* 16 */
	{     2,     0,     8,     0,   394,   125,   -85,     0,    83,     0},	/* 17 */
	{    13,     3,     1,     0,   -26,    79,    82,    31,    80,     0},	/* 18 */
	{    15,     0,     0,     0,     0,   256,   117,     0,   -28,     0},	/* 19 */
	{    16,     0,    -5,     0,   255,   256,    82,    82,   -30,     0},	/* 20 */
	{    13,    -3,     1,     0,   -26,   330,   119,     1,    12,     0},	/* 21 */
	{    13,     3,     1,     0,   256,   256,    87,    53,   -63,     0},	/* 22 */
	{    16,     0,    -5,     0,   127,   343,    82,    82,   -30,     0},	/* 23 */
	{     9,     0,    -7,     0,   127,   578,    75,    71,   -61,     0},	/* 24 */
	{    17,     0,     3,     0,   127,    48,    87,     0,   -83,     0},	/* 25 */
	{    15,     0,     0,     0,   127,   206,   117,     0,   -28,     0},	/* 26 */
	{    13,    -3,     1,     0,     0,   256,    18,  -106,   -51,     0},	/* 27 */
	{    13,    -3,     1,     0,   256,   256,    49,   -38,   101,     0},	/* 28 */
	{    17,     0,     3,     0,   128,    37,   -55,     0,   105,     0},	/* 29 */
	{    13,     3,     1,     0,     0,   256,    82,    31,    80,     0},	/* 30 */
	{    13,    10,     1,     0,    -3,   843,     0,     0,   119,     0},	/* 31 */
	{     9,     9,     1,     0,    57,   511,     0,     0,   119,     0},	/* 32 */
	{    13,     3,     1,     0,   586,   833,    82,    31,    80,     0},	/* 33 */
	{    15,     7,     1,     0,   257,  1038,     0,     0,   119,     0},	/* 34 */
	{    13,   -10,     1,     0,     0,   180,     0,     0,   119,     0},	/* 35 */
	{    15,    -7,     1,     0,   262,   -14,     0,     0,   119,     0},	/* 36 */
	{    13,    -3,     1,     0,   591,   190,    49,   -38,   101,     0},	/* 37 */
	{     9,    -9,     1,     0,    61,   512,    61,  -101,    15,     0},	/* 38 */
	{     9,    -9,     1,     0,   512,   214,    61,  -101,    15,     0},	/* 39 */
	{    13,    -3,     1,     0,   256,   256,    49,   -38,   101,     0},	/* 40 */
	{     9,     0,    12,     0,   129,   110,    74,    43,    83,     0},	/* 41 */
	{     5,   -11,     1,     0,   579,   167,    33,   -87,    74,     0},	/* 42 */
	{    13,     3,     1,     0,     0,   256,    82,    31,    80,     0},	/* 43 */
	{     9,     9,     1,     0,  -255,   214,    61,   103,    -2,     0},	/* 44 */
	{     5,    11,     1,     0,  -321,   167,   -41,    96,   -59,     0},	/* 45 */
	{    13,   -10,     1,     0,   -56,   263,    24,   -63,   -99,     0},	/* 46 */
	{     9,    -9,     1,     0,   -43,   275,    61,  -101,    15,     0},	/* 47 */
	{     5,     0,    -8,     0,   127,   437,   -26,     0,  -117,     0},	/* 48 */
	{    15,    -7,     1,     0,     0,   256,    88,     0,   -81,     0},	/* 49 */
	{     5,   -11,     1,     0,   -72,   289,   -83,   -85,    -4,     0},	/* 50 */
	{     9,     9,     1,     0,   299,   275,    61,   103,    -2,     0},	/* 51 */
	{    13,    10,     1,     0,   312,   263,    24,    64,   -99,     0},	/* 52 */
	{     9,     0,    -7,     0,   127,   413,    75,    71,   -61,     0},	/* 53 */
	{     5,    11,     1,     0,   328,   289,   -41,    96,   -59,     0},	/* 54 */
	{    13,    -3,     1,     0,    70,   263,   119,     1,    12,     0},	/* 55 */
	{    15,     7,     1,     0,   255,   256,    88,     1,   -81,     0},	/* 56 */
	{    13,     3,     1,     0,   185,   263,    87,    53,   -63,     0},	/* 57 */
};


/*   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_Minislippy_cap_txt[] = {
	0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 
	0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 
	0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 
	0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 
	0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 
	0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 
	0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 
	0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 
};

/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short VS_Minislippy_eye_txt[] = {
	0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 
	0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x181, 0x181, 0x181, 0x181, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 
	0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x181, 0x181, 0xce73, 0xce73, 0xce73, 0xce73, 0x181, 0x181, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 
	0x2c1, 0x2c1, 0x2c1, 0x181, 0xce73, 0xce73, 0xffff, 0xffff, 0xffff, 0xffff, 0xce73, 0xce73, 0x181, 0x2c1, 0x2c1, 0x2c1, 
	0x2c1, 0x2c1, 0x181, 0xce73, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xce73, 0x181, 0x2c1, 0x2c1, 
	0x2c1, 0x2c1, 0x181, 0xce73, 0xffff, 0xffff, 0x4ae5, 0x4ae5, 0x4ae5, 0x4ae5, 0xffff, 0xffff, 0xce73, 0x181, 0x2c1, 0x2c1, 
	0x2c1, 0x181, 0xce73, 0xffff, 0xffff, 0x4ae5, 0x99, 0x99, 0x99, 0x99, 0x4ae5, 0xffff, 0xffff, 0xce73, 0x181, 0x2c1, 
	0x2c1, 0x181, 0xce73, 0xffff, 0xffff, 0x4a53, 0x1, 0x1, 0x1, 0x1, 0x4a53, 0xffff, 0xffff, 0xce73, 0x181, 0x2c1, 
	0x2c1, 0x181, 0xce73, 0xffff, 0xffff, 0x4a53, 0x1, 0x1, 0x1, 0x1, 0x4a53, 0xffff, 0xffff, 0xce73, 0x181, 0x2c1, 
	0x2c1, 0x181, 0xce73, 0xffff, 0xffff, 0x4ae5, 0x99, 0x99, 0x99, 0x99, 0x4ae5, 0xffff, 0xffff, 0xce73, 0x181, 0x2c1, 
	0x2c1, 0x2c1, 0x181, 0xce73, 0xffff, 0xffff, 0x4ae5, 0x4ae5, 0x4ae5, 0x4ae5, 0xffff, 0xffff, 0xce73, 0x181, 0x2c1, 0x2c1, 
	0x2c1, 0x2c1, 0x181, 0xce73, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xce73, 0x181, 0x2c1, 0x2c1, 
	0x2c1, 0x2c1, 0x2c1, 0x181, 0xce73, 0xce73, 0xffff, 0xffff, 0xffff, 0xffff, 0xce73, 0xce73, 0x181, 0x2c1, 0x2c1, 0x2c1, 
	0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x181, 0x181, 0xce73, 0xce73, 0xce73, 0xce73, 0x181, 0x181, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 
	0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x181, 0x181, 0x181, 0x181, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 
	0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 0x2c1, 
};

