equal
deleted
inserted
replaced
37 {$INCLUDE options.inc} |
37 {$INCLUDE options.inc} |
38 type PHedgehog = ^THedgehog; |
38 type PHedgehog = ^THedgehog; |
39 PTeam = ^TTeam; |
39 PTeam = ^TTeam; |
40 PHHAmmo = ^THHAmmo; |
40 PHHAmmo = ^THHAmmo; |
41 THedgehog = record |
41 THedgehog = record |
42 Name: string[15]; |
42 Name: string[MAXNAMELEN]; |
43 Gear: PGear; |
43 Gear: PGear; |
44 NameRect, HealthRect, HealthTagRect: TSDL_Rect; |
44 NameRect, HealthRect, HealthTagRect: TSDL_Rect; |
45 Ammo: PHHAmmo; |
45 Ammo: PHHAmmo; |
46 CurSlot, CurAmmo: LongWord; |
46 CurSlot, CurAmmo: LongWord; |
47 AltSlot, AltAmmo: LongWord; |
47 AltSlot, AltAmmo: LongWord; |
52 end; |
52 end; |
53 THHAmmo = array[0..cMaxSlotIndex, 0..cMaxSlotAmmoIndex] of TAmmo; |
53 THHAmmo = array[0..cMaxSlotIndex, 0..cMaxSlotAmmoIndex] of TAmmo; |
54 TTeam = record |
54 TTeam = record |
55 Next: PTeam; |
55 Next: PTeam; |
56 Color: Cardinal; |
56 Color: Cardinal; |
57 TeamName: string[15]; |
57 TeamName: string[MAXNAMELEN]; |
58 ExtDriven: boolean; |
58 ExtDriven: boolean; |
59 Aliases: array[0..cKeyMaxIndex] of shortstring; |
59 Aliases: array[0..cKeyMaxIndex] of shortstring; |
60 Hedgehogs: array[0..cMaxHHIndex] of THedgehog; |
60 Hedgehogs: array[0..cMaxHHIndex] of THedgehog; |
61 Ammos: array[0..cMaxHHIndex] of THHAmmo; |
61 Ammos: array[0..cMaxHHIndex] of THHAmmo; |
62 CurrHedgehog: integer; |
62 CurrHedgehog: integer; |
147 function AddTeam: PTeam; |
147 function AddTeam: PTeam; |
148 begin |
148 begin |
149 New(Result); |
149 New(Result); |
150 TryDo(Result <> nil, 'AddTean: Result = nil', true); |
150 TryDo(Result <> nil, 'AddTean: Result = nil', true); |
151 FillChar(Result^, sizeof(TTeam), 0); |
151 FillChar(Result^, sizeof(TTeam), 0); |
152 Result.AttackBar:= 1; |
152 Result.AttackBar:= 2; |
153 if TeamsList = nil then TeamsList:= Result |
153 if TeamsList = nil then TeamsList:= Result |
154 else begin |
154 else begin |
155 Result.Next:= TeamsList; |
155 Result.Next:= TeamsList; |
156 TeamsList:= Result |
156 TeamsList:= Result |
157 end; |
157 end; |