#include<ultra64.h>

extern Vtx JT_Smark_v[];

extern unsigned char JT_Smark_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_Smark[]={

	gsDPSetTextureLUT(G_TT_RGBA16),
	gsDPLoadTLUT_pal16(0,&JT_Smark_CI4_txt[128]),
	gsDPLoadTextureBlock_4b(JT_Smark_CI4_txt,G_IM_FMT_CI,16,16,0,G_TX_CLAMP,G_TX_CLAMP,4,4,0,0),

	gsSPVertex(&JT_Smark_v[0],3,0),
	gsSP1Triangle(0, 1, 2, 0),
	gsDPPipeSync(),
        gsDPSetTextureLUT(G_TT_NONE),
	gsSPEndDisplayList(),
}; /* Default */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 3 vertices */
Vtx JT_Smark_v[]={
	{     0,  -107,     0,     0,   256,   624,     0,     0,   119,   255},	/* 0 */
	{    80,    53,     0,     0,   512,   112,     0,     0,   119,   255},	/* 1 */
	{   -80,    53,     0,     0,     0,   112,     0,     0,   119,   255},	/* 2 */
};


/*   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_Smark_CI4_txt[] = {
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 
	0x00, 0x00, 0x12, 0x22, 0x22, 0x31, 0x00, 0x00, 
	0x00, 0x00, 0x12, 0x31, 0x11, 0x11, 0x00, 0x00, 
	0x00, 0x00, 0x12, 0x22, 0x22, 0x31, 0x00, 0x00, 
	0x00, 0x00, 0x11, 0x11, 0x12, 0x31, 0x00, 0x00, 
	0x00, 0x00, 0x12, 0x22, 0x22, 0x31, 0x00, 0x00, 
	0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 

/* 8colors */
0x5, 0x91, 0x0, 0x1, 0xFF, 0xFF, 0x8C, 0x63, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xFE, };

