library Models;

uses
  ShareMem,
  uLegs in 'uLegs.pas',
  uBody in 'uBody.pas',
  uWeapons in 'uWeapons.pas',
  uBullets in 'uBullets.pas',
  uPlants in 'uPlants.pas',
  uHouses in 'uHouses.pas',
  uGlobal in '..\uGlobal.pas';

type
  TCallState = (onGetProcsList, onInit, onDeInit, onProgress);
  TStringArray = array of string;

procedure Add(var SA: TStringArray; Name: string);
begin
  SetLength(SA,length(SA)+1);
  SA[length(SA)-1]:=Name;
end;

function MainProc(State: TCallState): TStringArray; stdcall;
begin
  case State of
    onGetProcsList:
      begin
        Add(Result,'model_legs_biped');
        Add(Result,'model_legs_biped_physic');
        Add(Result,'model_body');
        Add(Result,'model_weapon');
        Add(Result,'model_bullet');

        Add(Result,'model_cactus');

        Add(Result,'model_saloon');
        Add(Result,'model_house');
        Add(Result,'model_jail');
      end;

    onInit:
      begin
      end;
    onDeInit:
      begin
      end;
  end;
end;

procedure SendHandles(Procs: array of pointer); stdcall;
begin
  Call:=Procs[0];
  PluginLoad:=Procs[1];
  PluginLoaded:=Procs[2];
end;

exports
  MainProc,
  SendHandles,

  model_legs_biped,
  model_legs_biped_physic,
  model_body,
  model_weapon,
  model_bullet,

  model_cactus,

  model_saloon,
  model_house,
  model_jail;

begin
end.
