#include<ultra64.h>

extern Vtx o_wing_l_v[];
extern Vtx o_wing_l_vmcur[];
extern Tri o_wing_l_tri[];
extern Lights1 o_wing_l_material[];
extern Mtx o_wing_l_matrix[];

extern unsigned short orca_1_txt[];
extern unsigned short orca_2_txt[];
extern unsigned short orca_3_txt[];
extern unsigned short orca_4_txt[];
extern unsigned short orca_hand_txt[];
extern unsigned short orca_tail_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 */


/* ======== o_wing_l ======== */

static	Gfx o_wing_l_grp_o_wing_lT[]={

	gsSPTexture(65535, 65535,0, 0, 1),
	gsDPPipeSync(),
	gsDPSetCombineMode(G_CC_MODULATEIDECALA,G_CC_PASS2),

	gs_Nin_SetUpTileDescrip(G_IM_FMT_IA,G_IM_SIZ_16b,16,16,0,0,G_TX_CLAMP,4,0,G_TX_CLAMP,4,0),
	gs_Nin_LoadTextureImage(orca_hand_txt,G_IM_FMT_IA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&o_wing_l_v[0], 8, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(0, 3, 1, 0),
	gsSP1Triangle(4, 5, 6, 0),
	gsSP1Triangle(5, 7, 6, 0),
	gsSPEndDisplayList(),
}; /* o_wing_l */ 

/* ======== db ======== */

Gfx o_wing_l_modelT[]={
	gsSPDisplayList(o_wing_l_grp_o_wing_lT),
	gsSPEndDisplayList(),
}; /* db */ 

Gfx *o_wing_l_model = NULL;

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 8 vertices */
Vtx o_wing_l_v[]={
	{ -1,222,0,0, 511, 511, 0,0,120,255 },   /* v0 p13/V1 used 2 times */ 
	{ 432,-62,0,0, 0, 0, 0,0,120,255 },   /* v1 p13/V3 used 2 times */ 
	{ 432,222,0,0, 511, 0, 0,0,120,255 },   /* v2 p12/V3 used 1 times */ 
	{ -1,-62,0,0, 0, 511, 0,0,120,255 },   /* v3 p13/V2 used 1 times */ 
	{ 432,222,0,0, 511, 0, 0,0,-119,255 },   /* v4 p11/V1 used 1 times */ 
	{ 432,-62,0,0, 0, 0, 0,0,-119,255 },   /* v5 p11/V2 used 2 times */ 
	{ -1,222,0,0, 511, 511, 0,0,-119,255 },   /* v6 p11/V3 used 2 times */ 
	{ -1,-62,0,0, 0, 511, 0,0,-119,255 },   /* v7 p10/V2 used 1 times */ 
};


/*   0 vertices */
/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_IA    */
unsigned short orca_hand_txt[] = {
	0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xd, 0x73, 0x2da, 0x24c4, 0x3963, 0xf0e, 0x0, 0x0, 0x0, 
	0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x59, 0xd6, 0xff, 0xff, 0xdff, 0x3aff, 0x6fdf, 0x4957, 0x0, 0x0, 
	0x0, 0x0, 0x0, 0x0, 0x16, 0xad, 0xff, 0xff, 0xff, 0xff, 0xff, 0xaff, 0x1cff, 0x5fff, 0x7281, 0x0, 
	0x0, 0x0, 0x0, 0x3a, 0xda, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1ff, 0x1fff, 0x86ff, 0x4f58, 
	0x0, 0x0, 0x3f, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7ff, 0x54ff, 0x90af, 
	0x0, 0x29, 0xe1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3bff, 0x93d1, 
	0x5, 0xbd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x21ff, 0x93e7, 
	0x58, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x2ff, 0x9ff, 0x1ff, 0xff, 0xff, 0x27ff, 0xa1f9, 
	0xa0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1ff, 0xeff, 0x19ff, 0xdff, 0xff, 0xff, 0x28ff, 0xabff, 
	0xc6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x10ff, 0x1fff, 0x22ff, 0xfff, 0xff, 0xff, 0x29ff, 0xaeee, 
	0xdd, 0xff, 0xff, 0xff, 0xff, 0x1ff, 0x12ff, 0x26ff, 0x4aff, 0x47ff, 0x2eff, 0x2ff, 0xff, 0x12ff, 0x59ff, 0x9ec7, 
	0xe1, 0xff, 0xff, 0xff, 0xff, 0x21ff, 0x3fff, 0x90ff, 0xa0ff, 0x36ff, 0x16ff, 0x2ff, 0x10ff, 0x56ff, 0xa8ff, 0x6268, 
	0xe2, 0xff, 0xff, 0xff, 0x15ff, 0x3fff, 0x6aff, 0x40ff, 0x1eff, 0x14ff, 0x37ff, 0x56ff, 0x89fb, 0xb3d4, 0x6b66, 0x100, 
	0xe1, 0xff, 0xff, 0xff, 0x30ff, 0x3cff, 0x1eff, 0x6ff, 0x42ff, 0x7fee, 0x73a9, 0x4d66, 0x2c2c, 0xa06, 0x0, 0x0, 
	0xd4, 0xff, 0xff, 0xff, 0x16ff, 0x1dff, 0xff, 0x45ff, 0x83a7, 0x231c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 
	0xb4, 0xf4, 0xec, 0xec, 0xec, 0xec, 0x2f4, 0x24c0, 0x90a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 
};

