anchor.diff:  
   //Add PNG images to spritepack if user has any addons in Sprites folder
   procedure TKMSpritePack.AddImage(aFolder, aFilename: string; aIndex: Integer);
  +type TMaskType = (mtNone, mtPlain, mtSmart);
   var
     I,K:integer;
     Tr, Tg, Tb, T: Byte;
  
positive.code:       if fRXData.HasMask[ID] and (fRXData.Mask[ID, I*SizeX + K] > 0) then
        begin
          M := fRXData.Mask[ID, I*SizeX + K];
          if fRXData.RGBA[ID, I*SizeX + K] = FLAG_COLOR_DARK then
            Png.Pixels[K,I] := M
          else
            Png.Pixels[K,I] := $FF + (255 - M) * $010100;
        end
        else
  
negative.code:     po.Free;
    end;
  
    MaskFile[mtPlain] := aFolder + StringReplace(aFilename, '.png', 'm.png', [rfReplaceAll, rfIgnoreCase]);
    MaskFile[mtSmart] := aFolder + StringReplace(aFilename, '.png', 'a.png', [rfReplaceAll, rfIgnoreCase]);
  
    //Determine mask processing mode
    if FileExists(MaskFile[mtPlain]) then
      MaskTyp := mtPlain
    else
    if FileExists(MaskFile[mtSmart]) then
      MaskTyp := mtSmart
    else
      MaskTyp := mtNone;
  
    fRXData.HasMask[aIndex] := MaskTyp in [mtPlain, mtSmart];
  
    //Load and process the mask if it exists
    if fRXData.HasMask[aIndex] then
    begin
      //Plain masks are used 'as is'
      //Smart masks are designed for the artist, they convert color brightness into a mask
  
      {$IFDEF WDC}
      po := TPNGObject.Create;
      po.LoadFromFile(MaskFile[MaskTyp]);
      {$ENDIF}
      {$IFDEF FPC}
      po := TBGRABitmap.Create(MaskFile[MaskTyp]);
      {$ENDIF}
  
      if (fRXData.Size[aIndex].X = po.Width)
  