#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], 15, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(3, 4, 5, 0),
	gsSP1Triangle(6, 7, 8, 0),
	gsSP1Triangle(9, 10, 11, 0),
	gsSP1Triangle(12, 13, 14, 0),
	gsSPVertex(&AS_Rock_ue_v[15], 5, 0),
	gsSPVertex(&AS_Rock_ue_v[22], 10, 5),
	gsSP1Triangle(0, 5, 6, 0),
	gsSP1Triangle(1, 7, 8, 0),
	gsSP1Triangle(2, 9, 10, 0),
	gsSP1Triangle(3, 11, 12, 0),
	gsSP1Triangle(4, 13, 14, 0),
	gsSPVertex(&AS_Rock_ue_v[20], 2, 0),
	gsSPVertex(&AS_Rock_ue_v[32], 4, 2),
	gsSP1Triangle(0, 2, 3, 0),
	gsSP1Triangle(1, 4, 5, 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 },   /* v0 used p8/V1 2 times */
	{ 65,-9,-97,0, 0, 1024, 58,59,-87,255 },   /* v1 used p8/V2 2 times */
	{ 16,125,-39,0, 1105, 1440, 42,82,-77,255 },   /* v2 used p8/V3 2 times */
	{ -43,120,13,0, -549, 1301, -80,84,29,255 },   /* v3 used p9/V1 2 times */
	{ 52,105,46,0, -1395, 2439, 53,77,74,255 },   /* v4 used p9/V2 2 times */
	{ 16,125,-39,0, -345, 2143, 42,82,-77,255 },   /* v5 used p9/V3 2 times */
	{ 0,-8,110,0, 772, -311, 3,-119,4,255 },   /* v6 used p79/V1 2 times */
	{ -107,-4,32,0, 11, -19, -9,-118,7,255 },   /* v7 used p79/V2 2 times */
	{ -66,-15,-90,0, 98, 981, 0,-119,3,255 },   /* v8 used p79/V3 2 times */
	{ 0,-8,110,0, 594, -321, 3,-119,4,255 },   /* v9 used p80/V1 2 times */
	{ -66,-15,-90,0, 246, 584, 0,-119,3,255 },   /* v10 used p80/V2 2 times */
	{ 65,-9,-97,0, 764, 786, 8,-119,2,255 },   /* v11 used p80/V3 2 times */
	{ 0,-8,110,0, 951, -420, 3,-119,4,255 },   /* v12 used p81/V1 2 times */
	{ 65,-9,-97,0, 0, 1024, 8,-119,2,255 },   /* v13 used p81/V2 2 times */
	{ 104,0,33,0, 1001, 614, 12,-118,4,255 },   /* v14 used p81/V3 2 times */
	{ -66,-15,-90,0, 0, 1024, -63,58,-84,255 },   /* v15 used p7/V1 2 times */
	{ 52,105,46,0, -2, 1024, 53,77,74,255 },   /* v16 used p1/V1 2 times */
	{ -66,-15,-90,0, 0, 1024, -63,58,-84,255 },   /* v17 used p2/V1 2 times */
	{ -43,120,13,0, -1024, 1024, -80,84,29,255 },   /* v18 used p3/V1 2 times */
	{ 16,125,-39,0, 530, 397, 42,82,-77,255 },   /* v19 used p4/V1 2 times */
	{ 52,105,46,0, -1024, 1024, 53,77,74,255 },   /* v20 used p5/V1 2 times */
	{ 52,105,46,0, 324, 632, 53,77,74,255 },   /* v21 used p6/V1 2 times */
	{ -107,-4,32,0, 1147, 1013, -100,57,30,255 },   /* v22 used p7/V2 2 times */
	{ -43,120,13,0, 894, -210, -80,84,29,255 },   /* v23 used p7/V3 2 times */
	{ 0,-8,110,0, 1021, 1024, -11,52,107,255 },   /* v24 used p1/V2 2 times */
	{ 104,0,33,0, 432, 278, 108,51,8,255 },   /* v25 used p1/V3 2 times */
	{ -43,120,13,0, 1024, 1024, -80,84,29,255 },   /* v26 used p2/V2 2 times */
	{ 16,125,-39,0, 907, 569, 42,82,-77,255 },   /* v27 used p2/V3 2 times */
	{ -107,-4,32,0, 0, 1024, -100,57,30,255 },   /* v28 used p3/V2 2 times */
	{ 0,-8,110,0, -250, 95, -11,52,107,255 },   /* v29 used p3/V3 2 times */
	{ 65,-9,-97,0, 554, 1284, 58,59,-87,255 },   /* v30 used p4/V2 2 times */
	{ -66,-15,-90,0, 1513, 1005, -63,58,-84,255 },   /* v31 used p4/V3 2 times */
	{ 104,0,33,0, 0, 1024, 108,51,8,255 },   /* v32 used p5/V2 2 times */
	{ 16,125,-39,0, -1233, 236, 42,82,-77,255 },   /* v33 used p5/V3 2 times */
	{ -43,120,13,0, 0, 1024, -80,84,29,255 },   /* v34 used p6/V2 2 times */
	{ 0,-8,110,0, 825, 1122, -11,52,107,255 },   /* v35 used p6/V3 2 times */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
