#include<ultra64.h>

extern Vtx MC_Tsukidashi02_Dodai_v[];

extern unsigned char MC_SignalTX01_CI8_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 */


/* ======== Default ======== */

Gfx MC_Tsukidashi02_Dodai[]={

	gsDPLoadTLUT_pal256(&MC_SignalTX01_CI8_txt[256]),
	gsDPLoadTextureBlock(MC_SignalTX01_CI8_txt,G_IM_FMT_CI,G_IM_SIZ_8b,16,16,0,G_TX_WRAP,G_TX_WRAP,4,4,0,0),
	gsDPSetTextureLUT(G_TT_RGBA16),

	gsSPVertex(&MC_Tsukidashi02_Dodai_v[0],12,0),
	gsSP1Quadrangle(0, 1, 2, 3, 0),
	gsSP1Quadrangle(4, 5, 6, 7, 0),
	gsSP1Quadrangle(8, 9, 10, 11, 0),
	gsDPPipeSync(),
        gsDPSetTextureLUT(G_TT_NONE),
	gsSPEndDisplayList(),
}; /* Default */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 12 vertices */
Vtx MC_Tsukidashi02_Dodai_v[]={
	{    70,     0,   -70,     0,   480,   512,   120,     0,     0,   255},	/* 0 */
	{    70,    10,   -70,     0,   480,     0,   120,     0,     0,   255},	/* 1 */
	{    70,    10,    70,     0,    31,     0,   120,     0,     0,   255},	/* 2 */
	{    70,     0,    70,     0,    31,   512,   120,     0,     0,   255},	/* 3 */
	{   -70,     0,    70,     0,   480,   512,  -119,     0,     0,   255},	/* 4 */
	{   -70,    10,    70,     0,   480,     0,  -119,     0,     0,   255},	/* 5 */
	{   -70,    10,   -70,     0,    31,     0,  -119,     0,     0,   255},	/* 6 */
	{   -70,     0,   -70,     0,    31,   512,  -119,     0,     0,   255},	/* 7 */
	{    70,     0,    70,     0,   480,   512,     0,     0,   119,   255},	/* 8 */
	{    70,    10,    70,     0,   480,     0,     0,     0,   119,   255},	/* 9 */
	{   -70,    10,    70,     0,    31,     0,     0,     0,   119,   255},	/* 10 */
	{   -70,     0,    70,     0,    31,   512,     0,     0,   119,   255},	/* 11 */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
