Changeset 536 for trunk


Ignore:
Timestamp:
Apr 15, 2024, 8:59:23 PM (7 months ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/CityScreen.pas

    r530 r536  
    579579      J := Pos('\', S);
    580580      if J = 0 then
    581         LoweredTextout(Offscreen.Canvas, -1, MainTexture, xmOpt + 40,
     581        LoweredTextOut(Offscreen.Canvas, -1, MainTexture, xmOpt + 40,
    582582          ymOpt - 9, S)
    583583      else
    584584      begin
    585         LoweredTextout(Offscreen.Canvas, -1, MainTexture, xmOpt + 40,
     585        LoweredTextOut(Offscreen.Canvas, -1, MainTexture, xmOpt + 40,
    586586          ymOpt - 17, Copy(S, 1, J - 1));
    587         LoweredTextout(Offscreen.Canvas, -1, MainTexture, xmOpt + 40, ymOpt - 1,
     587        LoweredTextOut(Offscreen.Canvas, -1, MainTexture, xmOpt + 40, ymOpt - 1,
    588588          Copy(S, J + 1, 255));
    589589      end;
     
    718718    CutCityFoodSurplus(Report.FoodSurplus, IsCityAlive, cGov, C.Size),
    719719    Report.Storage, 1, CanGrow);
    720   LoweredTextout(Offscreen.Canvas, -1, MainTexture, xFood + 3 - 5,
     720  LoweredTextOut(Offscreen.Canvas, -1, MainTexture, xFood + 3 - 5,
    721721    yFood + 102 - 20, Format('%d/%d', [TrueFood, Report.Storage]));
    722   LoweredTextout(Offscreen.Canvas, -1, MainTexture, xFood - 2, yFood + 66,
     722  LoweredTextOut(Offscreen.Canvas, -1, MainTexture, xFood - 2, yFood + 66,
    723723    Phrases.Lookup('STORAGE'));
    724724
     
    751751        I := 0;
    752752      FillBar(xProd + 3, yProd + 16 + 63, TrueProd, I, PrCost, 4, True);
    753       LoweredTextout(Offscreen.Canvas, -1, MainTexture, xProd + 3 - 5,
     753      LoweredTextOut(Offscreen.Canvas, -1, MainTexture, xProd + 3 - 5,
    754754        yProd + 16 + 43, Format('%d/%d', [TrueProd, PrCost]));
    755755      if BiColorTextWidth(Offscreen.Canvas, PrName) > wBar + dxBar then
     
    912912  else { if SmallMapMode = smSupportedUnits then }
    913913  begin
    914     LoweredTextout(Offscreen.Canvas, -1, MainTexture, xZoomMap + 6,
     914    LoweredTextOut(Offscreen.Canvas, -1, MainTexture, xZoomMap + 6,
    915915      yZoomMap + 2, Phrases.Lookup('SUPUNITS'));
    916916    FreeSupp := C.Size * SupportFree[cGov] shr 1;
  • trunk/LocalPlayer/CityType.pas

    r531 r536  
    134134      S := IntToStr(I + 1);
    135135      Font.Color := MainTexture.ColorTextLight;
    136       Textout(xList + 20 + I mod nListCol * 42 - TextWidth(S) div 2,
     136      TextOut(xList + 20 + I mod nListCol * 42 - TextWidth(S) div 2,
    137137        yList + 15 + I div nListCol * 32 - TextHeight(S) div 2, S);
    138138    end;
  • trunk/LocalPlayer/Diagram.pas

    r522 r536  
    220220        LineTo(X, InnerHeight - Border);
    221221        S := IntToStr(Abs(TurnToYear(T * LineStep)));
    222         Textout(X - TextWidth(S) div 2, Border - 16, S);
     222        TextOut(X - TextWidth(S) div 2, Border - 16, S);
    223223      end;
    224224
  • trunk/LocalPlayer/Draft.pas

    r531 r536  
    171171                  xTotal2 + W - 1 - dx, Y + 16));
    172172                Brush.Style := TBrushStyle.bsClear;
    173                 Textout(xTotal2 - 3 - dx + 1, Y, S);
     173                TextOut(xTotal2 - 3 - dx + 1, Y, S);
    174174              end;
    175175            end;
  • trunk/LocalPlayer/IsoEngine.pas

    r533 r536  
    7676    procedure PaintGrid(X, Y, nx, ny: Integer);
    7777    procedure FillRect(X, Y, Width, Height, Color: Integer);
    78     procedure Textout(X, Y, Color: Integer; const S: string);
     78    procedure TextOut(X, Y, Color: Integer; const S: string);
    7979    procedure Sprite(HGr: TGraphicSet; xDst, yDst, Width, Height, xGr, yGr: Integer);
    8080    procedure TSprite(xDst, yDst, grix: Integer; PureBlack: Boolean = False);
     
    581581end;
    582582
    583 procedure TIsoMap.Textout(X, Y, Color: Integer; const S: string);
     583procedure TIsoMap.TextOut(X, Y, Color: Integer; const S: string);
    584584begin
    585585  FOutput.Canvas.Font.Color := Color;
     
    797797      LabelTextColor := $000000;
    798798    end;
    799     Textout(xShield + 2, yShield - 1, LabelTextColor, S);
     799    TextOut(xShield + 2, yShield - 1, LabelTextColor, S);
    800800  end;
    801801end;
     
    10761076      if IsCapital then
    10771077        FOutput.Canvas.Font.Style := FOutput.Canvas.Font.Style + [TFontStyle.fsUnderline];
    1078       Textout(xs + 1, Y - 9, $000000, S);
    1079       Textout(xs, Y - 10, $FFFFFF, S);
     1078      TextOut(xs + 1, Y - 9, $000000, S);
     1079      TextOut(xs, Y - 10, $FFFFFF, S);
    10801080      if IsCapital then
    10811081        FOutput.Canvas.Font.Style := FOutput.Canvas.Font.Style - [TFontStyle.fsUnderline];
     
    12721272            PaintUnit(X + (xxt - xxu), Y + (yyt - yyu_anchor), UnitInfo,
    12731273              MyUn[uix].Status);
    1274           // if Showuix then Textout(x + 16, y + 5, $80FF00, IntToStr(uix));
     1274          // if Showuix then TextOut(x + 16, y + 5, $80FF00, IntToStr(uix));
    12751275        end
    12761276        else {$ENDIF} PaintUnit(X + (xxt - xxu), Y + (yyt - yyu_anchor), UnitInfo, 0);
     
    12901290  if (Loc >= 0) and (Loc < G.lx * G.ly) then
    12911291    if ShowLoc then
    1292       Textout(X + xxt - 16, Y + yyt - 9, $FFFF00, IntToStr(Loc))
     1292      TextOut(X + xxt - 16, Y + yyt - 9, $FFFF00, IntToStr(Loc))
    12931293    else if ShowDebug and (DebugMap <> nil) and (Loc >= 0) and
    12941294      (Loc < G.lx * G.ly) and (DebugMap[Loc] <> 0) then
    1295       Textout(X + xxt - 16, Y + yyt - 9, $00E0FF,
     1295      TextOut(X + xxt - 16, Y + yyt - 9, $00E0FF,
    12961296        IntToStr(Integer(DebugMap[Loc])))
    12971297end;
  • trunk/LocalPlayer/NatStat.pas

    r531 r536  
    266266
    267267  Offscreen.Canvas.Font.Assign(UniFont[ftCaption]);
    268   RisedTextout(Offscreen.Canvas,
    269     40 { (ClientWidth-BiColorTextWidth(offscreen.canvas,caption)) div 2 } ,
     268  RisedTextOut(Offscreen.Canvas,
     269    40 { (ClientWidth - BiColorTextWidth(Offscreen.Canvas,Caption)) div 2 },
    270270    7, Caption);
    271271
     
    383383    begin
    384384      S := Phrases.Lookup('FRNOCIVILREP');
    385       RisedTextout(Canvas, (ClientWidth - BiColorTextWidth(Canvas, S)) div 2,
     385      RisedTextOut(Canvas, (ClientWidth - BiColorTextWidth(Canvas, S)) div 2,
    386386        yReport + hReport div 2 - 10, S);
    387387    end;
  • trunk/LocalPlayer/Select.pas

    r531 r536  
    242242  CityReport: TCityReportNew;
    243243  mox: ^TModelInfo;
    244   S, number: string;
     244  S, Number: string;
    245245  CanGrow: Boolean;
    246246begin
     
    363363              y0 + 2, 131, 3);
    364364            ca.Font.Assign(UniFont[ftSmall]);
    365             RisedTextout(Offscreen.Canvas, 103 + CityNameSpace + 4 + 31,
     365            RisedTextOut(Offscreen.Canvas, 103 + CityNameSpace + 4 + 31,
    366366              y0 + 1, S);
    367367            ca.Font.Assign(UniFont[ftNormal]);
     
    652652              else if (Kind = kScience) and (FutureCount > 0) then
    653653              begin
    654                 number := IntToStr(FutureCount);
    655                 RisedTextout(ca, 104 - 33 + 15 + 10 + TechNameSpace + 24 * J -
    656                   BiColorTextWidth(ca, number) div 2, y0, number);
     654                Number := IntToStr(FutureCount);
     655                RisedTextOut(ca, 104 - 33 + 15 + 10 + TechNameSpace + 24 * J -
     656                  BiColorTextWidth(ca, Number) div 2, y0, Number);
    657657              end;
    658658            end;
  • trunk/LocalPlayer/UnitStat.pas

    r531 r536  
    305305        S := Phrases.Lookup('UNITSPECIAL');
    306306        Font.Color := $000000;
    307         Textout(X - 1, Y + 1, S);
     307        TextOut(X - 1, Y + 1, S);
    308308        Font.Color := $B0B0B0;
    309         Textout(X - 2, Y, S);
     309        TextOut(X - 2, Y, S);
    310310      end
    311311      else
     
    346346              FillRect(Rect(X - 3 + dx, Y + 2, X + W - 1 + dx, Y + 16));
    347347              Brush.Style := TBrushStyle.bsClear;
    348               Textout(X - 3 + dx + 1, Y, S);
     348              TextOut(X - 3 + dx + 1, Y, S);
    349349              Inc(dx, W + 1);
    350350            end;
     
    364364    DLine(Dst.Canvas, X - 2, X + 170, Y + 16, T.ColorBevelShade, T.ColorBevelLight);
    365365    LoweredTextOut(Dst.Canvas, -1, T, X - 2, Y, Cap);
    366     RisedTextout(Dst.Canvas, X + 170 - BiColorTextWidth(Dst.Canvas, S), Y, S);
     366    RisedTextOut(Dst.Canvas, X + 170 - BiColorTextWidth(Dst.Canvas, S), Y, S);
    367367  end;
    368368
     
    559559            LightGradient(Offscreen.Canvas, xView - 45, yView + 24, 38,
    560560              (ColorOfHealth(Health) and $FEFEFE shr 2) * 3);
    561             RisedTextout(Offscreen.Canvas, xView - 45 + 20 -
     561            RisedTextOut(Offscreen.Canvas, xView - 45 + 20 -
    562562              BiColorTextWidth(Offscreen.Canvas, S) div 2, yView + 23, S);
    563563          end;
     
    579579
    580580      DarkGradient(Offscreen.Canvas, xTotal - 6, yTotal + 1, 180, 2);
    581       RisedTextout(Offscreen.Canvas, xTotal - 2, yTotal,
     581      RisedTextOut(Offscreen.Canvas, xTotal - 2, yTotal,
    582582        Phrases.Lookup('UNITSTRENGTH'));
    583583      S := IntToStr(mi.Attack) + '/' + IntToStr(mi.Defense);
    584       RisedTextout(Offscreen.Canvas,
     584      RisedTextOut(Offscreen.Canvas,
    585585        xTotal + 170 - BiColorTextWidth(Offscreen.Canvas, S), yTotal, S);
    586586      FeatureBar(Offscreen, xTotal, yTotal + 19, mi, MainTexture);
     
    595595      else
    596596        S := IntToStr(mi.cost * BuildCostMod[G.Difficulty[Me]] div 12);
    597       RisedTextout(Offscreen.Canvas,
     597      RisedTextOut(Offscreen.Canvas,
    598598        xTotal + 159 - BiColorTextWidth(Offscreen.Canvas, S), yTotal + 57, S);
    599599      Sprite(Offscreen, HGrSystem, xTotal + 160, yTotal + 57 + 5, 10,
     
    614614            MainTexture.ColorTextLight);
    615615          S := TurnToString(MyModel[mixShow].IntroTurn);
    616           RisedTextout(Offscreen.Canvas,
     616          RisedTextOut(Offscreen.Canvas,
    617617            xTotal + 170 - BiColorTextWidth(Offscreen.Canvas, S),
    618618            (yTotal + StatDown - 19), S);
     
    673673      yCaption := 79;
    674674  end;
    675   RisedTextout(Offscreen.Canvas,
     675  RisedTextOut(Offscreen.Canvas,
    676676    (ClientWidth - BiColorTextWidth(Offscreen.Canvas, Caption)) div 2,
    677677    yCaption, Caption);
  • trunk/Packages/CevoComponents/ScreenTools.pas

    r533 r536  
    12331233  P, xp: Integer;
    12341234  sp: string;
    1235   shadow: Boolean;
     1235  Shadow: Boolean;
    12361236  Text: string;
    12371237begin
    12381238  Inc(X);
    12391239  Inc(Y);
    1240   for shadow := True downto False do
     1240  for Shadow := True downto False do
    12411241    with Canvas do
    1242       if not shadow or (clBack <> $7F007F) then
     1242      if not Shadow or (clBack <> $7F007F) then
    12431243      begin
    1244         if shadow then
     1244        if Shadow then
    12451245          Font.Color := clBack
    12461246        else
     
    12531253            (sp[P + 1] in ['c', 'f', 'l', 'm', 'n', 'o', 'p', 'r', 't', 'w']) then
    12541254          begin
    1255             Canvas.Textout(xp, Y, sp);
     1255            Canvas.TextOut(xp, Y, sp);
    12561256            Break;
    12571257          end
     
    12591259          begin
    12601260            Text := Copy(sp, 1, P - 1);
    1261             Textout(xp, Y, Text);
     1261            TextOut(xp, Y, Text);
    12621262            Inc(xp, Canvas.TextWidth(Text));
    1263             if not shadow then
     1263            if not Shadow then
    12641264              case sp[P + 1] of
    12651265                'c': PaintIcon(xp + 1, Y, 6);
Note: See TracChangeset for help on using the changeset viewer.