unit GMVars;

interface
  uses Windows;

const
Title='IDeyaX_OpenGL_Engine';
MouseLB=256;
MouseRB=257;
MouseMB=258;

Pi_180=Pi/180;
Pi_M180=Pi*180;
Pi_2=Pi/2;

TexW=1/256;

ActionCreate=0;
ActionSelect=1;
ActionNone=255;

MaxEnemies = 6;

type
 TMapObjects=record
 w,h:integer;
 x,y:integer;
 btype:string;
 end;

type
TBonus=record
 w,h:integer;
 x,y:integer;
 alive:boolean;
 Tid:integer;
 btype:string;
end;

type
 TExplosion=record
 alive:boolean;
 delay:integer;
 esize:integer;
 _x:integer;
 _y:integer;
 calliber:integer;
end;



TWeapondata=record
  shot_time :integer;
  types :string;
  shots_fired :integer;
  spread :integer;
  shot_size :integer;
  calliber_type :integer;
  ammo_type :string;
  bullet_capacity :integer;
  bullets_loaded :integer;
  reload_time :integer;
  inventory_place:integer;
  code :string;
  name :string;
  pic:integer;
  melee,chainsaw:boolean;
  explosive:integer;
  flamethrower:boolean;
  preference:integer;
  critical:real;
end;


Tprofile=record
  total_score:real;
  enemies_killed:integer;
  shots_fired:integer;
  shots_hit:integer;
  score_accuracy:integer;
  survived:integer;
  survived_time:integer;
  rank:string;
  damage_taken:integer;
  armour_max_health:integer;
  armour_protect:integer;
  gender:byte;
  gun_limit:integer;
  walk_speed:real;
  base_accuracy:integer;
  max_health:integer;
  max_inventory_slots:integer;
  score:integer;
  critical:integer;
  inventory:array of record
                     name:string;
                     params:array[0..3] of integer;
                     end;
end;

type
TanimKadr=record
   GFXfileId:integer;
   Binfilename:string;
   Index:integer;
   x1,y1,x2,y2:real;
   w,h:real;
   Speed:integer;
end;


 type
  TVSyncMode = (vsmSync, vsmNoSync);

 type
 TState = (sGMenu, sOptions, sRecords, sAuthor, sExit, sGame);   // состояние игры

var
  SCRW:integer;
  SCRH:integer;
  SCR2W:integer;
  SCR2H:integer;
  SCRHZ:integer; //Частота обновления
  SCRBit:integer; //Разрядность цвета
  FullScreen:boolean;
  Sync:boolean;

   AnimationBox:array of TanimKadr;


  GWHandle: hWnd;
  GWDC: HDC;
  GWHRC: HGLRC;
  GWInstance: HINST;

   CurrentTime : Longint;
   FPSLastTickCount : Longint;
   FPSFrames        : Longint;
   FPS              : Single;

   GUItexture:cardinal;

 Keys: array [0..258] of Boolean;
 MousePos:tpoint;

  MySysfont:Dword;
  MySysfont2:Dword;

   Pathstr:string='';
 GameStatus:TState=sGame;
 SelectPunkt:integer=0;
  EngineStart:boolean=false;

  wTime, wTime_Delta, wTime_Old,
  ups_delta, ups_time_old, ups_time : DWORD;

  weapondata:array[0..50] of Tweapondata;
  Bonus:array of TBonus;
  current_profile:Tprofile;

   updateRate  :integer= 6;
   precision   :integer= 1;
   speedFactor :integer= 1;
   frameDelay  :integer= 6;
   GamePaused  :boolean= false;
   game_started :integer=1;
   game_time   :real=0;

    effectnum :integer= 1;
    enemynum :integer= 1;

    EnemiesInplay :integer= 0;
    MaxHitBoxes :integer= 40;
    zombietime :integer= 0;
    bonusnum :integer= 0;
    bonses_inplay:integer=0;
    bonuses_inplay :integer= 0;
    wait_for_end :integer= 0;
    next_zombietime :real= 500;
    zombie_types:array[1..5] of string =('Zombie','Zombie','Zombie','Zombie','Zombie');
    had_gm94launcher,had_mossberg:boolean;

    force_next_bonus :string= '';
    had_steyr:boolean= false;
    had_boss:integer= 0;
    max_game_time:integer;
    ammo_remaining1:integer;
    ammo_remaining2:integer;
    inv_place:integer;
    inv_place2:integer;
    intersect_x,
    intersect_y:real;
    MaxBarrels:integer=0;
    
   StartPoints:array[0..3] of record
                              x,y:integer;
                              angle:integer;
                              end;


 Titul_menu : array[0..4] of string =
  ('Запустить игру',
   'Настройки',
   'Рекорды',
   'Автор',
   'Выход');

 Author_menu: array[0..20] of string=
  ('             Программинг:',
   '      Амосов Евгений aka Gambit_oz',
   '                   <IdeyaX studio>',
   '     e-Mail : greenrat@mail333.com',
   '',
   '             Графика:',
   '            Gambit_oz',
   '',
   '          Звуковые эффекты:',
   '             Gambit_oz',
   '',
   '       Используемые инструменты:',
   '         IDE          - Delphi 6',
   '     Графика          - Adobe Photoshop 7.0',
   '                      - 3dsmax 3.0',
   '       Sound          - www.yandex.ru',
   '',
   '',
   '',
   '      13.09.2007 - 23.09.2007',
   '       для code.darthman.com');


implementation

end.
