#include<ultra64.h>

extern Vtx JT_hit10_v[];

extern unsigned char JT_hit10_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_hit10[]={

	gsDPLoadTLUT_pal16(0,&JT_hit10_CI4_txt[256]),
	gsDPLoadTextureBlock_4b(JT_hit10_CI4_txt,G_IM_FMT_CI,32,16,0,G_TX_CLAMP,G_TX_CLAMP,5,4,0,0),

	gsDPSetTextureLUT(G_TT_RGBA16),

	gsSPVertex(&JT_hit10_v[0], 4, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(0, 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_hit10_v[]={
	{ 80,60,0,0, 0, 0, 0,0,119,255 },   /* v0 used p267/V1 4 times */
	{ 80,-60,0,0, 0, 512, 0,0,119,255 },   /* v1 used p267/V2 2 times */
	{ 204,-60,0,0, 705, 512, 0,0,119,255 },   /* v2 used p267/V3 4 times */
	{ 204,60,0,0, 705, 0, 0,0,119,255 },   /* v3 used p266/V3 2 times */
};

/* 32 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned char JT_hit10_CI4_txt[] = {
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11, 
	0x02, 0x22, 0x23, 0x40, 0x43, 0x22, 0x22, 0x22, 0x22, 0x23, 0x40, 0x11, 0x11, 0x11, 0x11, 0x11, 
	0x02, 0x22, 0x23, 0x40, 0x43, 0x22, 0x22, 0x22, 0x22, 0x23, 0x40, 0x11, 0x11, 0x11, 0x11, 0x11, 
	0x02, 0x22, 0x23, 0x40, 0x43, 0x24, 0x00, 0x00, 0x04, 0x23, 0x40, 0x11, 0x11, 0x11, 0x11, 0x11, 
	0x00, 0x03, 0x23, 0x40, 0x43, 0x24, 0x01, 0x11, 0x04, 0x23, 0x40, 0x11, 0x11, 0x11, 0x11, 0x11, 
	0x11, 0x03, 0x23, 0x40, 0x43, 0x24, 0x01, 0x11, 0x04, 0x23, 0x40, 0x11, 0x11, 0x11, 0x11, 0x11, 
	0x11, 0x03, 0x23, 0x40, 0x43, 0x24, 0x01, 0x11, 0x04, 0x23, 0x40, 0x11, 0x11, 0x11, 0x11, 0x11, 
	0x11, 0x03, 0x23, 0x40, 0x43, 0x24, 0x01, 0x11, 0x04, 0x23, 0x40, 0x11, 0x11, 0x11, 0x11, 0x11, 
	0x11, 0x03, 0x23, 0x40, 0x43, 0x24, 0x01, 0x11, 0x04, 0x23, 0x40, 0x11, 0x11, 0x11, 0x11, 0x11, 
	0x11, 0x03, 0x23, 0x40, 0x43, 0x24, 0x01, 0x11, 0x04, 0x23, 0x40, 0x11, 0x11, 0x11, 0x11, 0x11, 
	0x11, 0x03, 0x23, 0x40, 0x43, 0x24, 0x01, 0x11, 0x04, 0x23, 0x40, 0x11, 0x11, 0x11, 0x11, 0x11, 
	0x11, 0x03, 0x23, 0x40, 0x43, 0x24, 0x01, 0x11, 0x04, 0x23, 0x40, 0x11, 0x11, 0x11, 0x11, 0x11, 
	0x11, 0x03, 0x23, 0x40, 0x43, 0x24, 0x00, 0x00, 0x04, 0x23, 0x40, 0x11, 0x11, 0x11, 0x11, 0x11, 
	0x11, 0x03, 0x23, 0x40, 0x43, 0x22, 0x22, 0x22, 0x22, 0x23, 0x40, 0x11, 0x11, 0x11, 0x11, 0x11, 
	0x11, 0x03, 0x23, 0x40, 0x43, 0x22, 0x22, 0x22, 0x22, 0x23, 0x40, 0x11, 0x11, 0x11, 0x11, 0x11, 
	0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11, 

/* 8colors */
0x0, 0x1, 0x60, 0x0, 0xFF, 0xFF, 0xAD, 0x6B, 0x52, 0x95, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xFE, };

