#include<ultra64.h>

extern Vtx SX_Houdai_01_v[];

extern unsigned short SX_Beamana_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 */


/* ======== o2 ======== */

Gfx SX_Houdai_01[]={

	gs_Nin_SetUpTileDescrip(G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,0,G_TX_CLAMP,4,0,G_TX_CLAMP,4,0),
	gs_Nin_LoadTextureImage(SX_Beamana_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&SX_Houdai_01_v[0], 11, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(3, 0, 2, 0),
	gsSP1Triangle(1, 4, 2, 0),
	gsSP1Triangle(5, 6, 2, 0),
	gsSP1Triangle(7, 5, 2, 0),
	gsSP1Triangle(4, 8, 2, 0),
	gsSP1Triangle(9, 10, 2, 0),
	gsSP1Triangle(6, 9, 2, 0),
	gsSPEndDisplayList(),
}; /* o2 */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 11 vertices */
Vtx SX_Houdai_01_v[]={
	{ 132,0,0,0, 255, 512, 77,92,0,255 },   /* v0 used p11/V1 2 times */
	{ 100,0,-100,0, 767, 512, 52,95,-52,255 },   /* v1 used p11/V2 2 times */
	{ 0,110,0,0, 255, -51, 0,120,0,255 },   /* v2 used p11/V3 8 times */
	{ 100,0,100,0, -255, 512, 52,95,51,255 },   /* v3 used p10/V1 2 times */
	{ 0,0,-132,0, 255, 512, 0,92,-77,255 },   /* v4 used p7/V2 4 times */
	{ -132,0,0,0, 255, 512, -76,92,0,255 },   /* v5 used p8/V2 4 times */
	{ -100,0,100,0, -255, 512, -51,95,51,255 },   /* v6 used p9/V1 2 times */
	{ -100,0,-100,0, 767, 512, -51,95,-52,255 },   /* v7 used p8/V1 2 times */
	{ -100,0,-100,0, -255, 512, -51,95,-52,255 },   /* v8 used p13/V2 2 times */
	{ 0,0,132,0, 255, 512, 0,92,76,255 },   /* v9 used p12/V1 2 times */
	{ 100,0,100,0, 767, 512, 52,95,51,255 },   /* v10 used p12/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 SX_Beamana_txt[] = {
	0x1, 0x10c5, 0xcff7, 0x10c5, 0x41, 0x10c5, 0x324f, 0xcff7, 0xcff7, 0x324f, 0x10c5, 0x41, 0x10c5, 0xcff7, 0x10c5, 0x1, 
	0x324f, 0x218b, 0xcff7, 0x10c5, 0x7847, 0x1, 0x1, 0x324f, 0x324f, 0x1, 0x1, 0x7847, 0x10c5, 0xcff7, 0x218b, 0x324f, 
	0x1, 0x1, 0xcff7, 0x10c5, 0x7847, 0x9317, 0x1, 0x29cb, 0x29cb, 0x1, 0x9317, 0x7847, 0x10c5, 0xcff7, 0x1, 0x1, 
	0xcff7, 0x8e67, 0xcff7, 0x10c5, 0x7847, 0x9317, 0x1, 0x10c5, 0x10c5, 0x1, 0x9317, 0x7847, 0x10c5, 0xcff7, 0x8e67, 0xcff7, 
	0x1, 0x1, 0xcff7, 0x10c5, 0x7847, 0x9317, 0x1, 0x1, 0x1, 0x1, 0x9317, 0x7847, 0x10c5, 0xcff7, 0x1, 0x1, 
	0x324f, 0x218b, 0xcff7, 0x10c5, 0x8089, 0x810b, 0x9211, 0xa3db, 0xa3db, 0x9211, 0x810b, 0x8089, 0x10c5, 0xcff7, 0x218b, 0x324f, 
	0x1, 0x1, 0xcff7, 0x10c5, 0x2803, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x2803, 0x10c5, 0xcff7, 0x1, 0x1, 
	0xcff7, 0x8e67, 0xcff7, 0x10c5, 0x801, 0x1, 0x57c1, 0xffc1, 0xffc1, 0x57c1, 0x1, 0x801, 0x10c5, 0xcff7, 0x8e67, 0xcff7, 
	0x1, 0x1, 0xcff7, 0x10c5, 0x1, 0x1, 0x57c1, 0xffc1, 0xffc1, 0x57c1, 0x1, 0x1, 0x10c5, 0xcff7, 0x1, 0x1, 
	0x324f, 0x218b, 0xcff7, 0x10c5, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x10c5, 0xcff7, 0x218b, 0x324f, 
	0x1, 0x1, 0xcff7, 0x10c5, 0x710b, 0x810b, 0x9211, 0xa3db, 0xa3db, 0x9211, 0x810b, 0x710b, 0x10c5, 0xcff7, 0x1, 0x1, 
	0xcff7, 0x8e67, 0xcff7, 0x10c5, 0x7847, 0x9317, 0x1, 0x1, 0x1, 0x1, 0x9317, 0x7847, 0x10c5, 0xcff7, 0x8e67, 0xcff7, 
	0x1, 0x1, 0xcff7, 0x10c5, 0x7847, 0x9317, 0x1, 0x10c5, 0x10c5, 0x1, 0x9317, 0x7847, 0x10c5, 0xcff7, 0x1, 0x1, 
	0x324f, 0x218b, 0xcff7, 0x10c5, 0x7847, 0x9317, 0x801, 0x883, 0x883, 0x801, 0x9317, 0x7847, 0x10c5, 0xcff7, 0x218b, 0x324f, 
	0x1, 0x1, 0xcff7, 0x10c5, 0x6a51, 0x6a51, 0x1003, 0x1, 0x1, 0x1003, 0x6a51, 0x6a51, 0x10c5, 0xcff7, 0x1, 0x1, 
	0xcff7, 0x8e67, 0xcff7, 0x10c5, 0x4087, 0x4087, 0x4087, 0x1, 0x1, 0x4087, 0x4087, 0x4087, 0x10c5, 0xcff7, 0x8e67, 0xcff7, 
};

