anchor.diff:    LookupLine(S);
   end;
   
  +procedure AddRoundMasks(Line: Integer; Finalize: Boolean);
  +const
  +  NOT_TOP_MASK = not (_0 or _1 or _2);
  +  NOT_RIGHT_MASK = not (_2 or _3 or _4);
  +  NOT_BOTTOM_MASK = not (_4 or _5 or _6);
  +  NOT_LEFT_MASK = not (_6 or _7 or _0);
  +var
  +  i: Integer;
  +  Buffer: array[0..15] of Byte;
  +  Mask: Byte;
  +  S: string;
  +begin
  +  for i := 0 to 15 do
  +  begin
  +    Mask := Line * 16 + i;
  +
  +    if (Mask and (1 shl 1) = 0) then Mask := Mask and NOT_TOP_MASK;
  +    if (Mask and (1 shl 3) = 0) then Mask := Mask and NOT_RIGHT_MASK;
  +    if (Mask and (1 shl 5) = 0) then Mask := Mask and NOT_BOTTOM_MASK;
  +    if (Mask and (1 shl 7) = 0) then Mask := Mask and NOT_LEFT_MASK;
  +
  +    Buffer[i] := Mask;
  +  end;
  +
  +  S := Format('  $%0.2x, $%0.2x, $%0.2x, $%0.2x, $%0.2x, $%0.2x, $%0.2x, $%0.2x'+
  +              ', $%0.2x, $%0.2x, $%0.2x, $%0.2x, $%0.2x, $%0.2x, $%0.2x, $%0.2x',
  +    [Buffer[0], Buffer[1], Buffer[2], Buffer[3], Buffer[4], Buffer[5], Buffer[6], Buffer[7],
  +     Buffer[8], Buffer[9], Buffer[10], Buffer[11], Buffer[12], Buffer[13], Buffer[14], Buffer[15]]);
  +
  +  if (not Finalize) then S := S + ',';
  +  LookupLine(S);
  +end;
  +
   procedure GenerateLookups;
   const
     MIN_WEIGHT_VALUE: Single = 0.1;
  
positive.code:       end;
  
      nextcell:
        Inc(Cell);
      end;
  
      // next line
      Inc(NativeUInt(Cell), CellLineOffset);
    end;
  end;
  
  procedure TTileMap.Clear;
  
negative.code: 
  procedure TTileMap.UpdateCellMasks(const ChangedArea: TRect);
  label
    clearbit, fillmask, nextcell;
  var
    MaxI, MaxJ: Integer;
    X, Y, Left, Top, Right, Bottom: Integer;
    Rounded: Boolean;
    CellOffsets: PCPFOffsets;
    Cell: PCPFCell;
    FlagHexagonal: Integer;
    CellLineOffset: NativeUInt;
  
  