#include<ultra64.h>

extern Vtx TXT_window_v[];
extern Vtx TXT_window_vmcur[];
extern Tri TXT_window_tri[];
extern Mtx TXT_window_matrix[];

extern unsigned short TXT_window_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

/* main display list */


/* ======== g1 ======== */

Gfx TXT_window[]={

	gs_Nin_SetUpTileDescrip(G_IM_FMT_RGBA,G_IM_SIZ_16b,32,32,0,0,G_TX_CLAMP,5,0,G_TX_CLAMP,5,0),
	gs_Nin_LoadTextureImage(TXT_window_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,32,32,0,7),

	gsSPVertex(&TXT_window_v[0],4,0),
	gsSP1Quadrangle(0, 1, 2, 3, 0),
	gsSPEndDisplayList(),
}; /* g1 */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 4 vertices */
Vtx TXT_window_v[]={
	{  -160,     0,    40,     0,     0,  1024,     0,   120,     0,   255},	/* 0 */
	{   160,     0,    40,     0,  1024,  1024,     0,   120,     0,   255},	/* 1 */
	{   160,     0,   -40,     0,  1024,     0,     0,   120,     0,   255},	/* 2 */
	{  -160,     0,   -40,     0,     0,     0,     0,   120,     0,   255},	/* 3 */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
/* 32 x 32  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short TXT_window_txt[] = {
	0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 
	0x0, 0x9ce7, 0xd6b5, 0xd6b5, 0xe739, 0xd6b5, 0xd6b5, 0xd6b5, 0xd6b5, 0xd6b5, 0xd6b5, 0xd6b5, 0xd6b5, 0xe739, 0xd6b5, 0xd6b5, 0xd6b5, 0xd6b5, 0xe739, 0xdef7, 0xe739, 0xe739, 0xe739, 0xd6b5, 0xe739, 0xe739, 0xe739, 0xd6b5, 0xd6b5, 0xdef7, 0x6b5b, 0x0, 
	0x0, 0x94a5, 0xce73, 0xdef7, 0xe739, 0xe739, 0xe739, 0xe739, 0xe739, 0xe739, 0xe739, 0xe739, 0xe739, 0xe739, 0xe739, 0xe739, 0xe739, 0xe739, 0xe739, 0xe739, 0xe739, 0xe739, 0xe739, 0xe739, 0xe739, 0xdef7, 0xdef7, 0xdef7, 0xdef7, 0x8421, 0x18c7, 0x0, 
	0x0, 0x94a5, 0xad6b, 0x6319, 0x6319, 0x6319, 0x6319, 0x6319, 0x6b5b, 0x6319, 0x6319, 0x6319, 0x6319, 0x6319, 0x6319, 0x6319, 0x6319, 0x6319, 0x6b5b, 0x6b5b, 0x6319, 0x6319, 0x6319, 0x6319, 0x6319, 0x6319, 0x6319, 0x6319, 0x5ad7, 0x294b, 0x18c7, 0x0, 
	0x0, 0x9ce7, 0xb5ad, 0x739d, 0x739d, 0x739d, 0x739d, 0x739d, 0x739d, 0x739d, 0x739d, 0x739d, 0x7bdf, 0x7bdf, 0x739d, 0x739d, 0x739d, 0x739d, 0x7bdf, 0x7bdf, 0x739d, 0x739d, 0x739d, 0x739d, 0x739d, 0x739d, 0x739d, 0x6b5b, 0x6319, 0x294b, 0x18c7, 0x0, 
	0x0, 0x9ce7, 0xbdef, 0x7bdf, 0x7bdf, 0x8421, 0x8421, 0x8421, 0x8421, 0x8421, 0x8421, 0x8421, 0x8421, 0x8421, 0x8421, 0x8421, 0x8421, 0x8421, 0x8421, 0x8421, 0x8421, 0x8421, 0x8421, 0x8421, 0x8421, 0x7bdf, 0x7bdf, 0x739d, 0x6319, 0x318d, 0x18c7, 0x0, 
	0x0, 0xa529, 0xbdef, 0x7bdf, 0x8421, 0x8421, 0x8421, 0x8421, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8421, 0x8421, 0x7bdf, 0x739d, 0x6319, 0x318d, 0x18c7, 0x0, 
	0x0, 0xad6b, 0xc631, 0x8421, 0x8421, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8421, 0x8421, 0x739d, 0x6319, 0x318d, 0x18c7, 0x0, 
	0x0, 0xad6b, 0xce73, 0x8421, 0x8c63, 0x8c63, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x8c63, 0x8c63, 0x8421, 0x739d, 0x6319, 0x318d, 0x18c7, 0x0, 
	0x0, 0xa529, 0xc631, 0x8421, 0x8c63, 0x8c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7, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x94a5, 0x94a5, 0x94a5, 0x8c63, 0x8c63, 0x8421, 0x739d, 0x6319, 0x318d, 0x18c7, 0x0, 
	0x0, 0xa529, 0xc631, 0x8421, 0x8c63, 0x8c63, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x94a5, 0x94a5, 0x94a5, 0x8c63, 0x8c63, 0x8421, 0x739d, 0x6319, 0x318d, 0x18c7, 0x0, 
	0x0, 0xa529, 0xc631, 0x8421, 0x8c63, 0x8c63, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x9ce7, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x8c63, 0x8421, 0x8421, 0x739d, 0x6319, 0x294b, 0x18c7, 0x0, 
	0x0, 0xa529, 0xce73, 0x8421, 0x8c63, 0x8c63, 0x8c63, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x8c63, 0x8421, 0x8421, 0x739d, 0x6319, 0x294b, 0x18c7, 0x0, 
	0x0, 0xa529, 0xc631, 0x8421, 0x8c63, 0x8c63, 0x8c63, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x8c63, 0x8c63, 0x8421, 0x8421, 0x739d, 0x6319, 0x318d, 0x18c7, 0x0, 
	0x0, 0xa529, 0xc631, 0x8421, 0x8421, 0x8c63, 0x8c63, 0x8c63, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x94a5, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8421, 0x8421, 0x739d, 0x6319, 0x318d, 0x2109, 0x0, 
	0x0, 0x9ce7, 0xbdef, 0x8421, 0x8421, 0x8421, 0x8421, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8c63, 0x8421, 0x8421, 0x7bdf, 0x739d, 0x6319, 0x318d, 0x18c7, 0x0, 
	0x0, 0x9ce7, 0x7bdf, 0x62d9, 0x6319, 0x6b5b, 0x6b5b, 0x6b5b, 0x6b5b, 0x6b5b, 0x6b5b, 0x6b5b, 0x6b5b, 0x6b5b, 0x6b5b, 0x6b5b, 0x6b5b, 0x6b5b, 0x6b5b, 0x735d, 0x6b5b, 0x6b5b, 0x6b5b, 0x6b5b, 0x6319, 0x6319, 0x6319, 0x5ad7, 0x4a53, 0x39cf, 0x18c7, 0x0, 
	0x0, 0x5ad7, 0x318d, 0x318d, 0x39cf, 0x39cf, 0x39cf, 0x39cf, 0x41d1, 0x39cf, 0x39cf, 0x39cf, 0x39cf, 0x39cf, 0x39cf, 0x4211, 0x39cf, 0x4211, 0x39cf, 0x39cf, 0x39cf, 0x39cf, 0x4211, 0x39cf, 0x39cf, 0x318d, 0x318d, 0x318d, 0x294b, 0x294b, 0x18c7, 0x0, 
	0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x842, 0x842, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x842, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 
};

