Uberfix. TODO: ask fpc guys wtf. 0.9.20
authorunc0rr
Sun, 29 Dec 2013 15:08:52 +0400
branch0.9.20
changeset 9867 bfc2fdc1ccd1
parent 9865 415e6d04a1ac
child 9869 2d206defd974
child 9870 acf1ccf06b2d
Uberfix. TODO: ask fpc guys wtf.
hedgewars/uLandGraphics.pas
--- a/hedgewars/uLandGraphics.pas	Sat Dec 28 12:35:30 2013 -0500
+++ b/hedgewars/uLandGraphics.pas	Sun Dec 29 15:08:52 2013 +0400
@@ -210,22 +210,22 @@
         Land[y, i]:= Land[y, i] and lfNotCurrentMask;
         end;
     changePixelSetNotCurrent:
-    for i:= fromPix to toPix do
-        begin
-        if Land[y, i] and lfObjMask > 0 then
-            Land[y, i]:= (Land[y, i] and lfNotObjMask) or ((Land[y, i] and lfObjMask) - 1);
-        end;
+        for i:= fromPix to toPix do
+            begin
+            if Land[y, i] and lfObjMask > 0 then
+                Land[y, i]:= Land[y, i] - 1;
+            end;
     setCurrentHog:
     for i:= fromPix to toPix do
         begin
         Land[y, i]:= Land[y, i] or lfCurrentHog
         end;
     changePixelNotSetNotCurrent:
-    for i:= fromPix to toPix do
-        begin
-        if Land[y, i] and lfObjMask < lfObjMask then
-            Land[y, i]:= (Land[y, i] and lfNotObjMask) or ((Land[y, i] and lfObjMask) + 1)
-        end;
+        for i:= fromPix to toPix do
+            begin
+            if Land[y, i] and lfObjMask < lfObjMask then
+                Land[y, i]:= Land[y, i] + 1
+            end;
     end;
 end;