# HG changeset patch # User unc0rr # Date 1231590965 0 # Node ID 9f12da88d769dfb9d9b7267a5099920b1ba3035d # Parent 4939254196d6e26059e9a243093f5106dc6732bf - More debug stuff - Some cleanup diff -r 4939254196d6 -r 9f12da88d769 hedgewars/HHHandlers.inc --- 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; diff -r 4939254196d6 -r 9f12da88d769 hedgewars/uFloat.pas --- 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]