- Revert previous debug things
authorunc0rr
Fri, 11 Jan 2008 23:11:53 +0000
changeset 700 be4847674071
parent 699 353382e07407
child 701 8841f71b5e79
- Revert previous debug things - Add new tracing dbg
hedgewars/uGears.pas
hedgewars/uLand.pas
hedgewars/uLandGraphics.pas
--- a/hedgewars/uGears.pas	Fri Jan 11 22:56:28 2008 +0000
+++ b/hedgewars/uGears.pas	Fri Jan 11 23:11:53 2008 +0000
@@ -939,9 +939,11 @@
         Result: LongInt;
     begin
     Result:= 0;
+AddFileLog('x, y, test = ' + inttostr(x) + ', ' + inttostr(y) + ' ,' + inttostr(y and $FFFFFC00));
     if (y and $FFFFFC00) <> 0 then exit;
     for i:= max(x - r, 0) to min(x + r, 2043) do
         if Land[y, i] <> 0 then inc(Result);
+AddFileLog('CountNonZeroz = ' + inttostr(Result));
     CountNonZeroz:= Result
     end;
 
@@ -965,7 +967,6 @@
         repeat
           inc(y, 2);
         until (y > 1023) or (CountNonZeroz(x, y, Gear^.Radius - 1) = 0);
-AddFileLog('x, sy = ' + inttostr(x) + ', ' + inttostr(y));
         sy:= y;
         repeat
           inc(y);
--- a/hedgewars/uLand.pas	Fri Jan 11 22:56:28 2008 +0000
+++ b/hedgewars/uLand.pas	Fri Jan 11 23:11:53 2008 +0000
@@ -29,7 +29,6 @@
 procedure GenMap;
 function GenPreview: TPreview;
 procedure CheckLandDigest(s: shortstring);
-procedure LogLandDigest;
 
 implementation
 uses uConsole, uStore, uMisc, uConsts, uRandom, uTeams, uLandObjects, uSHA, uIO;
@@ -65,7 +64,7 @@
 if digest = '' then
    digest:= s
 else
-//   TryDo(s = digest, 'Different maps generated, sorry', true)
+   TryDo(s = digest, 'Different maps generated, sorry', true)
 end;
 
 procedure DrawLine(X1, Y1, X2, Y2: LongInt; Color: Longword);
--- a/hedgewars/uLandGraphics.pas	Fri Jan 11 22:56:28 2008 +0000
+++ b/hedgewars/uLandGraphics.pas	Fri Jan 11 23:11:53 2008 +0000
@@ -222,8 +222,6 @@
 
 if SDL_MustLock(LandSurface) then
    SDL_UnlockSurface(LandSurface);
-
-LogLandDigest
 end;
 
 procedure DrawHLinesExplosions(ar: PRangeArray; Radius: LongInt; y, dY: LongInt; Count: Byte);