Ignore:
Timestamp:
Apr 6, 2021, 10:16:55 PM (4 years ago)
Author:
chronos
Message:
  • Modified: TTexture changed from record to class.
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/UnitStat.pas

    r350 r352  
    9898procedure TUnitStatDlg.CheckAge;
    9999begin
    100   if MainTextureAge <> AgePrepared then
    101   begin
    102     AgePrepared := MainTextureAge;
     100  if MainTexture.Age <> AgePrepared then begin
     101    AgePrepared := MainTexture.Age;
    103102    BitBltCanvas(Back.Canvas, 0, 0, wCommon, hOwnModel,
    104       MainTexture.Image.Canvas, (wMainTexture - wCommon) div 2,
    105       (hMainTexture - hOwnModel) div 2);
     103      MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2,
     104      (MainTexture.Height - hOwnModel) div 2);
    106105    BitBltCanvas(Back.Canvas, wCommon, 0, wCommon, hEnemyModel,
    107       MainTexture.Image.Canvas, (wMainTexture - wCommon) div 2,
    108       (hMainTexture - hEnemyModel) div 2);
     106      MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2,
     107      (MainTexture.Height - hEnemyModel) div 2);
    109108    BitBltCanvas(Back.Canvas, 2 * wCommon, 0, wCommon, hEnemyUnit,
    110       MainTexture.Image.Canvas, (wMainTexture - wCommon) div 2,
    111       (hMainTexture - hEnemyUnit) div 2);
     109      MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2,
     110      (MainTexture.Height - hEnemyUnit) div 2);
    112111    BitBltCanvas(Back.Canvas, 3 * wCommon, 0, wCommon, hEnemyCityDefense,
    113       MainTexture.Image.Canvas, (wMainTexture - wCommon) div 2,
    114       (hMainTexture - hEnemyCityDefense) div 2);
     112      MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2,
     113      (MainTexture.Height - hEnemyCityDefense) div 2);
    115114    BitBltCanvas(Back.Canvas, 4 * wCommon, 0, wCommon, hEnemyCity,
    116       MainTexture.Image.Canvas, (wMainTexture - wCommon) div 2,
    117       (hMainTexture - hEnemyCity) div 2);
     115      MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2,
     116      (MainTexture.Height - hEnemyCity) div 2);
    118117    ImageOp_B(Back, Template, 0, 0, 0, 0, 5 * wCommon, hMax);
    119   end
     118  end;
    120119end;
    121120
     
    305304
    306305  procedure FeatureBar(dst: TBitmap; x, y: integer; const mi: TModelInfo;
    307     const T: TTexture);
     306    T: TTexture);
    308307  var
    309308    i, w, dx, num: integer;
     
    371370  end; { featurebar }
    372371
    373   procedure NumberBarS(dst: TBitmap; x, y: integer; Cap, s: string;
    374     const T: TTexture);
    375   begin
    376     DLine(dst.Canvas, x - 2, x + 170, y + 16, T.clBevelShade, T.clBevelLight);
     372  procedure NumberBarS(dst: TBitmap; x, y: integer; Cap, s: string; T: TTexture);
     373  begin
     374    DLine(dst.Canvas, x - 2, x + 170, y + 16, T.ColorBevelShade, T.ColorBevelLight);
    377375    LoweredTextOut(dst.Canvas, -1, T, x - 2, y, Cap);
    378376    RisedTextout(dst.Canvas, x + 170 - BiColorTextWidth(dst.Canvas, s), y, s);
     
    447445        end;
    448446        Frame(offscreen.Canvas, x - 1, yImp - 1, x + xSizeSmall,
    449           yImp + ySizeSmall, MainTexture.clBevelLight,
    450           MainTexture.clBevelShade);
     447          yImp + ySizeSmall, MainTexture.ColorBevelLight,
     448          MainTexture.ColorBevelShade);
    451449        BitBltCanvas(offscreen.Canvas, x, yImp, xSizeSmall, ySizeSmall,
    452450          SmallImp.Canvas, j mod 7 * xSizeSmall,
     
    527525        begin
    528526          { Frame(offscreen.canvas,xView-1,yView-1,xView+64,yView+48,
    529             MainTexture.clBevelShade,MainTexture.clBevelLight);
     527            MainTexture.ColorBevelShade,MainTexture.ColorBevelLight);
    530528            RFrame(offscreen.canvas,xView-2,yView-2,xView+65,yView+49,
    531             MainTexture.clBevelShade,MainTexture.clBevelLight); }
     529            MainTexture.ColorBevelShade,MainTexture.ColorBevelLight); }
    532530          with offscreen.Canvas do
    533531          begin
     
    615613        Phrases.Lookup('UNITCOST'));
    616614      DLine(offscreen.Canvas, xTotal - 2, xTotal + 170, yTotal + 57 + 16,
    617         MainTexture.clBevelShade, MainTexture.clBevelLight);
     615        MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    618616      if G.Difficulty[me] = 0 then
    619617        s := IntToStr(mi.cost)
     
    636634              (yTotal + StatDown - 19), Phrases.Lookup('UNITINTRO'));
    637635          DLine(offscreen.Canvas, xTotal - 2, xTotal + 170,
    638             (yTotal + StatDown - 19) + 16, MainTexture.clTextShade,
    639             MainTexture.clTextLight);
     636            (yTotal + StatDown - 19) + 16, MainTexture.ColorTextShade,
     637            MainTexture.ColorTextLight);
    640638          s := TurnToString(MyModel[mixShow].IntroTurn);
    641639          RisedTextout(offscreen.Canvas,
Note: See TracChangeset for help on using the changeset viewer.