#include<ultra64.h>

extern Vtx CN_ATC_08_v[];
extern Vtx CN_ATC_08_vmcur[];
extern Tri CN_ATC_08_tri[];
extern Mtx CN_ATC_08_matrix[];

extern unsigned short CN_Bill_04_txt[];
extern unsigned short CN_Bill_05_txt[];
extern unsigned short CN_Bill_07_2_txt[];
extern unsigned short CN_Billroof_txt[];
extern unsigned short CN_BossTX_01_txt[];
extern unsigned short CN_BossTX_04_txt[];
extern unsigned short CN_BossTX_07_txt[];
extern unsigned short CN_BossTX_11_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 */


/* ======== o1 ======== */

Gfx CN_ATC_08[]={

	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(CN_BossTX_01_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,32,32,0,7),


	gsSPVertex(&CN_ATC_08_v[0],20,0),
	gsSP1Quadrangle(0, 1, 2, 3, 0),
	gsSP1Quadrangle(4, 7, 5, 6, 0),
	gsSP2Triangles(8, 9, 10, 0, 8, 10, 11, 0),
	gsSP2Triangles(12, 13, 14, 0, 12, 14, 15, 0),
	gsSP1Quadrangle(16, 19, 17, 18, 0),
	gs_Nin_LoadTextureImage(CN_BossTX_07_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,32,32,0,7),

	gsSPVertex(&CN_ATC_08_v[20],4,0),
	gsSP1Quadrangle(0, 1, 2, 3, 0),
	gsSPEndDisplayList(),
}; /* o1 */ 

/* 24 vertices */
Vtx CN_ATC_08_v[]={
	{    34,    67,   -82,     0,   819,  1577,   106,    47,   -32,     0},	/* 0 */
	{    -7,   105,  -103,     0,  1024,  1024,    73,    31,   -90,     0},	/* 1 */
	{    -7,   105,     0,     0,     0,  1024,    84,    57,    63,     0},	/* 2 */
	{    34,    67,   -20,     0,   204,  1577,   105,    12,    57,     0},	/* 3 */
	{    -7,   105,  -103,     0,     0,  1024,    73,    31,   -90,     0},	/* 4 */
	{    34,   -46,   -82,     0,   819,  1275,   105,   -11,   -58,     0},	/* 5 */
	{    -7,   -83,  -103,     0,  1023,  1024,    84,   -56,   -64,     0},	/* 6 */
	{    34,    67,   -82,     0,   204,  1275,   106,    47,   -32,     0},	/* 7 */
	{    -7,   -83,     0,     0,     0,  1024,    73,   -30,    89,     0},	/* 8 */
	{    34,   -46,   -20,     0,   204,  1275,   106,   -46,    31,     0},	/* 9 */
	{    34,    67,   -20,     0,   819,  1275,   105,    12,    57,     0},	/* 10 */
	{    -7,   105,     0,     0,  1024,  1024,    84,    57,    63,     0},	/* 11 */
	{    -7,   -83,  -103,     0,     0,  1024,    84,   -56,   -64,     0},	/* 12 */
	{    34,   -46,   -82,     0,   204,  1577,   105,   -11,   -58,     0},	/* 13 */
	{    34,   -46,   -20,     0,   819,  1577,   106,   -46,    31,     0},	/* 14 */
	{    -7,   -83,     0,     0,  1024,  1024,    73,   -30,    89,     0},	/* 15 */
	{    34,   -46,   -82,     0,     0,  1024,   105,   -11,   -58,     0},	/* 16 */
	{    34,    67,   -20,     0,  1024,     0,   105,    12,    57,     0},	/* 17 */
	{    34,   -46,   -20,     0,     0,     0,   106,   -46,    31,     0},	/* 18 */
	{    34,    67,   -82,     0,  1024,  1024,   106,    47,   -32,     0},	/* 19 */
	{    -7,   105,  -103,     0,  1024,  1024,  -119,     0,     0,     0},	/* 20 */
	{    -7,   -83,  -103,     0,     0,  1024,  -119,     0,     0,     0},	/* 21 */
	{    -7,   -83,     0,     0,     0,     0,  -119,     0,     0,     0},	/* 22 */
	{    -7,   105,     0,     0,  1024,     0,  -119,     0,     0,     0},	/* 23 */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
