#include<ultra64.h>

extern Vtx SZ_ISBM_BodyLight_v[];

extern unsigned char SZ_ISBMTX05_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 */


/* ======== g15 ======== */

Gfx SZ_ISBM_BodyLight[]={

	gsDPSetTextureLUT(G_TT_RGBA16),
	gsDPLoadTLUT_pal256(&SZ_ISBMTX05_CI8_txt[256]),
	gsDPLoadTextureBlock(SZ_ISBMTX05_CI8_txt,G_IM_FMT_CI,G_IM_SIZ_8b,16,16,0,G_TX_WRAP,G_TX_WRAP,4,4,0,0),

	gsSPVertex(&SZ_ISBM_BodyLight_v[0],8,0),
	gsSP1Quadrangle(0, 1, 2, 3, 0),
	gsSP1Quadrangle(4, 5, 6, 7, 0),
	gsDPPipeSync(),
        gsDPSetTextureLUT(G_TT_NONE),
	gsSPEndDisplayList(),
}; /* g15 */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 8 vertices */
Vtx SZ_ISBM_BodyLight_v[]={
	{   -30,   -30,   110,     0,  -512,   512,  -117,     0,    22,   255},	/* 0 */
	{   -30,    30,   110,     0,  -512,     0,  -117,     0,    22,   255},	/* 1 */
	{   -52,    30,     0,     0,   532,     0,  -117,     0,    22,   255},	/* 2 */
	{   -52,   -30,     0,     0,   532,   512,  -117,     0,    22,   255},	/* 3 */
	{    52,   -30,     0,     0,   532,   512,   118,     0,    22,   255},	/* 4 */
	{    52,    30,     0,     0,   532,     0,   118,     0,    22,   255},	/* 5 */
	{    30,    30,   110,     0,  -512,     0,   118,     0,    22,   255},	/* 6 */
	{    30,   -30,   110,     0,  -512,   512,   118,     0,    22,   255},	/* 7 */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
