Changeset 72 for trunk/LocalPlayer/Wonders.pas
- Timestamp:
- Jan 15, 2017, 11:47:01 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Wonders.pas
r52 r72 82 82 var 83 83 X, Y, ch, x0Dst, y0Dst, x0Src, y0Src, darken, c: Integer; 84 Src, Dst: PPixel32;84 Src, Dst: TPixelPointer; 85 85 begin 86 86 x0Dst := ClientWidth div 2 - xSizeBig div 2 + RingPosition[i, 0]; … … 88 88 x0Src := (i mod 7) * xSizeBig; 89 89 y0Src := (i div 7 + SystemIconLines) * ySizeBig; 90 Src.Init(BigImp, x0Src, y0Src); 91 Dst.Init(Offscreen, x0Dst, y0Dst); 90 92 for Y := 0 to ySizeBig - 1 do begin 91 93 for X := 0 to xSizeBig - 1 do begin 92 Src := GetBitmapPixelPtr(BigImp, x0Src + X, y0Src + Y); 93 Dst := GetBitmapPixelPtr(Offscreen, x0Dst + X, y0Dst + Y); 94 darken := ((255 - Src^.B) * 3 + (255 - Src^.G) * 95 15 + (255 - Src^.R) * 9) div 128; 94 Darken := ((255 - Src.Pixel^.B) * 3 + (255 - Src.Pixel^.G) * 95 15 + (255 - Src.Pixel^.R) * 9) div 128; 96 96 for ch := 0 to 2 do begin 97 c := Dst^.Planes[ch] - darken; 98 if c < 0 then Dst^.Planes[ch] := 0 99 else Dst^.Planes[ch] := c; 100 end 101 end 97 c := Dst.Pixel^.Planes[ch] - Darken; 98 if c < 0 then Dst.Pixel^.Planes[ch] := 0 99 else Dst.Pixel^.Planes[ch] := c; 100 end; 101 Src.NextPixel; 102 Dst.NextPixel; 103 end; 104 Src.NextLine; 105 Dst.NextLine; 102 106 end; 103 107 end; … … 122 126 i, X, Y, r, ax, ch, c: Integer; 123 127 HaveWonder: boolean; 124 Line: array [0 .. 1] of PPixel32;128 Line: array [0..1] of TPixelPointer; 125 129 s: string; 126 130 begin … … 153 157 xm := ClientWidth div 2; 154 158 ym := ClientHeight div 2; 159 Line[0].Init(Offscreen); 160 Line[1].Init(Offscreen); 155 161 for Y := 0 to 127 do begin 156 162 for X := 0 to 179 do begin … … 163 169 for i := 0 to 1 do 164 170 for ch := 0 to 2 do begin 165 Line[0] := GetBitmapPixelPtr(Offscreen, xm + X, ym + Y); 166 Line[1] := GetBitmapPixelPtr(Offscreen, xm + X, ym - 1 - Y); 167 c := Line[i]^.Planes[ch] - darken; 168 if c < 0 then 169 Line[i]^.Planes[ch] := 0 170 else 171 Line[i]^.Planes[ch] := c; 172 Line[0] := GetBitmapPixelPtr(Offscreen, xm - 1 - X, ym + Y); 173 Line[1] := GetBitmapPixelPtr(Offscreen, xm - 1 - X, ym - 1 - Y); 174 c := Line[i]^.Planes[ch] - darken; 175 if c < 0 then 176 Line[i]^.Planes[ch] := 0 177 else 178 Line[i]^.Planes[ch] := c; 171 Line[0].SetXY(xm + X, ym + Y); 172 Line[1].SetXY(xm + X, ym - 1 - Y); 173 c := Line[i].Pixel^.Planes[ch] - darken; 174 if c < 0 then Line[i].Pixel^.Planes[ch] := 0 175 else Line[i].Pixel^.Planes[ch] := c; 176 Line[0].SetXY(xm - 1 - X, ym + Y); 177 Line[1].SetXY(xm - 1 - X, ym - 1 - Y); 178 c := Line[i].Pixel^.Planes[ch] - darken; 179 if c < 0 then Line[i].Pixel^.Planes[ch] := 0 180 else Line[i].Pixel^.Planes[ch] := c; 179 181 end; 180 182 end;
Note:
See TracChangeset
for help on using the changeset viewer.