diff -r 4f9d05416fd6 -r 91f889289a47 hedgewars/PascalExports.pas --- a/hedgewars/PascalExports.pas Thu Jan 20 01:27:51 2011 +0100 +++ b/hedgewars/PascalExports.pas Thu Jan 20 01:49:20 2011 +0100 @@ -22,7 +22,7 @@ interface uses uTypes, uConsts, uVariables, GLunit, uKeys, uChat, uSound, uAmmos, uUtils, - uCommands; + uCommands, uMobile; {$INCLUDE "config.inc"} @@ -38,6 +38,7 @@ versionStr^:= cVersionString; end; +// emulate mouse/keyboard input procedure HW_click; cdecl; export; begin leftClick:= true; @@ -190,12 +191,15 @@ GameState:= previousGameState; end; +// equivalent to esc+y; when closeFrontend = true the game exits after memory cleanup procedure HW_terminate(closeFrontend: boolean); cdecl; export; begin - isTerminated:= true; - if closeFrontend then alsoShutdownFrontend:= true; + {$IFDEF IPHONEOS}setGameRunning(false);{$ENDIF} + alsoShutdownFrontend:= closeFrontend; + ParseCommand('forcequit', true); end; +// cursor handling procedure HW_setCursor(x,y: LongInt); cdecl; export; begin CursorPoint.X:= x; @@ -208,9 +212,10 @@ y^:= CursorPoint.Y; end; +// ammo menu related functions function HW_isAmmoMenuOpen: boolean; cdecl; export; begin - exit(bShowAmmoMenu); + exit( bShowAmmoMenu ); end; function HW_isAmmoMenuNotAllowed: boolean; cdecl; export; @@ -219,11 +224,6 @@ ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) = 0)) and hideAmmoMenu)) ); end; -function HW_isWaiting: boolean; cdecl; export; -begin - exit( ReadyTimeLeft > 0 ); -end; - function HW_isWeaponRequiringClick: boolean; cdecl; export; begin if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) and (CurrentHedgehog^.BotLevel = 0) then