#include<ultra64.h>

extern Vtx TI_Rocker_Head01_v[];
extern Vtx TI_Rocker_Head01_vmcur[];
extern Tri TI_Rocker_Head01_tri[];
extern Mtx TI_Rocker_Head01_matrix[];

extern unsigned short TI_Duct05_txt[];
extern unsigned short TI_Paint01_txt[];
extern unsigned short TI_Shell01_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 */


/* ======== TI_Rocker_Head ======== */

Gfx TI_Rocker_Head01[]={

	gs_Nin_SetUpTileDescrip(G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,0,G_TX_CLAMP,4,0,G_TX_WRAP,4,0),
	gs_Nin_LoadTextureImage(TI_Duct05_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),


	gsSPVertex(&TI_Rocker_Head01_v[0],3,0),
	gsSP1Triangle(0, 1, 2, 0),
	gs_Nin_SetUpTileDescrip(G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,0,G_TX_CLAMP,4,0,G_TX_CLAMP,4,0),
	gs_Nin_LoadTextureImage(TI_Paint01_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),


	gsSPVertex(&TI_Rocker_Head01_v[3],5,0),
	gsSP2Triangles(0, 1, 2, 0, 3, 4, 1, 0),
	gs_Nin_LoadTextureImage(TI_Shell01_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&TI_Rocker_Head01_v[8],5,0),
	gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
	gsSP1Triangle(4, 0, 3, 0),
	gsSPEndDisplayList(),
}; /* TI_Rocker_Head */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 13 vertices */
Vtx TI_Rocker_Head01_v[]={
	{   -21,    -6,     1,     0,   434,   261,   -74,    94,     0,   255},	/* 0 */
	{    20,    26,    27,     0,   180,   101,   -50,   109,     0,   255},	/* 1 */
	{    20,    26,   -27,     0,   180,   421,   -22,   112,   -38,   255},	/* 2 */
	{    87,    -4,   -10,     0,     0,   512,    14,   -31,  -115,   255},	/* 3 */
	{   -21,    -6,     1,     0,   256,     0,    -7,   -71,   -96,   255},	/* 4 */
	{    20,    26,   -27,     0,     0,     0,    -7,   -71,   -96,   255},	/* 5 */
	{    87,    -4,    10,     0,   512,   512,    15,   -30,   114,   255},	/* 6 */
	{    20,    26,    27,     0,   512,     0,    15,   -30,   114,   255},	/* 7 */
	{    65,    34,     1,     0,   255,     0,    37,   114,     0,   255},	/* 8 */
	{    87,    -4,   -10,     0,     0,     0,    14,   -31,  -115,   255},	/* 9 */
	{    20,    26,   -27,     0,     0,   512,   -22,   112,   -38,   255},	/* 10 */
	{    20,    26,    27,     0,   511,   512,   -50,   109,     0,   255},	/* 11 */
	{    87,    -4,    10,     0,   511,     0,    15,   -30,   114,   255},	/* 12 */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short TI_Shell01_txt[] = {
	0x8c25, 0x735f, 0x5a9b, 0x4a17, 0x41d3, 0x3991, 0x314f, 0x310b, 0x2087, 0x1845, 0x1043, 0x1843, 0x1843, 0x1, 0x1, 0x3, 
	0x735f, 0x1, 0x1, 0x1, 0x1, 0x314d, 0x28cb, 0x1, 0x1, 0x2045, 0x1801, 0x1, 0x1, 0x1, 0x20c9, 0x1043, 
	0x5a99, 0x1, 0x49cb, 0x3907, 0x5189, 0x1, 0x1, 0x5189, 0x4107, 0x3, 0x3, 0x4105, 0x30c5, 0x2041, 0x314d, 0x1001, 
	0x4a15, 0x1, 0x4105, 0x59cb, 0x7a91, 0x7a91, 0x7251, 0x620f, 0x4103, 0x59cb, 0x7291, 0x724f, 0x620b, 0x2041, 0x318f, 0x801, 
	0x3991, 0x1, 0x4945, 0x82d3, 0xbca1, 0xa3db, 0x82d5, 0x6a4f, 0xa41b, 0x9357, 0x8b57, 0x6a4f, 0x4945, 0x4103, 0x318f, 0x801, 
	0x314f, 0x28cb, 0x1, 0x8b57, 0x9bd9, 0x9001, 0xb001, 0x5147, 0x9399, 0x9001, 0xc001, 0x3905, 0x4103, 0x6b5d, 0x1, 0x1, 
	0x20c9, 0x2087, 0x1, 0x6a4f, 0x620d, 0xd001, 0xf801, 0x30c3, 0x8315, 0xd801, 0xf801, 0x2841, 0x3905, 0x5a97, 0x801, 0x801, 
	0x2087, 0x1, 0x4107, 0x4107, 0x4107, 0x30c3, 0x40c3, 0x3081, 0x620d, 0x5187, 0x38c3, 0x3083, 0x4989, 0x38c3, 0x41d1, 0x801, 
	0x2045, 0x1, 0x2041, 0x3083, 0x93db, 0x8315, 0x82d3, 0x620d, 0x9bd9, 0x82d3, 0x6a4f, 0x59cd, 0x4907, 0x38c3, 0x5a13, 0x1, 
	0x2843, 0x2087, 0x3, 0x38c5, 0x8317, 0x9001, 0xb001, 0x4103, 0x8b55, 0x9001, 0xb001, 0x4947, 0x3881, 0x7b1b, 0x1, 0x1, 
	0x2001, 0x1845, 0x3, 0x4105, 0x6a91, 0xd801, 0xf801, 0x2841, 0x6a4d, 0xd801, 0xf801, 0x3081, 0x3881, 0x6a97, 0x801, 0x801, 
	0x1005, 0x3, 0x3081, 0x4947, 0x5989, 0x38c1, 0x40c1, 0x2841, 0x4947, 0x3041, 0x3041, 0x3081, 0x40c1, 0x3081, 0x5213, 0x1001, 
	0x1047, 0x3, 0x30c3, 0x620d, 0x5145, 0x40c1, 0x48c1, 0x38c3, 0x38c3, 0x3881, 0x3881, 0x3881, 0x40c1, 0x1801, 0x6ad9, 0x1, 
	0x1047, 0x3, 0x2883, 0x30c5, 0x2841, 0x62dd, 0x8c25, 0x2001, 0x1001, 0x6b1d, 0x8c25, 0x2841, 0x2041, 0x801, 0x6ad9, 0x3, 
	0x3, 0x20cb, 0x4a13, 0x4a13, 0x62d9, 0x1, 0x801, 0x51cf, 0x7a11, 0x1, 0x805, 0x5a13, 0x7297, 0x8b5d, 0x83e1, 0x1, 
	0x805, 0x1, 0x801, 0x1001, 0x1, 0x1, 0x1, 0x1001, 0x801, 0x1, 0x1, 0x1, 0x801, 0x1, 0x847, 0x5, 
};

