unit Mform;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, KeyBoard,
  Graphics, Controls, Forms, GLScene, GLWin32FullScreenViewer,
  GLWin32Viewer, GLMisc,
  GLTexture, GLCadencer, GLSkyBox, GLBitmapFont, GLGui, ZipMstr, ExtCtrls,
  GLProxyObjects;

type
  TQForm = class(TForm)
    ML3: TGLMaterialLibrary;
    FullViewer: TGLFullScreenViewer;
    GLBitmapFont1: TGLBitmapFont;
    Cadencer: TGLCadencer;
    Zip: TZipMaster;
    Timer: TTimer;
    GLScene1: TGLScene;
    procedure FormCreate(Sender: TObject);
    procedure VieverMouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure VieverMouseUp(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure FullViewerMouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure FullViewerMouseUp(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure CadencerProgress(Sender: TObject; const deltaTime,
      newTime: Double);
    procedure FullViewerMouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

const
  C=10;

var
  QForm: TQForm;

implementation
uses
  quod_A, quod_C, Lives, ghload, Model,Shoot, Setup;

{$R *.dfm}

procedure TQForm.FormCreate(Sender: TObject);
begin
  quod_A.CreatAll;
  quod_C.loadlevel('');
end;

procedure TQForm.VieverMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
//1
end;

procedure TQForm.VieverMouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
//1
end;

procedure TQForm.FullViewerMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  GGLMouseDown(Sender,TMouseButton(Button),Shift,X,Y);
  Shoot.Shuting;
end;

procedure TQForm.FullViewerMouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  GGLMouseUp(Sender,TMouseButton(Button),Shift,X,Y);
end;

procedure TQForm.CadencerProgress(Sender: TObject; const deltaTime,
  newTime: Double);
begin
  GGLChange;
  if quod_C.WGame
  then
    begin
      dt:=deltaTime;
      Shoot.PMove;
      quod_C.presskey;
    end;

end;

procedure TQForm.FullViewerMouseMove(Sender: TObject; Shift: TShiftState;
  X, Y: Integer);
begin
//  GGLMouseMove(Sender, Shift, X, Y);

  Model.Pers[Nhero].A.RollAngle:=whatroll(0,X- Setup.WinW/2, 0, Setup.WinH/2-Y);

end;

end.
