#include<ultra64.h>

extern Vtx VSS_Gomi06_v[];

extern unsigned char VSS_HashiraTX01_CI8_txt[];
extern unsigned char VSS_HashitaTX02_CI8_txt[];
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

Gfx VS_S_Gomi06[]={

	gsDPLoadTLUT_pal256(&VSS_HashiraTX01_CI8_txt[64]),
	gsDPLoadTextureBlock(VSS_HashiraTX01_CI8_txt,G_IM_FMT_CI,G_IM_SIZ_8b,8,8,0,G_TX_WRAP,G_TX_WRAP,3,3,0,0),
	gsDPSetTextureLUT(G_TT_RGBA16),

	gsSPVertex(&VSS_Gomi06_v[0], 8, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(0, 2, 3, 0),
	gsSP1Triangle(4, 5, 6, 0),
	gsSP1Triangle(4, 6, 7, 0),

	gsDPLoadTLUT_pal256(&VSS_HashitaTX02_CI8_txt[256]),
	gsDPLoadTextureBlock(VSS_HashitaTX02_CI8_txt,G_IM_FMT_CI,G_IM_SIZ_8b,16,16,0,G_TX_WRAP,G_TX_WRAP,4,4,0,0),

	gsSPVertex(&VSS_Gomi06_v[8], 12, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(0, 2, 3, 0),
	gsSP1Triangle(4, 5, 6, 0),
	gsSP1Triangle(4, 6, 7, 0),
	gsSP1Triangle(8, 9, 10, 0),
	gsSP1Triangle(8, 10, 11, 0),
	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),

	gsSPVertex(&VSS_Gomi06_v[20], 14, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(0, 2, 3, 0),
	gsSP1Triangle(3, 4, 5, 0),
	gsSP1Triangle(3, 5, 0, 0),
	gsSP1Triangle(6, 7, 8, 0),
	gsSP1Triangle(6, 8, 9, 0),
	gsSP1Triangle(10, 11, 12, 0),
	gsSP1Triangle(10, 12, 13, 0),
	gsSPVertex(&VSS_Gomi06_v[34], 8, 0),
	gsSP1Triangle(0, 2, 3, 0),
	gsSP1Triangle(0, 3, 4, 0),
	gsSP1Triangle(1, 5, 6, 0),
	gsSP1Triangle(1, 6, 7, 0),
	gsDPLoadTLUT_pal256(&VSS_HashiraTX01_CI8_txt[64]),
	gsDPLoadTextureBlock(VSS_HashiraTX01_CI8_txt,G_IM_FMT_CI,G_IM_SIZ_8b,8,8,0,G_TX_WRAP,G_TX_WRAP,3,3,0,0),

	gsSPVertex(&VSS_Gomi06_v[42], 8, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(0, 2, 3, 0),
	gsSP1Triangle(4, 5, 6, 0),
	gsSP1Triangle(4, 6, 7, 0),

	gsDPLoadTLUT_pal256(&VSS_HashitaTX02_CI8_txt[256]),
	gsDPLoadTextureBlock(VSS_HashitaTX02_CI8_txt,G_IM_FMT_CI,G_IM_SIZ_8b,16,16,0,G_TX_WRAP,G_TX_WRAP,4,4,0,0),

	gsSPVertex(&VSS_Gomi06_v[50], 12, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(0, 2, 3, 0),
	gsSP1Triangle(4, 5, 6, 0),
	gsSP1Triangle(4, 6, 7, 0),
	gsSP1Triangle(8, 9, 10, 0),
	gsSP1Triangle(8, 10, 11, 0),
	gsSPEndDisplayList(),
}; /* o16 */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 62 vertices */
Vtx VSS_Gomi06_v[]={
	{ -700,-160,40,0, 255, 256, 0,120,0,255 },   /* v0 used p198/V1 2 times */
	{ -140,-160,40,0, 255, -1336, 0,120,0,255 },   /* v1 used p198/V2 2 times */
	{ -140,-160,-40,0, 0, -1336, 0,120,0,255 },   /* v2 used p198/V3 2 times */
	{ -700,-160,-40,0, 0, 255, 0,120,0,255 },   /* v3 used p198/V4 2 times */
	{ -700,-240,-40,0, 0, 255, 0,-119,0,255 },   /* v4 used p196/V1 2 times */
	{ -140,-240,-40,0, 0, -1336, 0,-119,0,255 },   /* v5 used p196/V2 2 times */
	{ -140,-240,40,0, 255, -1336, 0,-119,0,255 },   /* v6 used p196/V3 2 times */
	{ -700,-240,40,0, 255, 256, 0,-119,0,255 },   /* v7 used p196/V4 2 times */
	{ -700,-240,40,0, 511, 0, 0,0,119,255 },   /* v8 used p195/V1 2 times */
	{ -140,-240,40,0, -1536, 0, 0,0,119,255 },   /* v9 used p195/V2 2 times */
	{ -140,-160,40,0, -1536, 512, 0,0,119,255 },   /* v10 used p195/V3 2 times */
	{ -700,-160,40,0, 512, 512, 0,0,119,255 },   /* v11 used p195/V4 2 times */
	{ -700,-160,-40,0, 512, 512, 0,0,-120,255 },   /* v12 used p197/V1 2 times */
	{ -140,-160,-40,0, -1536, 512, 0,0,-120,255 },   /* v13 used p197/V2 2 times */
	{ -140,-240,-40,0, -1536, 0, 0,0,-120,255 },   /* v14 used p197/V3 2 times */
	{ -700,-240,-40,0, 511, 0, 0,0,-120,255 },   /* v15 used p197/V4 2 times */
	{ -700,-160,-40,0, 255, 0, -119,0,0,255 },   /* v16 used p199/V1 2 times */
	{ -700,-240,-40,0, 255, 512, -119,0,0,255 },   /* v17 used p199/V2 2 times */
	{ -700,-240,40,0, 767, 512, -119,0,0,255 },   /* v18 used p199/V3 2 times */
	{ -700,-160,40,0, 767, 0, -119,0,0,255 },   /* v19 used p199/V4 2 times */
	{ 160,-300,-60,0, 1024, 1024, 120,0,0,255 },   /* v20 used p227/V4 2 times */
	{ -160,-300,-60,0, 0, 1024, 0,0,-120,255 },   /* v21 used p228/V2 2 times */
	{ -160,300,-60,0, 0, -1024, 0,0,-120,255 },   /* v22 used p228/V3 2 times */
	{ 160,300,-60,0, 1024, -1024, 120,0,0,255 },   /* v23 used p227/V1 2 times */
	{ 160,300,60,0, 0, -1024, 120,0,0,255 },   /* v24 used p227/V2 2 times */
	{ 160,-300,60,0, 0, 1024, 120,0,0,255 },   /* v25 used p227/V3 2 times */
	{ 160,-300,-60,0, 1024, 1024, 0,-119,0,255 },   /* v26 used p226/V1 2 times */
	{ 160,-300,60,0, 1024, 0, 0,-119,0,255 },   /* v27 used p226/V2 2 times */
	{ -160,-300,60,0, 0, 0, 0,-119,0,255 },   /* v28 used p226/V3 2 times */
	{ -160,-300,-60,0, 0, 1024, 0,-119,0,255 },   /* v29 used p226/V4 2 times */
	{ -160,-300,-60,0, 1024, 1024, -119,0,0,255 },   /* v30 used p225/V1 2 times */
	{ -160,-300,60,0, 0, 1024, -119,0,0,255 },   /* v31 used p225/V2 2 times */
	{ -160,300,60,0, 0, -1024, -119,0,0,255 },   /* v32 used p225/V3 2 times */
	{ -160,300,-60,0, 1024, -1024, -119,0,0,255 },   /* v33 used p225/V4 2 times */
	{ -160,300,-60,0, 0, 0, 0,120,0,255 },   /* v34 used p224/V1 2 times */
	{ 160,300,60,0, 1024, -1024, 0,0,119,255 },   /* v35 used p223/V1 2 times */
	{ -160,300,60,0, 0, 1024, 0,120,0,255 },   /* v36 used p224/V2 2 times */
	{ 160,300,60,0, 1024, 1024, 0,120,0,255 },   /* v37 used p224/V3 2 times */
	{ 160,300,-60,0, 1024, 0, 0,120,0,255 },   /* v38 used p224/V4 2 times */
	{ -160,300,60,0, 0, -1024, 0,0,119,255 },   /* v39 used p223/V2 2 times */
	{ -160,-300,60,0, 0, 1024, 0,0,119,255 },   /* v40 used p223/V3 2 times */
	{ 160,-300,60,0, 1024, 1024, 0,0,119,255 },   /* v41 used p223/V4 2 times */
	{ 700,240,-40,0, 0, -1280, 0,120,0,255 },   /* v42 used p230/V1 2 times */
	{ 140,240,-40,0, 0, 312, 0,120,0,255 },   /* v43 used p230/V2 2 times */
	{ 140,240,40,0, 256, 312, 0,120,0,255 },   /* v44 used p230/V3 2 times */
	{ 700,240,40,0, 256, -1280, 0,120,0,255 },   /* v45 used p230/V4 2 times */
	{ 700,160,40,0, 256, -1280, 0,-119,0,255 },   /* v46 used p232/V1 2 times */
	{ 140,160,40,0, 256, 312, 0,-119,0,255 },   /* v47 used p232/V2 2 times */
	{ 140,160,-40,0, 0, 312, 0,-119,0,255 },   /* v48 used p232/V3 2 times */
	{ 700,160,-40,0, 0, -1280, 0,-119,0,255 },   /* v49 used p232/V4 2 times */
	{ 700,240,40,0, 512, 512, 0,0,119,255 },   /* v50 used p233/V1 2 times */
	{ 140,240,40,0, -1536, 512, 0,0,119,255 },   /* v51 used p233/V2 2 times */
	{ 140,160,40,0, -1536, 0, 0,0,119,255 },   /* v52 used p233/V3 2 times */
	{ 700,160,40,0, 511, 0, 0,0,119,255 },   /* v53 used p233/V4 2 times */
	{ 700,160,-40,0, 511, 0, 0,0,-120,255 },   /* v54 used p231/V1 2 times */
	{ 140,160,-40,0, -1536, 0, 0,0,-120,255 },   /* v55 used p231/V2 2 times */
	{ 140,240,-40,0, -1536, 512, 0,0,-120,255 },   /* v56 used p231/V3 2 times */
	{ 700,240,-40,0, 512, 512, 0,0,-120,255 },   /* v57 used p231/V4 2 times */
	{ 700,240,40,0, 255, 0, 120,0,0,255 },   /* v58 used p229/V1 2 times */
	{ 700,160,40,0, 255, 511, 120,0,0,255 },   /* v59 used p229/V2 2 times */
	{ 700,160,-40,0, 767, 511, 120,0,0,255 },   /* v60 used p229/V3 2 times */
	{ 700,240,-40,0, 767, 0, 120,0,0,255 },   /* v61 used p229/V4 2 times */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
