--- a/hedgewars/HHHandlers.inc Sat Jan 10 12:02:58 2009 +0000
+++ b/hedgewars/HHHandlers.inc Sat Jan 10 12:36:05 2009 +0000
@@ -664,9 +664,6 @@
exit
end;
-//if Gear^.uid = 7 then
-//with Gear^ do AddFileLog('State: (' + inttostr(hwRound(x)) + ',' + inttostr(hwRound(y)) + '), d(' + floattostr(dX) + ',' + floattostr(dY) + ')');
-
if (Gear^.State and gstHHDriven) = 0 then doStepHedgehogFree(Gear)
else doStepHedgehogDriven(Gear)
end;
--- a/hedgewars/uFloat.pas Sat Jan 10 12:02:58 2009 +0000
+++ b/hedgewars/uFloat.pas Sat Jan 10 12:36:05 2009 +0000
@@ -19,6 +19,8 @@
unit uFloat;
interface
+{$INCLUDE options.inc}
+
{$IFDEF FPC}
{$ifdef FPC_LITTLE_ENDIAN}
type hwFloat = record
@@ -332,6 +334,9 @@
function AngleSin(const Angle: Longword): hwFloat;
begin
+{$IFDEF DEBUGFILE}
+TryDo((Angle >= 0) and (Angle < 2048), 'Sin param exceeds limits', true);
+{$ENDIF}
AngleSin.isNegative:= false;
if Angle < 1024 then AngleSin.QWordValue:= SinTable[Angle]
else AngleSin.QWordValue:= SinTable[2048 - Angle]
@@ -339,6 +344,9 @@
function AngleCos(const Angle: Longword): hwFloat;
begin
+{$IFDEF DEBUGFILE}
+TryDo((Angle >= 0) and (Angle < 2048), 'Cos param exceeds limits', true);
+{$ENDIF}
AngleCos.isNegative:= Angle > 1024;
if Angle < 1024 then AngleCos.QWordValue:= SinTable[1024 - Angle]
else AngleCos.QWordValue:= SinTable[Angle - 1024]