unit uCore;

interface

uses Windows, SysUtils, uPlugins;

var
  MainPlugins: array[0..4] of string = (
    '..\plugins\GLCore\GLCore.dll',
    '..\plugins\Game\Game.dll',
    '..\plugins\Menu\Menu.dll',
    '..\plugins\POA\POA.dll',
    '..\plugins\Models\Models.dll'

   {
    'GLCore.dll',
    'Game.dll',
    'Menu.dll',
    'POA.dll',
    'Models.dll'  }

  );

function InitCore: boolean;

implementation

function InitCore: boolean;
var
  I: Integer;
begin
  Result:=false;

  for I := 0 to length(MainPlugins) - 1 do
  if length(MainPlugins[i])>0 then
    if not PluginLoad(MainPlugins[i]) then
    begin
      if @OnError=nil then raise Exception.Create('Cannot load '+MainPlugins[i]) else OnError('Cannot load '+MainPlugins[i]);
      exit;
    end;
  Result:=true;
end;

end.
