#include<ultra64.h>

extern Vtx VSS_Gomi05_v[];

extern unsigned char VSS_ISBMissileTX04_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 */


/* ======== o11 ======== */

Gfx VS_S_Gomi05[]={

	gsDPLoadTLUT_pal256(&VSS_ISBMissileTX04_CI8_txt[1024]),
	gsDPLoadTextureBlock(VSS_ISBMissileTX04_CI8_txt,G_IM_FMT_CI,G_IM_SIZ_8b,32,32,0,G_TX_WRAP,G_TX_MIRROR,5,5,0,0),
	gsDPSetTextureLUT(G_TT_RGBA16),

	gsSPVertex(&VSS_Gomi05_v[0], 16, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(0, 2, 3, 0),
	gsSP1Triangle(4, 5, 6, 0),
	gsSP1Triangle(4, 6, 7, 0),
	gsSP1Triangle(4, 7, 8, 0),
	gsSP1Triangle(4, 8, 9, 0),
	gsSP1Triangle(8, 10, 11, 0),
	gsSP1Triangle(8, 11, 9, 0),
	gsSP1Triangle(12, 13, 14, 0),
	gsSP1Triangle(12, 14, 15, 0),
	gsSPVertex(&VSS_Gomi05_v[16], 4, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(0, 2, 3, 0),
	gsSPEndDisplayList(),
}; /* o11 */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 20 vertices */
Vtx VSS_Gomi05_v[]={
	{ 400,240,-30,0, 1024, 542, 120,0,0,255 },   /* v0 used p175/V1 2 times */
	{ 400,240,30,0, 1024, 451, 120,0,0,255 },   /* v1 used p175/V2 2 times */
	{ 400,-240,30,0, 0, 451, 120,0,0,255 },   /* v2 used p175/V3 2 times */
	{ 400,-240,-30,0, 0, 542, 120,0,0,255 },   /* v3 used p175/V4 2 times */
	{ 400,-240,-30,0, 0, 2048, 0,0,-120,255 },   /* v4 used p174/V1 2 times */
	{ 400,-240,30,0, 1024, 2048, 0,-119,0,255 },   /* v5 used p172/V2 2 times */
	{ -400,-240,30,0, 1024, 0, 0,-119,0,255 },   /* v6 used p172/V3 2 times */
	{ -400,-240,-30,0, 0, 0, 0,0,-120,255 },   /* v7 used p174/V2 2 times */
	{ -400,240,-30,0, 1024, 0, 0,0,-120,255 },   /* v8 used p174/V3 2 times */
	{ 400,240,-30,0, 1024, 2048, 0,0,-120,255 },   /* v9 used p174/V4 2 times */
	{ -400,240,30,0, 0, 0, 0,120,0,255 },   /* v10 used p170/V2 2 times */
	{ 400,240,30,0, 0, 2048, 0,120,0,255 },   /* v11 used p170/V3 2 times */
	{ -400,-240,-30,0, 0, 542, -119,0,0,255 },   /* v12 used p171/V1 2 times */
	{ -400,-240,30,0, 0, 451, -119,0,0,255 },   /* v13 used p171/V2 2 times */
	{ -400,240,30,0, 1024, 451, -119,0,0,255 },   /* v14 used p171/V3 2 times */
	{ -400,240,-30,0, 1024, 542, -119,0,0,255 },   /* v15 used p171/V4 2 times */
	{ 400,240,30,0, 1024, 2048, 0,0,119,255 },   /* v16 used p169/V1 2 times */
	{ -400,240,30,0, 1024, 0, 0,0,119,255 },   /* v17 used p169/V2 2 times */
	{ -400,-240,30,0, 0, 0, 0,0,119,255 },   /* v18 used p169/V3 2 times */
	{ 400,-240,30,0, 0, 2048, 0,0,119,255 },   /* v19 used p169/V4 2 times */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
