Changeset 447 for trunk/LocalPlayer/Wonders.pas
- Timestamp:
- May 19, 2022, 10:39:34 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Wonders.pas
r442 r447 23 23 Selection: Integer; 24 24 Center: TPoint; 25 procedure DarkIcon( i: Integer);26 procedure Glow( i, GlowColor: Integer);25 procedure DarkIcon(I: Integer); 26 procedure Glow(I, GlowColor: Integer); 27 27 procedure PaintBackgroundShape; 28 28 public … … 116 116 for Y := 0 to Height - 1 do begin 117 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));118 R := X * X * ((Height div 4) * (Height div 4)) + Y * Y * ((Width div 4) * (Width div 4)); 119 119 ax := ((1 shl 16 div (Height div 4)) * (Width div 4)) * Y; 120 if ( r< ScaleToNative(8) * Height * Width * Width) and121 (( r>= (Height div 4) * (Height div 2) * (Width div 2) * (Width div 2)) and (ax < amax2 * X) and120 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 122 122 ((ax < amax0 * X) or (ax > amin2 * X)) or (ax > amin1 * X) and 123 123 ((ax < amax1 * X) or (ax > amin3 * X))) then begin 124 124 for ch := 0 to 2 do begin 125 c:= Line[0].Pixel^.Planes[ch] - Darken;126 if c< 0 then Line[0].Pixel^.Planes[ch] := 0127 else Line[0].Pixel^.Planes[ch] := c;128 c:= Line[1].Pixel^.Planes[ch] - Darken;129 if c< 0 then Line[1].Pixel^.Planes[ch] := 0130 else Line[1].Pixel^.Planes[ch] := c;131 c:= Line[2].Pixel^.Planes[ch] - Darken;132 if c< 0 then Line[2].Pixel^.Planes[ch] := 0133 else Line[2].Pixel^.Planes[ch] := c;134 c:= Line[3].Pixel^.Planes[ch] - Darken;135 if c< 0 then Line[3].Pixel^.Planes[ch] := 0136 else Line[3].Pixel^.Planes[ch] := c;125 C := Line[0].Pixel^.Planes[ch] - Darken; 126 if C < 0 then Line[0].Pixel^.Planes[ch] := 0 127 else Line[0].Pixel^.Planes[ch] := C; 128 C := Line[1].Pixel^.Planes[ch] - Darken; 129 if C < 0 then Line[1].Pixel^.Planes[ch] := 0 130 else Line[1].Pixel^.Planes[ch] := C; 131 C := Line[2].Pixel^.Planes[ch] - Darken; 132 if C < 0 then Line[2].Pixel^.Planes[ch] := 0 133 else Line[2].Pixel^.Planes[ch] := C; 134 C := Line[3].Pixel^.Planes[ch] - Darken; 135 if C < 0 then Line[3].Pixel^.Planes[ch] := 0 136 else Line[3].Pixel^.Planes[ch] := C; 137 137 end; 138 138 end; … … 150 150 end; 151 151 152 procedure TWondersDlg.DarkIcon( i: Integer);153 var 154 X, Y, ch, x0Dst, y0Dst, x0Src, y0Src, darken, c: Integer;152 procedure TWondersDlg.DarkIcon(I: Integer); 153 var 154 X, Y, ch, x0Dst, y0Dst, x0Src, y0Src, darken, C: Integer; 155 155 Src, Dst: TPixelPointer; 156 156 begin 157 157 Offscreen.BeginUpdate; 158 x0Dst := ClientWidth div 2 - xSizeBig div 2 + RingPosition[ i].X;159 y0Dst := ClientHeight div 2 - ySizeBig div 2 + RingPosition[ i].Y;160 x0Src := ( imod 7) * xSizeBig;161 y0Src := ( idiv 7 + SystemIconLines) * ySizeBig;158 x0Dst := ClientWidth div 2 - xSizeBig div 2 + RingPosition[I].X; 159 y0Dst := ClientHeight div 2 - ySizeBig div 2 + RingPosition[I].Y; 160 x0Src := (I mod 7) * xSizeBig; 161 y0Src := (I div 7 + SystemIconLines) * ySizeBig; 162 162 Src := PixelPointer(BigImp, ScaleToNative(x0Src), ScaleToNative(y0Src)); 163 163 Dst := PixelPointer(Offscreen, ScaleToNative(x0Dst), ScaleToNative(y0Dst)); … … 167 167 15 + (255 - Src.Pixel^.R) * 9) div 128; 168 168 for ch := 0 to 2 do begin 169 c:= Dst.Pixel^.Planes[ch] - Darken;170 if c< 0 then Dst.Pixel^.Planes[ch] := 0171 else Dst.Pixel^.Planes[ch] := c;169 C := Dst.Pixel^.Planes[ch] - Darken; 170 if C < 0 then Dst.Pixel^.Planes[ch] := 0 171 else Dst.Pixel^.Planes[ch] := C; 172 172 end; 173 173 Src.NextPixel; … … 180 180 end; 181 181 182 procedure TWondersDlg.Glow( i, GlowColor: Integer);182 procedure TWondersDlg.Glow(I, GlowColor: Integer); 183 183 begin 184 184 GlowFrame(Offscreen, 185 ClientWidth div 2 - xSizeBig div 2 + RingPosition[ i].X,186 ClientHeight div 2 - ySizeBig div 2 + RingPosition[ i].Y,185 ClientWidth div 2 - xSizeBig div 2 + RingPosition[I].X, 186 ClientHeight div 2 - ySizeBig div 2 + RingPosition[I].Y, 187 187 xSizeBig, ySizeBig, GlowColor); 188 188 end;
Note:
See TracChangeset
for help on using the changeset viewer.