#include<ultra64.h>
extern Vtx DEMO_Falco_reg02_v[];
extern Lights1 DEMO_Falco_reg02_material[];

extern unsigned short DEMO_Metal_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)

#define G_CC_PRIMSHADE PRIMITIVE,0,SHADE,0,0,0,0,SHADE


/* ======== o1 ======== */

Gfx DEMO_Falco_reg02[]={

	gsDPLoadTextureBlock(DEMO_Metal_txt, G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 16, 0, G_TX_MIRROR, G_TX_MIRROR, 4, 4, G_TX_NOLOD, G_TX_NOLOD ),


	gsSPVertex(&DEMO_Falco_reg02_v[0],19,0),
	gsSP2Triangles(0, 1, 2, 0, 3, 4, 5, 0),
	gsSP2Triangles(6, 7, 8, 0, 9, 10, 5, 0),
	gsSP2Triangles(11, 12, 13, 0, 12, 14, 13, 0),
	gsSP2Triangles(14, 15, 16, 0, 17, 18, 16, 0),
	gsSPEndDisplayList(),
}; /* o1 */ 

#undef G_CC_PRIMSHADE
#undef gs_Nin_LoadTextureImage
#undef gs_Nin_SetUpTileDescrip
/*  23 vertices */
Vtx DEMO_Falco_reg02_v[]={
	{   115,     0,    -1,     0,   512,   511,    29,   -15,  -115,   255},	/* 0 */
	{    26,     8,   -24,     0,   512,     0,    -1,   -45,  -110,   255},	/* 1 */
	{    43,    37,    -1,     0,     0,   511,     4,    73,   -94,   255},	/* 2 */
	{    26,     8,   -24,     0,     0,   511,    -1,   -45,  -110,   255},	/* 3 */
	{   115,     0,    -1,     0,   512,   512,    29,   -15,  -115,   255},	/* 4 */
	{    11,   -22,    -1,     0,   512,     0,    -1,   -45,  -110,   255},	/* 5 */
	{    26,     8,   -24,     0,   512,     0,   -43,    84,   -73,   255},	/* 6 */
	{   -13,     8,    -1,     0,   512,   512,   -43,    84,   -73,   255},	/* 7 */
	{    43,    37,    -1,     0,     0,   512,     4,    73,   -94,   255},	/* 8 */
	{   -13,     8,    -1,     0,   512,   512,    -1,   -45,  -110,   255},	/* 9 */
	{    26,     8,   -24,     0,     0,   512,    -1,   -45,  -110,   255},	/* 10 */
	{   115,     0,    -1,     0,   512,   511,    29,   -15,   114,   255},	/* 11 */
	{    26,     8,    23,     0,   512,     0,   -12,   -18,   116,   255},	/* 12 */
	{    11,   -22,    -1,     0,     0,   511,   -12,   -18,   116,   255},	/* 13 */
	{   -13,     8,    -1,     0,   512,   512,   -12,   -18,   116,   255},	/* 14 */
	{    26,     8,    23,     0,     0,   512,   -12,   -18,   116,   255},	/* 15 */
	{    43,    37,    -1,     0,   512,     0,     4,    73,    93,   255},	/* 16 */
	{    26,     8,    23,     0,     0,   511,   -12,   -18,   116,   255},	/* 17 */
	{   115,     0,    -1,     0,   512,   512,    29,   -15,   114,   255},	/* 18 */
};
