hedgewars/uGears.pas
changeset 2699 249adefa9c1c
parent 2695 ed789a7ef68d
child 2716 b9ca1bfca24f
equal deleted inserted replaced
2698:90585aba87ad 2699:249adefa9c1c
    57 			TriggerId: Longword;
    57 			TriggerId: Longword;
    58 			FlightTime: Longword;
    58 			FlightTime: Longword;
    59 			uid: Longword
    59 			uid: Longword
    60 			end;
    60 			end;
    61 
    61 
       
    62 procedure init_uGears;
       
    63 procedure free_uGears;
    62 function  AddGear(X, Y: LongInt; Kind: TGearType; State: Longword; dX, dY: hwFloat; Timer: LongWord): PGear;
    64 function  AddGear(X, Y: LongInt; Kind: TGearType; State: Longword; dX, dY: hwFloat; Timer: LongWord): PGear;
    63 procedure ProcessGears;
    65 procedure ProcessGears;
    64 procedure ResetUtilities;
    66 procedure ResetUtilities;
    65 procedure ApplyDamage(Gear: PGear; Damage: Longword);
    67 procedure ApplyDamage(Gear: PGear; Damage: Longword);
    66 procedure SetAllToActive;
    68 procedure SetAllToActive;
    70 procedure AddMiscGears;
    72 procedure AddMiscGears;
    71 procedure AssignHHCoords;
    73 procedure AssignHHCoords;
    72 procedure InsertGearToList(Gear: PGear);
    74 procedure InsertGearToList(Gear: PGear);
    73 procedure RemoveGearFromList(Gear: PGear);
    75 procedure RemoveGearFromList(Gear: PGear);
    74 
    76 
    75 var CurAmmoGear: PGear = nil;
    77 var CurAmmoGear: PGear;
    76     GearsList: PGear = nil;
    78     GearsList: PGear;
    77     KilledHHs: Longword = 0;
    79     KilledHHs: Longword;
    78     SuddenDeathDmg: Boolean = false;
    80     SuddenDeathDmg: Boolean;
    79     SpeechType: Longword = 1;
    81     SpeechType: Longword;
    80     SpeechText: shortstring;
    82     SpeechText: shortstring;
    81 	TrainingTargetGear: PGear = nil;
    83     TrainingTargetGear: PGear;
    82 	skipFlag: boolean = false;
    84     skipFlag: boolean;
    83 
    85 
    84 implementation
    86 implementation
    85 uses uWorld, uMisc, uStore, uConsole, uSound, uTeams, uRandom, uCollisions,
    87 uses uWorld, uMisc, uStore, uConsole, uSound, uTeams, uRandom, uCollisions, uLand, uIO, uLandGraphics,
    86 	uLand, uIO, uLandGraphics, uAIMisc, uLocale, uAI, uAmmos, uTriggers,
    88 	uAIMisc, uLocale, uAI, uAmmos, uTriggers, uStats, uVisualGears,
    87 {$IFDEF GLES11}
    89 {$IFDEF GLES11}
    88 	gles11,
    90 	gles11;
    89 {$ELSE}
    91 {$ELSE}
    90 	GL,
    92 	GL;
    91 {$ENDIF}
    93 {$ENDIF}
    92 	uStats, uVisualGears;
       
    93 
    94 
    94 const MAXROPEPOINTS = 384;
    95 const MAXROPEPOINTS = 384;
    95 var RopePoints: record
    96 var RopePoints: record
    96                 Count: Longword;
    97                 Count: Longword;
    97                 HookAngle: GLfloat;
    98                 HookAngle: GLfloat;
  2039 	DeleteGear(Gear);
  2040 	DeleteGear(Gear);
  2040 	Gear:= nil
  2041 	Gear:= nil
  2041 	end
  2042 	end
  2042 end;
  2043 end;
  2043 
  2044 
  2044 initialization
  2045 procedure init_uGears;
  2045 
  2046 begin
  2046 finalization
  2047 	CurAmmoGear:= nil;
  2047 FreeGearsList;
  2048 	GearsList:= nil;
       
  2049 	KilledHHs:= 0;
       
  2050 	SuddenDeathDmg:= false;
       
  2051 	SpeechType:= 1;
       
  2052 	TrainingTargetGear:= nil;
       
  2053 	skipFlag:= false;
       
  2054 end;
       
  2055 
       
  2056 procedure free_uGears;
       
  2057 begin
       
  2058 	FreeGearsList();
       
  2059 end;
  2048 
  2060 
  2049 end.
  2061 end.