unit Types;

interface

uses
 tstring;

type

{$ifndef unix}
	lint=longint;
	sint=integer;
	sword=word;

	mkstring=string;
{$else}
	lint=integer(32);
	sint=integer(16);
	sword=word(16);
{$endif}

 tp_SchiffTyp=^t_schifftyp;
 t_SchiffTyp=object
  RassenFlags,
  MissionFlags,

  Masse,
  Schild,
  Huelle,
  MinCrew,
  MaxCrew,
  MaxMasse,
  MaxFuel,
  CostCred,
  CostMolyb,
  CostDura,
  CostTrit:lint;
  TypNr,
  Bild,
  TechLvl,
  Enganz,
  maxBeams,
  maxTorps,
  maxBays,
  MaxMines:sword;

  Name:string20;
 end;

 tp_Schiff=^t_Schiff;
 t_Schiff=record
  typnr:sword;
  ID_NR,
  Mission1,
  BeamTyp,
  Engtyp,
  TorpRohreTyp,
  Beams,
  TorpRohre,
  Bays,
  Minenleger:byte;

  Mission2,
  Mission3,{mission3,oldmission1,oldmission2}
  Mission4,
  Colons,
  Crew:lint;
  fighter,
  Owner,
  Damage,
  Cred,
  Supplies,
  Neutr,
  Molyb,
  Dura,
  Trit,
  warp:sint;
  Posx,
  Posy,
  Posz,
  Targetx,
  Targety,
  Targetz:sint;
  Torps,
  Minen:array[1..9] of sint;
  Schiffname:string30;
 end;

 tp_Minenfeld=^t_Minenfeld;
 t_Minenfeld=record
  Id_nr,
  owner,
  knownto,
  Anz:lint;
  Posx,
  Posy,
  Posz:sint;
  TypID:byte;
 end;

 tp_BeamWeapon=^t_BeamWeapon;
 t_BeamWeapon=record
  ID_nr,
  Bild,
  TechLvl,
  CostCred,
  CostMolyb,
  CostDura,
  CostTrit,
  Kill,
  Destroy,
  range:sword;
  Name:string20;
 end;

 tp_Torpedo=^t_Torpedo;
 t_Torpedo=record
  ID_nr,
  Bild,
  TechLvl,
  CostCred,
  CostMolyb,
  CostDura,
  CostTrit,
  Kill,
  Destroy,
  range:sword;
  Name:string20;
 end;


 tp_TorpRohr=^t_TorpRohr;
 t_TorpRohr=record
  Id_nr,
  Bild,
  TechLvl,
  CostCred,
  CostMolyb,
  CostDura,
  CostTrit,
  recharge:sword;
  Name:string20;
 end;

 tp_Mine=^t_Mine;
 t_Mine=record
  ID_nr,
  Bild,
  TechLvl,
  CostCred,
  CostMolyb,
  CostDura,
  CostTrit,
  Kill,
  Destroy:sword;
  Name:string20;
 end;

 tp_planet=^t_planet;
 t_planet=record
  id_nr,
  knownto,
  Size,

  Neutr,
  Molyb,
  Dura,
  Trit,

  Creds,
  Supplies,
  MinedNeutr,
  MinedMolyb,
  MinedDura,
  MinedTrit,

  NativeAnz,
  Raceanz:lint;
  Mission,
  NativeTax,
  RaceTax,
  bild,
  Climate,
  VertNeutr,
  vertMolyb,
  vertDura,
  vertTrit,
  Mines,
  Facts,
  Defs,
  forts,
  NativeTyp,
  Racetyp,
  NativeCont,
  RaceCont:sword;
  Posx,
  Posy,
  Posz:sint;
  name:string20;
 end;

 tp_starbase=^t_starbase;
 t_starbase=record
  id_nr,

  RepairID,

  Creds,
  Supplies,
  Neutr,
  Molyb,
  Dura,
  Trit,

  Crew:lint;

  fighter,
  defs,
  techH,
  techE,
  TechB,
  TechT,
  TechTl,
  TechM,
  Mission1,
  Owner:byte;

  damage,
  Posx,
  Posy,
  Posz:sint;

  CanBuild:array[0..4] of lint;

  build:record
   hullid,
   beamtyp,
   torprtyp,
   engid:byte;
   beams,
   torprs,
   mines,
   bays:sint;
  end;

  storage:array[0..2,1..9] of shortint;
  stml,
  stba:shortint;

  Torps,
  Minen:array[1..9] of sint;
  name:string20;
 end;

 tp_Engine=^t_Engine;
 t_Engine=record
  ID_nr,
  Bild,
  TechLvl,
  CostCred,
  CostMolyb,
  CostDura,
  CostTrit:sword;
  FuelUse:array[1..9] of lint;
  Name:string20;
 end;

 t_Markierung=record
  id_nr,
  knownto:lint;
  x1,y1,z1,
  x2,y2,z2,
  x3,y3,z3,
  farbe,
  owner:sword;
 end;

 tp_message=^t_message;
 t_message=array[0..29] of pstring;

 t_msgtag=object
  concern1,
  concern2,
  concern3:byte;
  ofs:lint;
 end;
 tp_messagelist=^t_messagelist;
 t_messagelist=array[0..1999] of t_msgtag;

 t_wmsgtag=record
  rassen,
  ofs:lint;
 end;
 ta_wmsg=array[0..32] of t_wmsgtag;

 tp_planets1=^ta_planets1;
 tp_planets2=^ta_planets2;
 ta_planets1=array[0..499] of t_planet;
 ta_planets2=array[500..999] of t_planet;

 tp_ships1=^ta_schiff1;
 tp_ships2=^ta_schiff2;
 tp_ships3=^ta_schiff3;
 tp_ships4=^ta_schiff4;
 tp_ships5=^ta_schiff5;
 tp_ships6=^ta_schiff6;
 tp_ships7=^ta_schiff7;
 ta_schiff1=array[0000..0499] of t_schiff;
 ta_schiff2=array[0500..0999] of t_schiff;
 ta_schiff3=array[1000..1499] of t_schiff;
 ta_schiff4=array[1500..1999] of t_schiff;
 ta_schiff5=array[2000..2499] of t_schiff;
 ta_schiff6=array[2500..2999] of t_schiff;
 ta_schiff7=array[3000..3499] of t_schiff;

 tp_bases1=^t_bases1;
 tp_bases2=^t_bases2;
 tp_bases3=^t_bases3;
 tp_bases4=^t_bases4;
 t_bases1=array[000..0299] of t_starbase;
 t_bases2=array[300..0599] of t_starbase;
 t_bases3=array[600..0899] of t_starbase;
 t_bases4=array[900..1199] of t_starbase;

 tp_mfelder=^t_mfelder;
 t_mfelder=array[0..149] of t_minenfeld;

 t_engines=array[0..9] of t_engine;
 t_Beams=array[0..10] of t_BeamWeapon;
 t_Mines=array[0..10] of t_mine;
 t_Torps=array[0..10] of t_torpedo;
 t_Torprohre=array[0..10] of t_torprohr;

 t_hulls=array[0..159] of t_schifftyp;

 t_bdata=record
  x1,y1:sword;
  px,py,x,y,c,h:byte;
 end;

 tp_hplanet=^ta_hplanet;
 ta_hplanet=array[0..499] of t_planet;
 tap_hplanet=array[0..1,0..1] of record
  p:tp_hplanet;
  h:sword;
 end;

 tp_hschiff=^ta_hschiff;
 ta_hschiff=array[0..499] of t_schiff;
 tap_hschiff=array[0..1,0..6] of record
  p:tp_hschiff;
  h:sword;
 end;

 tp_hbasis=^ta_hbasis;
 ta_hbasis=array[0..299] of t_starbase;
 tap_hbasis=array[0..1,0..3] of record
  p:tp_hbasis;
  h:sword;
 end;

 ta_hmfeld=array[0..2399] of t_minenfeld;
 tpa_hmfeld=^ta_hmfeld;
 tap_hmfeld=array[0..1] of record
  p:tpa_hmfeld;
  h:sword;
 end;

 t_hmsgtag=object(t_msgtag)
  len:sword;
  free:sint;
  lines:byte;
 end;
 tp_hmsgs=^t_hmsgs;
 t_hmsgs=array[0..1999] of t_hmsgtag;

Implementation
end.