#include<ultra64.h>

extern Vtx VS_Ground_02_v[];
extern Vtx VS_Ground_02_vmcur[];
extern Tri VS_Ground_02_tri[];
extern Mtx VS_Ground_02_matrix[];

extern unsigned short VS_Ground_01_txt[];
extern unsigned short VS_Ground_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 */


/* ======== o5 ======== */

Gfx VS_Ground_02[]={

	gs_Nin_SetUpTileDescrip(G_IM_FMT_RGBA,G_IM_SIZ_16b,32,32,0,0,G_TX_MIRROR,5,0,G_TX_MIRROR,5,0),
	gs_Nin_LoadTextureImage(VS_Ground_02_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,32,32,0,7),

	gsSPVertex(&VS_Ground_02_v[0],4,0),
	gsSP1Quadrangle(0, 1, 2, 3, 0),
	gsSPEndDisplayList(),
}; /* o5 */ 

/* 4 vertices */
Vtx VS_Ground_02_v[]={
	{  6000,     0, -6000,     0,  7680, -6656,   255,   255,   255,   255},	/* 0 */
	{ -6000,     0, -6000,     0,     0, -6656,   255,   255,   255,   255},	/* 1 */
	{ -6000,     0,  6000,     0,     0,  1024,   255,   255,   255,   255},	/* 2 */
	{  6000,     0,  6000,     0,  7680,  1024,   255,   255,   255,   255},	/* 3 */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
