#include<ultra64.h>

extern Vtx MOJI_pol_V_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 */


/* ======== V ======== */

Gfx MOJI_pol_V[]={

	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_V_v[0], 16, 0),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(1, 3, 2, 0),
	gsSP1Triangle(4, 5, 6, 0),
	gsSP1Triangle(4, 6, 7, 0),
	gsSP1Triangle(8, 9, 10, 0),
	gsSP1Triangle(8, 10, 11, 0),
	gsSP1Triangle(12, 13, 14, 0),
	gsSP1Triangle(13, 15, 14, 0),
	gsSPVertex(&MOJI_pol_V_v[16], 4, 0),
	gsSPVertex(&MOJI_pol_V_v[25], 11, 4),
	gsSP1Triangle(0, 4, 5, 0),
	gsSP1Triangle(1, 6, 7, 0),
	gsSP1Triangle(1, 8, 6, 0),
	gsSP1Triangle(2, 9, 10, 0),
	gsSP1Triangle(2, 10, 11, 0),
	gsSP1Triangle(3, 12, 13, 0),
	gsSP1Triangle(3, 13, 14, 0),
	gsSPVertex(&MOJI_pol_V_v[20], 4, 0),
	gsSPVertex(&MOJI_pol_V_v[36], 11, 4),
	gsSP1Triangle(0, 4, 5, 0),
	gsSP1Triangle(1, 6, 7, 0),
	gsSP1Triangle(1, 7, 8, 0),
	gsSP1Triangle(2, 9, 10, 0),
	gsSP1Triangle(2, 10, 11, 0),
	gsSP1Triangle(3, 12, 13, 0),
	gsSP1Triangle(3, 13, 14, 0),
	gsSPVertex(&MOJI_pol_V_v[24], 1, 0),
	gsSPVertex(&MOJI_pol_V_v[47], 3, 1),
	gsSP1Triangle(0, 1, 2, 0),
	gsSP1Triangle(0, 2, 3, 0),
	gsSPEndDisplayList(),
}; /* V */ 

#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 50 vertices */
Vtx MOJI_pol_V_v[]={
	{ 44,40,10,0, 281, 0, 0,0,119,255 },   /* v0 used p1879/V1 2 times */
	{ -5,-30,10,0, -32, 448, 0,0,119,255 },   /* v1 used p1879/V2 4 times */
	{ 52,40,10,0, 332, 0, 0,0,119,255 },   /* v2 used p1879/V3 4 times */
	{ -4,-40,10,0, -25, 512, 0,0,119,255 },   /* v3 used p1880/V2 2 times */
	{ 44,40,-10,0, 281, 192, -87,82,0,255 },   /* v4 used p1877/V1 2 times */
	{ 44,40,10,0, 281, 320, -95,72,0,255 },   /* v5 used p1878/V2 2 times */
	{ 52,40,10,0, 332, 320, 0,120,0,255 },   /* v6 used p1877/V2 2 times */
	{ 52,40,-10,0, 332, 192, 0,120,0,255 },   /* v7 used p1877/V3 2 times */
	{ 52,40,-10,0, 64, 0, 98,-68,0,255 },   /* v8 used p1875/V1 2 times */
	{ 52,40,10,0, -64, 0, 98,-68,0,255 },   /* v9 used p1876/V2 2 times */
	{ -4,-40,10,0, -64, 512, 94,-74,0,255 },   /* v10 used p1875/V2 2 times */
	{ -4,-40,-10,0, 64, 512, 81,-88,0,255 },   /* v11 used p1875/V3 2 times */
	{ -5,-30,-10,0, -32, 448, 0,0,-120,255 },   /* v12 used p1884/V1 2 times */
	{ -20,-40,-10,0, -128, 512, 0,0,-120,255 },   /* v13 used p1885/V1 2 times */
	{ -12,40,-10,0, -76, 0, 0,0,-120,255 },   /* v14 used p1885/V3 2 times */
	{ -28,40,-10,0, -179, 0, 0,0,-120,255 },   /* v15 used p1885/V2 2 times */
	{ -4,-40,-10,0, -25, 512, 0,0,-120,255 },   /* v16 used p1883/V1 2 times */
	{ 52,40,-10,0, 332, 0, 0,0,-120,255 },   /* v17 used p1882/V1 2 times */
	{ -20,-40,-10,0, 64, 512, -117,-23,0,255 },   /* v18 used p1873/V1 2 times */
	{ -5,-30,-10,0, 64, 448, -97,69,0,255 },   /* v19 used p1865/V1 2 times */
	{ -5,-30,10,0, -32, 448, 0,0,119,255 },   /* v20 used p1864/V1 2 times */
	{ -12,40,10,0, -76, 0, 0,0,119,255 },   /* v21 used p1863/V1 2 times */
	{ -4,-40,-10,0, -25, 192, 81,-88,0,255 },   /* v22 used p1868/V1 4 times */
	{ -28,40,-10,0, -179, 192, 0,120,0,255 },   /* v23 used p1871/V1 2 times */
	{ -12,40,-10,0, 64, 0, 117,25,0,255 },   /* v24 used p1869/V1 2 times */
	{ -20,-40,-10,0, -128, 512, 0,0,-120,255 },   /* v25 used p1883/V2 2 times */
	{ -5,-30,-10,0, -32, 448, 0,0,-120,255 },   /* v26 used p1883/V3 2 times */
	{ -5,-30,-10,0, -32, 448, 0,0,-120,255 },   /* v27 used p1882/V3 2 times */
	{ 44,40,-10,0, 281, 0, 0,0,-120,255 },   /* v28 used p1881/V3 2 times */
	{ -4,-40,-10,0, -25, 512, 0,0,-120,255 },   /* v29 used p1882/V2 2 times */
	{ -20,-40,10,0, -64, 512, -106,-53,0,255 },   /* v30 used p1874/V2 2 times */
	{ -28,40,10,0, -64, 0, -118,-11,0,255 },   /* v31 used p1873/V2 2 times */
	{ -28,40,-10,0, 64, 0, -118,-11,0,255 },   /* v32 used p1873/V3 2 times */
	{ -5,-30,10,0, -64, 448, -97,69,0,255 },   /* v33 used p1866/V2 2 times */
	{ 44,40,10,0, -64, 0, -95,72,0,255 },   /* v34 used p1865/V2 2 times */
	{ 44,40,-10,0, 64, 0, -87,82,0,255 },   /* v35 used p1865/V3 2 times */
	{ -20,-40,10,0, -128, 512, 0,0,119,255 },   /* v36 used p1864/V2 2 times */
	{ -4,-40,10,0, -25, 512, 0,0,119,255 },   /* v37 used p1864/V3 2 times */
	{ -28,40,10,0, -179, 0, 0,0,119,255 },   /* v38 used p1862/V2 2 times */
	{ -20,-40,10,0, -128, 512, 0,0,119,255 },   /* v39 used p1863/V2 2 times */
	{ -5,-30,10,0, -32, 448, 0,0,119,255 },   /* v40 used p1863/V3 2 times */
	{ -4,-40,10,0, -25, 320, 94,-74,0,255 },   /* v41 used p1868/V2 2 times */
	{ -20,-40,10,0, -128, 320, -106,-53,0,255 },   /* v42 used p1868/V3 4 times */
	{ -20,-40,-10,0, -128, 192, -117,-23,0,255 },   /* v43 used p1867/V3 2 times */
	{ -28,40,10,0, -179, 320, 0,120,0,255 },   /* v44 used p1872/V2 2 times */
	{ -12,40,10,0, -76, 320, 105,58,0,255 },   /* v45 used p1871/V2 2 times */
	{ -12,40,-10,0, -76, 192, 117,25,0,255 },   /* v46 used p1871/V3 2 times */
	{ -12,40,10,0, -64, 0, 105,58,0,255 },   /* v47 used p1870/V2 2 times */
	{ -5,-30,10,0, -64, 448, 119,12,0,255 },   /* v48 used p1869/V2 2 times */
	{ -5,-30,-10,0, 64, 448, 119,12,0,255 },   /* v49 used p1869/V3 2 times */
};


/*   0 vertices */
/*   1 Materials */

#define	LDIRX	0
#define	LDIRY	0
#define	LDIRZ	120
#define	AMBDIV	1
