Ignore:
Timestamp:
Apr 9, 2021, 5:56:50 PM (3 years ago)
Author:
chronos
Message:
  • Modified: Merged changes from trunk r360 into highdpi branch.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/LocalPlayer/Term.pas

    r351 r361  
    16971697        Controls[i].Visible := false;
    16981698    me := -1;
    1699     SetMainTextureByAge(-1);
     1699    MainTexture.Age := -1;
    17001700    with Panel.Canvas do
    17011701    begin
     
    17341734    { if MyRO.Happened and phGameEnd<>0 then
    17351735      begin
    1736       Age:=3;
    1737       SetMainTextureByAge(-1);
     1736      Age := 3;
     1737      MainTexture.Age := -1;
    17381738      end
    17391739      else }
    17401740    begin
    17411741      Age := GetAge(me);
    1742       if SetMainTextureByAge(Age) then
     1742      if MainTexture.Age <> Age then begin
     1743        MainTexture.Age := Age;
    17431744        EOT.Invalidate; // has visible background parts in its bounds
     1745      end;
    17441746    end;
    17451747    // age:=MyRO.Turn mod 4; //!!!
     
    17541756  begin
    17551757    Age := 0;
    1756     SetMainTextureByAge(-1);
     1758    MainTexture.Age := -1;
    17571759    if ClientMode = cMovieTurn then
    17581760      EOT.ButtonIndex := eotCancel
     
    25442546        Age := 0;
    25452547        if Command = cHelpOnly then
    2546           SetMainTextureByAge(-1);
     2548          MainTexture.Age := -1;
    25472549        Tribes.Init;
    25482550        HelpDlg.UserLeft := (DpiScreen.width - HelpDlg.width) div 2;
     
    42714273        xMini + 2 + G.lx - MapWidth div (xxt * 2), yMini + 2,
    42724274        xMini + 1 + G.lx + MapWidth div (xxt * 2), yMini + 2 + G.ly - 1,
    4273         MainTexture.clMark, MainTexture.clMark)
     4275        MainTexture.ColorMark, MainTexture.ColorMark)
    42744276    else
    42754277      Frame(Panel.Canvas,
    42764278        xMini + 2 + G.lx - MapWidth div (xxt * 2), yMini + 2 + yw,
    42774279        xMini + 1 + G.lx + MapWidth div (xxt * 2), yMini + yw + MapHeight div yyt,
    4278         MainTexture.clMark, MainTexture.clMark);
     4280        MainTexture.ColorMark, MainTexture.ColorMark);
    42794281  end;
    42804282end;
     
    43074309  begin
    43084310    Fill(Panel.Canvas, 0, 3, xMidPanel + 7 - 10, PanelHeight - 3,
    4309       wMainTexture - (xMidPanel + 7 - 10), hMainTexture - PanelHeight);
     4311      MainTexture.Width - (xMidPanel + 7 - 10), MainTexture.Height - PanelHeight);
    43104312    Fill(Panel.Canvas, xRightPanel + 10 - 7, 3, Panel.width - xRightPanel - 10 +
    4311       7, PanelHeight - 3, -(xRightPanel + 10 - 7), hMainTexture - PanelHeight);
     4313      7, PanelHeight - 3, -(xRightPanel + 10 - 7), MainTexture.Height - PanelHeight);
    43124314    FillLarge(Panel.Canvas, xMidPanel - 2, PanelHeight - MidPanelHeight,
    43134315      xRightPanel + 2, PanelHeight, ClientWidth div 2);
     
    43214323    LineTo(xRightPanel, 0);
    43224324    LineTo(ClientWidth, 0);
    4323     Pen.Color := MainTexture.clBevelLight;
     4325    Pen.Color := MainTexture.ColorBevelLight;
    43244326    MoveTo(xMidPanel + 7 - 9, PanelHeight - MidPanelHeight + 2);
    43254327    LineTo(xRightPanel + 10 - 8, PanelHeight - MidPanelHeight + 2);
    4326     Pen.Color := MainTexture.clBevelLight;
     4328    Pen.Color := MainTexture.ColorBevelLight;
    43274329    MoveTo(0, 1);
    43284330    LineTo(xMidPanel + 7 - 9, 1);
    4329     Pen.Color := MainTexture.clBevelShade;
     4331    Pen.Color := MainTexture.ColorBevelShade;
    43304332    LineTo(xMidPanel + 7 - 9, PanelHeight - MidPanelHeight + 1);
    4331     Pen.Color := MainTexture.clBevelLight;
     4333    Pen.Color := MainTexture.ColorBevelLight;
    43324334    LineTo(xRightPanel + 10 - 9, PanelHeight - MidPanelHeight + 1);
    4333     Pen.Color := MainTexture.clBevelLight;
     4335    Pen.Color := MainTexture.ColorBevelLight;
    43344336    LineTo(xRightPanel + 10 - 9, 1);
    43354337    LineTo(ClientWidth, 1);
     
    43394341    MoveTo(0, 2);
    43404342    LineTo(xMidPanel + 7 - 10, 2);
    4341     Pen.Color := MainTexture.clBevelShade;
     4343    Pen.Color := MainTexture.ColorBevelShade;
    43424344    LineTo(xMidPanel + 7 - 10, PanelHeight);
    43434345    Corner(Panel.Canvas, xMidPanel + 7 - 16, 1, 1, MainTexture);
     
    44784480              ScreenTools.Frame(Panel.Canvas, xTroop + 1 + x,
    44794481                yTroop + 6 - yyt div 2, xTroop + 2 * xxt - 1 + x,
    4480                 yTroop + 2 * yyt + 10, MainTexture.clMark, MainTexture.clMark);
     4482                yTroop + 2 * yyt + 10, MainTexture.ColorMark, MainTexture.ColorMark);
    44814483            end;
    44824484          end;
     
    45964598        else
    45974599          x := xTroop - 152;
    4598         Pen.Color := MainTexture.clBevelShade;
     4600        Pen.Color := MainTexture.ColorBevelShade;
    45994601        MoveTo(x - 1, PanelHeight - MidPanelHeight + 2);
    46004602        LineTo(x - 1, PanelHeight);
    4601         Pen.Color := MainTexture.clBevelLight;
     4603        Pen.Color := MainTexture.ColorBevelLight;
    46024604        MoveTo(x, PanelHeight - MidPanelHeight + 2);
    46034605        LineTo(x, PanelHeight);
     
    46374639                        ScreenTools.Frame(Panel.Canvas, xTroop + 3 + x,
    46384640                          yTroop + 2, xTroop + 63 + x, yTroop + 46,
    4639                           MainTexture.clMark, MainTexture.clMark);
     4641                          MainTexture.ColorMark, MainTexture.ColorMark);
    46404642                      end
    46414643                      else if (unx.Master >= 0) and (unx.Master = UnFocus) then
     
    46444646                          xTroop + 64 + x, yTroop + 47, 8, $000000);
    46454647                        CFrame(Panel.Canvas, xTroop + 3 + x, yTroop + 2,
    4646                           xTroop + 63 + x, yTroop + 46, 8, MainTexture.clMark);
     4648                          xTroop + 63 + x, yTroop + 46, 8, MainTexture.ColorMark);
    46474649                      end;
    46484650                      NoMapPanel.SetOutput(Panel);
     
    47394741          RFrame(Panel.Canvas, Left - 1, Top - self.ClientHeight +
    47404742            (PanelHeight - 1), Left + width, Top + height - self.ClientHeight +
    4741             PanelHeight, MainTexture.clBevelShade, MainTexture.clBevelLight)
     4743            PanelHeight, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight)
    47424744    end; { if TroopLoc>=0 }
    47434745  end;
     
    47554757          RFrame(Panel.Canvas, Left - 1, Top - self.ClientHeight +
    47564758            (PanelHeight - 1), Left + width, Top + height - self.ClientHeight +
    4757             PanelHeight, MainTexture.clBevelShade, MainTexture.clBevelLight);
     4759            PanelHeight, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    47584760        end;
    47594761      end;
     
    47694771          RFrame(Panel.Canvas, Left - 1, Top - self.ClientHeight +
    47704772            (PanelHeight - 1), Left + width, Top + height - self.ClientHeight +
    4771             PanelHeight, MainTexture.clBevelShade, MainTexture.clBevelLight);
     4773            PanelHeight, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    47724774        end;
    47734775  end;
     
    47864788    MoveTo(0, TopBarHeight - 1);
    47874789    LineTo(ClientWidth, TopBarHeight - 1);
    4788     Pen.Color := MainTexture.clBevelShade;
     4790    Pen.Color := MainTexture.ColorBevelShade;
    47894791    MoveTo(0, TopBarHeight - 2);
    47904792    LineTo(ClientWidth, TopBarHeight - 2);
    47914793    MoveTo(0, TopBarHeight - 3);
    47924794    LineTo(ClientWidth, TopBarHeight - 3);
    4793     Pen.Color := MainTexture.clBevelLight;
     4795    Pen.Color := MainTexture.ColorBevelLight;
    47944796    ScreenTools.Frame(TopBar.Canvas, 40, -1, xTreasurySection - 1,
    4795       TopBarHeight - 7, MainTexture.clBevelShade, MainTexture.clBevelLight);
     4797      TopBarHeight - 7, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    47964798    ScreenTools.Frame(TopBar.Canvas, xResearchSection + 332, -1, ClientWidth,
    4797       TopBarHeight - 7, MainTexture.clBevelShade, MainTexture.clBevelLight);
     4799      TopBarHeight - 7, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    47984800  end;
    47994801  if GameMode <> cMovie then
     
    52305232          Frame(Panel.Canvas, xMini + 2 + G.lx - MapWidth div (2 * xxt),
    52315233            yMini + 2, xMini + 1 + G.lx + MapWidth div (2 * xxt),
    5232             yMini + 2 + G.ly - 1, MainTexture.clMark, MainTexture.clMark)
     5234            yMini + 2 + G.ly - 1, MainTexture.ColorMark, MainTexture.ColorMark)
    52335235        else
    52345236          Frame(Panel.Canvas, xMini + 2 + G.lx - MapWidth div (2 * xxt),
    52355237            yMini + 2 + yw, xMini + 2 + G.lx + MapWidth div (2 * xxt) - 1,
    5236             yMini + 2 + yw + MapHeight div yyt - 2, MainTexture.clMark,
    5237             MainTexture.clMark);
     5238            yMini + 2 + yw + MapHeight div yyt - 2, MainTexture.ColorMark,
     5239            MainTexture.ColorMark);
    52385240      end;
    52395241      RectInvalidate(xMini + 2, TopBarHeight + MapHeight - overlap + yMini + 2,
     
    74987500        Frame(Buffer.Canvas, x - xMini - 2 - MapWidth div (xxt * 2), 0,
    74997501          x - xMini - 2 + MapWidth div (xxt * 2) - 1, G.ly - 1,
    7500           MainTexture.clMark, MainTexture.clMark)
     7502          MainTexture.ColorMark, MainTexture.ColorMark)
    75017503      else
    75027504        Frame(Buffer.Canvas, x - xMini - 2 - MapWidth div (xxt * 2), yw,
    75037505          x - xMini - 2 + MapWidth div (xxt * 2) - 1, yw + MapHeight div yyt -
    7504           2, MainTexture.clMark, MainTexture.clMark);
     7506          2, MainTexture.ColorMark, MainTexture.ColorMark);
    75057507      DpiBitCanvas(Panel.Canvas, xMini + 2, yMini + 2, G.lx * 2, G.ly,
    75067508        Buffer.Canvas, 0, 0);
     
    80368038
    80378039end.
     8040
Note: See TracChangeset for help on using the changeset viewer.