/* 
 * 変換日付 Mon Sep 11 16:41:48 2000
 * 2000/9/8 var2.05
 * パレット有効
 * XXコードの頂点破棄
 * 使用テキスチャ─チェック
 * 頂点カラーを評価しない
 * ビュア─の設定対応
 */
#include <mbi.h>
#include <u64macro.h>

extern unsigned char hi_light_txt[];
extern Mtx	softsprite_mtx;

extern u64	act_m_tentou_start = 0;


/* ビュア─設定のパレット */
/* ビュア─設定のテキスチャ─ */
/* vretex = 29 */
static Vtx act_m_tentou_v[] = {
/* 0番目 */ {   0,  320, -432,    0,  504,  439,    0,   88,  -81,  130},
/* 1番目 */ {   0,  480,    0,    0,  504,  276,    0,  119,    1,  255},
/* 2番目 */ { 410,  320, -134,    0,  349,  327,   81,   84,  -26,  248},
/* 3番目 */ {-329,    0, -453,    0,  697,  496,  -68,   32,  -93,   50},
/* 4番目 */ {-410,  320, -134,    0,  658,  327,  -81,   84,  -26,   92},
/* 5番目 */ {   0,  320, -432,    0,  504,  439,    0,   88,  -81,  130},
/* 6番目 */ { 329,    0, -453,    0,  310,  496,   68,   32,  -93,   90},
/* 7番目 */ { 253,  320,  348,    0,  408,  145,   42,   89,   69,  255},
/* 8番目 */ { 410,  320, -134,    0,  349,  327,   81,   84,  -26,  248},
/* 9番目 */ { 533,    0,  173,    0,  195,  219,  109,   32,   36,  242},
/* 10番目 */ {-254,  320,  348,    0,  599,  145,  -42,   89,   69,  220},
/* 11番目 */ {   0,    0,  560,    0,  504,    5,    0,   40,  113,  216},
/* 12番目 */ {-533,    0,  173,    0,  812,  219, -109,   32,   36,   50},
/* 13番目 */ {-254,  320,  348,    0,  599,  145,  -42,   89,   69,  220},
/* 14番目 */ {   0,    0,  560,    0,  504,  517,    0,   40,  113,  216},
/* 15番目 */ {-254,  320,  348,    0,  599,  657,  -42,   89,   69,  220},
/* 16番目 */ {-853,    0,  173,    0,  914,  679,  -78,   80,   42,  146},
/* 17番目 */ { 253,  320,  348,    0,  408,  657,   42,   89,   69,  255},
/* 18番目 */ {-254,  320,  348,    0,  599,  657,  -42,   89,   69,  220},
/* 19番目 */ {   0,  480,    0,    0,  504,  788,    0,  119,    1,  255},
/* 20番目 */ {-490,  320, -134,    0,  710,  839,  -56,  104,  -19,  156},
/* 21番目 */ {   0,  320, -432,    0,  504,  951,    0,   88,  -81,  130},
/* 22番目 */ {-490,  320, -134,    0,  710,  839,  -56,  104,  -19,  156},
/* 23番目 */ {-649,    0, -453,    0,  799, 1008,  -51,   67,  -85,   50},
/* 24番目 */ { 853,    0,  173,    0,   93,  679,   78,   80,   42,  255},
/* 25番目 */ { 490,  320, -134,    0,  298,  839,   56,  104,  -19,  255},
/* 26番目 */ { 253,  320,  348,    0,  408,  657,   42,   89,   69,  255},
/* 27番目 */ { 649,    0, -453,    0,  208, 1008,   51,   67,  -85,  140},
/* 28番目 */ { 490,  320, -134,    0,  298,  839,   56,  104,  -19,  255},

};

static unsigned short act_m_tentou_pal[] = {
0x318c,0x318d,0x4211,0x5ad7,0x8421,0xa529,0x2109,0x7881,
0xc8c1,0xd941,0xe9c1,0xfa41,0xcddd,0xb543,0xff0f,0xa533,
};
static unsigned char act_m_tentou[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1d,
0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x62,0x00,0x00,0x00,0x00,0x00,0x00,0x6d,0x23,
0x00,0x00,0x00,0x00,0x00,0x06,0x16,0x34,0x00,0x00,0x00,0x00,0x00,0x61,0x22,0x61,
0x00,0x00,0x00,0x00,0x06,0x12,0x22,0x34,0x00,0x00,0x00,0x00,0x66,0x12,0x9a,0x45,
0x00,0x00,0x00,0x00,0x61,0x18,0x9a,0xb5,0x00,0x00,0x00,0x00,0x61,0x18,0x89,0x94,
0x00,0x00,0x00,0x00,0x66,0x12,0x88,0x33,0x00,0x00,0x00,0x00,0x06,0x11,0x22,0x23,
0x00,0x00,0x00,0x00,0x06,0x61,0x11,0x22,0x00,0x00,0x00,0x00,0x00,0x66,0x61,0x11,
0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1d,
0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x62,0x00,0x00,0x00,0x00,0x00,0x66,0x6d,0x23,
0x00,0x00,0x00,0x00,0x66,0x11,0x26,0x34,0x00,0x00,0x00,0x06,0x17,0x89,0x32,0x61,
0x00,0x00,0x00,0x06,0x18,0x9a,0x43,0x13,0x00,0x00,0x00,0xc6,0x29,0xa4,0x51,0xd4,
0x00,0x00,0x0f,0xc6,0x23,0x45,0x2d,0x42,0x00,0x00,0x0f,0xc6,0x12,0x21,0xdc,0x34,
0x00,0x00,0x0f,0xfd,0x61,0x6d,0xc4,0x12,0x00,0x00,0x00,0xff,0xdd,0xdf,0x42,0x34,
0x00,0x00,0x00,0x0f,0xff,0x54,0x12,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x61,0x34,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
}; /* act_m_tentou */

extern Gfx act_m_tentou1T_model[] = {
	gsSPTexture( 0xffff, 0xffff, 0, 0, G_ON),
	gsDPPipeSync(),
	gsDPSetCombineLERP(
		TEXEL0, 0, PRIMITIVE, 0,
		TEXEL0, 0, ENVIRONMENT, 0,
		COMBINED, 0, SHADE, 0,
		0, 0, 0, COMBINED
	),
	gsDPSetPrimColor(0, 255, 255, 255, 255, 255),
//	gsDPSetEnvColor(255, 255, 255, 255),
	gsDPSetRenderMode(G_RM_FOG_SHADE_A,G_RM_ZB_XLU_SURF2),
/* repeat = (1,1)  mirror = (1,1) clamp = (0,1) */
	gsDPPipeSync(),
	gsDPSetTextureLUT(G_TT_RGBA16),
	gsDPLoadTLUT_pal16(15,act_m_tentou_pal),
	gsDPLoadTextureBlock_4b(
			act_m_tentou,
			G_IM_FMT_CI,
			16, 32, 15,
			G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_CLAMP,
			4, 5, 0, 0),
/* act_m_tentou1T_1 */
	gsSPLoadGeometryMode(G_LIGHTING | G_CULL_BACK | G_FOG | G_SHADE | G_SHADING_SMOOTH | G_ZBUFFER),
	gsSPVertex(&act_m_tentou_v[0],14,0),
	gsSP2Triangles( 0, 1, 2, 0, 3, 4, 5, 0 ),
	gsSP2Triangles( 6, 3, 5, 0, 2, 1, 7, 0 ),
	gsSP2Triangles( 6, 5, 8, 0, 9, 6, 8, 0 ),
	gsSP2Triangles( 7, 1, 10, 0, 9, 8, 7, 0 ),
	gsSP2Triangles( 11, 9, 7, 0, 4, 3, 12, 0 ),
	gsSP2Triangles( 4, 12, 13, 0, 1, 0, 4, 0 ),
	gsSP2Triangles( 10, 1, 4, 0, 11, 7, 13, 0 ),
	gsSP1Triangle( 11, 13, 12, 0),
	gsSPEndDisplayList(),
};

extern Gfx act_m_tentou2T_model[] = {
	gsSPTexture( 0xffff, 0xffff, 0, 0, G_ON),
	gsDPPipeSync(),
	gsDPSetCombineLERP(
		TEXEL0, 0, PRIMITIVE, 0,
		TEXEL0, 0, ENVIRONMENT, 0,
		COMBINED, 0, SHADE, 0,
		0, 0, 0, COMBINED
	),
	gsDPSetPrimColor(0, 255, 255, 255, 255, 255),
//	gsDPSetEnvColor(255, 255, 255, 255),
	gsDPSetRenderMode(G_RM_FOG_SHADE_A,G_RM_ZB_XLU_SURF2),
/* repeat = (1,1)  mirror = (1,1) clamp = (0,1) */
	gsDPPipeSync(),
	gsDPSetTextureLUT(G_TT_RGBA16),
	gsDPLoadTLUT_pal16(15,act_m_tentou_pal),
	gsDPLoadTextureBlock_4b(
			act_m_tentou,
			G_IM_FMT_CI,
			16, 32, 15,
			G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_CLAMP,
			4, 5, 0, 0),
/* act_m_tentou2T_1 */
	gsSPLoadGeometryMode(G_LIGHTING | G_CULL_BACK | G_FOG | G_SHADE | G_SHADING_SMOOTH | G_ZBUFFER),
	gsSPVertex(&act_m_tentou_v[14],15,0),
	gsSP2Triangles( 0, 1, 2, 0, 0, 3, 1, 0 ),
	gsSP2Triangles( 4, 5, 6, 0, 5, 7, 6, 0 ),
	gsSP2Triangles( 8, 2, 1, 0, 8, 9, 2, 0 ),
	gsSP2Triangles( 0, 10, 3, 0, 10, 11, 3, 0 ),
	gsSP2Triangles( 12, 5, 4, 0, 10, 13, 11, 0 ),
	gsSP2Triangles( 13, 7, 11, 0, 14, 5, 12, 0 ),
	gsSP2Triangles( 13, 9, 7, 0, 9, 8, 7, 0 ),
	gsSP1Triangle( 7, 5, 14, 0),
	gsSPEndDisplayList(),
};


extern u64	act_m_tentou_end = 0;
