# HG changeset patch # User unc0rr # Date 1336634958 -14400 # Node ID 7edce323558f844f87553ef3cd5e6ae5835b7aec # Parent d99934a827f042256e648b92acc776329662c412 uAmmos.c now compiles (3 warnings though) diff -r d99934a827f0 -r 7edce323558f hedgewars/uAmmos.pas --- 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; diff -r d99934a827f0 -r 7edce323558f tools/pas2c.hs --- 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