#include<ultra64.h>

extern Vtx JT_Missile_01_v[];
extern Vtx JT_Missile_01_vmcur[];
extern Tri JT_Missile_01_tri[];

extern unsigned short JT_Missile_TX01_txt[];
extern unsigned short JT_Black_txt[];
extern unsigned short JT_Bom_TAMA_txt[];
extern unsigned short JT_White_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 JT_Missile_01[]={

	gs_Nin_SetUpTileDescrip(G_IM_FMT_RGBA,G_IM_SIZ_16b,8,8,0,0,G_TX_MIRROR,3,0,G_TX_MIRROR,3,0),
	gs_Nin_LoadTextureImage(JT_Black_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,8,8,0,7),


	gsSPVertex(&JT_Missile_01_v[0],20,0),
	gsSP2Triangles(0, 1, 2, 0, 2, 3, 4, 0),
	gsSP1Triangle(5, 4, 3, 0),
	gsSP1Quadrangle(6, 9, 7, 8, 0),
	gsSP2Triangles(10, 11, 12, 0, 12, 11, 13, 0),
	gsSP2Triangles(14, 1, 15, 0, 16, 17, 18, 0),
	gsSP1Triangle(19, 18, 17, 0),
	gs_Nin_LoadTextureImage(JT_White_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,8,8,0,7),


	gsSPVertex(&JT_Missile_01_v[20],16,0),
	gsSP2Triangles(0, 1, 2, 0, 1, 0, 3, 0),
	gsSP2Triangles(4, 5, 6, 0, 3, 7, 8, 0),
	gsSP2Triangles(8, 7, 9, 0, 10, 11, 12, 0),
	gsSP2Triangles(6, 13, 14, 0, 11, 10, 15, 0),
	gs_Nin_SetUpTileDescrip(G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,0,G_TX_MIRROR,4,0,G_TX_MIRROR,4,0),
	gs_Nin_LoadTextureImage(JT_Bom_TAMA_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),


	gsSPVertex(&JT_Missile_01_v[36],20,0),
	gsSP2Triangles(0, 1, 2, 0, 3, 4, 5, 0),
	gsSP2Triangles(5, 6, 7, 0, 2, 8, 9, 0),
	gsSP2Triangles(10, 11, 12, 0, 12, 13, 14, 0),
	gsSP2Triangles(15, 16, 17, 0, 18, 19, 15, 0),
	gs_Nin_LoadTextureImage(JT_Missile_TX01_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),

	gsSPVertex(&JT_Missile_01_v[56],25,0),
	gsSP2Triangles(0, 1, 2, 0, 3, 1, 0, 0),
	gsSP2Triangles(4, 5, 6, 0, 7, 8, 9, 0),
	gsSP2Triangles(10, 11, 12, 0, 13, 14, 10, 0),
	gsSP2Triangles(12, 15, 16, 0, 16, 17, 13, 0),
	gsSP2Triangles(18, 19, 20, 0, 20, 21, 22, 0),
	gsSP2Triangles(2, 23, 4, 0, 6, 24, 18, 0),
	gsSPEndDisplayList(),
}; /* o1 */ 

/* 96 vertices */
Vtx JT_Missile_01_v[]={
	{    11,   -11,    60,     0,     6,   255,    85,   -84,     5,     0},	/* 0 */
	{    16,     0,    60,     0,     0,   256,   120,     0,     7,     0},	/* 1 */
	{     0,     0,   118,     0,   240,   180,   -97,   -39,    56,     0},	/* 2 */
	{   -11,   -11,    60,     0,     6,   166,   -84,   -84,     5,     0},	/* 3 */
	{     0,   -16,    60,     0,     9,   218,     0,  -119,     7,     0},	/* 4 */
	{     0,    -8,     0,     0,  -246,   218,     0,  -118,    15,     0},	/* 5 */
	{    11,    11,   -31,     0,     0,     0,   -28,   -28,  -113,     0},	/* 6 */
	{   -11,   -11,   -31,     0,   255,   256,   -15,    43,  -111,     0},	/* 7 */
	{   -11,    11,   -31,     0,   255,     0,   -18,   -51,  -106,     0},	/* 8 */
	{    11,   -11,   -31,     0,     0,   256,   -61,   -63,   -80,     0},	/* 9 */
	{    -8,     0,     0,     0,    67, -1000,  -116,   -25,     6,     0},	/* 10 */
	{   -16,     0,    60,     0,     0,   255,  -119,     0,     7,     0},	/* 11 */
	{   -11,    11,    60,     0,   255,   255,   -56,   106,     5,     0},	/* 12 */
	{     0,     0,   118,     0,   129,  1398,   -97,   -39,    56,     0},	/* 13 */
	{     8,     0,     0,     0,    67, -1000,   119,     0,    15,     0},	/* 14 */
	{    11,   -11,    60,     0,   256,   256,    85,   -84,     5,     0},	/* 15 */
	{     0,     8,     0,     0,  -255,   256,     0,   119,    15,     0},	/* 16 */
	{     0,    16,    60,     0,     0,   256,     0,   120,     7,     0},	/* 17 */
	{    11,    11,    60,     0,    -2,   203,    57,   106,     5,     0},	/* 18 */
	{     0,     0,   118,     0,   230,   217,   106,    44,    36,     0},	/* 19 */
	{   -11,   -11,    60,     0,     0,   256,   -84,   -84,     5,     0},	/* 20 */
	{   -16,     0,    60,     0,   256,   255,  -119,     0,     7,     0},	/* 21 */
	{    -8,     0,     0,     0,   188, -1000,  -116,   -25,     6,     0},	/* 22 */
	{     0,     0,   118,     0,   126,  1398,   -97,   -39,    56,     0},	/* 23 */
	{     0,     0,   118,     0,   126,  1487,   -97,   -39,    56,     0},	/* 24 */
	{     0,   -16,    60,     0,   256,   256,     0,  -119,     7,     0},	/* 25 */
	{    11,   -11,    60,     0,     0,   255,    85,   -84,     5,     0},	/* 26 */
	{     0,    16,    60,     0,   255,   256,     0,   120,     7,     0},	/* 27 */
	{   -11,    11,    60,     0,     0,   256,   -56,   106,     5,     0},	/* 28 */
	{     0,     8,     0,     0,   188, -1000,     0,   119,    15,     0},	/* 29 */
	{    11,    11,    60,     0,     0,   256,    57,   106,     5,     0},	/* 30 */
	{    16,     0,    60,     0,   255,   256,   120,     0,     7,     0},	/* 31 */
	{     8,     0,     0,     0,   188, -1000,   119,     0,    15,     0},	/* 32 */
	{     0,   -16,    60,     0,   256,   255,     0,  -119,     7,     0},	/* 33 */
	{     0,    -8,     0,     0,   188, -1000,     0,  -118,    15,     0},	/* 34 */
	{     0,     0,   118,     0,   126,  1487,   106,    44,    36,     0},	/* 35 */
	{    11,    11,    60,     0,  -803,  1024,    57,   106,     5,     0},	/* 36 */
	{    11,    11,   -31,     0,   511,   512,   -35,   114,     0,     0},	/* 37 */
	{     0,     8,     0,     0,     0,   512,     0,   119,    15,     0},	/* 38 */
	{   -11,    11,    60,     0,  -803,  1024,  -113,   -35,     0,     0},	/* 39 */
	{   -11,    11,   -31,     0,   511,   512,   -18,   -51,  -106,     0},	/* 40 */
	{    -8,     0,     0,     0,     0,   512,  -116,   -25,     6,     0},	/* 41 */
	{   -11,   -11,   -31,     0,   512,   512,   -15,    43,  -111,     0},	/* 42 */
	{   -11,   -11,    60,     0,  -803,     0,   -84,   -84,     5,     0},	/* 43 */
	{   -11,    11,   -31,     0,   512,   512,   -49,   104,    32,     0},	/* 44 */
	{   -11,    11,    60,     0,  -803,     0,   -56,   106,     5,     0},	/* 45 */
	{    11,   -11,    60,     0,  -803,  1024,    85,   -84,     5,     0},	/* 46 */
	{    11,   -11,   -31,     0,   512,   512,   117,   -26,     3,     0},	/* 47 */
	{     8,     0,     0,     0,     0,   512,   119,     0,    15,     0},	/* 48 */
	{    11,    11,   -31,     0,   512,   512,   104,    50,    32,     0},	/* 49 */
	{    11,    11,    60,     0,  -803,     0,   114,   -35,     0,     0},	/* 50 */
	{     0,    -8,     0,     0,     0,   512,     0,  -118,    15,     0},	/* 51 */
	{    11,   -11,   -31,     0,   511,   512,   -61,   -63,   -80,     0},	/* 52 */
	{    11,   -11,    60,     0,  -803,     0,    85,   -84,     5,     0},	/* 53 */
	{   -11,   -11,    60,     0,  -803,  1024,   -84,   -84,     5,     0},	/* 54 */
	{   -11,   -11,   -31,     0,   512,   512,   -49,  -103,    32,     0},	/* 55 */
	{     0,    -8,     0,     0,     0,   512,     0,  -118,    15,     0},	/* 56 */
	{     0,   -45,   -60,     0,   512,     0,    90,   -66,    40,     0},	/* 57 */
	{    11,   -11,   -31,     0,   512,   512,   117,   -26,     3,     0},	/* 58 */
	{   -11,   -11,   -31,     0,   512,   512,   -49,  -103,    32,     0},	/* 59 */
	{     8,     0,     0,     0,     0,   512,   119,     0,    15,     0},	/* 60 */
	{    45,     0,   -60,     0,   511,     0,    67,    90,    40,     0},	/* 61 */
	{    11,    11,   -31,     0,   512,   512,   104,    50,    32,     0},	/* 62 */
	{    -8,     0,     0,     0,     0,   512,  -116,   -25,     6,     0},	/* 63 */
	{   -45,     0,   -60,     0,   511,     0,   -66,   -89,    40,     0},	/* 64 */
	{   -11,   -11,   -31,     0,   511,   512,   -49,  -103,    32,     0},	/* 65 */
	{   -11,   -11,   -31,     0,     0,   512,   -15,    43,  -111,     0},	/* 66 */
	{   -45,     0,   -60,     0,  -752,   255,    79,     0,   -90,     0},	/* 67 */
	{   -11,    11,   -31,     0,     0,     0,   -18,   -51,  -106,     0},	/* 68 */
	{    11,   -11,   -31,     0,   511,   512,   117,   -26,     3,     0},	/* 69 */
	{     0,   -45,   -60,     0,   255,  1264,     0,    79,   -90,     0},	/* 70 */
	{     0,    45,   -60,     0,   255,  -752,     0,   -78,   -90,     0},	/* 71 */
	{    11,    11,   -31,     0,   511,     0,   -28,   -28,  -113,     0},	/* 72 */
	{    45,     0,   -60,     0,  1264,   255,   -78,     0,   -90,     0},	/* 73 */
	{     0,     8,     0,     0,     0,   512,     0,   119,    15,     0},	/* 74 */
	{     0,    45,   -60,     0,   511,     0,   -89,    67,    40,     0},	/* 75 */
	{   -11,    11,   -31,     0,   512,   512,   -49,   104,    32,     0},	/* 76 */
	{   -45,     0,   -60,     0,   511,     0,   -66,    90,    40,     0},	/* 77 */
	{    -8,     0,     0,     0,     0,   512,   -66,    90,    40,     0},	/* 78 */
	{    45,     0,   -60,     0,   512,     0,    67,   -89,    40,     0},	/* 79 */
	{     0,    45,   -60,     0,   511,     0,    90,    67,    40,     0},	/* 80 */
};

/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short JT_Missile_TX01_txt[] = {
	0x5001, 0x5001, 0x5001, 0x5801, 0x6001, 0x6841, 0x7041, 0x7041, 0x7041, 0x7041, 0x6841, 0x6001, 0x5801, 0x5001, 0x5001, 0x5001, 
	0x5001, 0x5001, 0x5801, 0x6001, 0x6841, 0x7881, 0x80c1, 0x88c1, 0x88c1, 0x80c1, 0x7881, 0x6841, 0x6001, 0x5801, 0x5001, 0x5001, 
	0x5001, 0x5801, 0x6001, 0x7041, 0x80c1, 0x9141, 0xa181, 0xa1c1, 0xa1c1, 0xa181, 0x9141, 0x80c1, 0x7041, 0x6001, 0x5801, 0x5001, 
	0x5801, 0x6001, 0x7041, 0x88c1, 0x9981, 0xb201, 0xc2c1, 0xc301, 0xc301, 0xc2c1, 0xb201, 0x9981, 0x88c1, 0x7041, 0x6001, 0x5801, 
	0x6001, 0x6841, 0x80c1, 0x9981, 0xba41, 0xcb41, 0xdc01, 0xe481, 0xe481, 0xdc01, 0xcb41, 0xba41, 0x9981, 0x80c1, 0x6841, 0x6001, 
	0x6841, 0x7881, 0x9141, 0xb201, 0xcb41, 0xe481, 0xed41, 0xf5c1, 0xf5c1, 0xed41, 0xe481, 0xcb41, 0xb201, 0x9141, 0x7881, 0x6841, 
	0x7041, 0x80c1, 0xa181, 0xc2c1, 0xdc01, 0xed41, 0xf641, 0xf6c1, 0xf6c1, 0xf641, 0xed41, 0xdc01, 0xc2c1, 0xa181, 0x80c1, 0x7041, 
	0x7041, 0x88c1, 0xa1c1, 0xc301, 0xe481, 0xf5c1, 0xf6c1, 0xff01, 0xff01, 0xf6c1, 0xf5c1, 0xe481, 0xc301, 0xa1c1, 0x88c1, 0x7041, 
	0x7041, 0x88c1, 0xa1c1, 0xc301, 0xe481, 0xf5c1, 0xf6c1, 0xff01, 0xff01, 0xf6c1, 0xf5c1, 0xe481, 0xc301, 0xa1c1, 0x88c1, 0x7041, 
	0x7041, 0x80c1, 0xa181, 0xc2c1, 0xdc01, 0xed41, 0xf641, 0xf6c1, 0xf6c1, 0xf641, 0xed41, 0xdc01, 0xc2c1, 0xa181, 0x80c1, 0x7041, 
	0x6841, 0x7881, 0x9141, 0xb201, 0xcb41, 0xe481, 0xed41, 0xf5c1, 0xf5c1, 0xed41, 0xe481, 0xcb41, 0xb201, 0x9141, 0x7881, 0x6841, 
	0x6001, 0x6841, 0x80c1, 0x9981, 0xba41, 0xcb41, 0xdc01, 0xe481, 0xe481, 0xdc01, 0xcb41, 0xba41, 0x9981, 0x80c1, 0x6841, 0x6001, 
	0x5801, 0x6001, 0x7041, 0x88c1, 0x9981, 0xb201, 0xc2c1, 0xc301, 0xc301, 0xc2c1, 0xb201, 0x9981, 0x88c1, 0x7041, 0x6001, 0x5801, 
	0x5001, 0x5801, 0x6001, 0x7041, 0x80c1, 0x9141, 0xa181, 0xa1c1, 0xa1c1, 0xa181, 0x9141, 0x80c1, 0x7041, 0x6001, 0x5801, 0x5001, 
	0x5001, 0x5001, 0x5801, 0x6001, 0x6841, 0x7881, 0x80c1, 0x88c1, 0x88c1, 0x80c1, 0x7881, 0x6841, 0x6001, 0x5801, 0x5001, 0x5001, 
	0x5001, 0x5001, 0x5001, 0x5801, 0x6001, 0x6841, 0x7041, 0x7041, 0x7041, 0x7041, 0x6841, 0x6001, 0x5801, 0x5001, 0x5001, 0x5001, 
};

/* 8 x 8  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short JT_Black_txt[] = {
	0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 
	0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 
	0x7, 0x7, 0x9, 0x9, 0x9, 0x7, 0x7, 0x7, 
	0x7, 0x7, 0x7, 0x9, 0x7, 0x7, 0x7, 0x7, 
	0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 
	0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 
	0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 
	0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 
};

/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short JT_Bom_TAMA_txt[] = {
	0x739d, 0x739d, 0x739d, 0x739d, 0x739d, 0x7bdf, 0x7bdf, 0x7bdf, 0x7bdf, 0x7bdf, 0x7bdf, 0x739d, 0x739d, 0x739d, 0x739d, 0x739d, 
	0x739d, 0x318d, 0x39cf, 0x39cf, 0x4211, 0x4211, 0x4a53, 0x4a53, 0x4a53, 0x4a53, 0x4211, 0x4211, 0x39cf, 0x39cf, 0x318d, 0x739d, 
	0x739d, 0x39cf, 0x39cf, 0x4211, 0x4a53, 0x5295, 0x5ad7, 0x6319, 0x6319, 0x5ad7, 0x5295, 0x4a53, 0x4211, 0x39cf, 0x39cf, 0x739d, 
	0x739d, 0x39cf, 0x4211, 0x5295, 0x6319, 0x6b5b, 0x7bdf, 0x7bdf, 0x7bdf, 0x7bdf, 0x6b5b, 0x6319, 0x5295, 0x4211, 0x39cf, 0x739d, 
	0x739d, 0x4211, 0x4a53, 0x6319, 0x739d, 0x8c63, 0x94a5, 0x9ce7, 0x9ce7, 0x94a5, 0x8c63, 0x739d, 0x6319, 0x4a53, 0x4211, 0x739d, 
	0x7bdf, 0x4211, 0x5295, 0x6b5b, 0x8c63, 0xa529, 0xb5ad, 0xbdef, 0xbdef, 0xb5ad, 0xa529, 0x8c63, 0x6b5b, 0x5295, 0x4211, 0x7bdf, 
	0x8253, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x8253, 
	0x8253, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x8253, 
	0x8253, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x8253, 
	0x8253, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x8253, 
	0x7bdf, 0x4211, 0x5295, 0x6b5b, 0x8c63, 0xa529, 0xb5ad, 0xbdef, 0xbdef, 0xb5ad, 0xa529, 0x8c63, 0x6b5b, 0x5295, 0x4211, 0x7bdf, 
	0x739d, 0x4211, 0x4a53, 0x6319, 0x739d, 0x8c63, 0x94a5, 0x9ce7, 0x9ce7, 0x94a5, 0x8c63, 0x739d, 0x6319, 0x4a53, 0x4211, 0x739d, 
	0x739d, 0x39cf, 0x4211, 0x5295, 0x6319, 0x6b5b, 0x7bdf, 0x7bdf, 0x7bdf, 0x7bdf, 0x6b5b, 0x6319, 0x5295, 0x4211, 0x39cf, 0x739d, 
	0x739d, 0x39cf, 0x39cf, 0x4211, 0x4a53, 0x5295, 0x5ad7, 0x6319, 0x6319, 0x5ad7, 0x5295, 0x4a53, 0x4211, 0x39cf, 0x39cf, 0x739d, 
	0x739d, 0x318d, 0x39cf, 0x39cf, 0x4211, 0x4211, 0x4a53, 0x4a53, 0x4a53, 0x4a53, 0x4211, 0x4211, 0x39cf, 0x39cf, 0x318d, 0x739d, 
	0x739d, 0x739d, 0x739d, 0x739d, 0x739d, 0x7bdf, 0x7bdf, 0x7bdf, 0x7bdf, 0x7bdf, 0x7bdf, 0x739d, 0x739d, 0x739d, 0x739d, 0x739d, 
};

/* 8 x 8  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short JT_White_txt[] = {
	0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 
	0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 
	0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 
	0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 
	0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 
	0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 
	0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 
	0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 0xce73, 
};

