Changeset 58 for trunk/LocalPlayer
- Timestamp:
- Jan 12, 2017, 11:47:00 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/IsoEngine.pas
r40 r58 406 406 procedure Done; 407 407 begin 408 NoMap.Free; 409 NoMap := nil; 410 LandPatch.Free; 411 LandPatch := nil; 412 OceanPatch.Free; 413 OceanPatch := nil; 414 Borders.Free; 415 Borders := nil; 408 FreeAndNil(NoMap); 409 FreeAndNil(LandPatch); 410 FreeAndNil(OceanPatch); 411 FreeAndNil(Borders); 416 412 end; 417 413 … … 979 975 var 980 976 dx, dy: integer; 981 Line: ^TLine;977 PixelPtr: TPixelPointer; 982 978 begin 983 979 if ShowBorder and (Loc >= 0) and (Loc < G.lx * G.ly) and … … 989 985 if BordersOK and (1 shl p1) = 0 then 990 986 begin 987 // Clearing before bitblt SRCCOPY shouldn't be neccesary but for some 988 // reason without it code works different then under Delphi 989 Borders.Canvas.FillRect(Bounds(0, p1 * (yyt * 2), xxt * 2, yyt * 2)); 990 991 991 LCLIntf.BitBlt(Borders.Canvas.Handle, 0, p1 * (yyt * 2), xxt * 2, 992 992 yyt * 2, GrExt[HGrTerrain].Data.Canvas.Handle, … … 995 995 for dy := 0 to yyt * 2 - 1 do 996 996 begin 997 Line := Borders.ScanLine[p1 * (yyt * 2) + dy]; 998 for dx := 0 to xxt * 2 - 1 do 999 if Line[dx, 0] = 99 then 1000 begin 1001 Line[dx, 0] := Tribe[p1].Color shr 16 and $FF; 1002 Line[dx, 1] := Tribe[p1].Color shr 8 and $FF; 1003 Line[dx, 2] := Tribe[p1].Color and $FF; 1004 end 997 PixelPtr.Init(Borders, 0, p1 * (yyt * 2) + dy); 998 for dx := 0 to xxt * 2 - 1 do begin 999 if PixelPtr.Pixel^.B = 99 then begin 1000 PixelPtr.Pixel^.B := Tribe[p1].Color shr 16 and $FF; 1001 PixelPtr.Pixel^.G := Tribe[p1].Color shr 8 and $FF; 1002 PixelPtr.Pixel^.R := Tribe[p1].Color and $FF; 1003 end; 1004 PixelPtr.NextPixel; 1005 end; 1005 1006 end; 1006 1007 Borders.EndUpdate;
Note:
See TracChangeset
for help on using the changeset viewer.