#include<ultra64.h>

extern Vtx JT_hit9_v[];

extern unsigned char JT_hit9_CI4_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 JT_hit9[]={

	gsDPLoadTLUT_pal16(0,&JT_hit9_CI4_txt[128]),
	gsDPLoadTextureBlock_4b(JT_hit9_CI4_txt,G_IM_FMT_CI,16,16,0,G_TX_CLAMP,G_TX_CLAMP,4,4,0,0),
	gsDPSetTextureLUT(G_TT_RGBA16),

	gsSPVertex(&JT_hit9_v[0],4,0),
	gsSP1Quadrangle(0, 1, 2, 3, 0),
	gsDPPipeSync(),
        gsDPSetTextureLUT(G_TT_NONE),
	gsSPEndDisplayList(),
}; /* Default */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 4 vertices */
Vtx JT_hit9_v[]={
	{    90,    60,     0,     0,     0,     0,     0,     0,   119,   255},	/* 0 */
	{    90,   -60,     0,     0,     0,   512,     0,     0,   119,   255},	/* 1 */
	{   210,   -60,     0,     0,   511,   512,     0,     0,   119,   255},	/* 2 */
	{   210,    60,     0,     0,   511,     0,     0,     0,   119,   255},	/* 3 */
};


/*   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 char JT_hit9_CI4_txt[] = {
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x01, 0x23, 0x33, 0x33, 0x33, 0x33, 0x32, 0x10, 
	0x01, 0x23, 0x33, 0x33, 0x33, 0x33, 0x32, 0x10, 
	0x01, 0x24, 0x10, 0x00, 0x00, 0x12, 0x32, 0x10, 
	0x01, 0x24, 0x10, 0x55, 0x50, 0x12, 0x32, 0x10, 
	0x01, 0x24, 0x10, 0x55, 0x50, 0x12, 0x32, 0x10, 
	0x01, 0x24, 0x10, 0x00, 0x00, 0x12, 0x32, 0x10, 
	0x01, 0x23, 0x33, 0x33, 0x33, 0x33, 0x32, 0x10, 
	0x01, 0x23, 0x33, 0x33, 0x33, 0x33, 0x32, 0x10, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x32, 0x10, 
	0x55, 0x55, 0x55, 0x55, 0x50, 0x12, 0x32, 0x10, 
	0x55, 0x55, 0x55, 0x55, 0x50, 0x12, 0x32, 0x10, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x32, 0x10, 
	0x01, 0x33, 0x33, 0x33, 0x33, 0x33, 0x32, 0x10, 
	0x01, 0x33, 0x33, 0x33, 0x33, 0x33, 0x32, 0x10, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 

/* 8colors */
0x0, 0x1, 0x52, 0x95, 0xAD, 0x6B, 0xFF, 0xFF, 0xCE, 0x73, 0x60, 0x0, 0xFF, 0xFE, 0xFF, 0xFE, };

