/* 
 * 変換日付 Wed Aug 30 15:24:44 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_abura_start = 0;

/* ビュア─設定のパレット */
/* ビュア─設定のテキスチャ─ */
/* vretex = 22 */
static Vtx act_m_abura_v[] = {
/* 0番目 */ {-750,    0,  750,    0, 1024,    0,  -72,   96,    0,  114},
/* 1番目 */ {   0,  563,  750,    0,  512,    0,    0,  120,    0,  234},
/* 2番目 */ {   0,  563, -750,    0,  512, 1024,    0,  120,    0,  234},
/* 3番目 */ {-750,    0, -750,    0, 1024, 1024,  -72,   96,    0,  114},
/* 4番目 */ { 750,    0,  750,    0,    0,    0,   72,   96,    0,  255},
/* 5番目 */ { 750,    0, -750,    0,    0, 1024,   72,   96,    0,  255},
/* 6番目 */ { 656,  281,  188,    0,    0, 1024,   53,  107,    0,  255},
/* 7番目 */ { 656,  281, -1313,    0,    0, 2048,   53,  107,    0,  255},
/* 8番目 */ { -94,  656, -1313,    0,  512, 2048,    0,  120,    0,  234},
/* 9番目 */ { -94,  656,  188,    0,  512, 1024,    0,  120,    0,  234},
/* 10番目 */ {  94,  656, -1313,    0,  512, 2048,    0,  120,    0,  234},
/* 11番目 */ {-656,  281, -1313,    0, 1024, 2048,  -53,  107,    0,  152},
/* 12番目 */ {-656,  281,  188,    0, 1024, 1024,  -53,  107,    0,  152},
/* 13番目 */ {  94,  656,  188,    0,  512, 1024,    0,  120,    0,  234},
/* 14番目 */ {1688,  375,  563,    0,    0, 2048,    0,  120,    0,  234},
/* 15番目 */ {1688,  375, -188,    0,  512, 2048,    0,  120,    0,  234},
/* 16番目 */ { 188,  375, -188,    0,  512, 1024,    0,  120,    0,  234},
/* 17番目 */ { 188,  375,  563,    0,    0, 1024,    0,  120,    0,  234},
/* 18番目 */ {-188,  375, -188,    0,  512, 1024,    0,  120,    0,  234},
/* 19番目 */ {-1688,  375, -188,    0,  512, 2048,    0,  120,    0,  234},
/* 20番目 */ {-1688,  375,  563,    0,    0, 2048,    0,  120,    0,  234},
/* 21番目 */ {-188,  375,  563,    0,    0, 1024,    0,  120,    0,  234},

};

static unsigned short act_m_abura_pal[] = {
0x49cc,0x49cd,0x520f,0x6b17,0x7b9b,0x9461,0x2907,0x9b4f,
0xb411,0xd51b,0x828b,0x9b0f,0x7207,0xad6b,0xc631,0xdef7,
};

static unsigned char act_m_abura[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x06,0x00,0x06,0x61,0x00,0x00,0x00,0x00,0x60,0x00,0x06,0xd6,0xb6,
0x00,0x00,0x06,0x20,0x00,0x06,0x61,0x11,0x00,0x00,0x01,0x20,0x00,0x62,0x12,0x11,
0x00,0x00,0x06,0x26,0x00,0x61,0xba,0xa1,0x00,0x00,0x00,0x62,0x06,0x1b,0xaa,0xa1,
0x00,0x00,0x00,0x06,0x26,0x1a,0xaa,0x16,0x00,0x00,0x00,0x00,0x66,0x66,0x11,0x11,
0x00,0x00,0x00,0x00,0x06,0x44,0xd2,0x33,0x00,0x00,0x00,0x00,0x01,0x52,0x53,0x35,
0x00,0x00,0x00,0x06,0x21,0x12,0x23,0x35,0x00,0x00,0x00,0x62,0x66,0x11,0x22,0x33,
0x00,0x00,0x06,0x26,0x06,0x56,0x12,0x11,0x00,0x00,0x01,0x60,0x06,0x45,0xd3,0x4f,
0x00,0x00,0x06,0x00,0x06,0x11,0x1e,0xef,0x00,0x00,0x60,0x00,0x06,0x55,0x31,0x11,
0x00,0x00,0x60,0x00,0x00,0x23,0x43,0x11,0x00,0x06,0x00,0x00,0x12,0x62,0x3e,0xff,
0x00,0x00,0x00,0x01,0x20,0x64,0xe4,0x23,0x00,0x00,0x00,0x02,0x60,0x61,0x32,0x23,
0x00,0x00,0x00,0x62,0x00,0x06,0x23,0x35,0x00,0x00,0x00,0x26,0x00,0x01,0x11,0x22,
0x00,0x00,0x00,0x20,0x00,0x06,0x35,0xdd,0x00,0x00,0x00,0x60,0x00,0x00,0x11,0x12,
0x00,0x00,0x06,0x00,0x00,0x00,0x64,0x5e,0x00,0x00,0x60,0x00,0x00,0x00,0x01,0x12,
0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x5f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x12,
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,0xcc,0x00,0x00,0x00,
0x00,0x00,0x00,0x0c,0x87,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x97,0xc0,0x00,0x00,
0x00,0x00,0x00,0xc9,0x78,0x70,0x00,0x00,0x00,0x00,0x0c,0x88,0x79,0x70,0x00,0x00,
0x00,0x00,0x0c,0x9b,0x79,0x87,0x00,0x00,0x00,0x00,0x0c,0x97,0x89,0x77,0x00,0x00,
0x00,0x00,0xc7,0x97,0x97,0x97,0x00,0x00,0x00,0x00,0xc9,0x79,0x97,0x98,0x70,0x00,
0x00,0x00,0xc9,0x79,0x97,0x99,0x70,0x00,0x00,0x0c,0x89,0x79,0x8b,0xc9,0x70,0x00,
0x00,0x0c,0xb9,0x77,0xbc,0xbc,0x70,0x00,0x00,0x0c,0xc7,0xcb,0x79,0x87,0x87,0x00,
0x00,0x0c,0xbc,0xb9,0x79,0x97,0x97,0x00,0x00,0x0c,0x97,0x99,0x78,0x97,0x97,0x00,
0x00,0x0c,0x97,0x98,0xb7,0x9b,0x97,0x00,0x00,0x0c,0x97,0x97,0xcb,0x78,0x97,0x00,
0x00,0x0c,0x97,0x97,0x8c,0x79,0x97,0x00,0x00,0x0c,0x97,0x87,0x98,0x79,0x87,0x00,
0x00,0x0c,0x87,0xb7,0x99,0x89,0x70,0x00,0x00,0x0c,0x97,0xc9,0x79,0x98,0x70,0x00,
0x00,0x0c,0x9c,0x79,0x78,0x97,0x00,0x00,0x00,0x0c,0x8b,0x79,0x97,0x97,0x00,0x00,
0x00,0x00,0xc9,0x79,0x99,0x77,0x00,0x00,0x00,0x00,0xc9,0x97,0x99,0x70,0x00,0x00,
0x00,0x00,0xc8,0x97,0x99,0x70,0x00,0x00,0x00,0x00,0x0c,0x99,0x79,0x70,0x00,0x00,
0x00,0x00,0x0c,0x89,0x97,0x00,0x00,0x00,0x00,0x00,0x00,0xc7,0x70,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
}; /* act_m_abura */

extern Gfx act_m_abura1_1T_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,0) */
	gsDPPipeSync(),
	gsDPSetTextureLUT(G_TT_RGBA16),
	gsDPLoadTLUT_pal16(15,act_m_abura_pal),
	gsDPLoadTextureBlock_4b(
			act_m_abura,
			G_IM_FMT_CI,
			16, 64, 15,
			G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP,
			4, 6, 0, 0),
/* act_m_abura1_1T_1 */
	gsSPLoadGeometryMode(G_LIGHTING | G_FOG | G_SHADE | G_SHADING_SMOOTH | G_ZBUFFER),
	gsSPVertex(&act_m_abura_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_abura1_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, 200),
//	gsDPSetEnvColor(255, 255, 255, 255),
	gsDPSetRenderMode(G_RM_FOG_SHADE_A,G_RM_ZB_XLU_SURF2),
/* repeat = (1,1)  mirror = (1,1) clamp = (0,0) */
	gsDPPipeSync(),
	gsDPSetTextureLUT(G_TT_RGBA16),
	gsDPLoadTLUT_pal16(15,act_m_abura_pal),
	gsDPLoadTextureBlock_4b(
			act_m_abura,
			G_IM_FMT_CI,
			16, 64, 15,
			G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP,
			4, 6, 0, 0),
/* act_m_abura1_2T_1 */
	gsSPLoadGeometryMode(G_LIGHTING | G_FOG | G_SHADE | G_SHADING_SMOOTH | G_ZBUFFER),
	gsSPVertex(&act_m_abura_v[6],8,0),
	gsSP2Triangles( 0, 1, 2, 0, 0, 2, 3, 0 ),
	gsSP2Triangles( 4, 5, 6, 0, 4, 6, 7, 0 ),
	gsSPEndDisplayList(),
};

extern Gfx act_m_abura2_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, 200),
//	gsDPSetEnvColor(255, 255, 255, 255),
	gsDPSetRenderMode(G_RM_FOG_SHADE_A,G_RM_ZB_XLU_SURF2),
/* repeat = (1,1)  mirror = (1,1) clamp = (0,0) */
	gsDPPipeSync(),
	gsDPSetTextureLUT(G_TT_RGBA16),
	gsDPLoadTLUT_pal16(15,act_m_abura_pal),
	gsDPLoadTextureBlock_4b(
			act_m_abura,
			G_IM_FMT_CI,
			16, 64, 15,
			G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP,
			4, 6, 0, 0),
/* act_m_abura2_2T_1 */
	gsSPLoadGeometryMode(G_LIGHTING | G_FOG | G_SHADE | G_SHADING_SMOOTH | G_ZBUFFER),
	gsSPVertex(&act_m_abura_v[14],8,0),
	gsSP2Triangles( 0, 1, 2, 0, 0, 2, 3, 0 ),
	gsSP2Triangles( 4, 5, 6, 0, 4, 6, 7, 0 ),
	gsSPEndDisplayList(),
};


extern u64	act_m_abura_end = 0;


