program ROAD;

uses
  windows,MagicV2MEngine,
  math,
  RoadUnit in 'RoadUnit.pas',
  RoadPhysic in 'RoadPhysic.pas',
  RoadGraphic in 'RoadGraphic.pas',
  RoadSound in 'RoadSound.pas',
  RoadSys in 'RoadSys.pas',
  opengl,
  RoadGlobal in 'RoadGlobal.pas',
  GLRender in 'GLRender.pas',
  Scenes in 'Scenes.pas',
  SnakeUnits in 'SnakeUnits.pas';

{$APPTYPE CONSOLE}
type
  T3Vertex  = packed record
    X,Y,Z : Single;
  end;
  T2Vertex  = packed record
    X,Y : Single;
  end;

  TQuad = packed record
    q1,q2,q3,q4 : T3Vertex;
  end;

  TQuad2 = packed record
    q1,q2,q3,q4 : T2Vertex;
  end;
const
  MaxMap  = 256;

var
Font :  TGraphicFont;

begin
  Randomize;
  try
  V2mPlayFile('pocketrocket.v2m',True);
    Application.ChangeDisplayMode(800,600,32);
  Application.InitFullScreen;
//  Application.InitWindowed(0,0,600,500);
  Render  :=  TGLRender.Create;
  Render.InitRender(Application.Window.Handle,Application.Window.DC);
//  Font  :=  Render.CreateVectorFont('Arial Black',24);
  TSceneIntro.Create;
//  ChangeScene(TSceneIntro);
//  TSceneIntro.Create.DrawScene;
//  Scene.DrawScene;
//  Application.SetUpdateProc(@Upd);
//  Application.SetRenderProc(@Rend);
  Application.Run(50);
  finally
//  Font.Free;
  V2mStop;
  Render.Free;
  Application.ChangeDisplayModeToDefault;
  end;
end.

