#include<ultra64.h>

extern Vtx ZO_sibuki01_v[];

extern unsigned char ZO_sibuki01_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 */


/* ======== g2 ======== */

Gfx ZO_sibuki01[]={

	gs_Nin_SetUpTileDescrip(G_IM_FMT_IA,G_IM_SIZ_8b,16,16,0,0,G_TX_MIRROR,4,0,G_TX_CLAMP,4,0),
	gs_Nin_LoadTextureImage(ZO_sibuki01_txt,G_IM_FMT_IA,G_IM_SIZ_8b,16,16,0,7),

	gsSPVertex(&ZO_sibuki01_v[0],8,0),
	gsSP1Quadrangle(0, 1, 2, 3, 0),
	gsSP1Quadrangle(0, 3, 4, 5, 0),
	gsSP1Quadrangle(4, 6, 7, 5, 0),
	gsSPEndDisplayList(),
}; /* g2 */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 8 vertices */
Vtx ZO_sibuki01_v[]={
	{   -80,   260,     0,     0,   256,     0,   -51,     0,   107,   255},	/* 0 */
	{  -160,   260,  -100,     0,     0,     0,   -93,     0,    74,   255},	/* 1 */
	{  -160,   -20,  -100,     0,     0,   512,   -93,     0,    74,   255},	/* 2 */
	{   -80,   -20,     0,     0,   256,   512,   -51,     0,   107,   255},	/* 3 */
	{    80,   -20,     0,     0,   768,   512,    52,     0,   107,   255},	/* 4 */
	{    80,   260,     0,     0,   768,     0,    52,     0,   107,   255},	/* 5 */
	{   160,   -20,  -100,     0,  1024,   512,    94,     0,    74,   255},	/* 6 */
	{   160,   260,  -100,     0,  1024,     0,    94,     0,    74,   255},	/* 7 */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
/* 16 x 16  G_IM_SIZ_8b  G_IM_FMT_IA    */
unsigned char ZO_sibuki01_txt[] = {
	0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 
	0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf1, 0xf0, 0xf0, 0xf0, 
	0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf1, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf4, 0xf0, 0xf0, 0xf0, 
	0xf0, 0xf0, 0xf0, 0xf1, 0xf0, 0xf0, 0xf2, 0xf0, 0xf1, 0xf0, 0xf0, 0xf0, 0xf7, 0xf0, 0xf0, 0xf5, 
	0xf0, 0xf0, 0xf1, 0xf2, 0xf4, 0xf0, 0xf4, 0xf6, 0xf3, 0xf8, 0xf4, 0xf4, 0xfa, 0xf4, 0xf0, 0xf7, 
	0xf0, 0xf0, 0xf0, 0xf3, 0xf8, 0xf2, 0xf6, 0xff, 0xf7, 0xff, 0xf8, 0xf5, 0xfa, 0xf4, 0xf3, 0xfa, 
	0xf0, 0xf3, 0xf0, 0xf5, 0xfc, 0xf4, 0xf9, 0xf8, 0xf9, 0xff, 0xf9, 0xf9, 0xfb, 0xf9, 0xfa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