hedgewars/PascalExports.pas
changeset 3973 0d1a420531ef
parent 3952 d6412423da45
child 3981 928e2040d34f
equal deleted inserted replaced
3972:93212a97f01a 3973:0d1a420531ef
     1 (*
     1 (*
     2  *  PascalExports.pas
     2  * Hedgewars, a free turn based strategy game
     3  *  hwengine
     3  * Copyright (c) 2004-2011 Andrey Korotaev <unC0Rr@gmail.com>
     4  *
     4  *
     5  *  Created by Vittorio on 09/01/10.
     5  * This program is free software; you can redistribute it and/or modify
     6  *  Copyright 2009 __MyCompanyName__. All rights reserved.
     6  * it under the terms of the GNU General Public License as published by
       
     7  * the Free Software Foundation; version 2 of the License
     7  *
     8  *
       
     9  * This program is distributed in the hope that it will be useful,
       
    10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    12  * GNU General Public License for more details.
       
    13  *
       
    14  * You should have received a copy of the GNU General Public License
       
    15  * along with this program; if not, write to the Free Software
       
    16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
     8  *)
    17  *)
     9 
       
    10 
    18 
    11 {$INCLUDE "options.inc"}
    19 {$INCLUDE "options.inc"}
    12 
    20 
    13 unit PascalExports;
    21 unit PascalExports;
    14 
    22 
   282     if (CurrentTeam^.ExtDriven) or (CurrentTeam^.Hedgehogs[0].BotLevel <> 0) then
   290     if (CurrentTeam^.ExtDriven) or (CurrentTeam^.Hedgehogs[0].BotLevel <> 0) then
   283         exit(-1);
   291         exit(-1);
   284     a:= CurrentHedgehog^.Ammo;
   292     a:= CurrentHedgehog^.Ammo;
   285     for slot:= 0 to cMaxSlotIndex do
   293     for slot:= 0 to cMaxSlotIndex do
   286         for index:= 0 to cMaxSlotAmmoIndex do
   294         for index:= 0 to cMaxSlotAmmoIndex do
   287             counts[ord(a^[slot,index].AmmoType)-1]:= a^[slot,index].Count;
   295             if a^[slot,index].Count <> 0 then // yes, ammomenu is hell
       
   296                 counts[ord(a^[slot,index].AmmoType)-1]:= a^[slot,index].Count;
   288     exit(0);
   297     exit(0);
   289 end;
   298 end;
   290 
   299 
   291 procedure HW_getAmmoDelays (skipTurns: PByte); cdecl; export;
   300 procedure HW_getAmmoDelays (skipTurns: PByte); cdecl; export;
   292 var a : TAmmoType;
   301 var a : TAmmoType;