Changeset 352


Ignore:
Timestamp:
Apr 6, 2021, 10:16:55 PM (3 years ago)
Author:
chronos
Message:
  • Modified: TTexture changed from record to class.
  • Modified: Code cleanup.
Location:
trunk
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/Direct.pas

    r347 r352  
    6060  case ID of
    6161    ntInitLocalHuman: begin
    62       SetMainTextureByAge(-1);
     62      MainTexture.Age := -1;
    6363      State := -1;
    6464      Info := Phrases.Lookup('BUSY_MODLH');
     
    151151        while BiColorTextWidth(Canvas, Info) + 64 > ClientWidth do
    152152          Delete(Info, Length(Info), 1);
    153         SetMainTextureByAge(-1);
     153        MainTexture.Age := -1;
    154154        State := -1;
    155155        Show;
     
    276276  Frame(Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, 0, 0);
    277277  Frame(Canvas, 1, 1, ClientWidth - 2, ClientHeight - 2,
    278     MainTexture.clBevelLight, MainTexture.clBevelShade);
     278    MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    279279  Frame(Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3,
    280     MainTexture.clBevelLight, MainTexture.clBevelShade);
     280    MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    281281  if State >= 0 then
    282282    RisedTextOut(Canvas, (ClientWidth - BiColorTextWidth(Canvas, Info))
  • trunk/Inp.pas

    r350 r352  
    4646  Frame(Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, 0, 0);
    4747  Frame(Canvas, 1, 1, ClientWidth - 2, ClientHeight - 2,
    48     MainTexture.clBevelLight, MainTexture.clBevelShade);
     48    MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    4949  Frame(Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3,
    50     MainTexture.clBevelLight, MainTexture.clBevelShade);
     50    MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    5151  EditFrame(Canvas, EInput.BoundsRect, MainTexture);
    5252  BtnFrame(Canvas, OKBtn.BoundsRect, MainTexture);
     
    8484begin
    8585  OKBtn.Caption := Phrases.Lookup('BTN_OK');
    86   EInput.Font.Color := MainTexture.clMark;
     86  EInput.Font.Color := MainTexture.ColorMark;
    8787  EInput.SelStart := 0;
    8888  EInput.SelLength := Length(EInput.Text);
  • trunk/LocalPlayer/Battle.pas

    r350 r352  
    243243  end;
    244244  Frame(Canvas, Border + 1, Border + 1, ClientWidth - (2 + Border),
    245     ClientHeight - (2 + Border), MainTexture.clBevelLight,
    246     MainTexture.clBevelShade);
     245    ClientHeight - (2 + Border), MainTexture.ColorBevelLight,
     246    MainTexture.ColorBevelShade);
    247247  Frame(Canvas, 2 + Border, 2 + Border, ClientWidth - (3 + Border),
    248     ClientHeight - (3 + Border), MainTexture.clBevelLight,
    249     MainTexture.clBevelShade);
     248    ClientHeight - (3 + Border), MainTexture.ColorBevelLight,
     249    MainTexture.ColorBevelShade);
    250250
    251251  if IsSuicideQuery then
  • trunk/LocalPlayer/CityScreen.pas

    r350 r352  
    8282    ProdHint: Boolean;
    8383    AllowChange: Boolean;
     84    RedTex: TTexture;
     85    BarTex: TTexture;
    8486    procedure InitSmallCityMap;
    8587    procedure InitZoomCityMap;
     
    197199begin
    198200  inherited;
     201  RedTex := TTexture.Create;
     202  BarTex := TTexture.Create;
    199203  AreaMap := TIsoMap.Create;
    200204  AreaMap.SetOutput(offscreen);
     
    259263  FreeAndNil(Template);
    260264  FreeAndNil(Back);
     265  FreeAndNil(RedTex);
     266  FreeAndNil(BarTex);
    261267end;
    262268
     
    269275procedure TCityDlg.CheckAge;
    270276begin
    271   if MainTextureAge <> AgePrepared then
    272   begin
    273     AgePrepared := MainTextureAge;
     277  if MainTexture.Age <> AgePrepared then begin
     278    AgePrepared := MainTexture.Age;
    274279
    275280    UnshareBitmap(Back);
     
    388393  procedure FillBar(x, y, pos, Growth, max, Kind: integer;
    389394    IndicateComplete: boolean);
    390   var
    391     Tex: TTexture;
    392   begin
    393     Tex := MainTexture;
    394     if Kind = 3 then
    395     begin
    396       Tex.clBevelLight := HGrSystem.Data.Canvas.Pixels[104, 36];
    397       Tex.clBevelShade := Tex.clBevelLight;
     395  begin
     396    BarTex.Assign(MainTexture);
     397    if Kind = 3 then begin
     398      BarTex.ColorBevelLight := HGrSystem.Data.Canvas.Pixels[104, 36];
     399      BarTex.ColorBevelShade := BarTex.ColorBevelLight;
    398400    end;
    399401    PaintRelativeProgressBar(offscreen.Canvas, Kind, x - 3, y, wBar - 4, pos,
    400       Growth, max, IndicateComplete, Tex);
     402      Growth, max, IndicateComplete, BarTex);
    401403  end;
    402404
     
    492494  UnitInfo: TUnitInfo;
    493495  UnitReport: TUnitReport;
    494   RedTex: TTexture;
    495496  IsCityAlive, CanGrow: boolean;
    496497begin
     
    524525    Report.Working := c.Size;
    525526
    526   RedTex := MainTexture;
    527   RedTex.clBevelLight := $0000FF;
    528   RedTex.clBevelShade := $000000;
    529   RedTex.clTextLight := $000000;
    530   RedTex.clTextShade := $0000FF;
     527  RedTex.Assign(MainTexture);
     528  RedTex.ColorBevelLight := $0000FF;
     529  RedTex.ColorBevelShade := $000000;
     530  RedTex.ColorTextLight := $000000;
     531  RedTex.ColorTextShade := $0000FF;
    531532
    532533  BitBltCanvas(offscreen.Canvas, 0, 0, 640, 480, Back.Canvas, 0, 0);
     
    797798    Frame(offscreen.Canvas, xSmallMap + 48 * (ZoomArea div 3),
    798799      ySmallMap + 24 * (ZoomArea mod 3), xSmallMap + 48 * (ZoomArea div 3) + 49,
    799       ySmallMap + 24 * (ZoomArea mod 3) + 25, MainTexture.clMark,
    800       MainTexture.clMark);
     800      ySmallMap + 24 * (ZoomArea mod 3) + 25, MainTexture.ColorMark,
     801      MainTexture.ColorMark);
    801802  Frame(offscreen.Canvas, xSmallMap - 1, ySmallMap - 1, xSmallMap + wSmallMap,
    802803    ySmallMap + hSmallMap, $B0B0B0, $FFFFFF);
     
    812813  if Mode = mSupp then
    813814  begin
    814     offscreen.Canvas.brush.Color := MainTexture.clMark;
     815    offscreen.Canvas.brush.Color := MainTexture.ColorMark;
    815816    offscreen.Canvas.FillRect(Rect(x - 27, y - 6, x + 27, y + 6));
    816817    offscreen.Canvas.brush.style := bsClear;
  • trunk/LocalPlayer/CityType.pas

    r350 r352  
    9393
    9494  Frame(offscreen.Canvas, 0, yList + 32 * nListRow, InnerWidth - 255,
    95     yPool - 23, MainTexture.clBevelLight, MainTexture.clBevelShade);
     95    yPool - 23, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    9696  Frame(offscreen.Canvas, InnerWidth - 254, yList + 32 * nListRow,
    97     InnerWidth - 89, yPool - 23, MainTexture.clBevelLight,
    98     MainTexture.clBevelShade);
     97    InnerWidth - 89, yPool - 23, MainTexture.ColorBevelLight,
     98    MainTexture.ColorBevelShade);
    9999  Frame(offscreen.Canvas, InnerWidth - 88, yList + 32 * nListRow,
    100     InnerWidth - 1, yPool - 23, MainTexture.clBevelLight,
    101     MainTexture.clBevelShade);
     100    InnerWidth - 1, yPool - 23, MainTexture.ColorBevelLight,
     101    MainTexture.ColorBevelShade);
    102102  Frame(offscreen.Canvas, 0, yPool - 22, InnerWidth - 1, yPool - 1,
    103     MainTexture.clBevelLight, MainTexture.clBevelShade);
     103    MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    104104  for i := 0 to nCityType - 1 do
    105105  begin
    106106    RFrame(offscreen.Canvas, xSwitch + i * 42, ySwitch, xSwitch + 39 + i * 42,
    107       ySwitch + 23, MainTexture.clBevelShade, MainTexture.clBevelLight);
     107      ySwitch + 23, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    108108    if i = ctype then
    109109      Frame(offscreen.Canvas, xSwitch + 1 + i * 42, ySwitch + 1,
    110         xSwitch + 38 + i * 42, ySwitch + 22, MainTexture.clBevelShade,
    111         MainTexture.clBevelLight)
     110        xSwitch + 38 + i * 42, ySwitch + 22, MainTexture.ColorBevelShade,
     111        MainTexture.ColorBevelLight)
    112112    else
    113113      Frame(offscreen.Canvas, xSwitch + 1 + i * 42, ySwitch + 1,
    114         xSwitch + 38 + i * 42, ySwitch + 22, MainTexture.clBevelLight,
    115         MainTexture.clBevelShade);
     114        xSwitch + 38 + i * 42, ySwitch + 22, MainTexture.ColorBevelLight,
     115        MainTexture.ColorBevelShade);
    116116    BitBltCanvas(offscreen.Canvas, xSwitch + 2 + i * 42, ySwitch + 2,
    117117      xSizeSmall, ySizeSmall, SmallImp.Canvas, (i + 3) * xSizeSmall, 0);
     
    130130    for i := 1 to nListRow - 1 do
    131131      DLine(offscreen.Canvas, xList - 5, xList + 4 + 42 * nListCol,
    132         yList - 1 + 32 * i, MainTexture.clBevelLight, MainTexture.clBevelShade);
     132        yList - 1 + 32 * i, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    133133    for i := 0 to nListCol * nListRow - 1 do
    134134    begin
    135135      s := IntToStr(i + 1);
    136       Font.Color := MainTexture.clTextLight;
     136      Font.Color := MainTexture.ColorTextLight;
    137137      Textout(xList + 20 + i mod nListCol * 42 - TextWidth(s) div 2,
    138138        yList + 15 + i div nListCol * 32 - TextHeight(s) div 2, s);
     
    147147      xList + 21 + xSizeSmall div 2 + i mod nListCol * 42,
    148148      yList + 16 + ySizeSmall div 2 + i div nListCol * 32,
    149       MainTexture.clBevelLight, MainTexture.clBevelShade);
     149      MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    150150    BitBltCanvas(offscreen.Canvas, xList + 21 - xSizeSmall div 2 +
    151151      i mod nListCol * 42, yList + 16 - ySizeSmall div 2 + i div nListCol * 32,
     
    169169        nPool div nPoolCol * 32, xPool + 21 + xSizeSmall div 2 +
    170170        nPool mod nPoolCol * 42, yPool + 16 + ySizeSmall div 2 +
    171         nPool div nPoolCol * 32, MainTexture.clBevelLight,
    172         MainTexture.clBevelShade);
     171        nPool div nPoolCol * 32, MainTexture.ColorBevelLight,
     172        MainTexture.ColorBevelShade);
    173173      BitBltCanvas(offscreen.Canvas, xPool + 21 - xSizeSmall div 2 +
    174174        nPool mod nPoolCol * 42, yPool + 16 - ySizeSmall div 2 +
  • trunk/LocalPlayer/ClientTools.pas

    r328 r352  
    201201  i: integer;
    202202begin
    203   if p = me then
    204   begin
     203  if p = me then begin
    205204    Result := 0;
    206205    for i := 1 to 3 do
    207206      if MyRO.Tech[AgePreq[i]] >= tsApplicable then
    208207        Result := i;
    209   end
    210   else
    211   begin
     208  end else begin
    212209    Result := 0;
    213210    for i := 1 to 3 do
  • trunk/LocalPlayer/Diagram.pas

    r350 r352  
    6363  Canvas.Brush.Style := bsClear;
    6464    ScreenTools.Frame(canvas, Left - 1, Top - 1, Left + Width, Top + 200,
    65       MainTexture.clBevelShade, MainTexture.clBevelLight);
     65      MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    6666    RFrame(canvas, Left - 2, Top - 2, Left + Width + 1, Top + 200 + 1,
    67       MainTexture.clBevelShade, MainTexture.clBevelLight);
     67      MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    6868
    6969    // stars
     
    163163  begin
    164164    LoweredTextOut(offscreen.canvas, -1, MainTexture, x - 2, y, Cap);
    165     DLine(offscreen.canvas, x - 2, x + 169, y + 16, MainTexture.clTextShade,
    166       MainTexture.clTextLight);
     165    DLine(offscreen.canvas, x - 2, x + 169, y + 16, MainTexture.ColorTextShade,
     166      MainTexture.ColorTextLight);
    167167    if val0 > 0 then
    168168      s := Format(Phrases.Lookup('SHARE'), [val0, val1])
  • trunk/LocalPlayer/Draft.pas

    r350 r352  
    183183        Phrases.Lookup('UNITSPEED'));
    184184      DLine(offscreen.Canvas, xTotal - 2, xTotal + 174, y + 16,
    185         MainTexture.clBevelShade, MainTexture.clBevelLight);
     185        MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    186186      DLine(offscreen.Canvas, xTotal2 + 176, xTotal2 + 263, y + 16,
    187         MainTexture.clBevelShade, MainTexture.clBevelLight);
     187        MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    188188      s := MovementToString(MyRO.DevModel.Speed);
    189189      RisedTextOut(offscreen.Canvas, xTotal2 + 170 + 64 + 30 -
     
    199199        xTotal2 + 148 + 30, y, '=');
    200200      DLine(offscreen.Canvas, xTotal - 2, xTotal + 174, y + 16,
    201         MainTexture.clBevelShade, MainTexture.clBevelLight);
     201        MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    202202      DLine(offscreen.Canvas, xTotal2 + 176, xTotal2 + 263, y + 16,
    203         MainTexture.clBevelShade, MainTexture.clBevelLight);
     203        MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    204204      s := IntToStr(MyRO.DevModel.Cost);
    205205      RisedTextOut(offscreen.Canvas, xTotal2 + 170 + 64 + 30 - 12 -
     
    216216          xTotal2 + 148 + 30, y, '=');
    217217        DLine(offscreen.Canvas, xTotal - 2, xTotal + 174, y + 16,
    218           MainTexture.clBevelShade, MainTexture.clBevelLight);
     218          MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    219219        DLine(offscreen.Canvas, xTotal2 + 176, xTotal2 + 263, y + 16,
    220           MainTexture.clBevelShade, MainTexture.clBevelLight);
     220          MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    221221        s := IntToStr(MyRO.DevModel.Cost * BuildCostMod
    222222          [G.Difficulty[me]] div 12);
     
    236236
    237237  ClientHeight := Template.Height - Cut;
    238   if ClientHeight > hMainTexture then
     238  if ClientHeight > MainTexture.Height then
    239239  // assemble background from 2 texture tiles
    240240  begin
    241241    BitBltCanvas(Back.Canvas, 0, 0, ClientWidth, 64,
    242       MainTexture.Image.Canvas, (wMainTexture - ClientWidth) div 2,
    243       hMainTexture - 64);
     242      MainTexture.Image.Canvas, (MainTexture.Width - ClientWidth) div 2,
     243      MainTexture.Height - 64);
    244244    BitBltCanvas(Back.Canvas, 0, 64, ClientWidth, ClientHeight - 64,
    245       MainTexture.Image.Canvas, (wMainTexture - ClientWidth) div 2,
     245      MainTexture.Image.Canvas, (MainTexture.Width - ClientWidth) div 2,
    246246      0);
    247247  end
    248248  else
    249249    BitBltCanvas(Back.Canvas, 0, 0, ClientWidth, ClientHeight,
    250       MainTexture.Image.Canvas, (wMainTexture - ClientWidth) div 2,
    251       (hMainTexture - ClientHeight) div 2);
     250      MainTexture.Image.Canvas, (MainTexture.Width - ClientWidth) div 2,
     251      (MainTexture.Height - ClientHeight) div 2);
    252252  ImageOp_B(Back, Template, 0, 0, 0, 0, Template.Width, 64);
    253253  ImageOp_B(Back, Template, 0, 64, 0, 64 + Cut, Template.Width,
     
    320320            RFrame(offscreen.Canvas, xFeature - (21 + 1),
    321321              yFeature + 2 + LinePitch * i - 1, xFeature - (21 - 24),
    322               yFeature + 2 + LinePitch * i + 12, MainTexture.clBevelShade,
    323               MainTexture.clBevelLight);
     322              yFeature + 2 + LinePitch * i + 12, MainTexture.ColorBevelShade,
     323              MainTexture.ColorBevelLight);
    324324          end
    325325          else
     
    329329            RFrame(offscreen.Canvas, xFeature - (9 + 1),
    330330              yFeature + 2 + LinePitch * i - 1, xFeature - (21 - 24),
    331               yFeature + 2 + LinePitch * i + 12, MainTexture.clBevelShade,
    332               MainTexture.clBevelLight);
     331              yFeature + 2 + LinePitch * i + 12, MainTexture.ColorBevelShade,
     332              MainTexture.ColorBevelLight);
    333333          end;
    334334
     
    362362
    363363        if MyRO.DevModel.Cap[code[i]] > 0 then
    364           TextColor := MainTexture.clLitText
     364          TextColor := MainTexture.ColorLitText
    365365        else
    366366          TextColor := -1;
  • trunk/LocalPlayer/MessgEx.pas

    r323 r352  
    357357  if (IconKind = mikImp) and (IconIndex = 27) then
    358358  begin // "YOU WIN" message
    359     clSaveTextLight := MainTexture.clTextLight;
    360     clSaveTextShade := MainTexture.clTextShade;
    361     MainTexture.clTextLight := $000000; // gold
    362     MainTexture.clTextShade := $0FDBFF;
     359    clSaveTextLight := MainTexture.ColorTextLight;
     360    clSaveTextShade := MainTexture.ColorTextShade;
     361    MainTexture.ColorTextLight := $000000; // gold
     362    MainTexture.ColorTextShade := $0FDBFF;
    363363    inherited;
    364     MainTexture.clTextLight := clSaveTextLight;
    365     MainTexture.clTextShade := clSaveTextShade;
     364    MainTexture.ColorTextLight := clSaveTextLight;
     365    MainTexture.ColorTextShade := clSaveTextShade;
    366366  end
    367367  else
     
    411411      end;
    412412    mikBook:
    413       PaintBook(Canvas, ClientWidth div 2, 24, MainTexture.clPage,
    414         MainTexture.clCover);
     413      PaintBook(Canvas, ClientWidth div 2, 24, MainTexture.ColorPage,
     414        MainTexture.ColorCover);
    415415    mikTribe:
    416416      if Assigned(Tribe[IconIndex].faceHGr) then
  • trunk/LocalPlayer/NatStat.pas

    r350 r352  
    107107procedure TNatStatDlg.CheckAge;
    108108begin
    109   if MainTextureAge <> AgePrepared then
    110   begin
    111     AgePrepared := MainTextureAge;
     109  if MainTexture.Age <> AgePrepared then begin
     110    AgePrepared := MainTexture.Age;
    112111    BitBltCanvas(Back.Canvas, 0, 0, ClientWidth, ClientHeight,
    113       MainTexture.Image.Canvas, (wMainTexture - ClientWidth) div 2,
    114       (hMainTexture - ClientHeight) div 2);
     112      MainTexture.Image.Canvas, (MainTexture.Width - ClientWidth) div 2,
     113      (MainTexture.Height - ClientHeight) div 2);
    115114    ImageOp_B(Back, Template, 0, 0, 0, 0, ClientWidth, ClientHeight);
    116115  end;
     
    358357      with Canvas do
    359358      begin
    360         Brush.Color := MainTexture.clBevelShade;
     359        Brush.Color := MainTexture.ColorBevelShade;
    361360        FillRect(Rect(xReport + wReport, yReport + PaperShade,
    362361          xReport + wReport + PaperShade, yReport + hReport + PaperShade));
  • trunk/LocalPlayer/Nego.pas

    r350 r352  
    510510
    511511  Fill(Offscreen.Canvas, 3, 3, ClientWidth - 6, ClientHeight - 6,
    512     (wMaintexture - ClientWidth) div 2, (hMaintexture - ClientHeight) div 2);
     512    (Maintexture.Width - ClientWidth) div 2, (Maintexture.Height - ClientHeight) div 2);
    513513  Frame(Offscreen.Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, 0, 0);
    514514  Frame(Offscreen.Canvas, 1, 1, ClientWidth - 2, ClientHeight - 2,
    515     MainTexture.clBevelLight, MainTexture.clBevelShade);
     515    MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    516516  Frame(Offscreen.Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3,
    517     MainTexture.clBevelLight, MainTexture.clBevelShade);
     517    MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    518518  Corner(Offscreen.Canvas, 1, 1, 0, MainTexture);
    519519  Corner(Offscreen.Canvas, ClientWidth - 9, 1, 1, MainTexture);
     
    565565  with Offscreen.Canvas do
    566566  begin
    567     Brush.Color := MainTexture.clBevelShade;
     567    Brush.Color := MainTexture.ColorBevelShade;
    568568    if History[me].Text[Page - 1] <> '' then
    569569    begin
  • trunk/LocalPlayer/Rates.pas

    r350 r352  
    5656
    5757  Fill(Offscreen.Canvas, 0, 0, ClientWidth, ClientHeight,
    58     (wMaintexture - ClientWidth) div 2, (hMaintexture - ClientHeight) div 2);
     58    (Maintexture.Width - ClientWidth) div 2, (Maintexture.Height - ClientHeight) div 2);
    5959  Frame(Offscreen.Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, 0, 0);
    6060  Frame(Offscreen.Canvas, 1, 1, ClientWidth - 2, ClientHeight - 2,
    61     MainTexture.clBevelLight, MainTexture.clBevelShade);
     61    MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    6262  Frame(Offscreen.Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3,
    63     MainTexture.clBevelLight, MainTexture.clBevelShade);
     63    MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    6464
    6565  BtnFrame(Offscreen.Canvas, CloseBtn.BoundsRect, MainTexture);
     
    118118    Frame(Offscreen.Canvas, x - 1, y - 1, x + max, y + 7, $000000, $000000);
    119119    RFrame(Offscreen.Canvas, x - 2, y - 2, x + max + 1, y + 8,
    120       MainTexture.clBevelShade, MainTexture.clBevelLight);
     120      MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    121121    with Offscreen.Canvas do
    122122    begin
     
    138138      MyRO.LuxRate * 120 div 100, 0, 120, MainTexture);
    139139    RFrame(Offscreen.Canvas, ScienceBtn.Left - 1, LuxBtn.Top - 1,
    140       LuxBtn.Left + 12, LuxBtn.Top + 12, MainTexture.clBevelShade,
    141       MainTexture.clBevelLight);
    142   end;
    143 
    144   DLine(Offscreen.Canvas, 1, ClientWidth - 2, 154, MainTexture.clBevelShade,
    145     MainTexture.clBevelLight);
     140      LuxBtn.Left + 12, LuxBtn.Top + 12, MainTexture.ColorBevelShade,
     141      MainTexture.ColorBevelLight);
     142  end;
     143
     144  DLine(Offscreen.Canvas, 1, ClientWidth - 2, 154, MainTexture.ColorBevelShade,
     145    MainTexture.ColorBevelLight);
    146146  RisedTextOut(Offscreen.Canvas, 16 + 80, 164, Phrases.Lookup('TAXRATE'));
    147147  s := Format('%d%%', [MyRO.TaxRate]);
     
    151151    MyRO.TaxRate * 120 div 100, 0, 120, MainTexture);
    152152  RFrame(Offscreen.Canvas, TaxUpBtn.Left - 1, TaxUpBtn.Top - 1,
    153     TaxUpBtn.Left + 12, TaxDownBtn.Top + 12, MainTexture.clBevelShade,
    154     MainTexture.clBevelLight);
     153    TaxUpBtn.Left + 12, TaxDownBtn.Top + 12, MainTexture.ColorBevelShade,
     154    MainTexture.ColorBevelLight);
    155155
    156156  MarkUsedOffscreen(ClientWidth, ClientHeight);
  • trunk/LocalPlayer/Select.pas

    r350 r352  
    202202    begin
    203203      Frame(offscreen.Canvas, x + (16 - 1), y + (16 - 2), x + (16 + xSizeSmall),
    204         y + (16 - 1 + ySizeSmall), MainTexture.clBevelLight,
    205         MainTexture.clBevelShade);
     204        y + (16 - 1 + ySizeSmall), MainTexture.ColorBevelLight,
     205        MainTexture.ColorBevelShade);
    206206      if pix and cpType = 0 then
    207207        if (pix and cpIndex = imPalace) and (MyRO.Government <> gAnarchy) then
     
    231231      if y + TextSize.cy >= TitleHeight + InnerHeight then
    232232        TextSize.cy := TitleHeight + InnerHeight - y;
    233       Fill(ca, x, y, TextSize.cx, TextSize.cy, (wMaintexture - ClientWidth)
    234         div 2, (hMaintexture - ClientHeight) div 2);
     233      Fill(ca, x, y, TextSize.cx, TextSize.cy, (Maintexture.Width - ClientWidth)
     234        div 2, (Maintexture.Height - ClientHeight) div 2);
    235235    end;
    236236    LoweredTextOut(ca, Color, MainTexture, x, y, s);
     
    260260      begin
    261261        x := x + SideFrame;
    262         y := y + TitleHeight
     262        y := y + TitleHeight;
    263263      end;
    264264      if lit then
    265         TextColor := MainTexture.clLitText
     265        TextColor := MainTexture.ColorLitText
    266266      else
    267267        TextColor := -1;
     
    434434    end;
    435435    if lit then
    436       TextColor := MainTexture.clLitText
     436      TextColor := MainTexture.ColorLitText
    437437    else
    438438      TextColor := -1;
     
    556556              begin
    557557                Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1, (8 + 16 + 36),
    558                   y0 + 20, MainTexture.clBevelLight, MainTexture.clBevelShade);
     558                  y0 + 20, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    559559                Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20, 223, 295)
    560560              end
     
    562562              begin
    563563                Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1, (8 + 16 + 36),
    564                   y0 + 20, MainTexture.clBevelLight, MainTexture.clBevelShade);
     564                  y0 + 20, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    565565                Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20, 260, 295)
    566566              end
     
    568568              begin
    569569                Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1, (8 + 16 + 36),
    570                   y0 + 20, MainTexture.clBevelLight, MainTexture.clBevelShade);
     570                  y0 + 20, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    571571                Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20, 38, 295)
    572572              end
     
    575575                Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1,
    576576                  (8 + 16 + xSizeSmall), y0 + ySizeSmall,
    577                   MainTexture.clBevelLight, MainTexture.clBevelShade);
     577                  MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    578578                if AdvIcon[lix] < 84 then
    579579                  BitBltCanvas(offscreen.Canvas, (8 + 16), y0, xSizeSmall,
     
    681681            Frame(offscreen.Canvas, 8 + 16 - 1, y0 - 15 + (16 - 2),
    682682              8 + 16 + xSizeSmall, y0 - 15 + (16 - 1 + ySizeSmall),
    683               MainTexture.clBevelLight, MainTexture.clBevelShade);
     683              MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    684684            BitBltCanvas(offscreen.Canvas, 8 + 16, y0 - 15 + (16 - 1),
    685685              xSizeSmall, ySizeSmall, SmallImp.Canvas,
     
    712712    end;
    713713    if lit then
    714       TextColor := MainTexture.clLitText
     714      TextColor := MainTexture.ColorLitText
    715715    else
    716716      TextColor := -1;
     
    812812    begin
    813813      Fill(Canvas, 9, ClientHeight - 29, ClientWidth - 18, 24,
    814         (wMaintexture - ClientWidth) div 2,
    815         (hMaintexture - ClientHeight) div 2);
     814        (Maintexture.Width - ClientWidth) div 2,
     815        (Maintexture.Height - ClientHeight) div 2);
    816816      if ScienceNation >= 0 then
    817817      begin
     
    829829          ScienceNationDot.Height, Canvas, xScreen - 10, ClientHeight - 27);
    830830        ImageOp_BCC(ScienceNationDotBuffer, Templates.Data, Point(0, 0),
    831           ScienceNationDot.BoundsRect, MainTexture.clBevelShade, Tribe[ScienceNation].Color);
     831          ScienceNationDot.BoundsRect, MainTexture.ColorBevelShade, Tribe[ScienceNation].Color);
    832832        BitBltCanvas(Canvas, xScreen - 10, ClientHeight - 27, ScienceNationDot.Width,
    833833          ScienceNationDot.Height, ScienceNationDotBuffer.Canvas, 0, 0);
     
    15321532  begin
    15331533    LineDistance := 21; // looks ugly with scrollbar
    1534     MaxLines := (hMaintexture - (24 + TitleHeight + NarrowFrame))
     1534    MaxLines := (Maintexture.Height - (24 + TitleHeight + NarrowFrame))
    15351535      div LineDistance - 1;
    15361536  end
     
    15381538  begin
    15391539    LineDistance := 24;
    1540     MaxLines := (hMaintexture - (24 + TitleHeight + WideFrame))
     1540    MaxLines := (Maintexture.Height - (24 + TitleHeight + WideFrame))
    15411541      div LineDistance - 1;
    15421542  end;
     
    15741574    ClientHeight := InnerHeight + TitleHeight + NarrowFrame;
    15751575  end;
    1576   assert(ClientHeight <= hMaintexture);
     1576  assert(ClientHeight <= Maintexture.Height);
    15771577
    15781578  TechNameSpace := 224;
  • trunk/LocalPlayer/Term.pas

    r346 r352  
    16911691        Controls[i].Visible := false;
    16921692    me := -1;
    1693     SetMainTextureByAge(-1);
     1693    MainTexture.Age := -1;
    16941694    with Panel.Canvas do
    16951695    begin
     
    17281728    { if MyRO.Happened and phGameEnd<>0 then
    17291729      begin
    1730       Age:=3;
    1731       SetMainTextureByAge(-1);
     1730      Age := 3;
     1731      MainTexture.Age := -1;
    17321732      end
    17331733      else }
    17341734    begin
    17351735      Age := GetAge(me);
    1736       if SetMainTextureByAge(Age) then
     1736      if MainTexture.Age <> Age then begin
     1737        MainTexture.Age := Age;
    17371738        EOT.Invalidate; // has visible background parts in its bounds
     1739      end;
    17381740    end;
    17391741    // age:=MyRO.Turn mod 4; //!!!
     
    17481750  begin
    17491751    Age := 0;
    1750     SetMainTextureByAge(-1);
     1752    MainTexture.Age := -1;
    17511753    if ClientMode = cMovieTurn then
    17521754      EOT.ButtonIndex := eotCancel
     
    25382540        Age := 0;
    25392541        if Command = cHelpOnly then
    2540           SetMainTextureByAge(-1);
     2542          MainTexture.Age := -1;
    25412543        Tribes.Init;
    25422544        HelpDlg.UserLeft := (Screen.width - HelpDlg.width) div 2;
     
    42654267        xMini + 2 + G.lx - MapWidth div (xxt * 2), yMini + 2,
    42664268        xMini + 1 + G.lx + MapWidth div (xxt * 2), yMini + 2 + G.ly - 1,
    4267         MainTexture.clMark, MainTexture.clMark)
     4269        MainTexture.ColorMark, MainTexture.ColorMark)
    42684270    else
    42694271      Frame(Panel.Canvas,
    42704272        xMini + 2 + G.lx - MapWidth div (xxt * 2), yMini + 2 + yw,
    42714273        xMini + 1 + G.lx + MapWidth div (xxt * 2), yMini + yw + MapHeight div yyt,
    4272         MainTexture.clMark, MainTexture.clMark);
     4274        MainTexture.ColorMark, MainTexture.ColorMark);
    42734275  end;
    42744276end;
     
    43014303  begin
    43024304    Fill(Panel.Canvas, 0, 3, xMidPanel + 7 - 10, PanelHeight - 3,
    4303       wMainTexture - (xMidPanel + 7 - 10), hMainTexture - PanelHeight);
     4305      MainTexture.Width - (xMidPanel + 7 - 10), MainTexture.Height - PanelHeight);
    43044306    Fill(Panel.Canvas, xRightPanel + 10 - 7, 3, Panel.width - xRightPanel - 10 +
    4305       7, PanelHeight - 3, -(xRightPanel + 10 - 7), hMainTexture - PanelHeight);
     4307      7, PanelHeight - 3, -(xRightPanel + 10 - 7), MainTexture.Height - PanelHeight);
    43064308    FillLarge(Panel.Canvas, xMidPanel - 2, PanelHeight - MidPanelHeight,
    43074309      xRightPanel + 2, PanelHeight, ClientWidth div 2);
     
    43154317    LineTo(xRightPanel, 0);
    43164318    LineTo(ClientWidth, 0);
    4317     Pen.Color := MainTexture.clBevelLight;
     4319    Pen.Color := MainTexture.ColorBevelLight;
    43184320    MoveTo(xMidPanel + 7 - 9, PanelHeight - MidPanelHeight + 2);
    43194321    LineTo(xRightPanel + 10 - 8, PanelHeight - MidPanelHeight + 2);
    4320     Pen.Color := MainTexture.clBevelLight;
     4322    Pen.Color := MainTexture.ColorBevelLight;
    43214323    MoveTo(0, 1);
    43224324    LineTo(xMidPanel + 7 - 9, 1);
    4323     Pen.Color := MainTexture.clBevelShade;
     4325    Pen.Color := MainTexture.ColorBevelShade;
    43244326    LineTo(xMidPanel + 7 - 9, PanelHeight - MidPanelHeight + 1);
    4325     Pen.Color := MainTexture.clBevelLight;
     4327    Pen.Color := MainTexture.ColorBevelLight;
    43264328    LineTo(xRightPanel + 10 - 9, PanelHeight - MidPanelHeight + 1);
    4327     Pen.Color := MainTexture.clBevelLight;
     4329    Pen.Color := MainTexture.ColorBevelLight;
    43284330    LineTo(xRightPanel + 10 - 9, 1);
    43294331    LineTo(ClientWidth, 1);
     
    43334335    MoveTo(0, 2);
    43344336    LineTo(xMidPanel + 7 - 10, 2);
    4335     Pen.Color := MainTexture.clBevelShade;
     4337    Pen.Color := MainTexture.ColorBevelShade;
    43364338    LineTo(xMidPanel + 7 - 10, PanelHeight);
    43374339    Corner(Panel.Canvas, xMidPanel + 7 - 16, 1, 1, MainTexture);
     
    44724474              ScreenTools.Frame(Panel.Canvas, xTroop + 1 + x,
    44734475                yTroop + 6 - yyt div 2, xTroop + 2 * xxt - 1 + x,
    4474                 yTroop + 2 * yyt + 10, MainTexture.clMark, MainTexture.clMark);
     4476                yTroop + 2 * yyt + 10, MainTexture.ColorMark, MainTexture.ColorMark);
    44754477            end;
    44764478          end;
     
    45904592        else
    45914593          x := xTroop - 152;
    4592         Pen.Color := MainTexture.clBevelShade;
     4594        Pen.Color := MainTexture.ColorBevelShade;
    45934595        MoveTo(x - 1, PanelHeight - MidPanelHeight + 2);
    45944596        LineTo(x - 1, PanelHeight);
    4595         Pen.Color := MainTexture.clBevelLight;
     4597        Pen.Color := MainTexture.ColorBevelLight;
    45964598        MoveTo(x, PanelHeight - MidPanelHeight + 2);
    45974599        LineTo(x, PanelHeight);
     
    46314633                        ScreenTools.Frame(Panel.Canvas, xTroop + 3 + x,
    46324634                          yTroop + 2, xTroop + 63 + x, yTroop + 46,
    4633                           MainTexture.clMark, MainTexture.clMark);
     4635                          MainTexture.ColorMark, MainTexture.ColorMark);
    46344636                      end
    46354637                      else if (unx.Master >= 0) and (unx.Master = UnFocus) then
     
    46384640                          xTroop + 64 + x, yTroop + 47, 8, $000000);
    46394641                        CFrame(Panel.Canvas, xTroop + 3 + x, yTroop + 2,
    4640                           xTroop + 63 + x, yTroop + 46, 8, MainTexture.clMark);
     4642                          xTroop + 63 + x, yTroop + 46, 8, MainTexture.ColorMark);
    46414643                      end;
    46424644                      NoMapPanel.SetOutput(Panel);
     
    47334735          RFrame(Panel.Canvas, Left - 1, Top - self.ClientHeight +
    47344736            (PanelHeight - 1), Left + width, Top + height - self.ClientHeight +
    4735             PanelHeight, MainTexture.clBevelShade, MainTexture.clBevelLight)
     4737            PanelHeight, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight)
    47364738    end; { if TroopLoc>=0 }
    47374739  end;
     
    47494751          RFrame(Panel.Canvas, Left - 1, Top - self.ClientHeight +
    47504752            (PanelHeight - 1), Left + width, Top + height - self.ClientHeight +
    4751             PanelHeight, MainTexture.clBevelShade, MainTexture.clBevelLight);
     4753            PanelHeight, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    47524754        end;
    47534755      end;
     
    47634765          RFrame(Panel.Canvas, Left - 1, Top - self.ClientHeight +
    47644766            (PanelHeight - 1), Left + width, Top + height - self.ClientHeight +
    4765             PanelHeight, MainTexture.clBevelShade, MainTexture.clBevelLight);
     4767            PanelHeight, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    47664768        end;
    47674769  end;
     
    47804782    MoveTo(0, TopBarHeight - 1);
    47814783    LineTo(ClientWidth, TopBarHeight - 1);
    4782     Pen.Color := MainTexture.clBevelShade;
     4784    Pen.Color := MainTexture.ColorBevelShade;
    47834785    MoveTo(0, TopBarHeight - 2);
    47844786    LineTo(ClientWidth, TopBarHeight - 2);
    47854787    MoveTo(0, TopBarHeight - 3);
    47864788    LineTo(ClientWidth, TopBarHeight - 3);
    4787     Pen.Color := MainTexture.clBevelLight;
     4789    Pen.Color := MainTexture.ColorBevelLight;
    47884790    ScreenTools.Frame(TopBar.Canvas, 40, -1, xTreasurySection - 1,
    4789       TopBarHeight - 7, MainTexture.clBevelShade, MainTexture.clBevelLight);
     4791      TopBarHeight - 7, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    47904792    ScreenTools.Frame(TopBar.Canvas, xResearchSection + 332, -1, ClientWidth,
    4791       TopBarHeight - 7, MainTexture.clBevelShade, MainTexture.clBevelLight);
     4793      TopBarHeight - 7, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    47924794  end;
    47934795  if GameMode <> cMovie then
     
    52245226          Frame(Panel.Canvas, xMini + 2 + G.lx - MapWidth div (2 * xxt),
    52255227            yMini + 2, xMini + 1 + G.lx + MapWidth div (2 * xxt),
    5226             yMini + 2 + G.ly - 1, MainTexture.clMark, MainTexture.clMark)
     5228            yMini + 2 + G.ly - 1, MainTexture.ColorMark, MainTexture.ColorMark)
    52275229        else
    52285230          Frame(Panel.Canvas, xMini + 2 + G.lx - MapWidth div (2 * xxt),
    52295231            yMini + 2 + yw, xMini + 2 + G.lx + MapWidth div (2 * xxt) - 1,
    5230             yMini + 2 + yw + MapHeight div yyt - 2, MainTexture.clMark,
    5231             MainTexture.clMark);
     5232            yMini + 2 + yw + MapHeight div yyt - 2, MainTexture.ColorMark,
     5233            MainTexture.ColorMark);
    52325234      end;
    52335235      RectInvalidate(xMini + 2, TopBarHeight + MapHeight - overlap + yMini + 2,
     
    74927494        Frame(Buffer.Canvas, x - xMini - 2 - MapWidth div (xxt * 2), 0,
    74937495          x - xMini - 2 + MapWidth div (xxt * 2) - 1, G.ly - 1,
    7494           MainTexture.clMark, MainTexture.clMark)
     7496          MainTexture.ColorMark, MainTexture.ColorMark)
    74957497      else
    74967498        Frame(Buffer.Canvas, x - xMini - 2 - MapWidth div (xxt * 2), yw,
    74977499          x - xMini - 2 + MapWidth div (xxt * 2) - 1, yw + MapHeight div yyt -
    7498           2, MainTexture.clMark, MainTexture.clMark);
     7500          2, MainTexture.ColorMark, MainTexture.ColorMark);
    74997501      BitBltCanvas(Panel.Canvas, xMini + 2, yMini + 2, G.lx * 2, G.ly,
    75007502        Buffer.Canvas, 0, 0);
  • 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,
  • trunk/LocalPlayer/Wonders.pas

    r319 r352  
    199199
    200200  Fill(Offscreen.Canvas, 3, 3, ClientWidth - 6, ClientHeight - 6,
    201     (wMaintexture - ClientWidth) div 2, (hMaintexture - ClientHeight) div 2);
     201    (Maintexture.Width - ClientWidth) div 2, (Maintexture.Height - ClientHeight) div 2);
    202202  Frame(Offscreen.Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, 0, 0);
    203203  Frame(Offscreen.Canvas, 1, 1, ClientWidth - 2, ClientHeight - 2,
    204     MainTexture.clBevelLight, MainTexture.clBevelShade);
     204    MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    205205  Frame(Offscreen.Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3,
    206     MainTexture.clBevelLight, MainTexture.clBevelShade);
     206    MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    207207  Corner(Offscreen.Canvas, 1, 1, 0, MainTexture);
    208208  Corner(Offscreen.Canvas, ClientWidth - 9, 1, 1, MainTexture);
     
    230230          Fill(Offscreen.Canvas, Center.X - xSizeBig div 2 + RingPosition[I].X - 3,
    231231            Center.Y - ySizeBig div 2 + RingPosition[I].Y - 3, xSizeBig + 6,
    232             ySizeBig + 6, (wMaintexture - ClientWidth) div 2,
    233             (hMaintexture - ClientHeight) div 2);
     232            ySizeBig + 6, (Maintexture.Width - ClientWidth) div 2,
     233            (Maintexture.Height - ClientHeight) div 2);
    234234        end;
    235235        WonderDestroyed: begin
     
    308308  begin
    309309    Fill(Canvas, 9, ClientHeight - 3 - 46, ClientWidth - 18, 44,
    310       (wMaintexture - ClientWidth) div 2, (hMaintexture - ClientHeight) div 2);
     310      (Maintexture.Width - ClientWidth) div 2, (Maintexture.Height - ClientHeight) div 2);
    311311    if Selection >= 0 then
    312312    begin
     
    318318          (ClientWidth-BiColorTextWidth(Canvas,S)) div 2+1,
    319319          ClientHeight-3-36+1, S);
    320           Canvas.Font.Color:=MainTexture.clBevelLight;
     320          Canvas.Font.Color:=MainTexture.ColorBevelLight;
    321321          Canvas.TextOut(
    322322          (ClientWidth-BiColorTextWidth(Canvas,S)) div 2,
  • trunk/NoTerm.pas

    r350 r352  
    310310  Frame(Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, $000000, $000000);
    311311  Frame(Canvas, 1, 1, ClientWidth - 2, ClientHeight - 2,
    312     MainTexture.clBevelLight, MainTexture.clBevelShade);
     312    MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    313313  Frame(Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3,
    314     MainTexture.clBevelLight, MainTexture.clBevelShade);
     314    MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    315315  Corner(Canvas, 1, 1, 0, MainTexture);
    316316  Corner(Canvas, ClientWidth - 9, 1, 1, MainTexture);
     
    325325    begin
    326326      Frame(Canvas, xBrain[i] - 24, yBrain[i] - 8 - 16, xBrain[i] - 24 + 111,
    327         yBrain[i] - 8 - 16 + 111, MainTexture.clBevelShade,
    328         MainTexture.clBevelShade);
     327        yBrain[i] - 8 - 16 + 111, MainTexture.ColorBevelShade,
     328        MainTexture.ColorBevelShade);
    329329      FrameImage(Canvas, PlayersBrain[i].Picture, xBrain[i],
    330330        yBrain[i] - 16, 64, 64, 0, 0);
  • trunk/Packages/CevoComponents/BaseWin.pas

    r340 r352  
    292292  procedure CornerFrame(x0, y0, x1, y1: integer);
    293293  begin
    294     Frame(Canvas, x0 + 1, y0 + 1, x1 - 2, y1 - 2, MainTexture.clBevelLight,
    295       MainTexture.clBevelShade);
    296     Frame(Canvas, x0 + 2, y0 + 2, x1 - 3, y1 - 3, MainTexture.clBevelLight,
    297       MainTexture.clBevelShade);
     294    Frame(Canvas, x0 + 1, y0 + 1, x1 - 2, y1 - 2, MainTexture.ColorBevelLight,
     295      MainTexture.ColorBevelShade);
     296    Frame(Canvas, x0 + 2, y0 + 2, x1 - 3, y1 - 3, MainTexture.ColorBevelLight,
     297      MainTexture.ColorBevelShade);
    298298    Corner(Canvas, x0 + 1, y0 + 1, 0, MainTexture);
    299299    Corner(Canvas, x1 - 9, y0 + 1, 1, MainTexture);
     
    318318  l := BiColorTextWidth(Canvas, Caption);
    319319  Cut := (ClientWidth - l) div 2;
    320   xTexOffset := (wMaintexture - ClientWidth) div 2;
    321   yTexOffset := (hMaintexture - ClientHeight) div 2;
     320  xTexOffset := (Maintexture.Width - ClientWidth) div 2;
     321  yTexOffset := (Maintexture.Height - ClientHeight) div 2;
    322322  if WideBottom then
    323323    InnerBottom := ClientHeight - WideFrame
     
    345345  Frame(Canvas, 0, FrameTop, ClientWidth - 1, FrameBottom - 1, 0, 0);
    346346  Frame(Canvas, SideFrame - 1, TitleHeight - 1, ClientWidth - SideFrame,
    347     InnerBottom, MainTexture.clBevelShade, MainTexture.clBevelLight);
     347    InnerBottom, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    348348  // RFrame(Canvas,SideFrame-2,TitleHeight-2,ClientWidth-SideFrame+1,
    349   // InnerBottom+1,MainTexture.clBevelShade,MainTexture.clBevelLight);
     349  // InnerBottom+1,MainTexture.ColorBevelShade,MainTexture.ColorBevelLight);
    350350  if FullCaption then
    351351  begin
     
    367367          4, xTexOffset, yTexOffset);
    368368        CornerFrame(0, FrameTop, ClientWidth, FrameBottom);
    369         Pen.Color := MainTexture.clBevelShade;
     369        Pen.Color := MainTexture.ColorBevelShade;
    370370        MoveTo(3 + ModalFrameIndent, 2);
    371371        LineTo(3 + ModalFrameIndent, TitleHeight);
    372         Pen.Color := MainTexture.clBevelShade;
     372        Pen.Color := MainTexture.ColorBevelShade;
    373373        MoveTo(4 + ModalFrameIndent, TitleHeight - 1);
    374374        LineTo(ClientWidth - 4 - ModalFrameIndent, TitleHeight - 1);
    375375        LineTo(ClientWidth - 4 - ModalFrameIndent, 1);
    376         Pen.Color := MainTexture.clBevelLight;
     376        Pen.Color := MainTexture.ColorBevelLight;
    377377        MoveTo(ClientWidth - 5 - ModalFrameIndent, 2);
    378378        LineTo(4 + ModalFrameIndent, 2);
     
    380380        MoveTo(ClientWidth - 4 - ModalFrameIndent, 1);
    381381        LineTo(3 + ModalFrameIndent, 1);
    382         Pen.Color := MainTexture.clBevelLight;
     382        Pen.Color := MainTexture.ColorBevelLight;
    383383        MoveTo(ClientWidth - 3 - ModalFrameIndent, 3);
    384384        LineTo(ClientWidth - 3 - ModalFrameIndent, TitleHeight);
     
    397397
    398398    Frame(Canvas, CaptionLeft + 1, 0 + 1, ClientWidth - CaptionLeft - 2,
    399       TitleHeight - 1, MainTexture.clBevelLight, MainTexture.clBevelShade);
     399      TitleHeight - 1, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    400400    Frame(Canvas, CaptionLeft + 2, 0 + 2, ClientWidth - CaptionLeft - 3,
    401       TitleHeight - 1, MainTexture.clBevelLight, MainTexture.clBevelShade);
     401      TitleHeight - 1, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    402402    Corner(Canvas, CaptionLeft + 1, 0 + 1, 0, MainTexture);
    403403    Corner(Canvas, ClientWidth - CaptionLeft - 9, 0 + 1, 1, MainTexture);
     
    405405    with Canvas do
    406406    begin
    407       Pen.Color := MainTexture.clBevelShade;
     407      Pen.Color := MainTexture.ColorBevelShade;
    408408      MoveTo(CaptionLeft + 1, FrameTop + 2);
    409409      LineTo(CaptionLeft + 1, TitleHeight);
    410       Pen.Color := MainTexture.clBevelLight;
     410      Pen.Color := MainTexture.ColorBevelLight;
    411411      MoveTo(ClientWidth - CaptionLeft - 2, FrameTop + 2);
    412412      LineTo(ClientWidth - CaptionLeft - 2, TitleHeight);
     
    421421      Frame(Canvas, CaptionLeft + 1, ClientHeight - WideFrame - 1 + 1,
    422422        ClientWidth - CaptionLeft - 2, ClientHeight - 2,
    423         MainTexture.clBevelLight, MainTexture.clBevelShade);
     423        MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    424424      Frame(Canvas, CaptionLeft + 2, ClientHeight - WideFrame - 1 + 1,
    425425        ClientWidth - CaptionLeft - 3, ClientHeight - 3,
    426         MainTexture.clBevelLight, MainTexture.clBevelShade);
     426        MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    427427      Corner(Canvas, CaptionLeft + 1, ClientHeight - 9, 2, MainTexture);
    428428      Corner(Canvas, ClientWidth - CaptionLeft - 9, ClientHeight - 9, 3,
     
    431431      with Canvas do
    432432      begin
    433         Pen.Color := MainTexture.clBevelShade;
     433        Pen.Color := MainTexture.ColorBevelShade;
    434434        MoveTo(CaptionLeft + 1, ClientHeight - WideFrame);
    435435        LineTo(CaptionLeft + 1, FrameBottom - 2);
    436         Pen.Color := MainTexture.clBevelLight;
     436        Pen.Color := MainTexture.ColorBevelLight;
    437437        MoveTo(ClientWidth - CaptionLeft - 2, ClientHeight - WideFrame);
    438438        LineTo(ClientWidth - CaptionLeft - 2, FrameBottom - 2);
     
    486486begin
    487487  Fill(Offscreen.Canvas, Left, Top, Width, Height,
    488     SideFrame + (wMaintexture - ClientWidth) div 2,
    489     TitleHeight + (hMaintexture - ClientHeight) div 2);
     488    SideFrame + (Maintexture.Width - ClientWidth) div 2,
     489    TitleHeight + (Maintexture.Height - ClientHeight) div 2);
    490490end;
    491491
  • trunk/Packages/CevoComponents/DrawDlg.pas

    r347 r352  
    258258      $000000, $000000);
    259259  Frame(Canvas, Border + 1, Border + 1, ClientWidth - (2 + Border),
    260     ClientHeight - (2 + Border), MainTexture.clBevelLight,
    261     MainTexture.clBevelShade);
     260    ClientHeight - (2 + Border), MainTexture.ColorBevelLight,
     261    MainTexture.ColorBevelShade);
    262262  Frame(Canvas, 2 + Border, 2 + Border, ClientWidth - (3 + Border),
    263     ClientHeight - (3 + Border), MainTexture.clBevelLight,
    264     MainTexture.clBevelShade);
     263    ClientHeight - (3 + Border), MainTexture.ColorBevelLight,
     264    MainTexture.ColorBevelShade);
    265265  SplitText(false);
    266266
  • trunk/Packages/CevoComponents/ScreenTools.pas

    r347 r352  
    1111
    1212type
    13   TTexture = record
     13
     14  { TTexture }
     15
     16  TTexture = class
     17  private
     18    FAge: Integer;
     19    function GetHeight: Integer;
     20    function GetWidth: Integer;
     21    procedure SetAge(AValue: Integer);
     22  public
    1423    Image: TBitmap;
    15     clBevelLight: TColor;
    16     clBevelShade: TColor;
    17     clTextLight: TColor;
    18     clTextShade: TColor;
    19     clLitText: TColor;
    20     clMark: TColor;
    21     clPage: TColor;
    22     clCover: TColor;
    23   end;
     24    ColorBevelLight: TColor;
     25    ColorBevelShade: TColor;
     26    ColorTextLight: TColor;
     27    ColorTextShade: TColor;
     28    ColorLitText: TColor;
     29    ColorMark: TColor;
     30    ColorPage: TColor;
     31    ColorCover: TColor;
     32    constructor Create;
     33    destructor Destroy; override;
     34    procedure Assign(Source: TTexture);
     35    property Age: Integer read FAge write SetAge;
     36    property Width: Integer read GetWidth;
     37    property Height: Integer read GetHeight;
     38  end;
     39
    2440  TLoadGraphicFileOption = (gfNoError, gfNoGamma);
    2541  TLoadGraphicFileOptions = set of TLoadGraphicFileOption;
     
    3551function TurnToString(Turn: integer): string;
    3652function MovementToString(Movement: integer): string;
    37 procedure BtnFrame(ca: TCanvas; p: TRect; const T: TTexture);
    38 procedure EditFrame(ca: TCanvas; p: TRect; const T: TTexture);
     53procedure BtnFrame(ca: TCanvas; p: TRect; T: TTexture);
     54procedure EditFrame(ca: TCanvas; p: TRect; T: TTexture);
    3955function HexStringToColor(S: string): integer;
    4056function LoadGraphicFile(Bmp: TBitmap; FileName: string; Options: TLoadGraphicFileOptions = []): boolean;
     
    7490procedure GlowFrame(Dst: TBitmap; x0, y0, Width, Height: integer; cl: TColor);
    7591procedure InitOrnament;
    76 procedure InitCityMark(const T: TTexture);
     92procedure InitCityMark(T: TTexture);
    7793procedure Fill(ca: TCanvas; Left, Top, Width, Height, xOffset, yOffset: integer); overload;
    7894procedure Fill(Canvas: TCanvas; Rect: TRect; Offset: TPoint); overload;
     
    8399  const Texture: TBitmap);
    84100procedure PaintBackground(Form: TForm; Left, Top, Width, Height: integer);
    85 procedure Corner(ca: TCanvas; x, y, Kind: integer; const T: TTexture);
     101procedure Corner(ca: TCanvas; x, y, Kind: integer; T: TTexture);
    86102procedure BiColorTextOut(ca: TCanvas; clMain, clBack: TColor; x, y: integer; s: string);
    87 procedure LoweredTextOut(ca: TCanvas; cl: TColor; const T: TTexture;
     103procedure LoweredTextOut(ca: TCanvas; cl: TColor; T: TTexture;
    88104  x, y: integer; s: string);
    89105function BiColorTextWidth(ca: TCanvas; s: string): integer;
     
    95111procedure UnderlinedTitleValue(Canvas: TCanvas; Title, Value: string; X, Y, Width: Integer);
    96112procedure NumberBar(dst: TBitmap; x, y: integer; Cap: string; val: integer;
    97   const T: TTexture);
     113  T: TTexture);
    98114procedure CountBar(dst: TBitmap; x, y, w: integer; Kind: integer;
    99   Cap: string; val: integer; const T: TTexture);
     115  Cap: string; val: integer; T: TTexture);
    100116procedure PaintProgressBar(ca: TCanvas; Kind, x, y, pos, Growth, max: integer;
    101   const T: TTexture);
     117  T: TTexture);
    102118procedure PaintRelativeProgressBar(ca: TCanvas;
    103119  Kind, x, y, size, pos, Growth, max: integer; IndicateComplete: boolean;
    104   const T: TTexture);
     120  T: TTexture);
    105121procedure PaintLogo(Canvas: TCanvas; X, Y, LightColor, ShadeColor: integer);
    106 function SetMainTextureByAge(Age: integer): boolean;
    107122procedure LoadPhrases;
    108123procedure Texturize(Dest, Texture: TBitmap; TransparentColor: Cardinal);
     
    115130  TransparentColor1 = $FF00FF;
    116131  TransparentColor2 = $7F007F;
    117 
    118   wMainTexture = 640;
    119   hMainTexture = 480;
    120132
    121133  // template positions in Templates.png
     
    167179  HGrSystem2: TGraphicSet;
    168180  ClickFrameColor: Integer;
    169   MainTextureAge: Integer;
    170181  MainTexture: TTexture;
    171182  Templates: TGraphicSet;
     
    327338end;
    328339
    329 procedure BtnFrame(ca: TCanvas; p: TRect; const T: TTexture);
    330 begin
    331   RFrame(ca, p.Left - 1, p.Top - 1, p.Right, p.Bottom, T.clBevelShade,
    332     T.clBevelLight);
    333 end;
    334 
    335 procedure EditFrame(ca: TCanvas; p: TRect; const T: TTexture);
     340procedure BtnFrame(ca: TCanvas; p: TRect; T: TTexture);
     341begin
     342  RFrame(ca, p.Left - 1, p.Top - 1, p.Right, p.Bottom, T.ColorBevelShade,
     343    T.ColorBevelLight);
     344end;
     345
     346procedure EditFrame(ca: TCanvas; p: TRect; T: TTexture);
    336347begin
    337348  Frame(ca, p.Left - 1, p.Top - 1, p.Right, p.Bottom, $000000, $000000);
    338349  Frame(ca, p.Left - 2, p.Top - 2, p.Right + 1, p.Bottom + 1, $000000, $000000);
    339350  Frame(ca, p.Left - 3, p.Top - 3, p.Right + 2, p.Bottom + 1, $000000, $000000);
    340   RFrame(ca, p.Left - 4, p.Top - 4, p.Right + 3, p.Bottom + 2, T.clBevelShade,
    341     T.clBevelLight);
     351  RFrame(ca, p.Left - 4, p.Top - 4, p.Right + 3, p.Bottom + 2, T.ColorBevelShade,
     352    T.ColorBevelLight);
    342353end;
    343354
     
    10411052begin
    10421053  if InitOrnamentDone then Exit;
    1043   Light := ColorToColor32(MainTexture.clBevelLight);
    1044   // and $FCFCFC shr 2*3+MainTexture.clBevelShade and $FCFCFC shr 2;
    1045   Shade := ColorToColor32(MainTexture.clBevelShade and $FCFCFC shr 2 * 3 +
    1046     MainTexture.clBevelLight and $FCFCFC shr 2);
     1054  Light := ColorToColor32(MainTexture.ColorBevelLight);
     1055  // and $FCFCFC shr 2*3+MainTexture.ColorBevelShade and $FCFCFC shr 2;
     1056  Shade := ColorToColor32(MainTexture.ColorBevelShade and $FCFCFC shr 2 * 3 +
     1057    MainTexture.ColorBevelLight and $FCFCFC shr 2);
    10471058  HGrSystem2.Data.BeginUpdate;
    10481059  PixelPtr := PixelPointer(HGrSystem2.Data, ScaleToNative(Ornament.Left), ScaleToNative(Ornament.Top));
     
    10721083end;
    10731084
    1074 procedure InitCityMark(const T: TTexture);
     1085procedure InitCityMark(T: TTexture);
    10751086var
    10761087  x: Integer;
     
    10851096          x, CityMark1.Top + y] and $FF;
    10861097        HGrSystem.Data.Canvas.Pixels[CityMark2.Left + x, CityMark2.Top + y] :=
    1087           T.clMark and $FF * Intensity div $FF + T.clMark shr 8 and
    1088           $FF * Intensity div $FF shl 8 + T.clMark shr 16 and
     1098          T.ColorMark and $FF * Intensity div $FF + T.ColorMark shr 8 and
     1099          $FF * Intensity div $FF shl 8 + T.ColorMark shr 16 and
    10891100          $FF * Intensity div $FF shl 16;
    10901101      end;
     
    10971108procedure Fill(ca: TCanvas; Left, Top, Width, Height, xOffset, yOffset: Integer);
    10981109begin
    1099   Assert((Left + xOffset >= 0) and (Left + xOffset + Width <= wMainTexture) and
    1100     (Top + yOffset >= 0) and (Top + yOffset + Height <= hMainTexture));
     1110  Assert((Left + xOffset >= 0) and (Left + xOffset + Width <= MainTexture.Width) and
     1111    (Top + yOffset >= 0) and (Top + yOffset + Height <= MainTexture.Height));
    11011112  BitBltCanvas(ca, Left, Top, Width, Height, MainTexture.Image.Canvas,
    11021113    Left + xOffset, Top + yOffset);
     
    11141125    n: integer;
    11151126  begin
    1116     n := ((hMainTexture div 2) div (y1 - y0)) * 2;
    1117     while hMainTexture div 2 + (I + 1) * (y1 - y0) > hMainTexture do
     1127    n := ((MainTexture.Height div 2) div (y1 - y0)) * 2;
     1128    while MainTexture.Height div 2 + (I + 1) * (y1 - y0) > MainTexture.Height do
    11181129      Dec(I, n);
    1119     while hMainTexture div 2 + I * (y1 - y0) < 0 do
     1130    while MainTexture.Height div 2 + I * (y1 - y0) < 0 do
    11201131      Inc(I, n);
    11211132    Result := I;
     
    11251136  I: Integer;
    11261137begin
    1127   for I := 0 to (x1 - xm) div wMainTexture - 1 do
    1128     BitBltCanvas(ca, xm + I * wMainTexture, y0, wMainTexture, y1 - y0,
    1129       MainTexture.Image.Canvas, 0, hMainTexture div 2 + Band(I) *
     1138  for I := 0 to (x1 - xm) div MainTexture.Width - 1 do
     1139    BitBltCanvas(ca, xm + I * MainTexture.Width, y0, MainTexture.Width, y1 - y0,
     1140      MainTexture.Image.Canvas, 0, MainTexture.Height div 2 + Band(I) *
    11301141      (y1 - y0));
    1131   BitBltCanvas(ca, xm + ((x1 - xm) div wMainTexture) * wMainTexture, y0,
    1132     x1 - (xm + ((x1 - xm) div wMainTexture) * wMainTexture), y1 - y0,
    1133     MainTexture.Image.Canvas, 0, hMainTexture div 2 + Band(
    1134     (x1 - xm) div wMainTexture) * (y1 - y0));
    1135   for I := 0 to (xm - x0) div wMainTexture - 1 do
    1136     BitBltCanvas(ca, xm - (I + 1) * wMainTexture, y0, wMainTexture, y1 - y0,
    1137       MainTexture.Image.Canvas, 0, hMainTexture div 2 +
     1142  BitBltCanvas(ca, xm + ((x1 - xm) div MainTexture.Width) * MainTexture.Width, y0,
     1143    x1 - (xm + ((x1 - xm) div MainTexture.Width) * MainTexture.Width), y1 - y0,
     1144    MainTexture.Image.Canvas, 0, MainTexture.Height div 2 + Band(
     1145    (x1 - xm) div MainTexture.Width) * (y1 - y0));
     1146  for I := 0 to (xm - x0) div MainTexture.Width - 1 do
     1147    BitBltCanvas(ca, xm - (I + 1) * MainTexture.Width, y0, MainTexture.Width, y1 - y0,
     1148      MainTexture.Image.Canvas, 0, MainTexture.Height div 2 +
    11381149      Band(-I - 1) * (y1 - y0));
    1139   BitBltCanvas(ca, x0, y0, xm - ((xm - x0) div wMainTexture) *
    1140     wMainTexture - x0, y1 - y0, MainTexture.Image.Canvas,
    1141     ((xm - x0) div wMainTexture + 1) * wMainTexture - (xm - x0),
    1142     hMainTexture div 2 + Band(-(xm - x0) div wMainTexture - 1) * (y1 - y0));
     1150  BitBltCanvas(ca, x0, y0, xm - ((xm - x0) div MainTexture.Width) *
     1151    MainTexture.Width - x0, y1 - y0, MainTexture.Image.Canvas,
     1152    ((xm - x0) div MainTexture.Width + 1) * MainTexture.Width - (xm - x0),
     1153    MainTexture.Height div 2 + Band(-(xm - x0) div MainTexture.Width - 1) * (y1 - y0));
    11431154end;
    11441155
     
    11851196procedure PaintBackground(Form: TForm; Left, Top, Width, Height: Integer);
    11861197begin
    1187   Fill(Form.Canvas, Left, Top, Width, Height, (wMainTexture - Form.ClientWidth) div
    1188     2, (hMainTexture - Form.ClientHeight) div 2);
    1189 end;
    1190 
    1191 procedure Corner(ca: TCanvas; x, y, Kind: Integer; const T: TTexture);
     1198  Fill(Form.Canvas, Left, Top, Width, Height, (MainTexture.Width - Form.ClientWidth) div
     1199    2, (MainTexture.Height - Form.ClientHeight) div 2);
     1200end;
     1201
     1202procedure Corner(ca: TCanvas; x, y, Kind: Integer; T: TTexture);
    11921203begin
    11931204  { BitBltCanvas(ca,x,y,8,8,T.HGr.Mask.Canvas,
     
    12841295end;
    12851296
    1286 procedure LoweredTextOut(ca: TCanvas; cl: TColor; const T: TTexture;
     1297procedure LoweredTextOut(ca: TCanvas; cl: TColor; T: TTexture;
    12871298  x, y: Integer; s: string);
    12881299begin
    12891300  if cl = -2 then
    1290     BiColorTextOut(ca, (T.clBevelShade and $FEFEFE) shr 1,
    1291       T.clBevelLight, x, y, s)
     1301    BiColorTextOut(ca, (T.ColorBevelShade and $FEFEFE) shr 1,
     1302      T.ColorBevelLight, x, y, s)
    12921303  else if cl < 0 then
    1293     BiColorTextOut(ca, T.clTextShade, T.clTextLight, x, y, s)
     1304    BiColorTextOut(ca, T.ColorTextShade, T.ColorTextLight, x, y, s)
    12941305  else
    1295     BiColorTextOut(ca, cl, T.clTextLight, x, y, s);
     1306    BiColorTextOut(ca, cl, T.ColorTextLight, x, y, s);
    12961307end;
    12971308
     
    13681379procedure UnderlinedTitleValue(Canvas: TCanvas; Title, Value: string; X, Y, Width: Integer);
    13691380begin
    1370   DLine(Canvas, X, X + Width, Y + 19, MainTexture.clBevelLight, MainTexture.clBevelShade);
     1381  DLine(Canvas, X, X + Width, Y + 19, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    13711382  RisedTextOut(Canvas, X, Y, Title);
    13721383  RisedTextOut(Canvas, X + Width - BiColorTextWidth(Canvas, Value), Y, Value);
     
    13741385
    13751386procedure NumberBar(dst: TBitmap; x, y: integer; Cap: string;
    1376   val: Integer; const T: TTexture);
     1387  val: Integer; T: TTexture);
    13771388var
    13781389  s: string;
     
    13801391  if val > 0 then
    13811392  begin
    1382     DLine(dst.Canvas, x - 2, x + 170, y + 16, T.clBevelShade,
    1383       T.clBevelLight);
     1393    DLine(dst.Canvas, x - 2, x + 170, y + 16, T.ColorBevelShade,
     1394      T.ColorBevelLight);
    13841395    LoweredTextOut(dst.Canvas, -1, T, x - 2, y, Cap);
    13851396    s := IntToStr(val);
     
    13901401
    13911402procedure CountBar(dst: TBitmap; x, y, w: Integer; Kind: Integer;
    1392   Cap: string; val: Integer; const T: TTexture);
     1403  Cap: string; val: Integer; T: TTexture);
    13931404var
    13941405  i, sd, ld, cl, xIcon, yIcon: Integer;
     
    14031414    // xIcon:=x+100;
    14041415    // yIcon:=y;
    1405     // DLine(dst.Canvas,x-2,x+170+32,y+16,T.clBevelShade,T.clBevelLight);
     1416    // DLine(dst.Canvas,x-2,x+170+32,y+16,T.ColorBevelShade,T.ColorBevelLight);
    14061417
    14071418    xIcon := x - 5;
    14081419    yIcon := y + 15;
    1409     DLine(dst.Canvas, x - 2, xIcon + w + 2, yIcon + 16, T.clBevelShade,
    1410       T.clBevelLight);
     1420    DLine(dst.Canvas, x - 2, xIcon + w + 2, yIcon + 16, T.ColorBevelShade,
     1421      T.ColorBevelLight);
    14111422
    14121423    s := IntToStr(val);
     
    14861497
    14871498procedure PaintProgressBar(ca: TCanvas; Kind, x, y, pos, Growth, max: Integer;
    1488   const T: TTexture);
     1499  T: TTexture);
    14891500var
    14901501  i: Integer;
     
    15041515    Growth := max - pos;
    15051516  Frame(ca, x - 1, y - 1, x + max, y + 7, $000000, $000000);
    1506   RFrame(ca, x - 2, y - 2, x + max + 1, y + 8, T.clBevelShade,
    1507     T.clBevelLight);
     1517  RFrame(ca, x - 2, y - 2, x + max + 1, y + 8, T.ColorBevelShade,
     1518    T.ColorBevelLight);
    15081519  with ca do
    15091520  begin
     
    15401551procedure PaintRelativeProgressBar(ca: TCanvas;
    15411552  Kind, x, y, size, pos, Growth, max: Integer; IndicateComplete: Boolean;
    1542   const T: TTexture);
     1553  T: TTexture);
    15431554begin
    15441555  if Growth > 0 then
     
    15591570    LightColor, ShadeColor);
    15601571  BitBltCanvas(Canvas, X, Y, Logo.Width, Logo.Height, LogoBuffer.Canvas, 0, 0);
    1561 end;
    1562 
    1563 function SetMainTextureByAge(Age: Integer): Boolean;
    1564 begin
    1565   if Age <> MainTextureAge then
    1566     with MainTexture do begin
    1567       MainTextureAge := Age;
    1568       LoadGraphicFile(Image, GetGraphicsDir + DirectorySeparator +
    1569         'Texture' + IntToStr(Age + 1) + '.jpg');
    1570       clBevelLight := Colors.Canvas.Pixels[clkAge0 + Age, cliBevelLight];
    1571       clBevelShade := Colors.Canvas.Pixels[clkAge0 + Age, cliBevelShade];
    1572       clTextLight := Colors.Canvas.Pixels[clkAge0 + Age, cliTextLight];
    1573       clTextShade := Colors.Canvas.Pixels[clkAge0 + Age, cliTextShade];
    1574       clLitText := Colors.Canvas.Pixels[clkAge0 + Age, cliLitText];
    1575       clMark := Colors.Canvas.Pixels[clkAge0 + Age, cliMark];
    1576       clPage := Colors.Canvas.Pixels[clkAge0 + Age, cliPage];
    1577       clCover := Colors.Canvas.Pixels[clkAge0 + Age, cliCover];
    1578       Result := True;
    1579     end
    1580   else
    1581     Result := False;
    15821572end;
    15831573
     
    17951785  BigImp := TBitmap.Create;
    17961786  BigImp.PixelFormat := pf24bit;
    1797   MainTexture.Image := TBitmap.Create;
    1798   MainTextureAge := -2;
     1787  MainTexture := TTexture.Create;
    17991788  ClickFrameColor := HGrSystem.Data.Canvas.Pixels[187, 175];
    18001789  InitOrnamentDone := False;
     
    18191808  FreeAndNil(Paper);
    18201809  FreeAndNil(Colors);
    1821   FreeAndNil(MainTexture.Image);
     1810  FreeAndNil(MainTexture);
     1811end;
     1812
     1813{ TTexture }
     1814
     1815procedure TTexture.SetAge(AValue: Integer);
     1816begin
     1817  if FAge = AValue then Exit;
     1818  FAge := AValue;
     1819  LoadGraphicFile(Image, GetGraphicsDir + DirectorySeparator +
     1820    'Texture' + IntToStr(Age + 1) + '.jpg');
     1821  ColorBevelLight := Colors.Canvas.Pixels[clkAge0 + Age, cliBevelLight];
     1822  ColorBevelShade := Colors.Canvas.Pixels[clkAge0 + Age, cliBevelShade];
     1823  ColorTextLight := Colors.Canvas.Pixels[clkAge0 + Age, cliTextLight];
     1824  ColorTextShade := Colors.Canvas.Pixels[clkAge0 + Age, cliTextShade];
     1825  ColorLitText := Colors.Canvas.Pixels[clkAge0 + Age, cliLitText];
     1826  ColorMark := Colors.Canvas.Pixels[clkAge0 + Age, cliMark];
     1827  ColorPage := Colors.Canvas.Pixels[clkAge0 + Age, cliPage];
     1828  ColorCover := Colors.Canvas.Pixels[clkAge0 + Age, cliCover];
     1829end;
     1830
     1831function TTexture.GetHeight: Integer;
     1832begin
     1833  Result := Image.Height;
     1834end;
     1835
     1836function TTexture.GetWidth: Integer;
     1837begin
     1838  Result := Image.Width;
     1839end;
     1840
     1841constructor TTexture.Create;
     1842begin
     1843  Image := TBitmap.Create;
     1844  FAge := -2;
     1845end;
     1846
     1847destructor TTexture.Destroy;
     1848begin
     1849  FreeAndNil(Image);
     1850  inherited;
     1851end;
     1852
     1853procedure TTexture.Assign(Source: TTexture);
     1854begin
     1855  FAge := Source.FAge;
     1856  Image.Assign(Image);
     1857  ColorBevelLight := Source.ColorBevelLight;
     1858  ColorBevelShade := Source.ColorBevelShade;
     1859  ColorTextLight := Source.ColorTextLight;
     1860  ColorTextShade := Source.ColorTextShade;
     1861  ColorLitText := Source.ColorLitText;
     1862  ColorMark := Source.ColorMark;
     1863  ColorPage := Source.ColorPage;
     1864  ColorCover := Source.ColorCover;
    18221865end;
    18231866
  • trunk/Settings.pas

    r317 r352  
    141141  Frame(Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, 0, 0);
    142142  Frame(Canvas, 1, 1, ClientWidth - 2, ClientHeight - 2,
    143     MainTexture.clBevelLight, MainTexture.clBevelShade);
     143    MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    144144  Frame(Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3,
    145     MainTexture.clBevelLight, MainTexture.clBevelShade);
     145    MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    146146  EditFrame(Canvas, List.BoundsRect, MainTexture);
    147147  BtnFrame(Canvas, OKBtn.BoundsRect, MainTexture);
     
    149149
    150150  RFrame(Canvas, ButtonFullscreen.Left - 1, ButtonFullscreen.Top - 1,
    151     ButtonFullscreen.Left + 12, ButtonFullscreen.Top + 12, MainTexture.clBevelShade,
    152     MainTexture.clBevelLight);
     151    ButtonFullscreen.Left + 12, ButtonFullscreen.Top + 12, MainTexture.ColorBevelShade,
     152    MainTexture.ColorBevelLight);
    153153
    154154  S := Phrases.Lookup('SETTINGS', 0);
     
    164164begin
    165165  Languages.LoadToStrings(List.Items);
    166   List.Font.Color := MainTexture.clMark;
     166  List.Font.Color := MainTexture.ColorMark;
    167167  LoadData;
    168168end;
  • trunk/Start.pas

    r344 r352  
    537537  begin
    538538    Frame(Canvas, 328, yMain + 112 - 15, ClientWidth, Up2Btn.top + 38,
    539       MainTexture.clBevelShade, MainTexture.clBevelLight);
     539      MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    540540    if AutoDiff > 0 then
    541541    begin
     
    543543        yMain + 112 - 15 { Up1Btn.Top-12 }{ y0Brain-dyBrain } ,
    544544        x0Brain + dxBrain + 64, Up2Btn.top + 38 { y0Brain+dyBrain+64 } ,
    545         MainTexture.clBevelShade, MainTexture.clBevelLight);
     545        MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    546546    end;
    547547  end
    548548  else if Page <> pgMain then
    549549    Frame(Canvas, 328, Up1Btn.top - 15, ClientWidth, Up2Btn.top + 38,
    550       MainTexture.clBevelShade, MainTexture.clBevelLight);
     550      MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    551551  Frame(Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, 0, 0);
    552552
    553553  // draw tabs
    554554  Frame(Canvas, 2, 2 + 2 * integer(Tab <> tbMain), TabOffset + (0 + 1) * TabSize - 1,
    555     TabHeight, MainTexture.clBevelLight, MainTexture.clBevelShade);
     555    TabHeight, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    556556  Frame(Canvas, 1, 1 + 2 * integer(Tab <> tbMain), TabOffset + (0 + 1) * TabSize,
    557     TabHeight, MainTexture.clBevelLight, MainTexture.clBevelShade);
    558   Canvas.Pixels[1, 1 + 2 * integer(Tab <> tbMain)] := MainTexture.clBevelShade;
     557    TabHeight, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
     558  Canvas.Pixels[1, 1 + 2 * integer(Tab <> tbMain)] := MainTexture.ColorBevelShade;
    559559  for Tab2 := tbMap to tbPrevious do
    560560  begin
    561561    Frame(Canvas, TabOffset + Integer(Tab2) * TabSize + 2, 2 + 2 * integer(Tab <> Tab2),
    562       TabOffset + (Integer(Tab2) + 1) * TabSize - 1, TabHeight, MainTexture.clBevelLight,
    563       MainTexture.clBevelShade);
     562      TabOffset + (Integer(Tab2) + 1) * TabSize - 1, TabHeight, MainTexture.ColorBevelLight,
     563      MainTexture.ColorBevelShade);
    564564    Frame(Canvas, TabOffset + Integer(Tab2) * TabSize + 1, 1 + 2 * integer(Tab <> Tab2),
    565       TabOffset + (Integer(Tab2) + 1) * TabSize, TabHeight, MainTexture.clBevelLight,
    566       MainTexture.clBevelShade);
     565      TabOffset + (Integer(Tab2) + 1) * TabSize, TabHeight, MainTexture.ColorBevelLight,
     566      MainTexture.ColorBevelShade);
    567567    Canvas.Pixels[TabOffset + Integer(Tab2) * TabSize + 1, 1 + 2 * integer(Tab <> Tab2)] :=
    568       MainTexture.clBevelShade;
     568      MainTexture.ColorBevelShade;
    569569  end;
    570570  Canvas.Font.Assign(UniFont[ftNormal]);
     
    579579    $000000, $000000);
    580580  Frame(Canvas, 1, TabHeight + 1, ClientWidth - 2, ClientHeight - 2,
    581     MainTexture.clBevelLight, MainTexture.clBevelShade);
     581    MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    582582  Frame(Canvas, 2, TabHeight + 2, ClientWidth - 3, ClientHeight - 3,
    583     MainTexture.clBevelLight, MainTexture.clBevelShade);
     583    MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    584584  if Tab = tbMain then
    585585  begin
    586586    PaintBackground(self, 3, TabHeight - 1, TabSize - 4 - 3 + TabOffset + 3, 4);
    587     Canvas.Pixels[2, TabHeight] := MainTexture.clBevelLight;
     587    Canvas.Pixels[2, TabHeight] := MainTexture.ColorBevelLight;
    588588  end
    589589  else
     
    592592      TabSize - 4, 4);
    593593    Canvas.Pixels[TabOffset + Integer(Tab) * TabSize + 2, TabHeight] :=
    594       MainTexture.clBevelLight;
     594      MainTexture.ColorBevelLight;
    595595  end;
    596596  Canvas.Pixels[TabOffset + (Integer(Tab) + 1) * TabSize - 1, TabHeight + 1] :=
    597     MainTexture.clBevelShade;
     597    MainTexture.ColorBevelShade;
    598598  if Tab < tbPrevious then
    599599    Frame(Canvas, TabOffset + (Integer(Tab) + 1) * TabSize + 1, 3,
    600       TabOffset + (Integer(Tab) + 1) * TabSize + 2, TabHeight, MainTexture.clBevelShade,
    601       MainTexture.clBevelShade); // Tab shadow
     600      TabOffset + (Integer(Tab) + 1) * TabSize + 2, TabHeight, MainTexture.ColorBevelShade,
     601      MainTexture.ColorBevelShade); // Tab shadow
    602602
    603603  // Paint menu logo
     
    685685            HGrSystem2.Data.Canvas, Ornament.Left, Ornament.Top, SRCPAINT);
    686686        end;
    687       PaintLogo(Canvas, 69 + 11 * 27, yLogo, MainTexture.clBevelLight,
    688         MainTexture.clBevelShade);
     687      PaintLogo(Canvas, 69 + 11 * 27, yLogo, MainTexture.ColorBevelLight,
     688        MainTexture.ColorBevelShade);
    689689
    690690      for i := 0 to nPlOffered - 1 do
     
    706706            RFrame(Canvas, PlayerSlots[i].DiffUpBtn.left - 1, PlayerSlots[i].DiffUpBtn.top - 1,
    707707              PlayerSlots[i].DiffUpBtn.left + 12, PlayerSlots[i].DiffUpBtn.top + 24,
    708               MainTexture.clBevelShade, MainTexture.clBevelLight);
     708              MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    709709            with Canvas do
    710710            begin
     
    718718              RFrame(Canvas, PlayerSlots[I].MultiBtn.left - 1, PlayerSlots[I].MultiBtn.top - 1,
    719719                PlayerSlots[I].MultiBtn.left + 12, PlayerSlots[I].MultiBtn.top + 12,
    720                 MainTexture.clBevelShade, MainTexture.clBevelLight);
     720                MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    721721              BitBltCanvas(Canvas, xBrain[i] - 31, yBrain[i], 13, 12,
    722722                HGrSystem.Data.Canvas, 88, 47);
     
    733733    else
    734734    begin
    735       DLine(Canvas, 24, 198, yMain + 140 + 19, MainTexture.clBevelLight,
    736         MainTexture.clBevelShade);
     735      DLine(Canvas, 24, 198, yMain + 140 + 19, MainTexture.ColorBevelLight,
     736        MainTexture.ColorBevelShade);
    737737      RisedTextOut(Canvas, 24 { x0Brain+32-BiColorTextWidth(Canvas,s) div 2 } ,
    738738        yMain + 140 { y0Mini-77 } , Phrases.Lookup('STARTCONTROLS', 15));
     
    746746
    747747      DLine(Canvas, 24, xDefault - 6, yMain + 164 + 19,
    748         MainTexture.clBevelLight, MainTexture.clBevelShade);
     748        MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    749749      RisedTextOut(Canvas, 24 { x0Brain+32-BiColorTextWidth(Canvas,s) div 2 } ,
    750750        yMain + 164 { y0Mini-77 } , Phrases.Lookup('STARTCONTROLS', 16));
     
    755755        FrameImage(Canvas, BrainDefault.Picture, xDefault, yDefault, 64, 64,
    756756          0, 0, true);
    757       DLine(Canvas, 56, 272, y0Mini + 61 + 19, MainTexture.clBevelLight,
    758         MainTexture.clBevelShade);
     757      DLine(Canvas, 56, 272, y0Mini + 61 + 19, MainTexture.ColorBevelLight,
     758        MainTexture.ColorBevelShade);
    759759
    760760      RisedTextOut(Canvas, 56, y0Mini + 61,
     
    771771            HGrSystem2.Data.Canvas, Ornament.Left, Ornament.Top, SRCPAINT);
    772772        end;
    773       PaintLogo(Canvas, 69, yLogo, MainTexture.clBevelLight,
    774         MainTexture.clBevelShade);
     773      PaintLogo(Canvas, 69, yLogo, MainTexture.ColorBevelLight,
     774        MainTexture.ColorBevelShade);
    775775    end;
    776776  end
     
    788788    end
    789789    else
    790       DLine(Canvas, 344, 514, y0Mini + 61 + 19, MainTexture.clBevelLight,
    791         MainTexture.clBevelShade);
     790      DLine(Canvas, 344, 514, y0Mini + 61 + 19, MainTexture.ColorBevelLight,
     791        MainTexture.ColorBevelShade);
    792792    RisedTextOut(Canvas, 344, y0Mini + 61, Phrases.Lookup('STARTCONTROLS', 8));
    793793    s := TurnToString(LoadTurn);
     
    805805  else if Page = pgEditMap then
    806806  begin
    807     // DLine(Canvas,344,514,y0Mini+61+19,MainTexture.clBevelLight,MainTexture.clBevelShade);
     807    // DLine(Canvas,344,514,y0Mini+61+19,MainTexture.ColorBevelLight,MainTexture.ColorBevelShade);
    808808    s := Format(Phrases2.Lookup('MAPPROP'),
    809809      [(nMapLandTiles * 100 + 556) div 1112,
     
    818818  if Up2Btn.Visible then
    819819    RFrame(Canvas, Up2Btn.left - 1, Up2Btn.top - 1, Up2Btn.left + 12,
    820       Up2Btn.top + 24, MainTexture.clBevelShade, MainTexture.clBevelLight);
     820      Up2Btn.top + 24, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    821821  if Up1Btn.Visible then
    822822    RFrame(Canvas, Up1Btn.left - 1, Up1Btn.top - 1, Up1Btn.left + 12,
    823       Up1Btn.top + 24, MainTexture.clBevelShade, MainTexture.clBevelLight);
     823      Up1Btn.top + 24, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    824824  if AutoDiffUpBtn.Visible then
    825825    RFrame(Canvas, AutoDiffUpBtn.left - 1, AutoDiffUpBtn.top - 1,
    826       AutoDiffUpBtn.left + 12, AutoDiffUpBtn.top + 24, MainTexture.clBevelShade,
    827       MainTexture.clBevelLight);
     826      AutoDiffUpBtn.left + 12, AutoDiffUpBtn.top + 24, MainTexture.ColorBevelShade,
     827      MainTexture.ColorBevelLight);
    828828  if AutoEnemyUpBtn.Visible then
    829829    RFrame(Canvas, AutoEnemyUpBtn.left - 1, AutoEnemyUpBtn.top - 1,
    830830      AutoEnemyUpBtn.left + 12, AutoEnemyUpBtn.top + 24,
    831       MainTexture.clBevelShade, MainTexture.clBevelLight);
     831      MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    832832  if CustomizeBtn.Visible then
    833833    RFrame(Canvas, CustomizeBtn.left - 1, CustomizeBtn.top - 1,
    834       CustomizeBtn.left + 12, CustomizeBtn.top + 12, MainTexture.clBevelShade,
    835       MainTexture.clBevelLight);
     834      CustomizeBtn.left + 12, CustomizeBtn.top + 12, MainTexture.ColorBevelShade,
     835      MainTexture.ColorBevelLight);
    836836  if List.Visible then
    837837    EditFrame(Canvas, List.BoundsRect, MainTexture);
     
    848848    yMini := y0Mini - MiniMap.Size.Y div 2;
    849849    Frame(Canvas, xMini, yMini, xMini + 3 + MiniMap.Size.X * 2,
    850       yMini + 3 + MiniMap.Size.Y, MainTexture.clBevelLight,
    851       MainTexture.clBevelShade);
     850      yMini + 3 + MiniMap.Size.Y, MainTexture.ColorBevelLight,
     851      MainTexture.ColorBevelShade);
    852852    Frame(Canvas, xMini + 1, yMini + 1, xMini + 2 + MiniMap.Size.X * 2,
    853       yMini + 2 + MiniMap.Size.Y, MainTexture.clBevelShade,
    854       MainTexture.clBevelLight);
     853      yMini + 2 + MiniMap.Size.Y, MainTexture.ColorBevelShade,
     854      MainTexture.ColorBevelLight);
    855855
    856856    s := '';
     
    878878procedure TStartDlg.FormShow(Sender: TObject);
    879879begin
    880   SetMainTextureByAge(-1);
    881   List.Font.Color := MainTexture.clMark;
     880  MainTexture.Age := -1;
     881  List.Font.Color := MainTexture.ColorMark;
    882882
    883883  Fill(EmptyPicture.Canvas, Bounds(0, 0, 64, 64),
    884     Point((wMaintexture - 64) div 2, (hMaintexture - 64) div 2));
     884    Point((Maintexture.Width - 64) div 2, (Maintexture.Height - 64) div 2));
    885885
    886886  DarkenImage(EmptyPicture, 28);
Note: See TracChangeset for help on using the changeset viewer.