#include<ultra64.h>

extern Vtx MOJI_pol_N_v[];

extern unsigned char MOJI_polmoji_CI4_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 */


/* ======== N ======== */

Gfx MOJI_pol_N[]={

	gsDPLoadTLUT_pal16(0,&MOJI_polmoji_CI4_txt[32]),
	gsDPLoadTextureBlock_4b(MOJI_polmoji_CI4_txt,G_IM_FMT_CI,8,8,0,G_TX_WRAP,G_TX_WRAP,3,3,0,0),
	gsDPSetTextureLUT(G_TT_RGBA16),

	gsSPVertex(&MOJI_pol_N_v[0], 15, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(2, 1, 3, 0),
	gsSP1Triangle(2, 3, 4, 0),
	gsSP1Triangle(0, 5, 1, 0),
	gsSP1Triangle(6, 4, 3, 0),
	gsSP1Triangle(7, 8, 9, 0),
	gsSP1Triangle(7, 10, 8, 0),
	gsSP1Triangle(11, 12, 13, 0),
	gsSP1Triangle(11, 13, 14, 0),
	gsSPVertex(&MOJI_pol_N_v[4], 1, 0),
	gsSPVertex(&MOJI_pol_N_v[6], 1, 1),
	gsSPVertex(&MOJI_pol_N_v[15], 6, 2),
	gsSPVertex(&MOJI_pol_N_v[32], 7, 8),
	gsSP1Triangle(2, 8, 9, 0),
	gsSP1Triangle(2, 10, 8, 0),
	gsSP1Triangle(3, 11, 12, 0),
	gsSP1Triangle(3, 13, 11, 0),
	gsSP1Triangle(1, 4, 0, 0),
	gsSP1Triangle(5, 7, 14, 0),
	gsSP1Triangle(6, 7, 5, 0),
	gsSPVertex(&MOJI_pol_N_v[19], 6, 0),
	gsSPVertex(&MOJI_pol_N_v[38], 9, 6),
	gsSP1Triangle(0, 3, 1, 0),
	gsSP1Triangle(1, 7, 6, 0),
	gsSP1Triangle(2, 9, 6, 0),
	gsSP1Triangle(0, 8, 10, 0),
	gsSP1Triangle(3, 0, 10, 0),
	gsSP1Triangle(4, 11, 10, 0),
	gsSP1Triangle(5, 12, 13, 0),
	gsSP1Triangle(5, 13, 14, 0),
	gsSPVertex(&MOJI_pol_N_v[0], 1, 0),
	gsSPVertex(&MOJI_pol_N_v[6], 1, 1),
	gsSPVertex(&MOJI_pol_N_v[25], 4, 2),
	gsSPVertex(&MOJI_pol_N_v[47], 8, 6),
	gsSP1Triangle(1, 2, 6, 0),
	gsSP1Triangle(0, 3, 7, 0),
	gsSP1Triangle(4, 8, 9, 0),
	gsSP1Triangle(4, 9, 10, 0),
	gsSP1Triangle(5, 11, 12, 0),
	gsSP1Triangle(5, 12, 13, 0),
	gsSPVertex(&MOJI_pol_N_v[29], 3, 0),
	gsSPVertex(&MOJI_pol_N_v[55], 9, 3),
	gsSP1Triangle(0, 3, 4, 0),
	gsSP1Triangle(0, 4, 5, 0),
	gsSP1Triangle(1, 6, 7, 0),
	gsSP1Triangle(1, 7, 8, 0),
	gsSP1Triangle(2, 9, 10, 0),
	gsSP1Triangle(2, 11, 9, 0),
	gsSPEndDisplayList(),
}; /* N */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 64 vertices */
Vtx MOJI_pol_N_v[]={
	{ -28,40,10,0, -179, 0, 0,0,119,255 },   /* v0 used p1862/V1 6 times */
	{ -7,29,10,0, -43, 73, 0,0,119,255 },   /* v1 used p1889/V2 3 times */
	{ -4,40,10,0, -25, 0, 0,0,119,255 },   /* v2 used p1889/V1 3 times */
	{ 24,-40,10,0, 153, 512, 0,0,119,255 },   /* v3 used p1889/V3 3 times */
	{ 27,-29,10,0, 171, 438, 0,0,119,255 },   /* v4 used p1888/V3 3 times */
	{ -24,-40,10,0, -153, 512, 0,0,119,255 },   /* v5 used p1864/V2 2 times */
	{ 32,-40,10,0, 204, 512, 0,0,119,255 },   /* v6 used p1867/V1 3 times */
	{ -24,-40,-10,0, -153, 192, 87,-82,0,255 },   /* v7 used p1886/V1 2 times */
	{ -48,-40,10,0, -307, 320, 0,-119,0,255 },   /* v8 used p1886/V2 2 times */
	{ -48,-40,-10,0, -307, 192, 0,-119,0,255 },   /* v9 used p1886/V3 2 times */
	{ -24,-40,10,0, -153, 320, 110,-46,0,255 },   /* v10 used p1887/V2 2 times */
	{ -48,-40,-10,0, 64, 512, -115,29,0,255 },   /* v11 used p1884/V1 2 times */
	{ -48,-40,10,0, -64, 512, -115,29,0,255 },   /* v12 used p1885/V2 2 times */
	{ -28,40,10,0, -64, 0, -110,45,0,255 },   /* v13 used p1884/V2 2 times */
	{ -28,40,-10,0, 64, 0, -90,78,0,255 },   /* v14 used p1884/V3 2 times */
	{ -7,29,-10,0, 64, 73, 116,-28,0,255 },   /* v15 used p1880/V1 2 times */
	{ -28,40,-10,0, -179, 192, -90,78,0,255 },   /* v16 used p1883/V1 4 times */
	{ 44,40,10,0, 281, 0, 0,0,119,255 },   /* v17 used p1867/V2 2 times */
	{ -4,40,-10,0, -25, 0, 0,0,-120,255 },   /* v18 used p1897/V1 2 times */
	{ 27,-29,-10,0, 171, 438, 0,0,-120,255 },   /* v19 used p1893/V1 4 times */
	{ -7,29,-10,0, -43, 73, 0,0,-120,255 },   /* v20 used p1897/V2 4 times */
	{ -24,-40,-10,0, -153, 512, 0,0,-120,255 },   /* v21 used p1895/V1 2 times */
	{ 24,-40,-10,0, 153, 512, 0,0,-120,255 },   /* v22 used p1890/V1 4 times */
	{ 44,40,-10,0, 281, 0, 0,0,-120,255 },   /* v23 used p1891/V1 2 times */
	{ 24,-40,-10,0, 64, 512, -106,-53,0,255 },   /* v24 used p1868/V1 2 times */
	{ 52,40,10,0, 332, 0, 0,0,119,255 },   /* v25 used p1865/V2 2 times */
	{ -48,-40,10,0, -307, 512, 0,0,119,255 },   /* v26 used p1862/V2 2 times */
	{ -4,40,-10,0, 64, 0, 102,64,0,255 },   /* v27 used p1871/V1 4 times */
	{ 52,40,-10,0, 64, 0, 116,-28,0,255 },   /* v28 used p1877/V1 4 times */
	{ 44,40,-10,0, 281, 192, -107,52,0,255 },   /* v29 used p1879/V1 4 times */
	{ 32,-40,-10,0, 204, 192, 109,-48,0,255 },   /* v30 used p1874/V1 2 times */
	{ 27,-29,-10,0, 64, 438, -115,29,0,255 },   /* v31 used p1873/V1 4 times */
	{ -24,-40,10,0, -64, 512, 110,-46,0,255 },   /* v32 used p1880/V2 2 times */
	{ -24,-40,-10,0, 64, 512, 87,-82,0,255 },   /* v33 used p1880/V3 2 times */
	{ -7,29,10,0, -64, 73, 116,-28,0,255 },   /* v34 used p1881/V2 2 times */
	{ -4,40,10,0, -25, 320, 79,91,0,255 },   /* v35 used p1883/V3 4 times */
	{ -4,40,-10,0, -25, 192, 102,64,0,255 },   /* v36 used p1882/V3 2 times */
	{ -28,40,10,0, -179, 320, -110,45,0,255 },   /* v37 used p1883/V2 2 times */
	{ -28,40,-10,0, -179, 0, 0,0,-120,255 },   /* v38 used p1897/V3 3 times */
	{ -24,-40,-10,0, -153, 512, 0,0,-120,255 },   /* v39 used p1896/V2 2 times */
	{ 44,40,-10,0, 281, 0, 0,0,-120,255 },   /* v40 used p1892/V2 2 times */
	{ -48,-40,-10,0, -307, 512, 0,0,-120,255 },   /* v41 used p1895/V2 2 times */
	{ 32,-40,-10,0, 204, 512, 0,0,-120,255 },   /* v42 used p1890/V3 6 times */
	{ 52,40,-10,0, 332, 0, 0,0,-120,255 },   /* v43 used p1891/V2 2 times */
	{ 24,-40,10,0, -64, 512, -98,-67,0,255 },   /* v44 used p1869/V2 2 times */
	{ -7,29,10,0, -64, 73, -108,-48,0,255 },   /* v45 used p1868/V2 2 times */
	{ -7,29,-10,0, 64, 73, -108,-48,0,255 },   /* v46 used p1868/V3 2 times */
	{ 44,40,10,0, 281, 0, 0,0,119,255 },   /* v47 used p1865/V3 2 times */
	{ -24,-40,10,0, -153, 512, 0,0,119,255 },   /* v48 used p1862/V3 2 times */
	{ -4,40,10,0, -64, 0, 79,91,0,255 },   /* v49 used p1871/V2 2 times */
	{ 27,-29,10,0, -64, 438, 109,49,0,255 },   /* v50 used p1871/V3 4 times */
	{ 27,-29,-10,0, 64, 438, 109,49,0,255 },   /* v51 used p1870/V3 2 times */
	{ 52,40,10,0, -64, 0, 116,-28,0,255 },   /* v52 used p1877/V2 2 times */
	{ 32,-40,10,0, -64, 512, 115,-33,0,255 },   /* v53 used p1877/V3 4 times */
	{ 32,-40,-10,0, 64, 512, 109,-48,0,255 },   /* v54 used p1876/V3 2 times */
	{ 44,40,10,0, 281, 320, -114,35,0,255 },   /* v55 used p1879/V2 2 times */
	{ 52,40,10,0, 332, 320, 0,120,0,255 },   /* v56 used p1879/V3 4 times */
	{ 52,40,-10,0, 332, 192, 0,120,0,255 },   /* v57 used p1878/V3 2 times */
	{ 32,-40,10,0, 204, 320, 115,-33,0,255 },   /* v58 used p1875/V2 2 times */
	{ 24,-40,10,0, 153, 320, -98,-67,0,255 },   /* v59 used p1874/V2 2 times */
	{ 24,-40,-10,0, 153, 192, -106,-53,0,255 },   /* v60 used p1874/V3 2 times */
	{ 44,40,10,0, -64, 0, -114,35,0,255 },   /* v61 used p1873/V3 4 times */
	{ 44,40,-10,0, 64, 0, -107,52,0,255 },   /* v62 used p1872/V3 2 times */
	{ 27,-29,10,0, -64, 438, -115,29,0,255 },   /* v63 used p1873/V2 2 times */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
