#include<ultra64.h>

extern Vtx SW_Boss_Backfire_v[];
extern Vtx SW_Boss_Backfire_vmcur[];
extern Tri SW_Boss_Backfire_tri[];
extern Mtx SW_Boss_Backfire_matrix[];

extern unsigned short SW_Boss_Backfire_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)

/* main display list */


/* ======== o1 ======== */

Gfx SW_Boss_Backfire[]={

	gs_Nin_SetUpTileDescrip(G_IM_FMT_IA,G_IM_SIZ_16b,8,16,0,0,G_TX_CLAMP,3,0,G_TX_CLAMP,4,0),
	gs_Nin_LoadTextureImage(SW_Boss_Backfire_txt,G_IM_FMT_IA,G_IM_SIZ_16b,8,16,0,7),

	gsSPVertex(&SW_Boss_Backfire_v[0],4,0),
	gsSP1Quadrangle(0, 1, 2, 3, 0),
	gsSPEndDisplayList(),
}; /* o1 */ 

/* 4 vertices */
Vtx SW_Boss_Backfire_v[]={
	{    20,    40,     0,     0,   256,     0,   255,   255,   255,   255},	/* 0 */
	{   -20,    40,     0,     0,     0,     0,   255,   255,   255,   255},	/* 1 */
	{   -20,   -40,     0,     0,     0,   512,   255,   255,   255,   255},	/* 2 */
	{    20,   -40,     0,     0,   256,   512,   255,   255,   255,   255},	/* 3 */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
/* 8 x 16  G_IM_SIZ_16b G_IM_FMT_IA    */
unsigned short SW_Boss_Backfire_txt[] = {
	0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 
	0xff00, 0xff00, 0xff4f, 0xff9f, 0xff9f, 0xff4f, 0xff00, 0xff00, 
	0xff00, 0xff2f, 0xff9f, 0xffff, 0xffff, 0xff9f, 0xff2f, 0xff00, 
	0xff00, 0xff3f, 0xffbf, 0xffff, 0xffff, 0xffbf, 0xff3f, 0xff00, 
	0xff00, 0xff38, 0xffb8, 0xffff, 0xffff, 0xffb0, 0xff38, 0xff00, 
	0xff00, 0xff25, 0xffa2, 0xfff9, 0xfff9, 0xff9d, 0xff25, 0xff00, 
	0xff00, 0xff13, 0xff86, 0xffef, 0xffef, 0xff83, 0xff13, 0xff00, 
	0xff00, 0xff0a, 0xff6e, 0xffe4, 0xffe4, 0xff6d, 0xff0a, 0xff00, 
	0xff00, 0xff05, 0xff59, 0xffd4, 0xffd4, 0xff59, 0xff05, 0xff00, 
	0xff00, 0xff02, 0xff43, 0xffb9, 0xffb9, 0xff43, 0xff02, 0xff00, 
	0xff00, 0xff01, 0xff2d, 0xff95, 0xff95, 0xff2d, 0xff01, 0xff00, 
	0xff00, 0xff00, 0xff1c, 0xff70, 0xff70, 0xff1c, 0xff00, 0xff00, 
	0xff00, 0xff00, 0xff11, 0xff50, 0xff50, 0xff11, 0xff00, 0xff00, 
	0xff00, 0xff00, 0xff0a, 0xff37, 0xff37, 0xff0a, 0xff00, 0xff00, 
	0xff00, 0xff00, 0xff00, 0xff24, 0xff24, 0xff00, 0xff00, 0xff00, 
	0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 
};

