Ignore:
Timestamp:
May 19, 2022, 10:39:34 PM (2 years ago)
Author:
chronos
Message:
  • Modified: Use first capital letter in identifiers.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Wonders.pas

    r442 r447  
    2323    Selection: Integer;
    2424    Center: TPoint;
    25     procedure DarkIcon(i: Integer);
    26     procedure Glow(i, GlowColor: Integer);
     25    procedure DarkIcon(I: Integer);
     26    procedure Glow(I, GlowColor: Integer);
    2727    procedure PaintBackgroundShape;
    2828  public
     
    116116  for Y := 0 to Height - 1 do begin
    117117    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));
    119119      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
     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
    122122        ((ax < amax0 * X) or (ax > amin2 * X)) or (ax > amin1 * X) and
    123123        ((ax < amax1 * X) or (ax > amin3 * X))) then begin
    124124        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] := 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;
     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;
    137137        end;
    138138      end;
     
    150150end;
    151151
    152 procedure TWondersDlg.DarkIcon(i: Integer);
    153 var
    154   X, Y, ch, x0Dst, y0Dst, x0Src, y0Src, darken, c: Integer;
     152procedure TWondersDlg.DarkIcon(I: Integer);
     153var
     154  X, Y, ch, x0Dst, y0Dst, x0Src, y0Src, darken, C: Integer;
    155155  Src, Dst: TPixelPointer;
    156156begin
    157157  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 := (i mod 7) * xSizeBig;
    161   y0Src := (i div 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;
    162162  Src := PixelPointer(BigImp, ScaleToNative(x0Src), ScaleToNative(y0Src));
    163163  Dst := PixelPointer(Offscreen, ScaleToNative(x0Dst), ScaleToNative(y0Dst));
     
    167167        15 + (255 - Src.Pixel^.R) * 9) div 128;
    168168      for ch := 0 to 2 do begin
    169         c := Dst.Pixel^.Planes[ch] - Darken;
    170         if c < 0 then Dst.Pixel^.Planes[ch] := 0
    171           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;
    172172      end;
    173173      Src.NextPixel;
     
    180180end;
    181181
    182 procedure TWondersDlg.Glow(i, GlowColor: Integer);
     182procedure TWondersDlg.Glow(I, GlowColor: Integer);
    183183begin
    184184  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,
    187187    xSizeBig, ySizeBig, GlowColor);
    188188end;
Note: See TracChangeset for help on using the changeset viewer.