--- a/hedgewars/PascalExports.pas Thu Dec 02 20:40:30 2010 -0500
+++ b/hedgewars/PascalExports.pas Sat Dec 04 08:52:57 2010 +0100
@@ -31,6 +31,7 @@
implementation
{$IFDEF HWLIBRARY}
var cZoomVal: GLfloat;
+ previousGameState: TGameState;
// retrieve protocol information
procedure HW_versionInfo(netProto: PShortInt; versionStr: PPChar); cdecl; export;
@@ -167,9 +168,31 @@
procedure HW_pause; cdecl; export;
begin
+ if isPaused = false then
+ pauseAction:= true;
+end;
+
+procedure HW_pauseToggle; cdecl; export;
+begin
pauseAction:= true;
end;
+function HW_isPaused: boolean; cdecl; export;
+begin
+ exit( isPaused );
+end;
+
+procedure HW_suspend; cdecl; export;
+begin
+ previousGameState:= GameState;
+ GameState:= gsSuspend;
+end;
+
+procedure HW_resume; cdecl; export;
+begin
+ GameState:= previousGameState;
+end;
+
procedure HW_terminate(closeFrontend: boolean); cdecl; export;
begin
isTerminated:= true;
@@ -199,11 +222,6 @@
((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) = 0)) and hideAmmoMenu)) );
end;
-function HW_isPaused: boolean; cdecl; export;
-begin
- exit( isPaused );
-end;
-
function HW_isWaiting: boolean; cdecl; export;
begin
exit( ReadyTimeLeft > 0 );