unit uVar;

interface

uses zglHeader,
     uzglMyPart;

const
  SCREEN_WIDTH  = 800;
  SCREEN_HEIGHT = 600;

  HINT_1  = 'Ящик с бонусом! Не уничтожай его!';
  HINT_2  = 'Все орудия на перезарядке!';
  HINT_3  = 'Орудие осталось без боеприпасов!';
  HINT_4  = 'Самолёт! Он может перевозить что-то ценное...';
  HINT_5  = 'Боезапас орудия увеличен!';
  HINT_6  = 'Радиус взрыва увеличен!';
  HINT_7  = 'Скорость перезарядки увеличена!';
  HINT_8  = 'Цепная реакция активирована!';
  HINT_9  = 'Осколочные снаряды активированы!';

type
  TPoint  = record
    x, y : single;
  end;

  TRect  = record
    x, y, w, h : integer;
  end;


  TGameStatus = (gsSplit,
                 gsStart,
                 gsCutScene,
                 gsLevel,
                 gsGame,
                 gsGameOver,
                 gsAuthors);



  TMissle = record
    exist  : boolean;
    x, y   : single;
    fx, fy : single;
    ang    : single;
    spd    : single;
    bon    : word;
  end;

  TExplode = record
    exist : boolean;
    x, y  : single;
    r     : single;
    bon   : word;
  end;

  TBomb = record
    exist : boolean;
    x, y  : single;
    fx, fy: single;
    spd, ang   : single;
  end;

  TPlane = record
    exist : boolean;
    x, y  : single;
    spd   : single;
    bcd   : integer;
    hp    : integer;
  end;

  TSmoke = record
    exist : boolean;
    x, y  : single;
    r, a  : single;
    frame : integer;
  end;

  TSmPlace = record
    exist : boolean;
    x     : single;
  end;

  TPrize = record
    exist : boolean;
    x, y  : single;
    pType : word;
  end;

var
   GUIFont2, GUIFont3: zglPFont;

var
   gs    : TGameStatus   = gsSplit;

   sndExpl : zglPSound;

   texFire : zglPTexture;
   texExpl : zglPTexture;
   texBomb : zglPTexture;
   texRock : zglPTexture;
   texSmoke: zglPTexture;
   texPlane: zglPTexture;
   texTank : zglPTexture;
   texLaun : zglPTexture;
   texSight: zglPTexture;
   texAmmo : zglPTexture;
   texPlne2: zglPTexture;
   texMouse: zglPTexture;
   texLogo : zglPTexture;
   igdcLogo: zglPTexture;
   fgLogo  : zglPTexture;
   zglLogo : zglPTexture;
   em_fire : TEmitter;
   fr_samp : TPartSample;

   frame_timer, b_fr : integer;
   level_timer, start_timer, level_timing, end_timing, tGiO_timer, scene_timing, split_timer, split_stage       : integer;
   level             : integer = 4;
   px, py : single;
   hint_timer, hint_id      : integer;
   combo_timer, combo_points, combo_buffer : integer;
   cx, cy : single;
   inactive                 : boolean;


   missles : array [0..31]  of TMissle;
   expls   : array [0..63]  of TExplode;
   bombs   : array [0..127] of TBomb;
   tu_pos  : array [1..3]   of TPoint;
   tu_cd   : array [1..3]   of Integer;
   tu_ammo : array [1..3]   of integer;
   tu_bonus: array [1..3]   of word;
   smoke   : array [0..511] of TSmoke;
   SmPlace : array [0..63]  of TSmPlace;

   plane   : TPlane;
   prize   : TPrize;

   c_tu   : integer = 1;

   score  : integer;
   city   : integer  = 100;

const    dirMid = 'data\midi\';
         dirRes = 'data\GUI\';
         dir    = 'data\tex\';
         dirNPC = 'data\tex\npc\';


implementation

end.
