hedgewars/PascalExports.pas
changeset 3651 7058ca178f3b
parent 3650 ec90e573f47a
child 3661 2378ada8a6ee
--- a/hedgewars/PascalExports.pas	Sun Jul 18 03:26:15 2010 +0200
+++ b/hedgewars/PascalExports.pas	Sun Jul 18 03:55:56 2010 +0200
@@ -13,7 +13,7 @@
 unit PascalExports;
 
 interface
-uses uKeys, GLunit, uWorld, uMisc, uConsole, uTeams, uConsts, uChat, hwengine;
+uses uKeys, GLunit, uWorld, uMisc, uConsole, uTeams, uConsts, uChat, uGears, hwengine;
 
 {$INCLUDE "config.inc"}
 
@@ -119,6 +119,11 @@
     backspaceKey:= true;
 end;
 
+procedure HW_tab; cdecl; export;
+begin
+    tabKey:= true;
+end;
+
 procedure HW_chat; cdecl; export;
 begin
     chatAction:= true;
@@ -130,40 +135,11 @@
     KeyPressChat(13); // enter - removes chat
 end;
 
-procedure HW_tab; cdecl; export;
-begin
-    switchAction:= true;
-end;
-
 procedure HW_pause; cdecl; export;
 begin
     pauseAction:= true;
 end;
 
-procedure HW_cursorUp(coefficient:LongInt); cdecl; export;
-begin
-    coeff:= coefficient;
-    cursorUp:= true;
-end;
-
-procedure HW_cursorDown(coefficient:LongInt); cdecl; export;
-begin
-    coeff:= coefficient;
-    cursorDown:= true;
-end;
-
-procedure HW_cursorLeft(coefficient:LongInt); cdecl; export;
-begin
-    coeff:= coefficient;
-    cursorLeft:= true;
-end;
-
-procedure HW_cursorRight(coefficient:LongInt); cdecl; export;
-begin
-    coeff:= coefficient;
-    cursorRight:= true;
-end;
-
 procedure HW_terminate(closeFrontend: boolean); cdecl; export;
 begin
     isTerminated:= true;
@@ -220,6 +196,14 @@
     exit( (CurrentHedgehog^.Ammo^[CurSlot, CurAmmo].Propz and ammoprop_Timerable) <> 0)
 end;
 
+function HW_isWeaponSwitch: boolean cdecl; export;
+begin
+    if CurAmmoGear <> nil then
+        exit(CurAmmoGear^.AmmoType = amSwitch) 
+    else
+        exit(false)
+end;
+
 procedure HW_setGrenadeTime(time: LongInt); cdecl; export;
 begin
     ParseCommand('/timer ' + inttostr(time), true);