{
	Bubble = ColorToAlpha([>>img\bubble.bmp] );	
	BlendIn = 0.5;
	BlendOut = 0.5;
	BlendInXOff = -50;
	BlendInYOff = -50;
	BlendOutXOff = 40;
	BlendOutYOff = 40;
	TimePerKara = 0.02;

	FUNC["fill_stay"]=
	{
		_col0_r = GetParam( _line, "Color0", CurTime(), 0 );
		_col0_g = GetParam( _line, "Color0", CurTime(), 1 );
		_col0_b = GetParam( _line, "Color0", CurTime(), 2 );
		_draw1 = FillColor( _img_text, _col0_r, _col0_g, _col0_b );
		CurKara( _line, _kara );
		_ce = range(CurLineStart+TimePerKara*_kara+TimePerKara,CurLineStart,CurKaraStart);
		_cs = _ce - TimePerKara*3;
		_a = (CurTime() - _cs)/(_ce-_cs);
		_a = range( _a, 0, 1 );
		DrawFinal( _draw1, _posx, _posy, 100, 100*_a, range(_a*3,0,1) );
	}
	FUNC["fill_explo"]=
	{
		_col0_r = GetParam( _line, "Color0", CurTime(), 0 );
		_col0_g = GetParam( _line, "Color0", CurTime(), 1 );
		_col0_b = GetParam( _line, "Color0", CurTime(), 2 );
		_draw1 = FillColor( _img_text, _col0_r, _col0_g, _col0_b );

		GenParticleFx( "fill_explo", _draw1, 1, _posx, _posy, 0.03, 0.5, 0 );

		ParticleForce( "fill_explo", _posx+rand(-10,10), _posy+rand(-20,20), 10, 0.05 );
		ParticleForce( "fill_explo", _posx+rand(-20,10), _posy+rand(-10,20), 10, 0.05 );
		ParticleForce( "fill_explo", _posx+rand(-10,20), _posy+rand(-20,10), 10, 0.05 );
		ParticleForce( "fill_explo", _posx+rand(-20,20), _posy+rand(-20,20), 10, 0.05 );
	}

	FUNC["bubble"]=
	{
		if( CompEqual( _init, -1 ) )
		{
			_init = 1;
			_rndx = BubbleX[_line*100+_kara*10+_char];
			_rndy = BubbleY[_line*100+_kara*10+_char];
			_sizx = GetImgSizeX( _img_text );
			_sizy = GetImgSizeY( _img_text );
			_diagsiz = sqrt( _sizx*_sizx + _sizy*_sizy )*0.7;
		}
		_col_r = GetParam( _line, _cstr, CurTime(), 0 );
		_col_g = GetParam( _line, _cstr, CurTime(), 1 );
		_col_b = GetParam( _line, _cstr, CurTime(), 2 );
		_draw = FillColor( Bubble, _col_r, _col_g, _col_b );
		_a = (BlendIn+_start - CurTime())/BlendIn;
		_a = range( _a, 0, 1 );
		_a2 = 1 - (_end - CurTime())/BlendOut;
		_a2 = range( _a2, 0, 1 );
		_alpsca = _a + _a2 ;
		_alpsca = 1 - _alpsca*_alpsca;
		_scale = _diagsiz * _alpsca / 32.0 * _sizmul;
		_alpha = _a + _a2;
		_alpha = 1;// - _alpha*_alpha*_alpha*_alpha*_alpha*_alpha*_alpha*_alpha;
		DrawFinal( _draw, _posx + (_a*BlendInXOff + _a2*BlendOutXOff)*_rndx, _posy + (_a*BlendInYOff + _a2*BlendOutYOff)*_rndy, 100 * _scale, 100 * _scale, _alpha );
	}

	FUNC["bubble_bg"]=
	{
		BubbleX[_line*100+_kara*10+_char] = rand(0.0,1);
		BubbleY[_line*100+_kara*10+_char] = rand(0.2,1);
		_cstr = "Color3";
		_sizmul = 1.15;
		CallFunc( "bubble" );
	}

	FUNC["bubble_fg"]=
	{
		_cstr = "Color2";
		_sizmul = 1.0;
		CallFunc( "bubble" );
	}

	FUNC["perChar_fill1"]=
	{
		Emit( "bubble_bg", CurLineStart-BlendIn+TimePerKara*CurKara, CurLineEnd+BlendOut+TimePerKara*(CurKara-10), CurLine, CurKara, CurChar );
	}

	FUNC["perChar_fill2"]=
	{
		Emit( "bubble_fg", CurLineStart-BlendIn+TimePerKara*CurKara, CurLineEnd+BlendOut+TimePerKara*(CurKara-10), CurLine, CurKara, CurChar );
	}

	FUNC["perKara_bg1"]=
	{
		EnumChars( "perChar_fill1", CurLine, CurKara );
	}

	FUNC["perKara_bg2"]=
	{
		EnumChars( "perChar_fill2", CurLine, CurKara );
	}

	FUNC["perKara_fill"]=
	{
		Emit( "fill_stay", CurLineStart, CurKaraStart, CurLine, CurKara, -1 );
		Emit( "fill_explo", CurKaraStart, CurKaraStart+oneframe, CurLine, CurKara, -1 );
	}

	FUNC["perLine"]=
	{
		EnumKaras( "perKara_bg1", CurLine );
		EnumKaras( "perKara_bg2", CurLine );
		EnumKaras( "perKara_fill", CurLine );
	}

	EnumLines( "perLine" );
}