#include<ultra64.h>

extern Vtx TI_WalkerArm_R_v[];

extern unsigned short TI_Catapira02_txt[];
extern unsigned short TI_Duct02_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_WalkerArm_R ======== */

Gfx TI_WalkerArm_R[]={

	gs_Nin_SetUpTileDescrip(G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,0,G_TX_WRAP,4,0,G_TX_WRAP,4,0),
	gs_Nin_LoadTextureImage(TI_Duct02_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&TI_WalkerArm_R_v[0], 11, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(3, 4, 5, 0),
	gsSP1Triangle(5, 6, 7, 0),
	gsSP1Triangle(8, 9, 10, 0),

	gs_Nin_LoadTextureImage(TI_Catapira02_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&TI_WalkerArm_R_v[11], 7, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(2, 1, 3, 0),
	gsSP1Triangle(3, 4, 5, 0),
	gsSP1Triangle(5, 4, 6, 0),
	gsSPEndDisplayList(),
}; /* TI_WalkerArm_R */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 18 vertices */
Vtx TI_WalkerArm_R_v[]={
	{ 139,-49,-24,0, 695, 879, 2,-84,84,255 },   /* v0 used p193/V1 2 times */
	{ 218,4,3,0, 200, 2955, 18,15,117,255 },   /* v1 used p193/V2 2 times */
	{ 66,1,27,0, 0, -511, 2,-84,84,255 },   /* v2 used p193/V3 2 times */
	{ 66,1,-57,0, 255, 563, -36,-95,-62,255 },   /* v3 used p231/V1 2 times */
	{ 139,-49,-24,0, 743, 86, 1,-64,-101,255 },   /* v4 used p231/V2 2 times */
	{ -30,-1,3,0, -393, 433, -58,-97,-37,255 },   /* v5 used p231/V3 2 times */
	{ 139,-49,-24,0, 743, 86, 2,-84,84,255 },   /* v6 used p191/V2 2 times */
	{ 66,1,27,0, 255, 563, 2,-84,84,255 },   /* v7 used p191/V3 2 times */
	{ 66,1,-57,0, 0, -511, 17,44,-110,255 },   /* v8 used p233/V1 2 times */
	{ 218,4,3,0, 200, 2955, 42,34,-107,255 },   /* v9 used p233/V2 2 times */
	{ 139,-49,-24,0, 695, 879, 1,-64,-101,255 },   /* v10 used p233/V3 2 times */
	{ 218,4,3,0, 331, -1780, 42,34,-107,255 },   /* v11 used p232/V1 2 times */
	{ 66,1,-57,0, 45, 234, 17,44,-110,255 },   /* v12 used p232/V2 2 times */
	{ 62,46,-24,0, 475, 361, 0,71,-97,255 },   /* v13 used p232/V3 2 times */
	{ -30,-1,3,0, 0, 1535, -20,88,78,255 },   /* v14 used p190/V1 4 times */
	{ 66,1,27,0, 45, 234, -1,90,78,255 },   /* v15 used p190/V2 4 times */
	{ 62,46,-24,0, 475, 361, -1,90,78,255 },   /* v16 used p190/V3 4 times */
	{ 218,4,3,0, 331, -1780, 18,15,117,255 },   /* v17 used p192/V3 2 times */
};

/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short TI_Catapira02_txt[] = {
	0x1, 0x3949, 0x5a51, 0x1, 0x7b9b, 0xa4e7, 0x1, 0xd5ed, 0xbd67, 0x1, 0x8bdd, 0x7317, 0x1, 0x418b, 0x2083, 0x1, 
	0x1, 0x801, 0x3149, 0x1, 0x420f, 0x6317, 0x1, 0x62d5, 0x41cd, 0x1, 0x41cd, 0x398b, 0x1, 0x1883, 0x1, 0x1, 
	0x1, 0x1, 0x3105, 0x5a0f, 0x1, 0x8bdd, 0x8399, 0x1, 0x8399, 0x49cd, 0x1, 0x28c3, 0x28c3, 0x1, 0x1, 0x1, 
	0x1, 0x1, 0x1041, 0x3107, 0x1, 0x398b, 0x41cb, 0x1, 0x418b, 0x1883, 0x1, 0x801, 0x801, 0x1, 0x1, 0x1, 
	0x1, 0x3107, 0x498b, 0x520f, 0xace5, 0x39cd, 0xe6f5, 0xfffd, 0xfffb, 0x6293, 0xbd69, 0xa4a3, 0x7b17, 0x6291, 0x49cb, 0x1, 
	0x1, 0x418b, 0x6291, 0x9ca3, 0xc5ed, 0xe6f5, 0xef39, 0xffff, 0xffbb, 0xf777, 0xe6b3, 0xc5ab, 0x7315, 0x520f, 0x418b, 0x1, 
	0x1, 0x520f, 0x7315, 0x1, 0x1, 0x1, 0x1, 0xfffd, 0xf779, 0x1, 0x1, 0x1, 0x1, 0x49cd, 0x3107, 0x1, 
	0x1, 0x520f, 0x6293, 0x1, 0xef79, 0xe737, 0x1, 0xffbd, 0xe6f5, 0x1, 0xef79, 0xef79, 0x1, 0x418b, 0x2905, 0x1, 
	0x1, 0x4149, 0x49cb, 0x1, 0xbd69, 0xcded, 0x1, 0x8c21, 0x7b59, 0x1, 0xace5, 0x8bdd, 0x1, 0x3107, 0x1841, 0x1, 
	0x1, 0x1, 0x1, 0x1, 0xc5ab, 0xdeb1, 0x1, 0x1, 0x1, 0x1, 0xbda9, 0x7b17, 0x1, 0x1, 0x1, 0x1, 
	0x1, 0x6291, 0x839b, 0xace3, 0xde71, 0xff79, 0xffff, 0xffff, 0xf77b, 0xdeb3, 0xc5ab, 0x5a51, 0x498b, 0x3107, 0x2083, 0x1, 
	0x1, 0x3947, 0x3149, 0xbd27, 0xeef3, 0xfffd, 0xffff, 0xffbb, 0x8c1f, 0x2107, 0xb527, 0x5a51, 0x2907, 0x1843, 0x2083, 0x1, 
	0x1, 0x1, 0x1, 0x1883, 0x28c5, 0x1, 0x41cd, 0x4a0f, 0x1, 0x3949, 0x3107, 0x1, 0x2083, 0x1841, 0x1, 0x1, 
	0x1, 0x1, 0x1, 0x28c5, 0x3949, 0x1, 0x9c5f, 0xb525, 0x1, 0x93dd, 0x7b57, 0x1, 0x3107, 0x1841, 0x1, 0x1, 
	0x1, 0x1, 0x3149, 0x1, 0x398b, 0x398b, 0x1, 0x4a0f, 0x5251, 0x1, 0x420f, 0x314b, 0x1, 0x3149, 0x1, 0x1, 
	0x1, 0x30c5, 0x6ad3, 0x1, 0x6ad5, 0x8c1f, 0x1, 0xb567, 0xcded, 0x1, 0x9ca3, 0x839b, 0x1, 0x6ad5, 0x30c5, 0x1, 
};
