uAmmos.c now compiles (3 warnings though)
authorunc0rr
Thu, 10 May 2012 11:29:18 +0400
changeset 7037 7edce323558f
parent 7036 d99934a827f0
child 7038 d853e4385241
uAmmos.c now compiles (3 warnings though)
hedgewars/uAmmos.pas
tools/pas2c.hs
--- a/hedgewars/uAmmos.pas	Thu May 10 11:12:06 2012 +0400
+++ b/hedgewars/uAmmos.pas	Thu May 10 11:29:18 2012 +0400
@@ -288,11 +288,9 @@
         with Hedgehog.Ammo^[Slot, ami] do
             if (AmmoType = Ammo) then
                 if Hedgehog.Team^.Clan^.TurnNumber > Ammoz[AmmoType].SkipTurns then
-                begin
-                    HHHasAmmo:= Count;
-                    exit;
-                end
-                else exit;
+                    exit(Count)
+                else 
+                    exit(0);
         inc(ami)
     end;
 end;
--- a/tools/pas2c.hs	Thu May 10 11:12:06 2012 +0400
+++ b/tools/pas2c.hs	Thu May 10 11:29:18 2012 +0400
@@ -638,7 +638,7 @@
 phrase2C NOP = return $ text ";"
 
 phrase2C (BuiltInFunctionCall [] (SimpleReference (Identifier "exit" BTUnknown))) = return $ text "return" <> semi
-phrase2C (BuiltInFunctionCall [e] (SimpleReference (Identifier "exit" BTUnknown))) = liftM (\e -> text "return" <> e <> semi) $ expr2C e
+phrase2C (BuiltInFunctionCall [e] (SimpleReference (Identifier "exit" BTUnknown))) = liftM (\e -> text "return" <+> e <> semi) $ expr2C e
 phrase2C (BuiltInFunctionCall [e] (SimpleReference (Identifier "dec" BTUnknown))) = liftM (\e -> text "--" <> e <> semi) $ expr2C e
 phrase2C (BuiltInFunctionCall [e1, e2] (SimpleReference (Identifier "dec" BTUnknown))) = liftM2 (\a b -> a <> text " -= " <> b <> semi) (expr2C e1) (expr2C e2)
 phrase2C (BuiltInFunctionCall [e] (SimpleReference (Identifier "inc" BTUnknown))) = liftM (\e -> text "++" <> e <> semi) $ expr2C e