/* 
 * 変換日付 Wed Aug 30 13:54:24 2000
 * 2000/6/28 var2.04
 * パレット有効
 * XXコードの頂点破棄
 * 使用テキスチャ─チェック
 * 頂点カラーを評価しない
 * ビュア─の設定対応
 */
#include <mbi.h>
#include <u64macro.h>

extern unsigned char hi_light_txt[];
extern Mtx	softsprite_mtx;

extern u64	act_m_miyama_start = 0;

/* ビュア─設定のパレット */
/* ビュア─設定のテキスチャ─ */
/* vretex = 12 */
static Vtx act_m_miyama_v[] = {
/* 0番目 */ {-1000,    0, 1000,    0, 1024,    0,  -72,   96,    0,  164},
/* 1番目 */ {   0,  750, 1000,    0,  512,    0,    0,  120,    0,  255},
/* 2番目 */ {   0,  750, -1000,    0,  512, 1024,    0,  120,    0,  255},
/* 3番目 */ {-1000,    0, -1000,    0, 1024, 1024,  -72,   96,    0,  164},
/* 4番目 */ {1000,    0, 1000,    0,    0,    0,   72,   96,    0,  255},
/* 5番目 */ {1000,    0, -1000,    0,    0, 1024,   72,   96,    0,  255},
/* 6番目 */ {   0,  750, 1000,    0,  512, 1024,    0,  120,    0,  255},
/* 7番目 */ {1000,    0, 1000,    0,    0, 1024,   72,   96,    0,  255},
/* 8番目 */ {1000,    0, -1000,    0,    0, 2048,   72,   96,    0,  255},
/* 9番目 */ {   0,  750, -1000,    0,  512, 2048,    0,  120,    0,  255},
/* 10番目 */ {-1000,    0, 1000,    0, 1024, 1024,  -72,   96,    0,  164},
/* 11番目 */ {-1000,    0, -1000,    0, 1024, 2048,  -72,   96,    0,  164},

};

static unsigned short act_m_miyama_pal[] = {
0x4988,0x4989,0x5a0b,0x728f,0x9397,0x9c1d,0x4107,0xbd27,
0x61c9,0x720b,0x824d,0x9b53,0xb45b,0xcd21,0xd5a7,0xeef1,
};
static unsigned char act_m_miyama[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x26,0x00,
0x00,0x00,0x00,0x00,0x00,0x13,0x60,0x00,0x00,0x00,0x00,0x00,0x06,0x23,0x40,0x00,
0x00,0x00,0x00,0x00,0x01,0x36,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x36,0x00,0x00,
0x00,0x00,0x00,0x00,0x01,0x34,0x60,0x00,0x00,0x00,0x60,0x00,0x06,0x31,0x00,0x00,
0x00,0x00,0x10,0x00,0x00,0x23,0x60,0x00,0x00,0x00,0x01,0x00,0x00,0x62,0x31,0x60,
0x00,0x00,0x00,0x60,0x00,0x06,0x11,0x66,0x00,0x00,0x00,0x06,0x00,0x67,0x34,0x32,
0x00,0x00,0x00,0x14,0x00,0x13,0x44,0x44,0x00,0x00,0x00,0x14,0x10,0x13,0x44,0x43,
0x00,0x00,0x00,0x01,0x30,0x63,0x44,0x32,0x00,0x00,0x00,0x00,0x16,0x66,0x22,0x61,
0x00,0x00,0x00,0x00,0x06,0x61,0x66,0x22,0x00,0x00,0x00,0x00,0x00,0x02,0x23,0xa3,
0x00,0x00,0x00,0x00,0x00,0x06,0x9a,0x34,0x00,0x00,0x00,0x01,0x36,0x66,0x61,0x16,
0x00,0x00,0x00,0x14,0x10,0x19,0xbc,0xe9,0x00,0x00,0x03,0x41,0x00,0x19,0xab,0xca,
0x00,0x01,0x16,0x00,0x00,0x19,0xab,0xca,0x00,0x60,0x00,0x00,0x16,0x19,0xab,0xca,
0x00,0x00,0x00,0x02,0x30,0x19,0xaa,0xb9,0x00,0x00,0x00,0x14,0x10,0x19,0xaa,0xb9,
0x00,0x00,0x00,0x41,0x00,0x69,0x9a,0xa8,0x00,0x00,0x00,0x20,0x00,0x01,0x99,0xa8,
0x00,0x00,0x00,0x10,0x00,0x01,0x89,0x98,0x00,0x00,0x01,0x00,0x00,0x00,0x66,0x18,
0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x26,0x00,
0x00,0x00,0x00,0x00,0x00,0x13,0x60,0x00,0x00,0x00,0x00,0x00,0x06,0x23,0x40,0x00,
0x00,0x00,0x00,0x00,0x01,0x36,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x36,0x00,0x00,
0x00,0x00,0x00,0x00,0x01,0x34,0x60,0x00,0x00,0x00,0x60,0x00,0x06,0x31,0x00,0x00,
0x00,0x00,0x10,0x00,0x00,0x23,0x60,0x00,0x00,0x00,0x01,0x00,0x00,0x62,0x31,0x60,
0x00,0x00,0x00,0x60,0x00,0x06,0x11,0x66,0x00,0x00,0x00,0x06,0x00,0x67,0x34,0x32,
0x00,0x00,0x00,0x14,0x00,0x13,0x44,0x44,0x00,0x00,0x00,0x14,0x10,0x13,0x44,0x43,
0x00,0x00,0x00,0x01,0x30,0x63,0x44,0x32,0x00,0x00,0x00,0x00,0x16,0x66,0x22,0x61,
0x00,0x00,0x00,0x00,0x06,0x88,0x86,0x22,0x00,0x00,0x00,0x06,0x88,0xab,0xcb,0x83,
0x00,0x00,0x00,0x68,0x9a,0xbc,0xcd,0xb8,0x00,0x00,0x06,0x89,0xab,0xbc,0xdd,0x86,
0x00,0xff,0xd1,0x9a,0xab,0xcc,0xd8,0x11,0x0f,0xff,0xe8,0x9a,0xbb,0xca,0x81,0x23,
0x0f,0xff,0xe8,0x9a,0xba,0x8d,0xd1,0x22,0x00,0xff,0xfe,0x88,0x8d,0xde,0xe2,0x34,
0x00,0x0f,0xff,0xee,0xee,0xfe,0xd1,0x23,0x00,0x00,0xff,0xff,0xff,0xed,0x12,0x34,
0x00,0x00,0x00,0xee,0xee,0xe6,0x61,0x23,0x00,0x00,0x00,0x20,0x00,0x06,0x12,0x34,
0x00,0x00,0x00,0x10,0x00,0x00,0x61,0x23,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x14,
0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
}; /* act_m_miyama */

extern Gfx act_m_miyama1T_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_miyama_pal),
	gsDPLoadTextureBlock_4b(
			act_m_miyama,
			G_IM_FMT_CI,
			16, 64, 15,
			G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_CLAMP,
			4, 6, 0, 0),
/* act_m_miyama1T_1 */
	gsSPLoadGeometryMode(G_LIGHTING | G_FOG | G_SHADE | G_SHADING_SMOOTH | G_ZBUFFER),
	gsSPVertex(&act_m_miyama_v[0],6,0),
	gsSP2Triangles( 0, 1, 2, 0, 0, 2, 3, 0 ),
	gsSP2Triangles( 1, 4, 5, 0, 1, 5, 2, 0 ),
	gsSPEndDisplayList(),
};

extern Gfx act_m_miyama2T_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_miyama_pal),
	gsDPLoadTextureBlock_4b(
			act_m_miyama,
			G_IM_FMT_CI,
			16, 64, 15,
			G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_CLAMP,
			4, 6, 0, 0),
/* act_m_miyama2T_1 */
	gsSPLoadGeometryMode(G_LIGHTING | G_FOG | G_SHADE | G_SHADING_SMOOTH | G_ZBUFFER),
	gsSPVertex(&act_m_miyama_v[6],6,0),
	gsSP2Triangles( 0, 1, 2, 0, 0, 2, 3, 0 ),
	gsSP2Triangles( 4, 0, 3, 0, 4, 3, 5, 0 ),
	gsSPEndDisplayList(),
};


extern u64	act_m_miyama_end = 0;

