anchor.diff:      procedure LoadGameResources;
       procedure MakeTileGFXFromTexture(Texture:GLuint);
   
  -    function GetColor32(aIndex:byte; aPal:TKMPal=DEF_PAL):cardinal;
  +    function GetColor32(aIdx:byte; aPal:TKMPal=DEF_PAL):cardinal;
   
       property DataState: TDataLoadingState read fDataState;
       property HouseDat: TKMHouseDatCollection read fHouseDat;
  
positive.code:         Pixel := y*Size[i].X + x;
          L := Data[i, Pixel]; //0..255
  
          if L<>0 then
            if NeedTeamColors and (L in[23..29]) //Only unit icons and scrolls in RX=4
            and ((ID<>4) or InRange(i,141,154) or InRange(i,521,550)) then
            begin
              RGBA[i,Pixel] := cardinal(((L-26)*42+128)*65793) OR $FF000000;
              case L of //Maybe it makes sense to convert to 8bit?
                23,29:  Mask[i,Pixel] := $60FFFFFF;   //7  //6
                24,28:  Mask[i,Pixel] := $90FFFFFF;   //11 //9
                25,27:  Mask[i,Pixel] := $C0FFFFFF;   //14 //12
                26:     Mask[i,Pixel] := $FFFFFFFF;   //16 //16
              end;
              HasMask[i] := true;
            end else
              RGBA[i,Pixel] := GetColor32(L, Palette);
        end;
     end;
    end;
  
negative.code: end;
  
  
  function TResource.GetColor32(aIdx:byte; aPal:TKMPal=DEF_PAL):cardinal;
  begin
    Result := Pal[aPal,aIdx,1] + Pal[aPal,aIdx,2] shl 8 + Pal[aPal,aIdx,3] shl 16 + (byte(aIdx<>0)*255 shl 24);
  end;
  
  
  