#include<ultra64.h>

extern Vtx MC_WingFrash_R_v[];

extern unsigned char MC_FrashTX02_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 */


/* ======== o38 ======== */

Gfx MC_WingFrash_R[]={

	gsDPLoadTextureBlock(MC_FrashTX02_CI8_txt,G_IM_FMT_IA,G_IM_SIZ_8b,8,8,0,G_TX_CLAMP,G_TX_CLAMP,3,3,0,0),

	gsSPVertex(&MC_WingFrash_R_v[0], 15, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(3, 4, 5, 0),
	gsSP1Triangle(6, 7, 8, 0),
	gsSP1Triangle(9, 10, 11, 0),
	gsSP1Triangle(12, 13, 14, 0),
	gsSPVertex(&MC_WingFrash_R_v[15], 3, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSPEndDisplayList(),
}; /* o38 */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 18 vertices */
Vtx MC_WingFrash_R_v[]={
	{ -75,-125,0,0, -8, 255, 0,0,119,255 },   /* v0 used p534/V1 2 times */
	{ 85,-125,0,0, 256, 255, 0,0,119,255 },   /* v1 used p534/V2 2 times */
	{ -55,-40,0,0, 24, -16, 0,0,119,255 },   /* v2 used p534/V3 2 times */
	{ -75,-125,0,0, 264, 255, 0,0,119,255 },   /* v3 used p533/V1 2 times */
	{ -55,-40,0,0, 260, -63, 0,0,119,255 },   /* v4 used p533/V2 2 times */
	{ -225,-85,0,0, 0, 256, 0,0,119,255 },   /* v5 used p533/V3 2 times */
	{ -55,-40,0,0, 128, -55, 0,0,119,255 },   /* v6 used p531/V1 2 times */
	{ 85,-125,0,0, 0, 255, 0,0,119,255 },   /* v7 used p531/V2 2 times */
	{ 85,45,0,0, 256, 255, 0,0,119,255 },   /* v8 used p531/V3 2 times */
	{ -55,-40,0,0, 31, -54, 0,0,119,255 },   /* v9 used p530/V1 2 times */
	{ 85,45,0,0, 255, 256, 0,0,119,255 },   /* v10 used p530/V2 2 times */
	{ -75,45,0,0, 0, 256, 0,0,119,255 },   /* v11 used p530/V3 2 times */
	{ -225,5,0,0, 256, 256, 0,0,119,255 },   /* v12 used p528/V1 2 times */
	{ -225,-85,0,0, 0, 256, 0,0,119,255 },   /* v13 used p528/V2 2 times */
	{ -55,-40,0,0, 128, -78, 0,0,119,255 },   /* v14 used p528/V3 2 times */
	{ -225,5,0,0, 0, 256, 0,0,119,255 },   /* v15 used p523/V1 2 times */
	{ -55,-40,0,0, 260, -63, 0,0,119,255 },   /* v16 used p523/V2 2 times */
	{ -75,45,0,0, 264, 255, 0,0,119,255 },   /* v17 used p523/V3 2 times */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
/* 8 x 8  G_IM_SIZ_16b G_IM_FMT_IA    */
unsigned char MC_FrashTX02_CI8_txt[] = {
	0xff16, 0xff16, 0xff16, 0xff16, 0xff16, 0xff16, 0xff16, 0xff16, 
	0xfc1b, 0xfc1b, 0xfc1b, 0xfc1b, 0xfc1b, 0xfc1b, 0xfc1b, 0xfc1b, 
	0xf02b, 0xf02b, 0xf02b, 0xf02b, 0xf02b, 0xf02b, 0xf02b, 0xf02b, 
	0xd74c, 0xd74c, 0xd74c, 0xd74c, 0xd74c, 0xd74c, 0xd74c, 0xd74c, 
	0xc478, 0xc478, 0xc478, 0xc478, 0xc478, 0xc478, 0xc478, 0xc478, 
	0xa5a6, 0xa5a6, 0xa5a6, 0xa5a6, 0xa5a6, 0xa5a6, 0xa5a6, 0xa5a6, 
	0x5bcb, 0x5bcb, 0x5bcb, 0x5bcb, 0x5bcb, 0x5bcb, 0x5bcb, 0x5bcb, 
	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
};

