unit uMaterials;

interface
uses
  zglHeader, uConst;
const
  MBtnColor : array[1..2] of Integer = ( $502530, $900060 );

procedure LoadMaterials;

var
  mFont_Ed, mFont_1  :zglPFont;
  mButton : array[1..2] of zglPTexture;
  mIgdc,
  m_PName : zglPTexture;

  mBgMenu, mBgMenu2,
  mBody, mBroom, mCap, mEyes, mHair, mHand,
  mMouse, mPants, mShirt, mShoes, mStock : zglPTexture;

  mGUI_bg1, mGUI_bg2, mGUI_bg3, mGUI_power, mGUI_magic,
  mGUI_Health, mMagic,
  mPoint, mMoney, mQuest1, mQuest1p, mQuest2,
  mBg, mBg2, mBonus : zglPTexture;

  particles      : zglTPEngine2D;
  em_bullet_magic : array[1..5] of zglTemitter2D;
  em_broom_magic, em_bonus_boom : zglTemitter2D;

implementation
uses
  uEmiter;

procedure LoadMaterials;
var
  I : Integer;
  F : TextFile;

begin
  mFont_Ed := font_LoadFromFile('Data\fonted.zfi');
  mFont_1 := font_LoadFromFile('Data\font_1.zfi');

  mIgdc := tex_LoadFromFile('Data\Igdc.PNG');
  m_PName := tex_LoadFromFile('Data\mName.PNG');

  mButton[1] := tex_LoadFromFile('Data\bt1.PNG');
  mButton[2] := tex_LoadFromFile('Data\bt2.PNG');
  mBgMenu := tex_LoadFromFile('Data\menu_bg1.jpg');
  mBgMenu2 := tex_LoadFromFile('Data\menu_bg2.png');
  mBg := tex_LoadFromFile('Data\bg.PNG');
  mBg2 := tex_LoadFromFile('Data\bg2.PNG');
  mBonus := tex_LoadFromFile('Data\bonus.PNG');
  tex_SetFrameSize(mBonus, 32, 32);

  mGUI_bg1 := tex_LoadFromFile('Data\GUI_bg1.PNG');
  mGUI_power := tex_LoadFromFile('Data\GUI_power.PNG');
  mGUI_magic := tex_LoadFromFile('Data\GUI_magic.PNG');
  mGUI_Health := tex_LoadFromFile('Data\GUI_Health.PNG');
  mMagic := tex_LoadFromFile('Data\mMagic.PNG');
  tex_SetFrameSize(mMagic, 64, 64);

  mPoint := tex_LoadFromFile('Data\mPoint.PNG');
  mMoney := tex_LoadFromFile('Data\mMoney.PNG');
  mQuest1 := tex_LoadFromFile('Data\mQuest1.PNG');
  mQuest1p := tex_LoadFromFile('Data\mQuest1p.PNG');
  mQuest2 := tex_LoadFromFile('Data\mQuest2.PNG');

  mBody := tex_LoadFromFile('Data\Eq\Body.PNG' );
  tex_SetFrameSize(mBody, 128, 128);
  mBroom := tex_LoadFromFile('Data\Eq\Broom.PNG' );
  tex_SetFrameSize(mBroom, 128, 128);
  mCap := tex_LoadFromFile('Data\Eq\Cap.PNG' );
  tex_SetFrameSize(mCap, 128, 128);
  mEyes := tex_LoadFromFile('Data\Eq\Eyes.PNG' );
  tex_SetFrameSize(mEyes, 128, 128);
  mHair := tex_LoadFromFile('Data\Eq\Hair.PNG' );
  tex_SetFrameSize(mHair, 128, 128);
  mHand := tex_LoadFromFile('Data\Eq\Hand.PNG' );
  tex_SetFrameSize(mHand, 128, 128);
  mMouse := tex_LoadFromFile('Data\Eq\Mouse.PNG' );
  tex_SetFrameSize(mMouse, 128, 128);
  mPants := tex_LoadFromFile('Data\Eq\Pants.PNG' );
  tex_SetFrameSize(mBody, 128, 128);
  mShirt := tex_LoadFromFile('Data\Eq\Shirt.PNG' );
  tex_SetFrameSize(mShirt, 128, 128);
  mShoes := tex_LoadFromFile('Data\Eq\Shoes.PNG' );
  tex_SetFrameSize(mShoes, 128, 128);
  mStock := tex_LoadFromFile('Data\Eq\Stock.PNG' );
  tex_SetFrameSize(mStock, 128, 128);

  LoadEmiter;

//  em_broom_magic  := emitter2d_LoadFromFile( 'Data\em_bmag.zei' );
//  em_bonus_boom   := emitter2d_LoadFromFile( 'Data\em_bonboom.zei' );
//  em_bullet_magic := emitter2d_LoadFromFile( 'Data\em_nature.zei' );
//  em_bullet_magic := emitter2d_LoadFromFile( 'Data\em_freeze.zei' );

{
  with em_bonus_boom^ do
  begin
    parParams.Texture := tex_LoadFromFile('Data\par.PNG' );
    tex_SetFrameSize(parParams.Texture,64,64);
    Params.Loop:=false;
  end; }


  pengine2d_Set( @particles );


end;
end.

