Changeset 245 for trunk/LocalPlayer/Wonders.pas
- Timestamp:
- May 21, 2020, 7:58:42 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Wonders.pas
r230 r245 104 104 Ch: Integer; 105 105 Line: array [0..3] of TPixelPointer; 106 begin 106 Width: Integer; 107 Height: Integer; 108 begin 109 Width := ScaleToNative(180); 110 Height := ScaleToNative(128); 107 111 Offscreen.BeginUpdate; 108 Line[0] := PixelPointer(Offscreen, Center.X, Center.Y);109 Line[1] := PixelPointer(Offscreen, Center.X, Center.Y- 1);110 Line[2] := PixelPointer(Offscreen, Center.X - 1, Center.Y);111 Line[3] := PixelPointer(Offscreen, Center.X - 1, Center.Y- 1);112 for Y := 0 to 127do begin113 for X := 0 to 179do begin114 r := X * X * ( 32 * 32) + Y * Y * (45 * 45);115 ax := ((1 shl 16 div 32) * 45) * Y;116 if (r < 8 * 128 * 180 * 180) and117 ((r >= 32 * 64 * 90 * 90) and (ax < amax2 * X) and112 Line[0] := PixelPointer(Offscreen, ScaleToNative(Center.X), ScaleToNative(Center.Y)); 113 Line[1] := PixelPointer(Offscreen, ScaleToNative(Center.X), ScaleToNative(Center.Y) - 1); 114 Line[2] := PixelPointer(Offscreen, ScaleToNative(Center.X) - 1, ScaleToNative(Center.Y)); 115 Line[3] := PixelPointer(Offscreen, ScaleToNative(Center.X) - 1, ScaleToNative(Center.Y) - 1); 116 for Y := 0 to Height - 1 do begin 117 for X := 0 to Width - 1 do begin 118 r := X * X * ((Height div 4) * (Height div 4)) + Y * Y * ((Width div 4) * (Width div 4)); 119 ax := ((1 shl 16 div (Height div 4)) * (Width div 4)) * Y; 120 if (r < ScaleToNative(8) * Height * Width * Width) and 121 ((r >= (Height div 4) * (Height div 2) * (Width div 2) * (Width div 2)) and (ax < amax2 * X) and 118 122 ((ax < amax0 * X) or (ax > amin2 * X)) or (ax > amin1 * X) and 119 123 ((ax < amax1 * X) or (ax > amin3 * X))) then begin … … 156 160 x0Src := (i mod 7) * xSizeBig; 157 161 y0Src := (i div 7 + SystemIconLines) * ySizeBig; 158 Src := PixelPointer(BigImp, x0Src, y0Src);159 Dst := PixelPointer(Offscreen, x0Dst, y0Dst);160 for Y := 0 to ySizeBig- 1 do begin161 for X := 0 to xSizeBig- 1 do begin162 Src := PixelPointer(BigImp, ScaleToNative(x0Src), ScaleToNative(y0Src)); 163 Dst := PixelPointer(Offscreen, ScaleToNative(x0Dst), ScaleToNative(y0Dst)); 164 for Y := 0 to ScaleToNative(ySizeBig) - 1 do begin 165 for X := 0 to ScaleToNative(xSizeBig) - 1 do begin 162 166 Darken := ((255 - Src.Pixel^.B) * 3 + (255 - Src.Pixel^.G) * 163 167 15 + (255 - Src.Pixel^.R) * 9) div 128; … … 229 233 ySizeBig + 6, (wMaintexture - ClientWidth) div 2, 230 234 (hMaintexture - ClientHeight) div 2); 231 //DarkIcon(I);235 DarkIcon(I); 232 236 end; 233 237 -2: // destroyed
Note:
See TracChangeset
for help on using the changeset viewer.