unit uEmiter;

interface
uses
  uMaterials, zglHeader;

procedure LoadEmiter;
var
  mSun, par : zglPTexture;

implementation

procedure LoadEmiter;
begin

par:= tex_LoadFromFile('Data\par.png');
tex_SetFrameSize(par,64,64);
emitter2d_Init( @em_broom_magic);
with em_broom_magic do
begin
Type_:=EMITTER_CIRCLE;
AsCircle.Radius:=11;
AsCircle.direction:=2.967059612;
AsCircle.spread:=0.2443460822;
Params.LifeTime:=349;
Params.Loop:=false;
Params.Emission:=25;
Params.Position.X:=0.5;
Params.Position.Y:=0;
parParams.Texture:=par;
ParParams.Frame[0]:=1;
ParParams.Frame[1]:=8;
ParParams.LifeTimeS:=349;
ParParams.LifeTimeV:=150;
ParParams.VelocityS:=22;
ParParams.VelocityV:=15;
setlength(ParParams.VelocityD,2);
parParams.VelocityD[0].Life:=0;
parParams.VelocityD[0].Value:=1;
parParams.VelocityD[1].Life:=1;
parParams.VelocityD[1].Value:=1;
ParParams.AVelocityS:=0;
ParParams.AVelocityV:=0;
setlength(ParParams.AVelocityD,2);
parParams.AVelocityD[0].Life:=0;
parParams.AVelocityD[0].Value:=0;
parParams.AVelocityD[1].Life:=1;
parParams.AVelocityD[1].Value:=0;
ParParams.AngleS:=11;
ParParams.AngleV:=7;
ParParams.SizeXS:=20;
ParParams.SizeXV:=8;
ParParams.SizeYS:=20;
ParParams.SizeYV:=8;
setlength(ParParams.SizeXD,2);
setlength(ParParams.SizeYD,2);
parParams.SizeXD[0].Life:=0;
parParams.SizeXD[0].Value:=1;
parParams.SizeYD[0].Life:=0;
parParams.SizeYD[0].Value:=1;
parParams.SizeXD[1].Life:=1;
parParams.SizeXD[1].Value:=1;
parParams.SizeYD[1].Life:=1;
parParams.SizeYD[1].Value:=1;
ParParams.SpinS:=0;
ParParams.SpinV:=0;
setlength(ParParams.SpinD,2);
parParams.SpinD[0].Life:=0;
parParams.SpinD[0].Value:=0;
parParams.SpinD[1].Life:=1;
parParams.SpinD[1].Value:=0;
ParParams.ColorMode:=1;
ParParams.BlendMode:=0;
setlength(ParParams.Color,3);
setlength(ParParams.Alpha,3);
parParams.Color[0].Life:=0;
parParams.Color[0].Value:=$73FBC1;
parParams.Alpha[0].Life:=0;
parParams.Alpha[0].Value:=174;
parParams.Color[1].Life:=0.5369649529;
parParams.Color[1].Value:=$13EC1E;
parParams.Alpha[1].Life:=0.5369649529;
parParams.Alpha[1].Value:=96;
parParams.Color[2].Life:=1;
parParams.Color[2].Value:=$BDFA74;
parParams.Alpha[2].Life:=1;
parParams.Alpha[2].Value:=30;
end;
{
par:= tex_LoadFromFile('Data\par.png');
tex_SetFrameSize(par,64,64); }
emitter2d_Init( @em_bonus_boom);
with em_bonus_boom do
begin
Type_:=EMITTER_CIRCLE;
AsCircle.Radius:=11;
AsCircle.direction:=4.712388992;
AsCircle.spread:=1.064650774;
Params.LifeTime:=523;
Params.Loop:=false;
Params.Emission:=61;
Params.Position.X:=0;
Params.Position.Y:=0;
parParams.Texture:=par;
ParParams.Frame[0]:=1;
ParParams.Frame[1]:=4;
ParParams.LifeTimeS:=3289;
ParParams.LifeTimeV:=399;
ParParams.VelocityS:=32;
ParParams.VelocityV:=8;
setlength(ParParams.VelocityD,3);
parParams.VelocityD[0].Life:=0;
parParams.VelocityD[0].Value:=1;
parParams.VelocityD[1].Life:=0.4954604506;
parParams.VelocityD[1].Value:=1.372881413;
parParams.VelocityD[2].Life:=1;
parParams.VelocityD[2].Value:=1;
ParParams.AVelocityS:=-25.56999969;
ParParams.AVelocityV:=1.059999943;
setlength(ParParams.AVelocityD,2);
parParams.AVelocityD[0].Life:=0;
parParams.AVelocityD[0].Value:=0;
parParams.AVelocityD[1].Life:=1;
parParams.AVelocityD[1].Value:=0;
ParParams.AngleS:=26;
ParParams.AngleV:=14;
ParParams.SizeXS:=20;
ParParams.SizeXV:=8;
ParParams.SizeYS:=20;
ParParams.SizeYV:=8;
setlength(ParParams.SizeXD,2);
setlength(ParParams.SizeYD,2);
parParams.SizeXD[0].Life:=0;
parParams.SizeXD[0].Value:=1;
parParams.SizeYD[0].Life:=0;
parParams.SizeYD[0].Value:=1;
parParams.SizeXD[1].Life:=1;
parParams.SizeXD[1].Value:=1;
parParams.SizeYD[1].Life:=1;
parParams.SizeYD[1].Value:=1;
ParParams.SpinS:=-16.47999954;
ParParams.SpinV:=0.8999999762;
setlength(ParParams.SpinD,2);
parParams.SpinD[0].Life:=0;
parParams.SpinD[0].Value:=0;
parParams.SpinD[1].Life:=1;
parParams.SpinD[1].Value:=0;
ParParams.ColorMode:=1;
ParParams.BlendMode:=0;
setlength(ParParams.Color,3);
setlength(ParParams.Alpha,3);
parParams.Color[0].Life:=0;
parParams.Color[0].Value:=$79FCFF;
parParams.Alpha[0].Life:=0;
parParams.Alpha[0].Value:=58;
parParams.Color[1].Life:=0.5460441113;
parParams.Color[1].Value:=$AAF2FF;
parParams.Alpha[1].Life:=0.5460441113;
parParams.Alpha[1].Value:=62;
parParams.Color[2].Life:=1;
parParams.Color[2].Value:=$EAFCFF;
parParams.Alpha[2].Life:=1;
parParams.Alpha[2].Value:=91;
end;



mSun:= tex_LoadFromFile('G:\GDev\Scroller\Data\m_Sun.png', $FF000000, TEX_DEFAULT_2D or TEX_MIPMAP );
tex_SetFrameSize(mSun,32,32);
emitter2d_Init( @em_bullet_magic[1]);
with em_bullet_magic[1] do
begin
Type_:=EMITTER_POINT;
asPoint.direction:=0;
asPoint.spread:=0.5585053563;
Params.LifeTime:=250;
Params.Loop:=false;
Params.Emission:=12;
Params.Position.X:=0;
Params.Position.Y:=0;
parParams.Texture:=mSun;
ParParams.Frame[0]:=1;
ParParams.Frame[1]:=8;
ParParams.LifeTimeS:=600;
ParParams.LifeTimeV:=0;
ParParams.VelocityS:=-50;
ParParams.VelocityV:=20;
setlength(ParParams.VelocityD,2);
parParams.VelocityD[0].Life:=0;
parParams.VelocityD[0].Value:=1;
parParams.VelocityD[1].Life:=1;
parParams.VelocityD[1].Value:=1;
ParParams.AVelocityS:=1;
ParParams.AVelocityV:=0.1099999994;
setlength(ParParams.AVelocityD,2);
parParams.AVelocityD[0].Life:=0;
parParams.AVelocityD[0].Value:=0;
parParams.AVelocityD[1].Life:=1;
parParams.AVelocityD[1].Value:=0;
ParParams.AngleS:=0;
ParParams.AngleV:=0;
ParParams.SizeXS:=24;
ParParams.SizeXV:=8;
ParParams.SizeYS:=24;
ParParams.SizeYV:=8;
setlength(ParParams.SizeXD,2);
setlength(ParParams.SizeYD,2);
parParams.SizeXD[0].Life:=0;
parParams.SizeXD[0].Value:=1;
parParams.SizeYD[0].Life:=0;
parParams.SizeYD[0].Value:=1;
parParams.SizeXD[1].Life:=1;
parParams.SizeXD[1].Value:=1;
parParams.SizeYD[1].Life:=1;
parParams.SizeYD[1].Value:=1;
ParParams.SpinS:=0.5299999714;
ParParams.SpinV:=0;
setlength(ParParams.SpinD,2);
parParams.SpinD[0].Life:=0;
parParams.SpinD[0].Value:=0;
parParams.SpinD[1].Life:=1;
parParams.SpinD[1].Value:=0;

ParParams.ColorMode:=1;
ParParams.BlendMode:=0;
setlength(ParParams.Color,5);
setlength(ParParams.Alpha,5);
parParams.Color[0].Life:=0;
parParams.Color[0].Value:=$FFFFFF;
parParams.Alpha[0].Life:=0;
parParams.Alpha[0].Value:=151;
parParams.Color[1].Life:=0.08560311049;
parParams.Color[1].Value:=$FFFEE6;
parParams.Alpha[1].Life:=0.08560311049;
parParams.Alpha[1].Value:=125;
parParams.Color[2].Life:=0.2619974017;
parParams.Color[2].Value:=$FFFFFF;
parParams.Alpha[2].Life:=0.2619974017;
parParams.Alpha[2].Value:=146;
parParams.Color[3].Life:=0.7483787537;
parParams.Color[3].Value:=$FFFFFF;
parParams.Alpha[3].Life:=0.7483787537;
parParams.Alpha[3].Value:=108;
parParams.Color[4].Life:=1;
parParams.Color[4].Value:=$FFFFFF;
parParams.Alpha[4].Life:=1;
parParams.Alpha[4].Value:=60;
end;

end;

end.
