#include<ultra64.h>

extern Vtx AS_Rock_ue_v[];

extern unsigned short AS_Rock_TX_07_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 */


/* ======== DXFdata ======== */

Gfx AS_Rock_ue[]={

	gs_Nin_SetUpTileDescrip(G_IM_FMT_RGBA,G_IM_SIZ_16b,32,32,0,0,G_TX_WRAP,5,0,G_TX_WRAP,5,0),
	gs_Nin_LoadTextureImage(AS_Rock_TX_07_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,32,32,0,7),

	gsSPVertex(&AS_Rock_ue_v[0],32,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),
	gsSP2Triangles(18, 19, 20, 0, 15, 21, 22, 0),
	gsSP2Triangles(23, 24, 25, 0, 26, 27, 28, 0),
	gsSP1Triangle(29, 30, 31, 0),
	gsSPVertex(&AS_Rock_ue_v[32],3,0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSPEndDisplayList(),
}; /* DXFdata */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 36 vertices */
Vtx AS_Rock_ue_v[]={
	{   104,     0,    33,     0,   667,   225,   108,    51,     8,   255},	/* 0 */
	{    65,    -9,   -97,     0,     0,  1024,    58,    59,   -87,   255},	/* 1 */
	{    16,   125,   -39,     0,  1105,  1440,    42,    82,   -77,   255},	/* 2 */
	{   -43,   120,    13,     0,  -549,  1301,   -80,    84,    29,   255},	/* 3 */
	{    52,   105,    46,     0, -1395,  2439,    53,    77,    74,   255},	/* 4 */
	{    16,   125,   -39,     0,  -345,  2143,    42,    82,   -77,   255},	/* 5 */
	{     0,    -8,   110,     0,   772,  -311,     3,  -119,     4,   255},	/* 6 */
	{  -107,    -4,    32,     0,    11,   -19,    -9,  -118,     7,   255},	/* 7 */
	{   -66,   -15,   -90,     0,    98,   981,     0,  -119,     3,   255},	/* 8 */
	{     0,    -8,   110,     0,   594,  -321,     3,  -119,     4,   255},	/* 9 */
	{   -66,   -15,   -90,     0,   246,   584,     0,  -119,     3,   255},	/* 10 */
	{    65,    -9,   -97,     0,   764,   786,     8,  -119,     2,   255},	/* 11 */
	{     0,    -8,   110,     0,   951,  -420,     3,  -119,     4,   255},	/* 12 */
	{    65,    -9,   -97,     0,     0,  1024,     8,  -119,     2,   255},	/* 13 */
	{   104,     0,    33,     0,  1001,   614,    12,  -118,     4,   255},	/* 14 */
	{   -66,   -15,   -90,     0,     0,  1024,   -63,    58,   -84,   255},	/* 15 */
	{  -107,    -4,    32,     0,  1147,  1013,  -100,    57,    30,   255},	/* 16 */
	{   -43,   120,    13,     0,   894,  -210,   -80,    84,    29,   255},	/* 17 */
	{    52,   105,    46,     0,    -2,  1024,    53,    77,    74,   255},	/* 18 */
	{     0,    -8,   110,     0,  1021,  1024,   -11,    52,   107,   255},	/* 19 */
	{   104,     0,    33,     0,   432,   278,   108,    51,     8,   255},	/* 20 */
	{   -43,   120,    13,     0,  1024,  1024,   -80,    84,    29,   255},	/* 21 */
	{    16,   125,   -39,     0,   907,   569,    42,    82,   -77,   255},	/* 22 */
	{   -43,   120,    13,     0, -1024,  1024,   -80,    84,    29,   255},	/* 23 */
	{  -107,    -4,    32,     0,     0,  1024,  -100,    57,    30,   255},	/* 24 */
	{     0,    -8,   110,     0,  -250,    95,   -11,    52,   107,   255},	/* 25 */
	{    16,   125,   -39,     0,   530,   397,    42,    82,   -77,   255},	/* 26 */
	{    65,    -9,   -97,     0,   554,  1284,    58,    59,   -87,   255},	/* 27 */
	{   -66,   -15,   -90,     0,  1513,  1005,   -63,    58,   -84,   255},	/* 28 */
	{    52,   105,    46,     0, -1024,  1024,    53,    77,    74,   255},	/* 29 */
	{   104,     0,    33,     0,     0,  1024,   108,    51,     8,   255},	/* 30 */
	{    16,   125,   -39,     0, -1233,   236,    42,    82,   -77,   255},	/* 31 */
	{    52,   105,    46,     0,   324,   632,    53,    77,    74,   255},	/* 32 */
	{   -43,   120,    13,     0,     0,  1024,   -80,    84,    29,   255},	/* 33 */
	{     0,    -8,   110,     0,   825,  1122,   -11,    52,   107,   255},	/* 34 */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
