unit uGlobal;

{$mode delphi}

interface

uses
  Classes, SysUtils, zglHeader, uScene, uGMP, uMeForm, uMM, uLevelMenu;

var
  Atlas : zglPTexture;
  mFont : zglPFont;
  SceneManager : tSceneMng;

//
  GMP : TGMP;
  MainMenu : TMainMenu;
  LevelMenu : TLevelMenu;
const
  WinW = 1024;
  WinH = 768;
  TEXT_ALIGN_CENTER = TEXT_HALIGN_CENTER or TEXT_VALIGN_CENTER;
  level_path : array[1..2] of string = ('data\level\', 'data\level2\');
//
  chsize = 10;
  cgspeed = chsize / 10;
  cwallsize = trunc(chsize * 2);

  cportal_h = chsize * 3;
  cportal_w = chsize * 2;
  c_portal_key = chsize * 0.95;
  c_door_key = chsize * 0.8;
  c_music_box_min = 8;
  c_music_box_max = 32;

  cFireColor  : array[0..3] of Integer = ($ffa500, $ffb02e, $ffd975, $ff7538);
  cBloodColor : array[0..3] of Integer = ($f00000, $A01010, $B50505, $E50000);
procedure LoadTextures;

implementation

procedure LoadTextures;
begin
  vFormFont := font_LoadFromFile('data\font_1.zfi');
  mFont := vFormFont;
 { Atlas := tex_LoadFromFile('data\panel_r.png');
  Atlas_Shadow := tex_LoadFromFile('data\panel_shad.png');
  GameName := tex_LoadFromFile('data\m.png');
  mBg := tex_LoadFromFile('data\bg.png');
  mBg0 := tex_LoadFromFile('data\bg0.jpg');
  mBg2 := tex_LoadFromFile('data\bg2.png');

  mBg1_1 := tex_LoadFromFile('data\bg1_2.png');
  mBg1_3 := tex_LoadFromFile('data\bg1_3.png');
  mHeroLens := TMeDrawRect.Create(Atlas, 38, 64);
  mHeroLens.Add(512 + 0*64, 256);
  mHeroLens.Add(512 + 1*64, 256);
  mHeroLens.Add(512 + 2*64, 256);
  mHeroLens.Add(512 + 3*64, 256);
  mHeroLens.Add(512 + 4*64, 256);
  mHeroLens.Add(512 + 5*64, 256);

  mBattary := TMeDrawRect.Create(Atlas, 44, 44);
  mBattary.Add(829 + 0*64, 125);
  mBattary.Add(829 + 1*64, 125);
  mBattary.Add(829 + 2*64, 125);

  mProton := TMeDrawRect.Create(Atlas, 32, 32);
  mProton.Add(832 + 0*32, 192);
  mProton.Add(832 + 1*32, 192);
  mProton.Add(832 + 2*32, 192);
  mProton.Add(832 + 3*32, 192);

  mLazPoint := TMeDrawRect.Create(Atlas, 16, 16);
  mLazPoint.Add(832 + 0*16, 224);
  mLazPoint.Add(832 + 0*16, 224);
  mLazPoint.Add(832 + 1*16, 224);
  mLazPoint.Add(832 + 2*16, 224);
  mLazPoint.Add(832 + 3*16, 224);  }

end;

end.

