Changeset 52 for trunk/LocalPlayer/TechTree.pas
- Timestamp:
- Jan 11, 2017, 10:14:11 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/TechTree.pas
r38 r52 120 120 121 121 procedure TTechTreeDlg.FormShow(Sender: TObject); 122 type123 TLine = array [0 .. 9999, 0 .. 2] of Byte;124 122 var 125 123 X, Y, ad, TexWidth, TexHeight: Integer; 126 124 s: string; 127 Src Line, DstLine: ^TLine;125 SrcPixel, DstPixel: PPixel32; 128 126 begin 129 127 if Image = nil then … … 171 169 for Y := 0 to Image.height - 1 do 172 170 begin 173 SrcLine := Paper.ScanLine[Y mod TexHeight];174 DstLine := Image.ScanLine[Y];175 171 for X := 0 to Image.width - 1 do 176 172 begin 177 if Cardinal((@DstLine[X])^) and $FFFFFF = $7F007F then // transparent 178 DstLine[X] := SrcLine[X mod TexWidth]; 173 DstPixel := GetBitmapPixelPtr(Image, X, Y); 174 if (DstPixel^.ARGB and $FFFFFF) = $7F007F then // transparent 175 begin 176 SrcPixel := GetBitmapPixelPtr(Paper, X mod TexWidth, Y mod TexHeight); 177 DstPixel^.B := SrcPixel^.B; 178 DstPixel^.G := SrcPixel^.G; 179 DstPixel^.R := SrcPixel^.R; 180 end; 179 181 end; 180 182 end;
Note:
See TracChangeset
for help on using the changeset viewer.