equal
deleted
inserted
replaced
295 |
295 |
296 function HW_getAmmoCounts(counts: PLongInt): LongInt; cdecl; export; |
296 function HW_getAmmoCounts(counts: PLongInt): LongInt; cdecl; export; |
297 var a : PHHAmmo; |
297 var a : PHHAmmo; |
298 slot, index: LongInt; |
298 slot, index: LongInt; |
299 begin |
299 begin |
300 if (CurrentTeam^.ExtDriven) or (CurrentTeam^.Hedgehogs[0].BotLevel <> 0) then |
300 if (CurrentTeam = nil) or |
|
301 (CurrentHedgehog = nil) or |
|
302 (CurrentTeam^.ExtDriven) or |
|
303 (CurrentTeam^.Hedgehogs[0].BotLevel <> 0) then |
301 exit(-1); |
304 exit(-1); |
|
305 |
302 a:= CurrentHedgehog^.Ammo; |
306 a:= CurrentHedgehog^.Ammo; |
303 for slot:= 0 to cMaxSlotIndex do |
307 for slot:= 0 to cMaxSlotIndex do |
304 for index:= 0 to cMaxSlotAmmoIndex do |
308 for index:= 0 to cMaxSlotAmmoIndex do |
305 if a^[slot,index].Count <> 0 then // yes, ammomenu is hell |
309 if a^[slot,index].Count <> 0 then // yes, ammomenu is hell |
306 counts[ord(a^[slot,index].AmmoType)-1]:= a^[slot,index].Count; |
310 counts[ord(a^[slot,index].AmmoType)-1]:= a^[slot,index].Count; |
312 begin |
316 begin |
313 for a:= Low(TAmmoType) to High(TAmmoType) do |
317 for a:= Low(TAmmoType) to High(TAmmoType) do |
314 skipTurns[ord(a)-1]:= byte(Ammoz[a].SkipTurns); |
318 skipTurns[ord(a)-1]:= byte(Ammoz[a].SkipTurns); |
315 end; |
319 end; |
316 |
320 |
317 function HW_getTurnsForCurrentTeam:LongInt; cdecl; export; |
321 function HW_getTurnsForCurrentTeam: LongInt; cdecl; export; |
318 begin |
322 begin |
319 exit(CurrentTeam^.Clan^.TurnNumber); |
323 exit(CurrentTeam^.Clan^.TurnNumber); |
320 end; |
324 end; |
321 |
325 |
322 function HW_getMaxNumberOfHogs: LongInt; cdecl; export; |
326 function HW_getMaxNumberOfHogs: LongInt; cdecl; export; |