unit uVar;

interface

uses  QuadEngine,
      Windows,
      uStateManager,
      uSMath,
      uStar,
      uBass;

var
  Quad : IQuadRender;

var
  Timer   : IQuadTimer;
  Timer_2 : IQuadTimer;

var
  Font_1  : IQuadFont;
  Font_2  : IQuadFont;
  Font_3  : IQuadFont;

var
  AppScrW     : Word;
  AppScrH     : Word;
  AppPixelWidth : Single;
  AppPixelHeight: Single;
  AppScrResf  : rVec2f;
  AppScrResi  : rVec2i;
  AppFullScr  : Boolean = True;

var StateManager : cStateManager;

var AppInited : boolean = false;

var AppDrawTime : Double;

var GameScore : LongInt;

var
  Section_EnemyDel  : TRTLCriticalSection;
  Section_FrameUpdt : TRTLCriticalSection;

var
  //DarkSprite  : IQuadTexture;
  QuadLogo    : IQuadTexture;
  //Sky         : IQuadTexture;
  //SkyGradient : IQuadTexture;
  //TextGradient: IQuadTexture;
  Star        : IQuadTexture;

  Player      : IQuadTexture;
  Enemy_1     : IQuadTexture;
  Enemy_2     : IQuadTexture;
  Enemy_2_flm : IQuadTexture;
  Enemy_3     : IQuadTexture;
  Enemy_3_flm : IQuadTexture;
  Enemy_2_2   : IQuadTexture;
  Enemy_2_2_flm : IQuadTexture;
  //Enemy_4     : IQuadTexture;
  //Enemy_5     : IQuadTexture;
  Enemy_6     : IQuadTexture;
  Bullet_1    : IQuadTexture;
  Bullet_2    : IQuadTexture;
  Bullet_3    : IQuadTexture;
  Bullet_4    : IQuadTexture;
  Explosion_1 : IQuadTexture;
  //Explosion_2 : IQuadTexture;
  //Explosion_3 : IQuadTexture;
  //Explosion_4 : IQuadTexture;
  //Explosion_5 : IQuadTexture;
  //Explosion_6 : IQuadTexture;
  Explosion_7 : IQuadTexture;
  //Explosion_8 : IQuadTexture;
  Explosion_9 : IQuadTexture;
  //Explosion_10: IQuadTexture;
  Explosion_11: IQuadTexture;

var
  ScreenBuf_0 : IQuadTexture;
  ScreenBuf_1 : IQuadTexture;
  ScreenBuf_2 : IQuadTexture;
  ScreenBuf_3 : IQuadTexture;
  BloomBuf_1  : IQuadTexture;
  BloomBuf_2  : IQuadTexture;
  BloomBuf_3  : IQuadTexture;

var
  UseShaders  : Boolean;
  ShadersSup  : Boolean;

var
  StarsBloomShader  : IQuadShader;
  OldTVShader       : IQuadShader;
  //BlurCHShader      : IQuadShader;
  //BlurCVShader      : IQuadShader;
  BloomShader       : IQuadShader;
  BlurHShader       : IQuadShader;
  BlurVShader       : IQuadShader;

var
  AppPixelSize      : array [ 1 .. 2 ] of Single;
  AppPixelSizeBlur  : array [ 1 .. 2 ] of Single;
  AppBlurPO_X       : array [ 1 .. 4, 1 .. 4 ] of Single;
  AppBlurPO_Y       : array [ 1 .. 4, 1 .. 4 ] of Single;
  AppBlurCof        : Single;
  AppPixelSizeOldTV : array [ 1 .. 2 ] of Single;
  AppOldTVCof       : Single;

var
  Music     : tSound;
  sndShoot_1: tSound;
  sndShoot_2: tSound;
  sndShoot_3: tSound;
  sndExplo_1: tSound;
  sndExplo_2: tSound;

implementation

end.

