warnings round also for ios
authorkoda
Sat, 24 Sep 2011 22:35:31 +0200
changeset 6019 8843ea756cfc
parent 6018 3b86826f6665
child 6020 c792d4b3e080
warnings round also for ios
hedgewars/hwengine.pas
hedgewars/uScript.pas
project_files/HedgewarsMobile/Classes/InGameMenuViewController.m
--- a/hedgewars/hwengine.pas	Sat Sep 24 22:27:52 2011 +0200
+++ b/hedgewars/hwengine.pas	Sat Sep 24 22:35:31 2011 +0200
@@ -112,18 +112,18 @@
     if flagMakeCapture then
     begin
         flagMakeCapture:= false;
-        {$IFNDEF IPHONEOS}
         s:= 'hw_' + FormatDateTime('YYYY-MM-DD_HH-mm-ss', Now()) + inttostr(GameTicks);
 
         playSound(sndShutter);
+{$IFNDEF IPHONEOS}
         if not MakeScreenshot(s) then
         begin
             WriteLnToConsole('Screenshot failed.');
             AddChatString(#5 + 'screen capture failed (lack of memory or write permissions)');
         end
         else
+{$ENDIF}
             WriteLnToConsole('Screenshot saved: ' + s);
-        {$ENDIF}
     end;
 end;
 
@@ -153,9 +153,10 @@
 const event: TSDL_Event = ();
 {$WARNINGS ON}
 var PrevTime, CurrTime: Longword;
-    prevFocusState: boolean;
 {$IFDEF SDL13}
     previousGameState: TGameState;
+{$ELSE}
+    prevFocusState: boolean;
 {$ENDIF}
 begin
     PrevTime:= SDL_GetTicks;
--- a/hedgewars/uScript.pas	Sat Sep 24 22:27:52 2011 +0200
+++ b/hedgewars/uScript.pas	Sat Sep 24 22:35:31 2011 +0200
@@ -1788,7 +1788,8 @@
 
 procedure ScriptSetAmmo(ammo : TAmmoType; count, propability, delay, reinforcement: Byte);
 begin
-if (ord(ammo) < 1) or (count > 9) or (count < 0) or (propability < 0) or (propability > 8) or (delay < 0) or (delay > 9) or (reinforcement < 0) or (reinforcement > 8) then
+//if (ord(ammo) < 1) or (count > 9) or (count < 0) or (propability < 0) or (propability > 8) or (delay < 0) or (delay > 9) or (reinforcement < 0) or (reinforcement > 8) then
+if (ord(ammo) < 1) or (count > 9) or (propability > 8) or (delay > 9) or (reinforcement > 8) then
     exit;
 ScriptAmmoLoadout[ord(ammo)]:= inttostr(count)[1];
 ScriptAmmoProbability[ord(ammo)]:= inttostr(propability)[1];
--- a/project_files/HedgewarsMobile/Classes/InGameMenuViewController.m	Sat Sep 24 22:27:52 2011 +0200
+++ b/project_files/HedgewarsMobile/Classes/InGameMenuViewController.m	Sat Sep 24 22:35:31 2011 +0200
@@ -139,7 +139,7 @@
 
 -(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
     UIActionSheet *actionSheet;
-    UIAlertView *alert;
+//    UIAlertView *alert;
 
     switch ([indexPath row]) {
         case 0: