/* 
 * 変換日付 Mon Sep 11 16:44:51 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_kamakiri_start = 0;


/* ビュア─設定のパレット */
/* ビュア─設定のテキスチャ─ */
/* vretex = 18 */
static Vtx act_m_kamakiri_v[] = {
/* 0番目 */ {-650, 1100, 1200,    0, 1024, -102,  -69,   72,  -66,   50},
/* 1番目 */ {   0,  750,  150,    0,  512,  512,    0,  110,  -46,  114},
/* 2番目 */ {-950,  363,  713,    0, 1024,  512,  -69,   72,  -66,   50},
/* 3番目 */ {-550,  600,  800,    0, 1024, -102,  -76,   91,   13,   98},
/* 4番目 */ {   0, 1075,  675,    0,  512,  205,    0,  118,   17,  214},
/* 5番目 */ {   0,  700, 1100,    0,  512, -102,    0,   90,   79,  255},
/* 6番目 */ {-750, -200, -1000,    0, 1024, 1536,  -89,   80,   -8,   50},
/* 7番目 */ {-550,  163,  313,    0, 1024,  512,  -88,   80,   -9,   50},
/* 8番目 */ {   0,  650, -1000,    0,  512, 1536,    0,  119,  -10,  176},
/* 9番目 */ { 550,  600,  800,    0,    0, -102,   76,   91,   13,  255},
/* 10番目 */ { 650, 1100, 1200,    0,    0, -102,   69,   72,  -66,  112},
/* 11番目 */ { 950,  363,  713,    0,    0,  512,   69,   72,  -66,  112},
/* 12番目 */ { 550,  163,  313,    0,    0,  512,   88,   80,   -9,  226},
/* 13番目 */ { 750, -200, -1000,    0,    0, 1536,   89,   80,   -8,  226},
/* 14番目 */ {-1250,  750,  375,    0, 1024, 1536,    0,  120,    0,  192},
/* 15番目 */ {1250,  750,  375,    0,    0, 1536,    0,  120,    0,  192},
/* 16番目 */ {1250,  750, -375,    0,    0, 2048,    0,  120,    0,  192},
/* 17番目 */ {-1250,  750, -375,    0, 1024, 2048,    0,  120,    0,  192},

};

static unsigned short act_m_kamakiri_pal[] = {
0x3c4c,0x3c4d,0x5dcd,0x7ecf,0x9f51,0xaf55,0x1a85,0xffef,
0xaa9d,0x92cd,0x6c4b,0xd61b,0xef25,0x9b15,0xd41d,0xe557,
};
static unsigned char act_m_kamakiri[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x01,0x10,0x00,0x00,0x06,0x21,0x13,
0x00,0x12,0x20,0x00,0x00,0x02,0x52,0x13,0x00,0x22,0x31,0x00,0x00,0x01,0x21,0x12,
0x01,0x20,0x31,0x00,0x00,0x00,0x00,0x1a,0x02,0x20,0x42,0x00,0x00,0x00,0x00,0x01,
0x02,0x00,0x02,0x10,0x00,0x00,0x00,0x02,0x0a,0x00,0x03,0x20,0x00,0x00,0x06,0x13,
0x0a,0x00,0x04,0x20,0x00,0x00,0x20,0x24,0x0d,0x00,0x00,0x21,0x00,0x02,0x60,0x24,
0x00,0x00,0x00,0x32,0x00,0x31,0x00,0x24,0x00,0x00,0x00,0x02,0x03,0x26,0x00,0x23,
0x00,0x00,0x00,0x00,0x22,0x10,0x00,0x13,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0xda,0x30,0x00,0x00,0x13,
0x00,0x00,0x0a,0x10,0x12,0x30,0x00,0x23,0x00,0x00,0x02,0x00,0x00,0x12,0x30,0x24,
0x00,0x00,0x01,0x00,0x00,0x00,0x61,0x24,0x00,0x00,0x20,0x00,0x00,0x00,0x01,0x25,
0x00,0x00,0x20,0x00,0x00,0x00,0x01,0x35,0x00,0x00,0x10,0x00,0x00,0x00,0x02,0x35,
0x00,0x0a,0x00,0x00,0x00,0x00,0x02,0x35,0x00,0x02,0x00,0x00,0x00,0x00,0x02,0x35,
0x00,0x1a,0x00,0x00,0x00,0x21,0x62,0x45,0x0a,0xd0,0x00,0x00,0x02,0x10,0x02,0x45,
0x00,0x00,0x00,0x00,0x31,0x00,0x22,0x45,0x00,0x00,0x00,0x03,0x10,0x00,0x23,0x45,
0x00,0x00,0x00,0xa1,0x00,0x00,0x23,0x45,0x00,0x00,0x0a,0x10,0x00,0x00,0x23,0x44,
0x00,0x00,0xda,0x00,0x00,0x00,0x23,0x44,0x00,0x00,0x0d,0x00,0x00,0x00,0x23,0x44,
0x00,0x00,0x00,0xa0,0x00,0x00,0x23,0x44,0x00,0x00,0x00,0x02,0x00,0x00,0x23,0x44,
0x00,0x00,0x00,0x0a,0x00,0x00,0x23,0x44,0x00,0x00,0x00,0x00,0x20,0x00,0x12,0x34,
0x00,0x00,0x00,0x00,0x10,0x00,0x12,0x33,0x00,0x00,0x00,0x00,0x02,0x00,0x01,0x33,
0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x23,0x00,0x00,0x00,0x00,0x0a,0x00,0x01,0x22,
0x00,0x00,0x00,0x00,0xd0,0x00,0x00,0xa2,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0xda,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x43,0x33,0x00,0x00,0x00,0x00,
0x07,0x77,0x77,0x54,0x33,0x33,0x00,0x00,0x00,0x77,0x77,0x77,0x77,0x54,0x32,0x00,
0x00,0x0c,0xcc,0xcc,0xcc,0xcc,0xb4,0x20,0x00,0x00,0x00,0x00,0xbb,0xbb,0xbb,0x10,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0x00,0x00,0x00,0x00,0x0f,0xee,0x88,0x00,
0x00,0x00,0xbf,0xff,0xfb,0xbb,0xbe,0x80,0x00,0x77,0x77,0x77,0x77,0xcc,0xcb,0xe0,
0x07,0x77,0x77,0x77,0xcc,0xcc,0xbb,0x00,0x00,0x77,0x77,0xcc,0xcc,0xcb,0xbb,0x00,
0x00,0x00,0xcc,0xcc,0xcc,0xbb,0xb0,0x00,0x00,0x00,0x00,0x0c,0xcb,0xbb,0xb0,0x00,
0x00,0x00,0x00,0x00,0x00,0xbb,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
}; /* act_m_kamakiri */

extern Gfx act_m_kamakiri1T_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_kamakiri_pal),
	gsDPLoadTextureBlock_4b(
			act_m_kamakiri,
			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_kamakiri1T_1 */
	gsSPLoadGeometryMode(G_LIGHTING | G_FOG | G_SHADE | G_SHADING_SMOOTH | G_ZBUFFER),
	gsSPVertex(&act_m_kamakiri_v[0],14,0),
	gsSP2Triangles( 0, 1, 2, 0, 3, 4, 1, 0 ),
	gsSP2Triangles( 3, 5, 4, 0, 1, 6, 7, 0 ),
	gsSP2Triangles( 1, 8, 6, 0, 9, 4, 5, 0 ),
	gsSP2Triangles( 9, 1, 4, 0, 10, 11, 1, 0 ),
	gsSP2Triangles( 12, 13, 1, 0, 13, 8, 1, 0 ),
	gsSPEndDisplayList(),
};

extern Gfx act_m_kamakiri2_2T_model[] = {
	gsSPTexture( 0xffff, 0xffff, 0, 0, G_ON),
	gsDPPipeSync(),
	gsDPSetCombineLERP(
		TEXEL0, 0, PRIMITIVE, 0,
		TEXEL0, 0, PRIMITIVE, 0,
		COMBINED, 0, SHADE, 0,
		COMBINED, 0, ENVIRONMENT, 0
	),
	gsDPSetPrimColor(0, 255, 255, 255, 255, 160),
//	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_kamakiri_pal),
	gsDPLoadTextureBlock_4b(
			act_m_kamakiri,
			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_kamakiri2_2T_1 */
	gsSPLoadGeometryMode(G_LIGHTING | G_FOG | G_SHADE | G_SHADING_SMOOTH | G_ZBUFFER),
	gsSPVertex(&act_m_kamakiri_v[14],4,0),
	gsSP2Triangles( 0, 1, 2, 0, 0, 2, 3, 0 ),
	gsSPEndDisplayList(),
};


extern u64	act_m_kamakiri_end = 0;
