Simplify converter's life
authorunc0rr
Wed, 11 Apr 2012 22:46:59 +0400
changeset 6879 f44042ba755c
parent 6878 0af34406b83d
child 6880 34d3bc7bd8b1
Simplify converter's life
hedgewars/SDLh.pas
hedgewars/uAIAmmoTests.pas
hedgewars/uFloat.pas
--- a/hedgewars/SDLh.pas	Wed Apr 11 01:04:58 2012 +0400
+++ b/hedgewars/SDLh.pas	Wed Apr 11 22:46:59 2012 +0400
@@ -422,10 +422,10 @@
         end;
 
     TSDL_RWops = record
-        seek: TSeek;
-        read: TRead;
-        write: TWrite;
-        close: TClose;
+        seek: ^TSeek;
+        read: ^TRead;
+        write: ^TWrite;
+        close: ^TClose;
         type_: LongWord;
         case Byte of
             0: (stdio: TStdio);
--- a/hedgewars/uAIAmmoTests.pas	Wed Apr 11 01:04:58 2012 +0400
+++ b/hedgewars/uAIAmmoTests.pas	Wed Apr 11 22:46:59 2012 +0400
@@ -641,7 +641,7 @@
 else
     ap.Angle:= - cMaxAngle div 4;
 
-valueResult:= RateShove(Me, trunc(x) + 10 * hwSign(Targ.X - x), trunc(y), 15, 30, 115, hwSign(Me^.dX)*0.353, -0.353, 1);
+valueResult:= RateShove(Me, trunc(x) + 10 * hwSignf(Targ.X - x), trunc(y), 15, 30, 115, hwSign(Me^.dX)*0.353, -0.353, 1);
 if valueResult <= 0 then
     valueResult:= BadTurn
 else
@@ -723,7 +723,7 @@
 
 valueResult:= 0;
 for i:= 0 to 4 do
-    valueResult:= valueResult + RateShove(Me, trunc(x) + 10 * hwSign(Targ.X - x),
+    valueResult:= valueResult + RateShove(Me, trunc(x) + 10 * hwSignf(Targ.X - x),
                                     trunc(y) - 20 * i - 5, 10, 30, 40, hwSign(Me^.dX), -0.8, 1);
 if valueResult <= 0 then
     valueResult:= BadTurn
--- a/hedgewars/uFloat.pas	Wed Apr 11 01:04:58 2012 +0400
+++ b/hedgewars/uFloat.pas	Wed Apr 11 22:46:59 2012 +0400
@@ -90,7 +90,7 @@
 function AngleCos(const Angle: Longword): hwFloat;
 function SignAs(const num, signum: hwFloat): hwFloat; inline; // Returns an hwFloat with the value of parameter num and the sign of signum.
 function hwSign(r: hwFloat): LongInt; inline; // Returns an integer with value 1 and sign of parameter r.
-function hwSign(r: real): LongInt; inline; // Returns an integer with value 1 and sign of parameter r.
+function hwSignf(r: real): LongInt; inline; // Returns an integer with value 1 and sign of parameter r.
 function isZero(const z: hwFloat): boolean; inline;
 {$IFDEF FPC}
 {$J-}
@@ -424,12 +424,12 @@
     hwSign:= 1
 end;
 
-function hwSign(r: real): LongInt;
+function hwSignf(r: real): LongInt;
 begin
 if r < 0 then
-    hwSign:= -1
+    hwSignf:= -1
 else
-    hwSign:= 1
+    hwSignf:= 1
 end;