#include<ultra64.h>

extern Vtx DEMO_Fox_arm02_v[];
extern Vtx DEMO_Fox_arm02_vmcur[];
extern Tri DEMO_Fox_arm02_tri[];
extern Mtx DEMO_Fox_arm02_matrix[];

extern unsigned short DEMO_Fox_yellow_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 DEMO_Fox_arm02[]={

	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(DEMO_Fox_yellow_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&DEMO_Fox_arm02_v[0],10,0),
	gsSP2Triangles(0, 1, 2, 0, 1, 3, 2, 0),
	gsSP2Triangles(4, 5, 3, 0, 3, 5, 6, 0),
	gsSP2Triangles(3, 6, 2, 0, 7, 4, 3, 0),
	gsSP2Triangles(0, 2, 6, 0, 8, 6, 5, 0),
	gsSP2Triangles(4, 8, 5, 0, 8, 9, 6, 0),
	gsSP2Triangles(7, 9, 8, 0, 7, 8, 4, 0),
	gsSPEndDisplayList(),
}; /* o1 */ 

/* 10 vertices */
Vtx DEMO_Fox_arm02_v[]={
	{    -7,   -13,   -24,     0,  4711,  3617,    16,     0,  -119,     0},	/* 0 */
	{    -7,    11,   -24,     0,  4717,  2534,    11,   108,   -50,     0},	/* 1 */
	{    53,     9,   -16,     0,  2780,  2581,    30,    50,  -105,     0},	/* 2 */
	{    53,     9,     3,     0,  2279,  2599,    30,   111,    32,     0},	/* 3 */
	{    -6,    11,     9,     0,   419,  2513,  -119,    -2,     4,     0},	/* 4 */
	{    54,    -7,     3,     0,  2283,  3402,    27,   -52,   103,     0},	/* 5 */
	{    53,    -7,   -16,     0,  2777,  3416,    57,   -78,   -71,     0},	/* 6 */
	{    -7,    11,   -24,     0,  -402,  2534,  -119,    -2,     4,     0},	/* 7 */
	{    -5,   -10,     9,     0,   425,  3514,  -119,    -2,     4,     0},	/* 8 */
	{    -7,   -13,   -24,     0,  -408,  3617,  -119,    -2,     4,     0},	/* 9 */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
