home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 November / Chip_2002-11_cd1.bin / ctenari / Majda / Org / OrgInterface.pas < prev    next >
Pascal/Delphi Source File  |  2002-09-14  |  3KB  |  73 lines

  1. unit OrgInterface;
  2.  
  3. interface
  4.  
  5. uses
  6.   Graphics;
  7.  
  8. const
  9.   MaxURCount = 256;   // new in M2
  10.   InvalidUR = MaxInt; // new in M2
  11.  
  12. type
  13.   TMoveDirection = (N, W, S, E);
  14.  
  15.   TOptions = record // new in M2
  16.     FuzzyAttack: Boolean;
  17.     EnergyPerStep: Integer;
  18.     DistributeEnergy: Boolean;
  19.     ChemGoAway: Boolean;
  20.   end;
  21.  
  22.   IVLFOrganism = interface
  23.     function Mass: Byte; stdcall;
  24.     function FoodIn: Byte; stdcall;
  25.     function Energy: Byte; stdcall;
  26.     function X: Integer; stdcall;
  27.     function Y: Integer; stdcall;
  28.     function MaxY: Integer; stdcall;
  29.     function MaxX: Integer; stdcall;
  30.     function Color: TColor; stdcall;
  31.     function Species: PChar; stdcall;
  32.     function Age: Integer; stdcall;
  33.     function MaxAge: Integer; stdcall;
  34.     function GenCount: Integer; stdcall;
  35.     function UR(index: Byte): Integer; stdcall;
  36.     function MinX: Integer; stdcall;                      // new in M2
  37.     function MinY: Integer; stdcall;                      // new in M2
  38.     function MaxMoveDist: Integer; stdcall;               // new in M2
  39.     function AllocedURCount: Integer; stdcall;            // new in M2
  40.     procedure GetOptions(var Options: TOptions); stdcall; // new in M2
  41.     function ForeignUR(index: Byte): Integer; stdcall;    // new in M2
  42.     function ForeignAllocedURCount: Integer; stdcall;     // new in M2
  43.  
  44.     function Eat(Value: Byte): Byte; stdcall;             // changed in M2
  45.     function Build(Value: Byte): Byte; stdcall;           // changed in M2
  46.     function Digest(Value: Byte): Byte; stdcall;          // changed in M2
  47.     function Move(Direction: TMoveDirection; Distance: Integer): Integer; stdcall; // changed in M2
  48.     function Spread(Value: Byte): Byte; stdcall;          // changed in M2
  49.     function Secrete(Value: Byte): Byte; stdcall;         // changed in M2
  50.     procedure DivCell; stdcall;
  51.     function Attack: Boolean; stdcall;                    // changed in M2
  52.     procedure Die; stdcall;
  53.     function FoodAt(AX, AY: Integer): Byte; stdcall;
  54.     function OrgAt(AX, AY: Integer): PChar; stdcall;
  55.     function SetUR(index: Byte; Value: Integer): Boolean; stdcall;        // changed in M2
  56.     function SetForeignUR(index: Byte; Value: Integer): Boolean; stdcall; // changed in M2
  57.     procedure SetColor(R, G, B: Byte); stdcall;
  58.     function Exclude(Radius: Integer; Value: Byte): Integer; stdcall;     // changed in M2
  59.     function ChemAt(AX, AY: Integer): Byte; stdcall;
  60.     function AllocUR(Count: Integer): Integer; stdcall;                   // new in M2
  61.   end;
  62.  
  63. function OrgRequiredVersion: Integer; stdcall;
  64.  
  65. implementation
  66.  
  67. function OrgRequiredVersion: Integer;
  68. begin
  69.   Result := $00040000;
  70. end;
  71.  
  72. end.
  73.