///////////////////////////////////////////////////////////////////////
// Copyright (C) Andru 2007                                          //
// mail: dr.andru@gmail.com                                          //
// site: http://andru.2x4.ru                                         //
//                                                                   //
// OMEGA Engine is free software.                                    //
//                                                                   //
// You may redistribute it and/or modify it under the terms of the   //
// GNU General Public License, as published by the Free Software     //
// Foundation; either version 2 of the License, or (at your option)  //
// any later version.                                                //
//                                                                   //
// this module is distributed in the hope that it will be useful,    //
// but WITHOUT ANY WARRANTY; without even the implied warranty of    //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.              //
// See the GNU General Public License for more details.              //
//                                                                   //
// You should have received a copy of the GNU General Public License //
// along with this module.  If not, write to:                        //
// 	The Free Software Foundation, Inc.,                              //
// 	51 Franklin Street, Fifth Floor                                  //
// 	Boston, MA  02110-1301, USA.                                     //
///////////////////////////////////////////////////////////////////////
unit ENGINE_VAR;

{$I DEFINES.pas}

interface
uses
  Windows,

  ENGINE_TIMERS,
  ENGINE_CONST
  ;

procedure ZeroProc;

var
//----------------------------------------------------------------------------//
//-------------------------------- Î Ê Í Î -----------------------------------//
//----------------------------------------------------------------------------//
  wnd_HWND  : HWND;
  wnd_DC    : HDC;
  wnd_GLRC  : HGLRC;
  wnd_INST  : HINST;
  wnd_Class : TWndClassEx;

  wnd_X        : Integer;
  wnd_Y        : Integer;
  wnd_Width    : Integer;
  wnd_Height   : Integer;
  wnd_CpnSize  : Integer;
  wnd_BrdSizeX : Integer;
  wnd_BrdSizeY : Integer;
  wnd_Style    : DWORD;
  wnd_StyleEx  : DWORD;

  wnd_Caption : PChar = wnd_ClassName;

//----------------------------------------------------------------------------//
//------------------------------ "Ý Ê Ð À Í" ---------------------------------//
//----------------------------------------------------------------------------//
  scr_OLDSettings : DEVMODE;
  scr_NOWSettings : DEVMODE;

  scr_Width   : Integer;
  scr_Height  : Integer;
  scr_BPP     : Integer;
  scr_Refresh : Integer;
  scr_VSync   : Boolean;

  scr_ScaleX  : Single = 1;
  scr_ScaleY  : Single = 1;

//----------------------------------------------------------------------------//
//-------------------------- Ï Ð È Ë Î Æ Å Í È Å -----------------------------//
//----------------------------------------------------------------------------//
  app_Dir : PChar;

  app_FullScreen : Boolean;

  app_InitType  : Byte;
  app_Init      : Boolean;
  app_CanClose  : Boolean = TRUE;
  app_Work      : Boolean;
  app_Pause     : Boolean;
  app_AutoPause : Boolean = TRUE;
  app_Focus     : Boolean;

  app_PFInit : Pointer = @ZeroProc;
  app_PInit  : Pointer = @ZeroProc;
  app_PDraw  : Pointer = @ZeroProc;
  app_PQuit  : Pointer = @ZeroProc;
  app_PWndProcBefor  : function ( hWnd : HWND; Msg : UINT; wParam : WPARAM; lParam : LPARAM ) : LRESULT; stdcall;
  app_PWndProcAfter  : function ( hWnd : HWND; Msg : UINT; wParam : WPARAM; lParam : LPARAM ) : LRESULT; stdcall;
  app_ConsoleMessage : procedure( Message : PChar; Len : Integer );

  app_Timer  : PTimer;
  app_Timers : Integer;

  app_FPS       : Integer;
  app_FPSCount  : Integer;
  app_FPS_TIMER : Integer = 1;

  app_AllFPS   : DWORD;
  app_AllTime  : DWORD;

  app_Cursor     : Boolean;
  app_HaltOnExit : Boolean;

  app_Text : String;

  app_Log : Boolean;

  app_ShowWarnings : Boolean = TRUE;
  app_ShowErrors   : Boolean = TRUE;

//----------------------------------------------------------------------------//
//------------------------------- O P E N G L --------------------------------//
//----------------------------------------------------------------------------//

  ogl_Version : Single;
  ogl_Extensions  : String;

  ogl_3DAccelerator : Boolean;

  ogl_MaxTextureSize : Integer;
  ogl_CanCompressTex : Boolean;
  ogl_MaxAnisotropy  : Integer;
  ogl_Anisotropy     : Integer;

  ogl_X      : Integer;
  ogl_Y      : Integer;
  ogl_Width  : Integer;
  ogl_Height : Integer;
 
  ogl_Stencil : Byte;
  ogl_ZBits   : Byte;

//----------------------------------------------------------------------------//
//------------------------ Ä Î Ï Î Ë Í È Ò Å Ë Ü Í Î -------------------------//
//----------------------------------------------------------------------------//
  time_ConsoleInterval : DWORD;
  time_ConsoleLast     : DWORD;

  time_FPSLast         : DWORD;

  TempString           : String;

  CropX                : Integer;
  CropY                : Integer;
  CropW                : Integer;
  CropH                : Integer;

//----------------------------------------------------------------------------//
                                 IMPLEMENTATION
//----------------------------------------------------------------------------//

procedure ZeroProc;
Begin
End;

end.
