/* 
 * 変換日付 Wed Aug 30 15:10:48 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_kanabun_start = 0;

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

};

static unsigned short act_m_kanabun_pal[] = {
0x61c4,0x7a49,0x9389,0x8549,0xae4d,0xc755,0x69c5,0xe797,
0x7bdd,0x9ce7,0xbe37,0xd699,0xfd29,0x6b05,0x5a85,0x7c05,
};
static unsigned char act_m_kanabun[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x60,0x00,0x00,0x00,0x00,0xdf,0x00,0x00,0x10,0x00,0x00,0x00,0x0d,0xf3,
0x00,0x00,0x01,0x00,0x00,0x00,0x0f,0x43,0x00,0x00,0x00,0x60,0x00,0x00,0x0d,0x34,
0x00,0x00,0x00,0x0d,0x00,0x00,0xb6,0xd4,0x00,0x00,0x00,0xd4,0x00,0x00,0x06,0xff,
0x00,0x00,0x00,0xd3,0xd0,0x00,0xf5,0x44,0x00,0x00,0x00,0x0d,0x3d,0x0f,0x54,0x33,
0x00,0x00,0x00,0x00,0xde,0xe5,0x43,0x3f,0x00,0x00,0x00,0x00,0x00,0xe4,0x33,0xff,
0x00,0x00,0x00,0x00,0x00,0xe4,0x33,0xdd,0x00,0x00,0x00,0x00,0x00,0x61,0xde,0x57,
0x00,0x00,0x00,0x0d,0x3e,0xe4,0x5f,0x34,0x00,0x00,0x00,0xd3,0xe0,0xd3,0x35,0xd3,
0x00,0x00,0x0d,0x3e,0x00,0xdf,0x33,0x7e,0x00,0x01,0x2e,0x00,0x00,0xdf,0xf3,0x4d,
0x00,0x60,0x00,0x00,0x00,0xef,0xff,0x3d,0x00,0x00,0x00,0x00,0xde,0xed,0xff,0x3d,
0x00,0x00,0x00,0x0d,0x30,0xde,0xdf,0x3d,0x00,0x00,0x00,0xe3,0xe0,0xef,0xed,0xfe,
0x00,0x00,0x00,0x3e,0x00,0x03,0xfe,0xde,0x00,0x00,0x00,0x20,0x00,0x01,0x3f,0xfe,
0x00,0x00,0x00,0xe0,0x00,0x00,0x13,0x31,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x16,
0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x60,0x00,0x00,0x00,0x00,0xdf,0x00,0x00,0x10,0x00,0x00,0x00,0x0d,0xf3,
0x00,0x00,0x01,0x00,0x00,0x00,0x0f,0x43,0x00,0x00,0x00,0x60,0x00,0x00,0x0d,0x34,
0x00,0x00,0x00,0x0d,0x00,0x00,0xb6,0xd4,0x00,0x00,0x00,0xd4,0x00,0x00,0x06,0xff,
0x00,0x00,0x00,0xd3,0xd0,0x00,0xf5,0x44,0x00,0x00,0x00,0x0d,0x3d,0x0f,0x54,0x33,
0x00,0x00,0x00,0x00,0xde,0xe5,0x43,0x3f,0x00,0x00,0x00,0x00,0x00,0xe4,0x33,0xff,
0x00,0x00,0x00,0x00,0x00,0xe4,0x33,0xdd,0x00,0x00,0x00,0x00,0x00,0x61,0xde,0x57,
0x00,0x00,0x00,0x0d,0x3e,0xe4,0x5f,0x34,0x00,0x00,0x00,0xd9,0xaa,0xd3,0x35,0xd3,
0x00,0x00,0x09,0xaa,0xaa,0xdf,0x33,0x7e,0x00,0x09,0xaa,0xaa,0xa9,0xdf,0xf3,0x4d,
0x00,0xaa,0xaa,0xaa,0x99,0xef,0xff,0x3d,0x00,0xaa,0xaa,0x99,0xaa,0xed,0xff,0x3d,
0x00,0xaa,0xaa,0xaa,0xa9,0xde,0xdf,0x3d,0x00,0x0a,0xaa,0xaa,0x99,0xef,0xed,0xfe,
0x00,0x00,0x9a,0xaa,0xaa,0x83,0xfe,0xde,0x00,0x00,0x00,0x89,0x98,0x01,0x3f,0xfe,
0x00,0x00,0x00,0xe0,0x00,0x00,0x13,0x31,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x16,
0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
}; /* act_m_kanabun */

extern Gfx act_m_kanabun1T_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_kanabun_pal),
	gsDPLoadTextureBlock_4b(
			act_m_kanabun,
			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_kanabun1T_1 */
	gsSPLoadGeometryMode(G_LIGHTING | G_FOG | G_SHADE | G_SHADING_SMOOTH | G_ZBUFFER),
	gsSPVertex(&act_m_kanabun_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_kanabun2T_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_kanabun_pal),
	gsDPLoadTextureBlock_4b(
			act_m_kanabun,
			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_kanabun2T_1 */
	gsSPLoadGeometryMode(G_LIGHTING | G_FOG | G_SHADE | G_SHADING_SMOOTH | G_ZBUFFER),
	gsSPVertex(&act_m_kanabun_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_kanabun_end = 0;

