# HG changeset patch # User unc0rr # Date 1334170019 -14400 # Node ID f44042ba755c4666d32a0e5e7eee4b0fb621cc78 # Parent 0af34406b83dba7c379403f46ee07eebf77a755b Simplify converter's life diff -r 0af34406b83d -r f44042ba755c hedgewars/SDLh.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); diff -r 0af34406b83d -r f44042ba755c hedgewars/uAIAmmoTests.pas --- 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 diff -r 0af34406b83d -r f44042ba755c hedgewars/uFloat.pas --- 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;