equal
deleted
inserted
replaced
41 procedure ApplyAmmoChanges(var Hedgehog: THedgehog); |
41 procedure ApplyAmmoChanges(var Hedgehog: THedgehog); |
42 procedure SwitchNotHeldAmmo(var Hedgehog: THedgehog); |
42 procedure SwitchNotHeldAmmo(var Hedgehog: THedgehog); |
43 procedure SetWeapon(weap: TAmmoType); |
43 procedure SetWeapon(weap: TAmmoType); |
44 procedure DisableSomeWeapons; |
44 procedure DisableSomeWeapons; |
45 procedure ResetWeapons; |
45 procedure ResetWeapons; |
46 function GetAmmoByNum(num: Longword): PHHAmmo; |
46 function GetAmmoByNum(num: LongInt): PHHAmmo; |
47 function GetCurAmmoEntry(var Hedgehog: THedgehog): PAmmo; |
47 function GetCurAmmoEntry(var Hedgehog: THedgehog): PAmmo; |
48 function GetAmmoEntry(var Hedgehog: THedgehog; am: TAmmoType): PAmmo; |
48 function GetAmmoEntry(var Hedgehog: THedgehog; am: TAmmoType): PAmmo; |
49 |
49 |
50 var StoreCnt: Longword; |
50 var StoreCnt: LongInt; |
51 |
51 |
52 implementation |
52 implementation |
53 uses uVariables, uCommands, uUtils, uCaptions, uDebug; |
53 uses uVariables, uCommands, uUtils, uCaptions, uDebug; |
54 |
54 |
55 type TAmmoCounts = array[TAmmoType] of Longword; |
55 type TAmmoCounts = array[TAmmoType] of Longword; |
149 end; |
149 end; |
150 |
150 |
151 FillAmmoStore(StoresList[Pred(StoreCnt)], newAmmos) |
151 FillAmmoStore(StoresList[Pred(StoreCnt)], newAmmos) |
152 end; |
152 end; |
153 |
153 |
154 function GetAmmoByNum(num: Longword): PHHAmmo; |
154 function GetAmmoByNum(num: LongInt): PHHAmmo; |
155 begin |
155 begin |
156 TryDo(num < StoreCnt, 'Invalid store number', true); |
156 TryDo(num < StoreCnt, 'Invalid store number', true); |
157 GetAmmoByNum:= StoresList[num] |
157 GetAmmoByNum:= StoresList[num] |
158 end; |
158 end; |
159 |
159 |