hedgewars/PascalExports.pas
changeset 6580 6155187bf599
parent 6415 af2047bb4f70
child 6700 e04da46ee43c
equal deleted inserted replaced
6579:fc52f7c22c9b 6580:6155187bf599
    30 interface
    30 interface
    31 uses uTypes, uConsts, uVariables, GLunit, uKeys, uSound, uAmmos, uUtils, uCommands;
    31 uses uTypes, uConsts, uVariables, GLunit, uKeys, uSound, uAmmos, uUtils, uCommands;
    32 
    32 
    33 {$INCLUDE "config.inc"}
    33 {$INCLUDE "config.inc"}
    34 procedure HW_versionInfo(netProto: PLongInt; versionStr: PPChar); cdecl; export;
    34 procedure HW_versionInfo(netProto: PLongInt; versionStr: PPChar); cdecl; export;
       
    35 
    35 function HW_getNumberOfWeapons:LongInt; cdecl; export;
    36 function HW_getNumberOfWeapons:LongInt; cdecl; export;
       
    37 
    36 function HW_getMaxNumberOfTeams:LongInt; cdecl; export;
    38 function HW_getMaxNumberOfTeams:LongInt; cdecl; export;
       
    39 
    37 function HW_getMaxNumberOfHogs:LongInt; cdecl; export;
    40 function HW_getMaxNumberOfHogs:LongInt; cdecl; export;
       
    41 
    38 procedure HW_terminate(closeFrontend: Boolean); cdecl; export;
    42 procedure HW_terminate(closeFrontend: Boolean); cdecl; export;
    39 
    43 
    40 implementation
    44 implementation
    41 {$IFDEF HWLIBRARY}
    45 {$IFDEF HWLIBRARY}
    42 var cZoomVal: GLfloat;
    46 var cZoomVal: GLfloat;
   223     exit( bShowAmmoMenu );
   227     exit( bShowAmmoMenu );
   224 end;
   228 end;
   225 
   229 
   226 function HW_isAmmoMenuNotAllowed: boolean; cdecl; export;
   230 function HW_isAmmoMenuNotAllowed: boolean; cdecl; export;
   227 begin;
   231 begin;
   228     exit( (TurnTimeLeft = 0) or (not CurrentTeam^.ExtDriven and (((CurAmmoGear = nil) or
   232     exit( (TurnTimeLeft = 0) or (not CurrentTeam^.ExtDriven and (((CurAmmoGear = nil)
   229           ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) = 0)) and hideAmmoMenu)) );
   233     or ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) = 0)) and hideAmmoMenu)) );
   230 end;
   234 end;
   231 
   235 
   232 function HW_isWeaponRequiringClick: boolean; cdecl; export;
   236 function HW_isWeaponRequiringClick: boolean; cdecl; export;
   233 begin
   237 begin
   234     if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) and (CurrentHedgehog^.BotLevel = 0) then
   238     if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) and (CurrentHedgehog^.BotLevel = 0) then
   268 
   272 
   269 procedure HW_setPianoSound(snd: LongInt); cdecl; export;
   273 procedure HW_setPianoSound(snd: LongInt); cdecl; export;
   270 begin
   274 begin
   271     // this most likely won't work in network game
   275     // this most likely won't work in network game
   272     if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Ammo <> nil) and (CurrentHedgehog^.BotLevel = 0)
   276     if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Ammo <> nil) and (CurrentHedgehog^.BotLevel = 0)
   273        and (CurrentHedgehog^.CurAmmoType = amPiano) then
   277         and (CurrentHedgehog^.CurAmmoType = amPiano) then
   274         case snd of
   278         case snd of
   275             0: PlaySound(sndPiano0);
   279             0: PlaySound(sndPiano0);
   276             1: PlaySound(sndPiano1);
   280             1: PlaySound(sndPiano1);
   277             2: PlaySound(sndPiano2);
   281             2: PlaySound(sndPiano2);
   278             3: PlaySound(sndPiano3);
   282             3: PlaySound(sndPiano3);