hedgewars/uLandObjects.pas
changeset 12102 ebe87b6ed182
parent 11900 19cb0de79287
child 12173 666e18b1ca32
equal deleted inserted replaced
12101:a79ab342bc84 12102:ebe87b6ed182
   573         SDTint.r:= StrToInt(Trim(Copy(s, 1, Pred(i))));
   573         SDTint.r:= StrToInt(Trim(Copy(s, 1, Pred(i))));
   574         Delete(s, 1, i);
   574         Delete(s, 1, i);
   575         i:= Pos(',', s);
   575         i:= Pos(',', s);
   576         SDTint.g:= StrToInt(Trim(Copy(s, 1, Pred(i))));
   576         SDTint.g:= StrToInt(Trim(Copy(s, 1, Pred(i))));
   577         Delete(s, 1, i);
   577         Delete(s, 1, i);
   578         SDTint.b:= StrToInt(Trim(s));
   578         i:= Pos(',', s);
       
   579         SDTint.b:= StrToInt(Trim(Copy(s, 1, Pred(i))));
       
   580         Delete(s, 1, i);
       
   581         SDTint.a:= StrToInt(Trim(s));
   579         if GrayScale
   582         if GrayScale
   580             then
   583             then
   581             begin
   584             begin
   582             t:= round(SDTint.r * RGB_LUMINANCE_RED + SDTint.g * RGB_LUMINANCE_GREEN + SDTint.b * RGB_LUMINANCE_BLUE);
   585             t:= round(SDTint.r * RGB_LUMINANCE_RED + SDTint.g * RGB_LUMINANCE_GREEN + SDTint.b * RGB_LUMINANCE_BLUE);
   583             if t > 255 then
   586             if t > 255 then