#include<ultra64.h>

extern Vtx AS_Rock_houdai_v[];

extern unsigned short AS_Rock_houdai_TX_01_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_houdai[]={

	gs_Nin_SetUpTileDescrip(G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,0,G_TX_WRAP,4,0,G_TX_WRAP,4,0),
	gs_Nin_LoadTextureImage(AS_Rock_houdai_TX_01_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&AS_Rock_houdai_v[0], 16, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(3, 4, 5, 0),
	gsSP1Triangle(6, 7, 8, 0),
	gsSP1Triangle(9, 10, 7, 0),
	gsSP1Triangle(7, 6, 9, 0),
	gsSP1Triangle(11, 12, 13, 0),
	gsSP1Triangle(14, 15, 12, 0),
	gsSP1Triangle(12, 11, 14, 0),
	gsSPEndDisplayList(),
}; /* DXFdata */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 16 vertices */
Vtx AS_Rock_houdai_v[]={
	{ 31,67,28,0, 256, -742, 84,4,84,255 },   /* v0 used p14/V1 2 times */
	{ -1,-84,41,0, 0, 512, 0,-3,119,255 },   /* v1 used p14/V2 2 times */
	{ 43,-84,-2,0, 512, 512, 84,-9,84,255 },   /* v2 used p14/V3 2 times */
	{ -32,67,-33,0, 256, -742, -83,4,-85,255 },   /* v3 used p16/V1 2 times */
	{ -1,-84,-46,0, 0, 512, 0,-3,-120,255 },   /* v4 used p16/V2 2 times */
	{ -45,-84,-2,0, 512, 512, -119,-3,0,255 },   /* v5 used p16/V3 2 times */
	{ -45,-84,-2,0, 0, 512, -119,-3,0,255 },   /* v6 used p15/V2 2 times */
	{ -32,67,28,0, 255, -716, -83,4,84,255 },   /* v7 used p15/V1 3 times */
	{ -32,67,-33,0, -103, -759, -83,4,-85,255 },   /* v8 used p12/V3 2 times */
	{ -1,-84,41,0, 512, 512, 0,-3,119,255 },   /* v9 used p15/V3 2 times */
	{ 31,67,28,0, 620, -759, 84,4,84,255 },   /* v10 used p9/V2 2 times */
	{ 43,-84,-2,0, 0, 512, 111,0,-46,255 },   /* v11 used p13/V2 2 times */
	{ 31,67,-33,0, 255, -742, 84,4,-85,255 },   /* v12 used p13/V1 3 times */
	{ 31,67,28,0, -103, -711, 84,4,84,255 },   /* v13 used p11/V3 2 times */
	{ -1,-84,-46,0, 511, 512, 0,-3,-120,255 },   /* v14 used p13/V3 2 times */
	{ -32,67,-33,0, 620, -711, -83,4,-85,255 },   /* v15 used p10/V2 2 times */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short AS_Rock_houdai_TX_01_txt[] = {
	0xf801, 0x1, 0x1, 0x1, 0x1, 0xf801, 0x1, 0x5801, 0x5801, 0x1, 0xf801, 0x1, 0x1, 0x1, 0x1, 0xf801, 
	0x1, 0x1043, 0x2107, 0x3989, 0x1, 0xf801, 0x1, 0xf801, 0xf801, 0x1, 0xf801, 0x1, 0x398b, 0x2907, 0x1083, 0x1, 
	0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 
	0x1, 0x1, 0x1, 0x1083, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0x18c7, 0x1, 0x1, 0x1, 
	0x1, 0x1, 0x1, 0x3147, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0x39cf, 0x1, 0x1, 0x1, 
	0xf801, 0xf801, 0x1, 0x3147, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0x39cf, 0x1, 0xf801, 0xf801, 
	0xf801, 0xf801, 0x1, 0x1083, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0x1085, 0x1, 0xf801, 0xf801, 
	0xf801, 0xf801, 0x1, 0x843, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0x843, 0x1, 0xf801, 0xf801, 
	0xf801, 0xf801, 0x1, 0x841, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0x843, 0x1, 0xf801, 0xf801, 
	0xf801, 0xf801, 0x1, 0x1083, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0x1083, 0x1, 0xf801, 0xf801, 
	0xf801, 0xf801, 0x1, 0x2907, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0x3147, 0x1, 0xf801, 0xf801, 
	0x1, 0x1, 0x1, 0x2905, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0x3147, 0x1, 0x1, 0x1, 
	0x1, 0x1, 0x1, 0x1043, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0xf801, 0x1083, 0x1, 0x1, 0x1, 
	0xf801, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xf801, 
	0x1, 0x1083, 0x2107, 0x3989, 0x1, 0xf801, 0x1, 0xf801, 0xf801, 0x1, 0xf801, 0x1, 0x41cb, 0x3147, 0x18c5, 0x1, 
	0x1, 0x1, 0x1, 0x1, 0x1, 0xf801, 0x1, 0x5801, 0x5801, 0x1, 0xf801, 0x1, 0x1, 0x1, 0x1, 0x1, 
};

