anchor.diff:        for K := 0 to pngHeight - 1 do
         for I := 0 to pngWidth - 1 do
         case maskTyp of
  -        mtPlain:  begin
  +        smtPlain:  begin
                       //For now process just red (assume pic is greyscale)
                       fRXData.Mask[aIndex, K*pngWidth+I] := pngData[K*pngWidth+I] and $FF;
                     end;
  -        mtSmart:  begin
  +        smtSmart:  begin
                       if Cardinal(pngData[K*pngWidth+I] and $FFFFFF) <> 0 then
                       begin
                         Tr := fRXData.RGBA[aIndex, K*pngWidth+I] and $FF;
  
positive.code:   for I := 0 to pngWidth - 1 do
      fRXData.RGBA[aIndex, K * pngWidth + I] := pngData[K * pngWidth + I];
  
    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
  
negative.code: //Add PNG images to spritepack if user has any addons in Sprites folder
  procedure TKMSpritePack.AddImage(const aFolder, aFilename: string; aIndex: Integer);
  type
    TKMSpriteMaskType = (smtNone, smtPlain, smtSmart);
  var
    I,K: Integer;
    Tr, Tg, Tb, T: Byte;
    Thue, Tsat, Tbri: Single;
    ft: TextFile;
    maskFile: array [TKMSpriteMaskType] of string;
    maskTyp: TKMSpriteMaskType;
    pngWidth, pngHeight: Word;
    pngData: TKMCardinalArray;
    txtFileName: string;
  