#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],16,0),
	gsSP2Triangles(0, 1, 2, 0, 3, 4, 5, 0),
	gsSP2Triangles(6, 7, 8, 0, 9, 10, 11, 0),
	gsSP2Triangles(12, 5, 13, 0, 14, 4, 15, 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},	/* 0 */
	{    85,  -125,     0,     0,   256,   255,     0,     0,   119,   255},	/* 1 */
	{   -55,   -40,     0,     0,    24,   -16,     0,     0,   119,   255},	/* 2 */
	{   -75,  -125,     0,     0,   264,   255,     0,     0,   119,   255},	/* 3 */
	{   -55,   -40,     0,     0,   260,   -63,     0,     0,   119,   255},	/* 4 */
	{  -225,   -85,     0,     0,     0,   256,     0,     0,   119,   255},	/* 5 */
	{   -55,   -40,     0,     0,   128,   -55,     0,     0,   119,   255},	/* 6 */
	{    85,  -125,     0,     0,     0,   255,     0,     0,   119,   255},	/* 7 */
	{    85,    45,     0,     0,   256,   255,     0,     0,   119,   255},	/* 8 */
	{   -55,   -40,     0,     0,    31,   -54,     0,     0,   119,   255},	/* 9 */
	{    85,    45,     0,     0,   255,   256,     0,     0,   119,   255},	/* 10 */
	{   -75,    45,     0,     0,     0,   256,     0,     0,   119,   255},	/* 11 */
	{  -225,     5,     0,     0,   256,   256,     0,     0,   119,   255},	/* 12 */
	{   -55,   -40,     0,     0,   128,   -78,     0,     0,   119,   255},	/* 13 */
	{  -225,     5,     0,     0,     0,   256,     0,     0,   119,   255},	/* 14 */
	{   -75,    45,     0,     0,   264,   255,     0,     0,   119,   255},	/* 15 */
};


/*   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, 
};

