///////////////////////////////////////////////////////////////////////
// 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 PLUGIN_MAIN;

{$I DEFINES.pas}

interface
uses
  ENGINE_VAR,

  ENGINE_FLAGS,
  ENGINE_SCREEN,
  ENGINE_CONSOLE,

  G2D_CAMERA;

const
  gENGINE_HWND    = $000000; //PDWORD^
  gENGINE_DC      = $000001; //PDWORD^
  gENGINE_GLRC    = $000002; //PDWORD^
  gENGINE_LOG     = $000008; //PBoolean^
  gENGINE_FLAGS   = $000010; //PDWORD
  gENGINE_APPDIR  = $000015; //PChar

  gOGL_WIDTH      = $000003; //PInteger^
  gOGL_HEIGHT     = $000004; //PInteger^
  gOGL_EXTENSIONS = $000009; //PChar

  gCURRENT_CAM2D  = $000005; //PPCamera2D^

  gCONSOLE_ACTIVE = $000011; //PBoolean;

  gSCREEN_SCALEX  = $000006;
  gSCREEN_SCALEY  = $000007;


function P_GetParams( What : Integer ) : Pointer; stdcall;

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

function P_GetParams;
Begin

case What of
gENGINE_HWND   : Result := @wnd_HWND;
gENGINE_DC     : Result := @wnd_DC;
gENGINE_GLRC   : Result := @wnd_GLRC;
gENGINE_LOG    : Result := @app_Log;
gENGINE_FLAGS  : Result := @F_Flags;
gENGINE_APPDIR : Result := PChar( app_Dir );

gOGL_WIDTH     : Result := @ogl_Width;
gOGL_HEIGHT    : Result := @ogl_Height;
gOGL_EXTENSIONS: Result := PChar( ogl_Extensions );

gCURRENT_CAM2D : Result := @Cam2D;

gCONSOLE_ACTIVE : Result := @Console.Active;

gSCREEN_SCALEX : Result := @scr_ScaleX;
gSCREEN_SCALEY : Result := @scr_ScaleY;
end;

End;

end.
