Ignore:
Timestamp:
Mar 26, 2021, 3:24:15 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Player border tile preparation code for bitmap color replacement moved to ScreenTools.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/IsoEngine.pas

    r330 r331  
    10931093  var
    10941094    dx, dy: integer;
    1095     PixelPtr: TPixelPointer;
    10961095  begin
    10971096    if ShowBorder and (Loc >= 0) and (Loc < G.lx * G.ly) and
     
    11041103            yyt * 2, HGrTerrain.Data.Canvas,
    11051104            1 + 8 * (xxt * 2 + 1), 1 + yyt + 16 * (yyt * 3 + 1));
    1106           Borders.BeginUpdate;
    1107           PixelPtr := PixelPointer(Borders, ScaleToNative(0), ScaleToNative(p1 * (yyt * 2)));
    1108           for dy := 0 to ScaleToNative(yyt * 2) - 1 do begin
    1109             for dx := 0 to ScaleToNative(xxt * 2) - 1 do begin
    1110               if PixelPtr.Pixel^.B = 99 then begin
    1111                 PixelPtr.Pixel^.B := Tribe[p1].Color shr 16 and $FF;
    1112                 PixelPtr.Pixel^.G := Tribe[p1].Color shr 8 and $FF;
    1113                 PixelPtr.Pixel^.R := Tribe[p1].Color and $FF;
    1114               end;
    1115               PixelPtr.NextPixel;
    1116             end;
    1117             PixelPtr.NextLine;
    1118           end;
    1119           Borders.EndUpdate;
     1105          BitmapReplaceColor(Borders, 0, p1 * (yyt * 2), xxt * 2, yyt * 2, $636363, Tribe[p1].Color);
    11201106          BordersOK^ := BordersOK^ or 1 shl p1;
    11211107        end;
Note: See TracChangeset for help on using the changeset viewer.