Changeset 468 for trunk


Ignore:
Timestamp:
Dec 3, 2023, 11:28:08 AM (12 months ago)
Author:
chronos
Message:
  • Added: High DPI support integrated into trunk branch. It can be enabled by adding DPI define to compiler parameters for main project and packages.
Location:
trunk
Files:
16 added
48 edited

Legend:

Unmodified
Added
Removed
  • trunk/Back.pas

    r422 r468  
    55
    66uses
    7   LCLIntf, LCLType, SysUtils, Classes, Graphics, Forms, Controls;
     7  LCLIntf, LCLType, SysUtils, Classes,
     8  {$IFDEF DPI}Dpi.Graphics, Dpi.Forms, Dpi.Controls{$ELSE}
     9  Graphics, Forms, Controls{$ENDIF};
    810
    911type
     
    2527var
    2628  Background: TBackground;
     29
    2730
    2831implementation
     
    6568begin
    6669  if FullScreen then begin
    67     WindowState := wsFullScreen;
     70    WindowState := TWindowState.wsFullScreen;
    6871    if not Assigned(Img) then begin
    6972      FileName := GetGraphicsDir + DirectorySeparator + 'Background.png';
     
    7578    end;
    7679  end else begin
    77     if WindowState <> wsMaximized then begin
    78       WindowState := wsNormal;
    79       WindowState := wsFullScreen;
     80    if WindowState <> TWindowState.wsMaximized then begin
     81      WindowState := TWindowState.wsNormal;
     82      WindowState := TWindowState.wsFullScreen;
    8083    end;
    81     WindowState := wsNormal;
     84    WindowState := TWindowState.wsNormal;
    8285    BoundsRect := Bounds(StartDlg.Left - 8, StartDlg.Top - 8,
    8386      StartDlg.Width + 16, StartDlg.Height + 16);
  • trunk/Brain.pas

    r456 r468  
    44
    55uses
    6   Classes, SysUtils, Generics.Collections, Graphics, Protocol, LazFileUtils,
    7   dynlibs, Types;
     6  Classes, SysUtils, Generics.Collections, Protocol, LazFileUtils,
     7  dynlibs, Types,
     8  {$IFDEF DPI}Dpi.Graphics{$ELSE}Graphics{$ENDIF};
    89
    910const
  • trunk/Direct.pas

    r464 r468  
    88
    99  LCLIntf, LCLType, {$IFDEF UNIX}LMessages, {$ENDIF}Messages, SysUtils, Classes,
    10   Graphics, Controls, Forms, DrawDlg, GameServer;
     10  DrawDlg, GameServer,
     11  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms{$ELSE}Graphics, Controls, Forms{$ENDIF};
    1112
    1213const
     
    187188  BrainRandom.Name := Phrases.Lookup('RANDOMAI');
    188189  Canvas.Font.Assign(UniFont[ftNormal]);
    189   Canvas.Brush.Style := bsClear;
     190  Canvas.Brush.Style := TBrushStyle.bsClear;
    190191end;
    191192
  • trunk/GameServer.pas

    r457 r468  
    77
    88uses
    9   Protocol, Database, dynlibs, Platform, dateutils, LazFileUtils, Graphics,
    10   Brain, Global;
     9  Protocol, Database, DynLibs, Platform, DateUtils, LazFileUtils, Brain, Global,
     10  {$IFDEF DPI}Graphics{$ELSE}Graphics{$ENDIF};
    1111
    1212const
  • trunk/IPQ.pas

    r447 r468  
    1111  PIntegerArray = ^TIntegerArray;
    1212
    13   TheapItem = record
     13  THeapItem = record
    1414    Item: Integer;
    1515    Value: Integer;
    1616  end;
    1717
    18   TItemArray = array [0 .. $40000000 div SizeOf(TheapItem)] of TheapItem;
     18  TItemArray = array [0 .. $40000000 div SizeOf(THeapItem)] of THeapItem;
    1919  PItemArray = ^TItemArray;
    2020
     
    3737  end;
    3838
     39
    3940implementation
    4041
     
    4344  inherited Create;
    4445  fmax := Max;
    45   GetMem(bh, fmax * SizeOf(TheapItem));
     46  GetMem(bh, fmax * SizeOf(THeapItem));
    4647  GetMem(Ix, fmax * SizeOf(Integer));
    4748  N := -1;
     
    118119var
    119120  I, J: Integer;
    120   Last: TheapItem;
     121  Last: THeapItem;
    121122  lbh: PItemArray;
    122123begin
  • trunk/Inp.pas

    r447 r468  
    55
    66uses
    7   ScreenTools, LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms,
    8   DrawDlg, ButtonA, StdCtrls;
     7  ScreenTools, LCLIntf, LCLType, SysUtils, Classes, DrawDlg, ButtonA, StdCtrls,
     8  System.UITypes,
     9  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms{$ELSE}
     10  Graphics, Controls, Forms{$ENDIF};
    911
    1012type
     
    3537begin
    3638  Canvas.Font.Assign(UniFont[ftNormal]);
    37   Canvas.Brush.Style := bsClear;
     39  Canvas.Brush.Style := TBrushStyle.bsClear;
    3840  TitleHeight := Height;
    3941  InitButtons;
  • trunk/Integrated.lpi

    r461 r468  
    99        <MainUnitHasCreateFormStatements Value="False"/>
    1010        <MainUnitHasTitleStatement Value="False"/>
     11        <MainUnitHasScaledStatement Value="False"/>
    1112        <CompatibilityMode Value="True"/>
    1213      </Flags>
     
    6970              <IgnoredMessages idx5024="True"/>
    7071            </CompilerMessages>
    71             <CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL"/>
     72            <OtherDefines Count="1">
     73              <Define0 Value="DPI"/>
     74            </OtherDefines>
    7275          </Other>
    7376        </CompilerOptions>
    7477      </Item2>
    7578      <SharedMatrixOptions Count="2">
    76         <Item1 ID="151739052537" Targets="CevoComponents,Common" Modes="Debug" Value="-g -gl -gh -CirotR -O1"/>
    77         <Item2 ID="186701832267" Targets="CevoComponents,Common" Modes="Release" Value="-CX -XX -O3"/>
     79        <Item1 ID="151739052537" Targets="CevoComponents,Common,DpiControls" Modes="Debug" Value="-g -gl -gh -O1"/>
     80        <Item2 ID="186701832267" Targets="CevoComponents,Common,DpiControls" Modes="Release" Value="-CX -XX -O3"/>
    7881      </SharedMatrixOptions>
    7982    </BuildModes>
     
    8790      </Modes>
    8891    </RunParams>
    89     <RequiredPackages Count="3">
     92    <RequiredPackages Count="4">
    9093      <Item1>
     94        <PackageName Value="DpiControls"/>
     95        <DefaultFilename Value="Packages\DpiControls\DpiControls.lpk" Prefer="True"/>
     96      </Item1>
     97      <Item2>
    9198        <PackageName Value="Common"/>
    9299        <DefaultFilename Value="Packages\Common\Common.lpk" Prefer="True"/>
    93       </Item1>
    94       <Item2>
     100      </Item2>
     101      <Item3>
    95102        <PackageName Value="CevoComponents"/>
    96103        <DefaultFilename Value="Packages\CevoComponents\CevoComponents.lpk" Prefer="True"/>
    97       </Item2>
    98       <Item3>
     104      </Item3>
     105      <Item4>
    99106        <PackageName Value="LCL"/>
    100       </Item3>
     107      </Item4>
    101108    </RequiredPackages>
    102109    <Units Count="47">
     
    395402      <Debugging>
    396403        <DebugInfoType Value="dsDwarf2Set"/>
    397         <UseHeaptrc Value="True"/>
    398404        <UseExternalDbgSyms Value="True"/>
    399405      </Debugging>
     
    409415      </CompilerMessages>
    410416      <CustomOptions Value="-dDEBUG"/>
     417      <OtherDefines Count="2">
     418        <Define0 Value="DEBUG"/>
     419        <Define1 Value="DPI"/>
     420      </OtherDefines>
    411421    </Other>
    412422  </CompilerOptions>
  • trunk/Integrated.lpr

    r426 r468  
    66  cthreads, clocale,
    77  {$ENDIF}
    8   Forms, Interfaces, SysUtils, Protocol, GameServer, Direct, Start, Messg, Inp,
     8  {$IFDEF DPI}Dpi.Forms,{$ELSE}Forms,{$ENDIF}
     9  Interfaces, SysUtils, Protocol, GameServer, Direct, Start, Messg, Inp,
    910  Back, Log, LocalPlayer, ClientTools, Tribes, IsoEngine, Term, CityScreen, Nego,
    1011  NoTerm, ScreenTools, Directories;
     
    2728  Application.Initialize;
    2829  Application.Title := 'C-evo';
    29   Application.TaskBarBehavior := tbMultiButton;
     30  Application.TaskBarBehavior := TTaskBarBehavior.tbMultiButton;
    3031  Directories.UnitInit;
    3132  ScreenTools.UnitInit;
  • trunk/LocalPlayer/Battle.pas

    r460 r468  
    55
    66uses
    7   ScreenTools, Protocol, ButtonBase, ButtonA, Types, LCLIntf, LCLType,
    8   SysUtils, Classes, Graphics, Controls, Forms, DrawDlg, IsoEngine;
     7  ScreenTools, Protocol, ButtonBase, ButtonA, Types, LCLIntf, LCLType, UITypes,
     8  SysUtils, Classes, DrawDlg, IsoEngine,
     9  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms{$ELSE}
     10  Graphics, Controls, Forms{$ENDIF};
    911
    1012type
     
    236238    Brush.Color := 0;
    237239    FillRect(Rect(0, 0, ClientWidth, ClientHeight));
    238     Brush.Style := bsClear;
     240    Brush.Style := TBrushStyle.bsClear;
    239241    PaintBackground(self, 3 + Border, 3 + Border,
    240242      ClientWidth - (6 + 2 * Border), ClientHeight - (6 + 2 * Border));
  • trunk/LocalPlayer/CityScreen.pas

    r464 r468  
    77  {$IFDEF UNIX}LMessages,{$ENDIF}
    88  Protocol, ClientTools, ScreenTools, IsoEngine, BaseWin, LCLIntf, LCLType,
    9   Messages, SysUtils, Classes, Graphics, Controls, Forms, ExtCtrls, ButtonA,
    10   ButtonC, Area, GraphType, Texture;
     9  Messages, SysUtils, Classes, ButtonA, ButtonC, Area, GraphType, Texture,
     10  System.UITypes,
     11  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.ExtCtrls{$ELSE}
     12  Graphics, Controls, Forms, ExtCtrls{$ENDIF};
    1113
    1214const
     
    224226
    225227  Back := TBitmap.Create;
    226   Back.PixelFormat := pf24bit;
     228  Back.PixelFormat := TPixelFormat.pf24bit;
    227229  Back.SetSize(Width, Height);
    228230  Back.Canvas.FillRect(0, 0, Back.Width, Back.Height);
    229231  Template := TBitmap.Create;
    230   Template.PixelFormat := pf24bit;
     232  Template.PixelFormat := TPixelFormat.pf24bit;
    231233  LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'City.png',
    232234    [gfNoGamma]);
    233235  CityMapTemplate := TBitmap.Create;
    234   CityMapTemplate.PixelFormat := pf24bit;
     236  CityMapTemplate.PixelFormat := TPixelFormat.pf24bit;
    235237  LoadGraphicFile(CityMapTemplate, GetGraphicsDir + DirectorySeparator + 'BigCityMap.png',
    236238    [gfNoGamma]);
    237239  SmallCityMapTemplate := TBitmap.Create;
    238   SmallCityMapTemplate.PixelFormat := pf24bit;
     240  SmallCityMapTemplate.PixelFormat := TPixelFormat.pf24bit;
    239241  LoadGraphicFile(SmallCityMapTemplate, GetGraphicsDir + DirectorySeparator + 'SmallCityMap.png',
    240242    [gfNoGamma]);
    241243  SmallCityMap := TBitmap.Create;
    242   SmallCityMap.PixelFormat := pf24bit;
     244  SmallCityMap.PixelFormat := TPixelFormat.pf24bit;
    243245  SmallCityMap.SetSize(98, 74);
    244246  SmallCityMap.Canvas.FillRect(0, 0, SmallCityMap.Width, SmallCityMap.Height);
    245247  ZoomCityMap := TBitmap.Create;
    246   ZoomCityMap.PixelFormat := pf24bit;
     248  ZoomCityMap.PixelFormat := TPixelFormat.pf24bit;
    247249  ZoomCityMap.SetSize(228, 124);
    248250  ZoomCityMap.Canvas.FillRect(0, 0, ZoomCityMap.Width, ZoomCityMap.Height);
     
    362364      end;
    363365    end;
    364     Brush.style := bsClear;
     366    Brush.style := TBrushStyle.bsClear;
    365367  end;
    366368end;
     
    537539    Brush.Color := $FFFFFF;
    538540    FillRect(Rect(8, 7, 36, 32));
    539     Brush.style := bsClear;
     541    Brush.style := TBrushStyle.bsClear;
    540542    Font.Color := $000000;
    541543    S := IntToStr(C.Size);
     
    810812    Offscreen.Canvas.Brush.Color := MainTexture.ColorMark;
    811813    Offscreen.Canvas.FillRect(Rect(X - 27, Y - 6, X + 27, Y + 6));
    812     Offscreen.Canvas.Brush.style := bsClear;
     814    Offscreen.Canvas.Brush.Style := TBrushStyle.bsClear;
    813815  end;
    814816  Sprite(Offscreen, HGrSystem, X - 16, Y - 5, 10, 10, 88, 115);
     
    985987        FillRect(Rect(xView + 9, yView + 5, xView + 1 + 72 - 8,
    986988          yView + 5 + 40));
    987         Brush.style := bsClear;
     989        Brush.Style := TBrushStyle.bsClear;
    988990      end;
    989991    end
     
    16241626        FillRect(Rect(xView + 9, yView + 5, xView + 1 + 72 - 8,
    16251627          yView + 5 + 40));
    1626         Brush.style := bsClear;
     1628        Brush.Style := TBrushStyle.bsClear;
    16271629      end
    16281630    else if BlinkTime = 6 then
  • trunk/LocalPlayer/CityType.pas

    r460 r468  
    66uses
    77  Protocol, ClientTools, ScreenTools, BaseWin, LCLIntf, LCLType,
    8   SysUtils, Classes, Graphics, Controls, Forms, ButtonB, ExtCtrls;
     8  SysUtils, Classes, ButtonB, ExtCtrls,
     9  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms{$ELSE}Graphics, Controls, Forms{$ENDIF};
    910
    1011type
  • trunk/LocalPlayer/Diagram.pas

    r460 r468  
    55
    66uses
    7   BaseWin, LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms,
    8   ButtonB, Menus;
     7  BaseWin, LCLIntf, LCLType, SysUtils, Classes, ButtonB,
     8{$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.Menus{$ELSE}
     9Graphics, Controls, Forms, Menus{$ENDIF};
    910
    1011type
     
    6061  Canvas.Brush.Color := $000000;
    6162  Canvas.FillRect(Rect(Left, Top, Left + Width, Top + 200));
    62   Canvas.Brush.Style := bsClear;
     63  Canvas.Brush.Style := TBrushStyle.bsClear;
    6364    ScreenTools.Frame(Canvas, Left - 1, Top - 1, Left + Width, Top + 200,
    6465      MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
     
    202203      Brush.Color := $000000;
    203204      FillRect(Rect(0, 0, InnerWidth, InnerHeight));
    204       Brush.Style := bsClear;
     205      Brush.Style := TBrushStyle.bsClear;
    205206      Pen.Color := $606060;
    206207      MoveTo(Border, InnerHeight - Border);
  • trunk/LocalPlayer/Diplomacy.pas

    r447 r468  
    88function DipCommandToString(pSender, pTarget, Treaty, OppCommand,
    99  Command: Integer; const OppOffer, Offer: TOffer): string;
     10
    1011
    1112implementation
  • trunk/LocalPlayer/Draft.pas

    r460 r468  
    66uses
    77  Protocol, ClientTools, ScreenTools, BaseWin, LCLIntf, LCLType, SysUtils,
    8   Classes, Graphics, Controls, Forms, ExtCtrls, ButtonA, ButtonB, Area;
     8  Classes, ButtonA, ButtonB, Area, System.UITypes,
     9  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.ExtCtrls{$ELSE}
     10  Graphics, Controls, Forms, ExtCtrls{$ENDIF};
    911
    1012type
     
    8385
    8486  Back := TBitmap.Create;
    85   Back.PixelFormat := pf24bit;
     87  Back.PixelFormat := TPixelFormat.pf24bit;
    8688  Back.SetSize(Width, Height);
    8789  Back.Canvas.FillRect(0, 0, Back.Width, Back.Height);
    8890  Template := TBitmap.Create;
    89   Template.PixelFormat := pf24bit;
     91  Template.PixelFormat := TPixelFormat.pf24bit;
    9092  LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'MiliRes.png',
    9193    [gfNoGamma]);
     
    156158              FrameRect(Rect(xTotal2 - 3 - dx, Y + 2,
    157159                xTotal2 + 11 - dx, Y + 16));
    158               Brush.Style := bsClear;
     160              Brush.Style := TBrushStyle.bsClear;
    159161              Sprite(Offscreen, HGrSystem, xTotal2 - 1 - dx, Y + 4, 10, 10,
    160162                66 + I mod 11 * 11, 137 + I div 11 * 11);
     
    167169                FillRect(Rect(xTotal2 - 3 - dx, Y + 2,
    168170                  xTotal2 + W - 1 - dx, Y + 16));
    169                 Brush.Style := bsClear;
     171                Brush.Style := TBrushStyle.bsClear;
    170172                Textout(xTotal2 - 3 - dx + 1, Y, S);
    171173              end;
     
    508510  I, D: Integer;
    509511begin
    510   if Button = mbLeft then
     512  if Button = TMouseButton.mbLeft then
    511513  begin
    512514    for D := 0 to nDomains - 1 do
  • trunk/LocalPlayer/Enhance.pas

    r460 r468  
    66uses
    77  ScreenTools, BaseWin, Protocol, ClientTools, LCLIntf, LCLType, SysUtils,
    8   Classes, Graphics, Controls, Forms, IsoEngine, ButtonB, ButtonC, Menus;
     8  Classes, IsoEngine, ButtonB, ButtonC,
     9  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.Menus{$ELSE}
     10  Graphics, Controls, Forms, Menus{$ENDIF};
     11
    912
    1013type
  • trunk/LocalPlayer/Help.pas

    r460 r468  
    55
    66uses
    7   Protocol, ScreenTools, BaseWin, StringTables, Math, LCLIntf, LCLType,
    8   Messages, SysUtils, Classes, Graphics, Controls, Forms, ExtCtrls,
    9   ButtonB, PVSB, Types, Generics.Collections, IsoEngine;
     7  Protocol, ScreenTools, BaseWin, StringTables, Math, LCLIntf, LCLType, System.UITypes,
     8  Messages, SysUtils, Classes, ButtonB, PVSB, Types, Generics.Collections, IsoEngine,
     9  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.ExtCtrls, Dpi.Common{$ELSE}
     10  Graphics, Controls, Forms, ExtCtrls{$ENDIF};
    1011
    1112const
     
    151152
    152153uses
    153   Directories, ClientTools, Term, Tribes, Inp, Messg, PixelPointer, Global,
    154   KeyBindings;
     154  {$IFDEF DPI}Dpi.PixelPointer,{$ELSE}PixelPointer,{$ENDIF}
     155  Directories, ClientTools, Term, Tribes, Inp, Messg, Global, KeyBindings;
    155156
    156157{$R *.lfm}
     
    293294  CaptionFont := Font.Create;
    294295  CaptionFont.Assign(UniFont[ftNormal]);
    295   CaptionFont.Style := CaptionFont.Style + [fsItalic, fsBold];
     296  CaptionFont.Style := CaptionFont.Style + [TFontStyle.fsItalic, TFontStyle.fsBold];
    296297  InitButtons;
    297298
     
    302303  ExtPic := TBitmap.Create;
    303304  TerrIcon := TBitmap.Create;
    304   TerrIcon.PixelFormat := pf24bit;
     305  TerrIcon.PixelFormat := TPixelFormat.pf24bit;
    305306  TerrIcon.SetSize(xSizeBig, ySizeBig);
    306307  TerrIcon.Canvas.FillRect(0, 0, TerrIcon.Width, TerrIcon.Height);
     
    699700                FrameRect(Rect(ofs, 1 + 23 + I * 24, ofs + 14,
    700701                  15 + 23 + I * 24));
    701                 Brush.Style := bsClear;
     702                Brush.Style := TBrushStyle.bsClear;
    702703                Sprite(OffScreen, HGrSystem, ofs + 2, 3 + 23 + I * 24, 10, 10,
    703704                  66 + HelpLineInfo.Picpix mod 11 * 11,
  • trunk/LocalPlayer/IsoEngine.pas

    r456 r468  
    66uses
    77  Protocol, ClientTools, ScreenTools, Tribes, LCLIntf, LCLType, SysUtils,
    8   Classes, Graphics, PixelPointer, GraphicSet;
     8  Classes, GraphicSet,
     9  {$IFDEF DPI}Dpi.Graphics, Dpi.PixelPointer, Dpi.Common{$ELSE}
     10  Graphics, PixelPointer{$ENDIF};
    911
    1012const
     
    215217begin
    216218  LandPatch := TBitmap.Create;
    217   LandPatch.PixelFormat := pf24bit;
     219  LandPatch.PixelFormat := TPixelFormat.pf24bit;
    218220  OceanPatch := TBitmap.Create;
    219   OceanPatch.PixelFormat := pf24bit;
     221  OceanPatch.PixelFormat := TPixelFormat.pf24bit;
    220222  Borders := TBitmap.Create;
    221   Borders.PixelFormat := pf24bit;
     223  Borders.PixelFormat := TPixelFormat.pf24bit;
    222224  HGrTerrain := nil;
    223225  HGrCities := nil;
     
    251253  Mask24 := TBitmap.Create;
    252254  Mask24.Assign(HGrTerrain.Mask);
    253   Mask24.PixelFormat := pf24bit;
     255  Mask24.PixelFormat := TPixelFormat.pf24bit;
    254256  Mask24.BeginUpdate;
    255257  for ySrc := 0 to TerrainIconLines - 1 do begin
     
    344346  OceanPatch.Canvas.FillRect(0, 0, OceanPatch.Width, OceanPatch.Height);
    345347  LandMore := TBitmap.Create;
    346   LandMore.PixelFormat := pf24bit;
     348  LandMore.PixelFormat := TPixelFormat.pf24bit;
    347349  LandMore.Canvas.Brush.Color := 0;
    348350  LandMore.SetSize(xxt * 18, yyt * 9);
    349351  LandMore.Canvas.FillRect(0, 0, LandMore.Width, LandMore.Height);
    350352  OceanMore := TBitmap.Create;
    351   OceanMore.PixelFormat := pf24bit;
     353  OceanMore.PixelFormat := TPixelFormat.pf24bit;
    352354  OceanMore.Canvas.Brush.Color := 0;
    353355  OceanMore.SetSize(xxt * 8, yyt * 4);
    354356  OceanMore.Canvas.FillRect(0, 0, OceanMore.Width, OceanMore.Height);
    355357  DitherMask := TBitmap.Create;
    356   DitherMask.PixelFormat := pf24bit;
     358  DitherMask.PixelFormat := TPixelFormat.pf24bit;
    357359  DitherMask.SetSize(xxt * 2, yyt * 2);
    358360  DitherMask.Canvas.FillRect(0, 0, DitherMask.Width, DitherMask.Height);
     
    584586  FOutput.Canvas.Brush.Color := Color;
    585587  FOutput.Canvas.FillRect(Rect(X, Y, X + Width, Y + Height));
    586   FOutput.Canvas.Brush.Style := bsClear;
     588  FOutput.Canvas.Brush.Style := TBrushStyle.bsClear;
    587589end;
    588590
     
    10801082      xs := X + xxt - (W + 1) div 2;
    10811083      if IsCapital then
    1082         FOutput.Canvas.Font.Style := FOutput.Canvas.Font.Style + [fsUnderline];
     1084        FOutput.Canvas.Font.Style := FOutput.Canvas.Font.Style + [TFontStyle.fsUnderline];
    10831085      Textout(xs + 1, Y - 9, $000000, S);
    10841086      Textout(xs, Y - 10, $FFFFFF, S);
    10851087      if IsCapital then
    1086         FOutput.Canvas.Font.Style := FOutput.Canvas.Font.Style - [fsUnderline];
     1088        FOutput.Canvas.Font.Style := FOutput.Canvas.Font.Style - [TFontStyle.fsUnderline];
    10871089    end;
    10881090  end;
     
    15091511    Brush.Color := $000000;
    15101512    FillRect(Rect(FLeft, RealTop, FRight, RealBottom));
    1511     Brush.Style := bsClear;
     1513    Brush.Style := TBrushStyle.bsClear;
    15121514  end;
    15131515
  • trunk/LocalPlayer/KeyBindings.pas

    r456 r468  
    55uses
    66  Classes, SysUtils, Generics.Collections, Generics.Defaults, LCLProc, LCLType,
    7   Menus, Registry;
     7  Registry,
     8  {$IFDEF DPI}Dpi.Menus{$ELSE}Menus{$ENDIF};
    89
    910type
  • trunk/LocalPlayer/LocalPlayer.pas

    r460 r468  
    77procedure SetAIName(P: Integer; Name: string);
    88
     9
    910implementation
    1011
    1112uses
    12   Term, CityScreen, Nego, BaseWin, Forms;
     13  Term, CityScreen, Nego, BaseWin,
     14  {$IFDEF DPI}Dpi.Forms{$ELSE}Forms{$ENDIF};
    1315
    1416var
  • trunk/LocalPlayer/MessgEx.pas

    r460 r468  
    66uses
    77  Messg, Protocol, ScreenTools, Platform, DateUtils, LCLIntf, LCLType, Messages,
    8   SysUtils, Classes, Graphics, Controls, Forms, ButtonA, ButtonB, StdCtrls,
    9   DrawDlg, Help;
     8  SysUtils, Classes, ButtonA, ButtonB, DrawDlg, Help, System.UITypes,
     9  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.StdCtrls, Dpi.Common{$ELSE}
     10  Graphics, Controls, Forms, StdCtrls{$ENDIF};
    1011
    1112type
     
    6162
    6263uses
    63   ClientTools, BaseWin, Term, UnitStat, Tribes, PixelPointer,
    64   Diagram, Sound;
     64  {$IFDEF DPI}Dpi.PixelPointer,{$ELSE}PixelPointer,{$ENDIF}
     65  ClientTools, BaseWin, Term, UnitStat, Tribes, Diagram, Sound;
    6566
    6667{$R *.lfm}
  • trunk/LocalPlayer/NatStat.pas

    r460 r468  
    66uses
    77  Protocol, ClientTools, ScreenTools, BaseWin, LCLIntf, LCLType, SysUtils,
    8   Classes, Graphics, Controls, Forms, ButtonB, ButtonC, Menus, EOTButton;
     8  Classes, ButtonB, ButtonC, EOTButton,
     9  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.Menus{$ELSE}
     10  Graphics, Controls, Forms, Menus{$ENDIF};
    911
    1012type
     
    8688
    8789  Back := TBitmap.Create;
    88   Back.PixelFormat := pf24bit;
     90  Back.PixelFormat := TPixelFormat.pf24bit;
    8991  Back.SetSize(Width, Height);
    9092  Back.Canvas.FillRect(0, 0, Back.Width, Back.Height);
    9193  Template := TBitmap.Create;
    92   Template.PixelFormat := pf24bit;
     94  Template.PixelFormat := TPixelFormat.pf24bit;
    9395  LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'Nation.png',
    9496    [gfNoGamma]);
     
    359361        FillRect(Rect(xReport + PaperShade, yReport + hReport,
    360362          xReport + wReport + PaperShade, yReport + hReport + PaperShade));
    361         Brush.Style := bsClear;
     363        Brush.Style := TBrushStyle.bsClear;
    362364      end;
    363365
  • trunk/LocalPlayer/Nego.pas

    r460 r468  
    55
    66uses
    7   ScreenTools, BaseWin, Protocol, LCLType, SysUtils, Classes, Graphics,
    8   Controls, Forms, ButtonA, ButtonB, ButtonN;
     7  ScreenTools, BaseWin, Protocol, LCLType, SysUtils, Classes, ButtonA, ButtonB,
     8  ButtonN, System.UITypes,
     9  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms{$ELSE}
     10  Graphics, Controls, Forms{$ENDIF};
    911
    1012const
     
    432434    else
    433435      FillRect(Rect(X, Y, X + 64, Y + 48));
    434     Brush.Style := bsClear;
     436    Brush.Style := TBrushStyle.bsClear;
    435437    ScreenTools.Frame(Offscreen.Canvas, X - 1, Y - 1, X + 64, Y + 48, $000000, $000000);
    436438  end
     
    572574    FillRect(Rect(xText1 + PaperShade, yText1 + hText,
    573575      xText1 + wText + PaperShade, yText1 + hText + PaperShade));
    574     Brush.Style := bsClear;
     576    Brush.Style := TBrushStyle.bsClear;
    575577  end;
    576578
  • trunk/LocalPlayer/PVSB.pas

    r447 r468  
    66uses
    77  {$IFDEF WINDOWS}Windows,{$ENDIF}
    8   Classes, Controls, Forms, LCLIntf, LCLType, LMessages, Messages, SysUtils,
    9   StdCtrls, Math;
     8  Classes, LCLIntf, LCLType, LMessages, Messages, SysUtils, Math,
     9  {$IFDEF DPI}Dpi.Controls, Dpi.Forms, Dpi.StdCtrls{$ELSE}
     10  Controls, Forms, StdCtrls{$ENDIF};
    1011
    1112type
     
    183184  Inc(Count);
    184185  ScrollBar := TScrollBar.Create(Parent);
    185   ScrollBar.Kind := sbVertical;
     186  ScrollBar.Kind := TScrollBarKind.sbVertical;
    186187  ScrollBar.Name := 'PVSB' + IntToStr(Count);
    187   ScrollBar.Align := alRight;
     188  ScrollBar.Align := TAlign.alRight;
    188189  ScrollBar.OnChange := ScrollBarChanged;
    189190  ScrollBar.Parent := Parent;
  • trunk/LocalPlayer/Rates.pas

    r460 r468  
    55
    66uses
    7   Protocol, ScreenTools, BaseWin, LCLIntf, LCLType, SysUtils, Classes, Graphics,
    8   Controls, Forms, ButtonB, ButtonC;
     7  Protocol, ScreenTools, BaseWin, LCLIntf, LCLType, SysUtils, Classes, ButtonB,
     8  ButtonC,
     9  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms{$ELSE}
     10  Graphics, Controls, Forms{$ENDIF};
    911
    1012type
     
    124126      Brush.Color := $000000;
    125127      FillRect(Rect(X, Y, X + Max - current, Y + 7));
    126       Brush.Style := bsClear;
     128      Brush.Style := TBrushStyle.bsClear;
    127129    end;
    128130
  • trunk/LocalPlayer/Select.pas

    r460 r468  
    55
    66uses
    7   Protocol, ClientTools, ScreenTools, PVSB, BaseWin,
    8   LCLIntf, LCLType, Messages, SysUtils, Classes, Graphics, Controls, Forms,
    9   ExtCtrls, ButtonB, ButtonBase, Menus, Types;
     7  Protocol, ClientTools, ScreenTools, PVSB, BaseWin, System.UITypes,
     8  LCLIntf, LCLType, Messages, SysUtils, Classes, ButtonB, ButtonBase, Types,
     9  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.ExtCtrls, Dpi.Menus{$ELSE}
     10  Graphics, Controls, Forms, ExtCtrls, Menus{$ENDIF};
    1011
    1112const
     
    118119  Layer2Btn.Hint := Phrases.Lookup('BTN_CLASSES');
    119120  ScienceNationDotBuffer := TBitmap.Create;
    120   ScienceNationDotBuffer.PixelFormat := pf24bit;
     121  ScienceNationDotBuffer.PixelFormat := TPixelFormat.pf24bit;
    121122  ScienceNationDotBuffer.SetSize(17, 17);
    122123  ScienceNationDotBuffer.Canvas.FillRect(0, 0, ScienceNationDotBuffer.Width, ScienceNationDotBuffer.Height);
     
    276277          Brush.Color := $FFFFFF;
    277278          FillRect(rect(X - 4 - 12, Y, X - 4 + 12, Y + 20));
    278           Brush.style := bsClear;
     279          Brush.Style := TBrushStyle.bsClear;
    279280          Font.Color := $000000;
    280281          S := IntToStr(MyCity[lix].Size);
     
    749750          FillRect(rect(104 - 33 + 14 + TechNameSpace + 24 * I + 1 * 2, 0,
    750751            104 - 33 + 17 + TechNameSpace + 24 * I + 8 * 2, InnerHeight));
    751           Brush.style := bsClear;
     752          Brush.Style := TBrushStyle.bsClear;
    752753        end
    753754        else
  • trunk/LocalPlayer/TechTree.pas

    r460 r468  
    55
    66uses
    7   ScreenTools, LCLIntf, LCLType, SysUtils, Classes, Graphics,
    8   Controls, Forms, ButtonB, DrawDlg;
     7  ScreenTools, LCLIntf, LCLType, SysUtils, Classes, ButtonB, DrawDlg,
     8  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms{$ELSE}
     9  Graphics, Controls, Forms{$ENDIF};
    910
    1011type
     
    132133  if Image = nil then begin
    133134    Image := TBitmap.Create;
    134     Image.PixelFormat := pf24bit;
     135    Image.PixelFormat := TPixelFormat.pf24bit;
    135136    LoadGraphicFile(Image, HomeDir + 'Help' + DirectorySeparator + 'AdvTree.png',
    136137      [gfNoGamma]);
     
    140141      Font.Assign(UniFont[ftSmall]);
    141142      Font.Color := clBlack;
    142       Brush.Style := bsClear;
     143      Brush.Style := TBrushStyle.bsClear;
    143144      for X := 0 to (Image.Width - xStart) div xPitch do
    144145        for Y := 0 to (Image.Height - yStart) div yPitch do
     
    186187  Shift: TShiftState; X, Y: Integer);
    187188begin
    188   if Button = mbLeft then
     189  if Button = TMouseButton.mbLeft then
    189190  begin
    190191    Dragging := True;
  • trunk/LocalPlayer/Term.pas

    r462 r468  
    1212{$ENDIF}
    1313  Protocol, Tribes, PVSB, ClientTools, ScreenTools, BaseWin, Messg, ButtonBase,
    14   LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, DrawDlg, Types,
    15   Forms, Menus, ExtCtrls, dateutils, Platform, ButtonB, ButtonC, EOTButton, Area,
     14  LCLIntf, LCLType, SysUtils, Classes, DrawDlg, Types, System.UITypes,
     15  DateUtils, Platform, ButtonB, ButtonC, EOTButton, Area,
    1616  GraphicSet, MiniMap, IsoEngine, Wonders, TechTree, Enhance, Nego, CityType,
    1717  Diagram, CityScreen, Rates, Battle, NatStat, UnitStat, Draft, Select, MessgEx,
    18   Help;
     18  Help,
     19  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.Menus, Dpi.ExtCtrls,
     20  Dpi.PixelPointer, Dpi.Common{$ELSE}
     21  Graphics, Controls, Forms, Menus, ExtCtrls, PixelPointer{$ENDIF};
    1922
    2023const
     
    642645
    643646uses
    644   Directories, Log, PixelPointer, Sound, Registry, Global, KeyBindings, CmdList;
     647  Directories, Log, Sound, Registry, Global, KeyBindings, CmdList;
    645648
    646649{$R *.lfm}
     
    18091812  HGrStdUnits := LoadGraphicSet('StdUnits.png');
    18101813  SmallImp := TBitmap.Create;
    1811   SmallImp.PixelFormat := pf24bit;
     1814  SmallImp.PixelFormat := TPixelFormat.pf24bit;
    18121815  InitSmallImp;
    18131816  SoundPreloadDone := [];
     
    18691872      Brush.Color := $000000;
    18701873      FillRect(Rect(0, 0, Panel.width, Panel.height));
    1871       Brush.Style := bsClear;
     1874      Brush.Style := TBrushStyle.bsClear;
    18721875    end;
    18731876    with TopBar.Canvas do
     
    18751878      Brush.Color := $000000;
    18761879      FillRect(Rect(0, 0, TopBar.width, TopBar.height));
    1877       Brush.Style := bsClear;
     1880      Brush.Style := TBrushStyle.bsClear;
    18781881    end;
    18791882    Invalidate;
     
    28852888          Brush.Color := $000000;
    28862889          FillRect(Rect(0, 0, Panel.width, Panel.height));
    2887           Brush.Style := bsClear;
     2890          Brush.Style := TBrushStyle.bsClear;
    28882891        end;
    28892892        with TopBar.Canvas do
     
    28912894          Brush.Color := $000000;
    28922895          FillRect(Rect(0, 0, TopBar.width, TopBar.height));
    2893           Brush.Style := bsClear;
     2896          Brush.Style := TBrushStyle.bsClear;
    28942897        end;
    28952898        FormResize(nil); // place mini map correctly according to its size
     
    36343637  MiniMap := TMiniMap.Create;
    36353638  Panel := TBitmap.Create;
    3636   Panel.PixelFormat := pf24bit;
     3639  Panel.PixelFormat := TPixelFormat.pf24bit;
    36373640  Panel.Canvas.Font.Assign(UniFont[ftSmall]);
    3638   Panel.Canvas.Brush.Style := bsClear;
     3641  Panel.Canvas.Brush.Style := TBrushStyle.bsClear;
    36393642  TopBar := TBitmap.Create;
    3640   TopBar.PixelFormat := pf24bit;
     3643  TopBar.PixelFormat := TPixelFormat.pf24bit;
    36413644  TopBar.Canvas.Font.Assign(UniFont[ftNormal]);
    3642   TopBar.Canvas.Brush.Style := bsClear;
     3645  TopBar.Canvas.Brush.Style := TBrushStyle.bsClear;
    36433646  Buffer := TBitmap.Create;
    3644   Buffer.PixelFormat := pf24bit;
     3647  Buffer.PixelFormat := TPixelFormat.pf24bit;
    36453648  if 2 * lxmax > 3 * xSizeBig then Buffer.width := 2 * lxmax
    36463649    else Buffer.width := 3 * xSizeBig;
     
    48064809      Brush.Color := $000000;
    48074810      FillRect(Rect(0, 0, MapWidth, MapHeight));
    4808       Brush.Style := bsClear;
     4811      Brush.Style := TBrushStyle.bsClear;
    48094812      OffscreenUser := self;
    48104813      Exit;
     
    49914994      xRightPanel + 2, PanelHeight, ClientWidth div 2);
    49924995
    4993     Brush.Style := bsClear;
     4996    Brush.Style := TBrushStyle.bsClear;
    49944997    Pen.Color := $000000;
    49954998    MoveTo(0, 0);
     
    52165219    else if TroopLoc >= 0 then
    52175220    begin
    5218       Brush.Style := bsClear;
     5221      Brush.Style := TBrushStyle.bsClear;
    52195222      if UnFocus >= 0 then
    52205223        with MyUn^[UnFocus] do
     
    57095712begin
    57105713  if Idle and (Me >= 0) and (GameMode <> cMovie) then
    5711     if (fsModal in Screen.ActiveForm.FormState) or
     5714    if (TFormStateType.fsModal in Screen.ActiveForm.FormState) or
    57125715      (Screen.ActiveForm is TBufferedDrawDlg) and
    57135716      (TBufferedDrawDlg(Screen.ActiveForm).WindowMode <> wmPersistent) then
     
    58655868  if (MouseLoc < 0) or (MouseLoc >= G.lx * G.ly) then
    58665869    Exit;
    5867   if (Button = mbLeft) and not(ssShift in Shift) then
     5870  if (Button = TMouseButton.mbLeft) and not(ssShift in Shift) then
    58685871  begin
    58695872    DoCenter := True;
     
    59925995    end;
    59935996  end
    5994   else if (ClientMode <> cEditMap) and (Button = mbRight) and
     5997  else if (ClientMode <> cEditMap) and (Button = TMouseButton.mbRight) and
    59955998    not(ssShift in Shift) then
    59965999  begin
     
    60756078      end;
    60766079  end
    6077   else if (Button = mbMiddle) and (UnFocus >= 0) and
     6080  else if (Button = TMouseButton.mbMiddle) and (UnFocus >= 0) and
    60786081    (MyModel[MyUn[UnFocus].mix].Kind in [mkSettler, mkSlaves]) then
    60796082  begin
     
    60886091      mEnhance.Click;
    60896092  end
    6090   else if (Button = mbLeft) and (ssShift in Shift) and
     6093  else if (Button = TMouseButton.mbLeft) and (ssShift in Shift) and
    60916094    (MyMap[MouseLoc] and fTerrain <> fUNKNOWN) then
    60926095    HelpOnTerrain(MouseLoc, wmPersistent)
    6093   else if (ClientMode <= cContinue) and (Button = mbRight) and
     6096  else if (ClientMode <= cContinue) and (Button = TMouseButton.mbRight) and
    60946097    (ssShift in Shift) and (UnFocus >= 0) and
    60956098    (MyMap[MouseLoc] and (fUnit or fOwned) = fUnit) then
     
    68676870    Exit;
    68686871
    6869   if Button = mbLeft then
     6872  if Button = TMouseButton.mbLeft then
    68706873  begin
    68716874    if (X >= xMini + 2) and (Y >= yMini + 2) and (X < xMini + 2 + 2 * G.lx) and
     
    71607163procedure TMainScreen.SetFullScreen(Active: Boolean);
    71617164begin
    7162     if Active and (CurrentWindowState <> wsFullScreen) then begin
     7165    if Active and (CurrentWindowState <> TWindowState.wsFullScreen) then begin
    71637166      PrevWindowState := WindowState;
    7164       CurrentWindowState := wsFullScreen;
     7167      CurrentWindowState := TWindowState.wsFullScreen;
    71657168      WindowState := CurrentWindowState;
    71667169      {$IFDEF WINDOWS}
     
    71697172      BorderIcons := [];
    71707173    end else
    7171     if not Active and (CurrentWindowState = wsFullScreen) then begin
    7172       if PrevWindowState = wsMaximized then begin
    7173         CurrentWindowState := wsMaximized;
     7174    if not Active and (CurrentWindowState = TWindowState.wsFullScreen) then begin
     7175      if PrevWindowState = TWindowState.wsMaximized then begin
     7176        CurrentWindowState := TWindowState.wsMaximized;
    71747177        WindowState := CurrentWindowState;
    71757178      end else begin
    7176         CurrentWindowState := wsNormal;
     7179        CurrentWindowState := TWindowState.wsNormal;
    71777180        WindowState := CurrentWindowState;
    7178         WindowState := wsFullScreen;
     7181        WindowState := TWindowState.wsFullScreen;
    71797182        WindowState := CurrentWindowState;
    71807183      end;
     
    71827185      BorderStyle := bsSizeable;
    71837186      {$ENDIF}
    7184       BorderIcons := [biSystemMenu, biMinimize, biMaximize];
     7187      BorderIcons := [TBorderIcon.biSystemMenu, TBorderIcon.biMinimize,
     7188        TBorderIcon.biMaximize];
    71857189    end;
    71867190end;
     
    79547958    MouseLoc := LocationOfScreenPixel(X, Y);
    79557959    if MouseLoc <> BrushLoc then
    7956       MapBoxMouseDown(nil, mbLeft, Shift, X, Y);
     7960      MapBoxMouseDown(nil, TMouseButton.mbLeft, Shift, X, Y);
    79577961  end
    79587962  (* else if Idle and (UnFocus>=0) then
     
    80678071          TopBarHeight + MapHeight - overlap));
    80688072      end;
    8069       Brush.Style := bsClear;
     8073      Brush.Style := TBrushStyle.bsClear;
    80708074    end;
    80718075  BitBltCanvas(Canvas, MapOffset, TopBarHeight, MapWidth, MapHeight - overlap,
  • trunk/LocalPlayer/Tribes.pas

    r464 r468  
    55
    66uses
    7   Protocol, ScreenTools, LazFileUtils, Classes, Graphics, SysUtils, Global,
    8   GraphicSet;
     7  Protocol, ScreenTools, LazFileUtils, Classes, SysUtils, Global,
     8  GraphicSet,
     9  {$IFDEF DPI}Dpi.Graphics{$ELSE}Graphics{$ENDIF};
     10
    911
    1012type
  • trunk/LocalPlayer/UnitStat.pas

    r460 r468  
    66uses
    77  Protocol, ClientTools, ScreenTools, BaseWin, LCLIntf, LCLType, SysUtils,
    8   Classes, Graphics, Controls, Forms, ButtonB, ButtonC, IsoEngine;
     8  Classes, ButtonB, ButtonC, IsoEngine,
     9  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms{$ELSE}
     10  Graphics, Controls, Forms{$ENDIF};
    911
    1012type
     
    7981
    8082  Back := TBitmap.Create;
    81   Back.PixelFormat := pf24bit;
     83  Back.PixelFormat := TPixelFormat.pf24bit;
    8284  Back.SetSize(5 * wCommon, hMax);
    8385  Back.Canvas.FillRect(0, 0, Back.Width, Back.Height);
    8486  Template := TBitmap.Create;
    85   Template.PixelFormat := pf24bit;
     87  Template.PixelFormat := TPixelFormat.pf24bit;
    8688  LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'Unit.png',
    8789    [gfNoGamma]);
     
    343345              Brush.Color := $FFFFFF;
    344346              FillRect(Rect(X - 3 + dx, Y + 2, X + W - 1 + dx, Y + 16));
    345               Brush.Style := bsClear;
     347              Brush.Style := TBrushStyle.bsClear;
    346348              Textout(X - 3 + dx + 1, Y, S);
    347349              Inc(dx, W + 1);
     
    349351            Brush.Color := $C0C0C0;
    350352            FrameRect(Rect(X - 3 + dx, Y + 2, X + 11 + dx, Y + 16));
    351             Brush.Style := bsClear;
     353            Brush.Style := TBrushStyle.bsClear;
    352354            Sprite(dst, HGrSystem, X - 1 + dx, Y + 4, 10, 10,
    353355              66 + I mod 11 * 11, 137 + I div 11 * 11);
     
    512514            Offscreen.Canvas.FillRect(Rect(xView, yView, xView + 64,
    513515              yView + 16));
    514             Brush.Style := bsClear;
     516            Brush.Style := TBrushStyle.bsClear;
    515517          end;
    516518
  • trunk/LocalPlayer/Wonders.pas

    r460 r468  
    55
    66uses
    7   ScreenTools, BaseWin, Protocol, LCLIntf, LCLType, SysUtils, Classes, Graphics,
    8   Controls, Forms, ButtonB;
     7  ScreenTools, BaseWin, Protocol, LCLIntf, LCLType, SysUtils, Classes, ButtonB,
     8  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.Common{$ELSE}
     9  Graphics, Controls, Forms{$ENDIF};
    910
    1011type
     
    3536
    3637uses
    37   Term, ClientTools, Help, Tribes, PixelPointer;
     38  {$IFDEF DPI}Dpi.PixelPointer,{$ELSE}PixelPointer,{$ENDIF}
     39  Term, ClientTools, Help, Tribes;
    3840
    3941{$R *.lfm}
     
    6769begin
    6870  Canvas.Font.Assign(UniFont[ftNormal]);
    69   Canvas.Brush.Style := bsClear;
     71  Canvas.Brush.Style := TBrushStyle.bsClear;
    7072  InitButtons;
    7173end;
  • trunk/Log.pas

    r447 r468  
    55
    66uses
    7   LCLIntf, LCLType, Messages, SysUtils, Classes, Graphics, Controls, Forms,
    8   StdCtrls, Menus;
     7  LCLIntf, LCLType, Messages, SysUtils, Classes,
     8  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.StdCtrls, Dpi.Menus{$ELSE}
     9  Graphics, Controls, Forms, StdCtrls, Menus{$ENDIF};
    910
    1011type
     
    130131  Shift: TShiftState; X, Y: Integer);
    131132begin
    132   if Button = mbRight then
     133  if Button = TMouseButton.mbRight then
    133134    LogPopup.Popup(Left + X, Top + Y);
    134135end;
  • trunk/Messg.pas

    r447 r468  
    66uses
    77  ScreenTools, LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes,
    8   Graphics, Controls, Forms, ButtonA, DrawDlg;
     8  ButtonA, DrawDlg, System.UITypes,
     9  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms{$ELSE}
     10  Graphics, Controls, Forms{$ENDIF};
    911
    1012const
  • trunk/MiniMap.pas

    r456 r468  
    55
    66uses
    7   Classes, SysUtils, Graphics, Protocol, ClientTools;
     7  Classes, SysUtils, Protocol, ClientTools,
     8  {$IFDEF DPI}Dpi.Graphics, Dpi.Common{$ELSE}Graphics{$ENDIF};
    89
    910type
     
    3738
    3839uses
    39   ScreenTools, PixelPointer, Global, GameServer, IsoEngine, Tribes;
     40  {$IFDEF DPI}Dpi.PixelPointer,{$ELSE}PixelPointer,{$ENDIF}
     41  ScreenTools, Global, GameServer, IsoEngine, Tribes;
    4042
    4143const
     
    169171  Size := WorldSize;
    170172
    171   Bitmap.PixelFormat := pf24bit;
     173  Bitmap.PixelFormat := TPixelFormat.pf24bit;
    172174  Bitmap.SetSize(Size.X * 2, Size.Y);
    173175  Bitmap.BeginUpdate;
     
    199201  OwnColor := HGrSystem.Data.Canvas.Pixels[95, 67];
    200202  EnemyColor := HGrSystem.Data.Canvas.Pixels[96, 67];
    201   Bitmap.PixelFormat := pf24bit;
     203  Bitmap.PixelFormat := TPixelFormat.pf24bit;
    202204  Bitmap.SetSize(Size.X * 2, Size.Y);
    203205  if Mode = mmPicture then begin
     
    261263    FillRect(Rect(0, 0, Bitmap.Width, Bitmap.Height));
    262264  end;
    263   Bitmap.PixelFormat := pf24bit;
     265  Bitmap.PixelFormat := TPixelFormat.pf24bit;
    264266  Bitmap.SetSize(Size.X * 2, Size.Y);
    265267  Bitmap.BeginUpdate;
  • trunk/NoTerm.pas

    r447 r468  
    55
    66uses
    7   ScreenTools, Protocol, Messg, LCLIntf, LCLType, dateutils, Platform,
    8   SysUtils, Classes, Graphics, Controls, Forms, ButtonB, DrawDlg;
     7  ScreenTools, Protocol, Messg, LCLIntf, LCLType, DateUtils, Platform,
     8  SysUtils, Classes, ButtonB, DrawDlg, System.UITypes,
     9  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms{$ELSE}
     10  Graphics, Controls, Forms{$ENDIF};
    911
    1012type
     
    8890  Top := 8;
    8991  Caption := Phrases.Lookup('AIT');
    90   Canvas.Brush.Style := bsClear;
     92  Canvas.Brush.Style := TBrushStyle.bsClear;
    9193  Canvas.Font.Assign(UniFont[ftSmall]);
    9294  TitleHeight := 36;
     
    168170        State := TBitmap.Create;
    169171        State.SetSize(192, 20);
    170         State.Canvas.Brush.Style := bsClear;
     172        State.Canvas.Brush.Style := TBrushStyle.bsClear;
    171173        State.Canvas.Font.Assign(UniFont[ftSmall]);
    172174        NewStat;
  • trunk/Packages/CevoComponents/Area.pas

    r184 r468  
    44
    55uses
    6   Classes, Graphics, Controls;
     6  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls,{$ELSE}
     7  Graphics, Controls,{$ENDIF}
     8  Classes;
    79
    810type
  • trunk/Packages/CevoComponents/BaseWin.pas

    r464 r468  
    44
    55uses
    6   ScreenTools, LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms,
    7   DrawDlg;
     6  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms,{$ELSE}
     7  Graphics, Controls, Forms,{$ENDIF}
     8  ScreenTools, LCLIntf, LCLType, SysUtils, Classes, DrawDlg, System.UITypes;
    89
    910type
     
    133134begin
    134135  if Key = VK_ESCAPE then begin
    135     if fsModal in FormState then
     136    if TFormStateType.fsModal in FormState then
    136137      ModalResult := mrCancel;
    137138  end else
    138139  if Key = VK_RETURN then begin
    139     if fsModal in FormState then
     140    if TFormStateType.fsModal in FormState then
    140141      ModalResult := mrOK;
    141142  end else
     
    245246  TexOverride := False;
    246247  ModalIndication := True;
    247   Canvas.Brush.Style := bsClear;
     248  Canvas.Brush.Style := TBrushStyle.bsClear;
    248249  InnerWidth := Width - 2 * SideFrame;
    249250  InnerHeight := Height - TitleHeight - NarrowFrame;
     
    479480    Exit;
    480481  Offscreen := TBitmap.Create;
    481   Offscreen.PixelFormat := pf24bit;
     482  Offscreen.PixelFormat := TPixelFormat.pf24bit;
    482483  if Screen.Height - yUnused < 480 then
    483484    Offscreen.SetSize(Screen.Width, 480)
     
    485486    Offscreen.SetSize(Screen.Width, Screen.Height - yUnused);
    486487  Offscreen.Canvas.FillRect(0, 0, Offscreen.Width, OffScreen.Height);
    487   Offscreen.Canvas.Brush.Style := bsClear;
     488  Offscreen.Canvas.Brush.Style := TBrushStyle.bsClear;
    488489end;
    489490
  • trunk/Packages/CevoComponents/ButtonA.pas

    r431 r468  
    44
    55uses
    6   ButtonBase, Classes, Graphics, LCLIntf, LCLType, ScreenTools, Types;
     6  {$IFDEF DPI}Dpi.Graphics,{$ELSE}Graphics,{$ENDIF}
     7  ButtonBase, Classes, LCLIntf, LCLType, ScreenTools, Types;
    78
    89type
     
    4849      BitBltCanvas(Canvas, 0, 0, 100, 25, Graphic.Canvas, 195,
    4950        243 + 26 * Byte(Down));
    50       Canvas.Brush.Style := bsClear;
     51      Canvas.Brush.Style := TBrushStyle.bsClear;
    5152      TextSize := TextExtent(FCaption);
    5253      TextOut(50 - (TextSize.Width + 1) div 2,
  • trunk/Packages/CevoComponents/ButtonB.pas

    r462 r468  
    44
    55uses
    6   ButtonBase, Classes, Graphics, LCLIntf, LCLType;
     6  {$IFDEF DPI}Dpi.Graphics,{$ELSE}Graphics,{$ENDIF}
     7  ButtonBase, Classes, LCLIntf, LCLType;
    78
    89type
  • trunk/Packages/CevoComponents/ButtonBase.pas

    r464 r468  
    44
    55uses
    6   Classes, Graphics, Controls;
     6  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls,{$ELSE}
     7  Graphics, Controls,{$ENDIF}
     8  Classes;
    79
    810type
     
    8486        DownChangedProc(self);
    8587    end;
    86     if (Button = mbLeft) and (@ClickProc <> nil) then
     88    if (Button = TMouseButton.mbLeft) and (@ClickProc <> nil) then
    8789      ClickProc(self);
    8890  end
  • trunk/Packages/CevoComponents/ButtonN.pas

    r447 r468  
    44
    55uses
    6   Classes, Graphics, Controls, LCLIntf, LCLType, ScreenTools;
     6  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls,{$ELSE}Graphics, Controls,{$ENDIF}
     7  Classes, LCLIntf, LCLType, ScreenTools;
    78
    89type
     
    8586  X, Y: Integer);
    8687begin
    87   if FPossible and (Button = mbLeft) and (@ChangeProc <> nil) then
     88  if FPossible and (Button = TMouseButton.mbLeft) and (@ChangeProc <> nil) then
    8889    ChangeProc(Self);
    8990end;
  • trunk/Packages/CevoComponents/CevoComponents.lpk

    r456 r468  
    112112    </Files>
    113113    <CompatibilityMode Value="True"/>
    114     <RequiredPkgs Count="3">
     114    <RequiredPkgs Count="4">
    115115      <Item1>
    116         <PackageName Value="Common"/>
     116        <PackageName Value="DpiControls"/>
    117117      </Item1>
    118118      <Item2>
    119         <PackageName Value="LCL"/>
     119        <PackageName Value="Common"/>
    120120      </Item2>
    121121      <Item3>
     122        <PackageName Value="LCL"/>
     123      </Item3>
     124      <Item4>
    122125        <PackageName Value="FCL"/>
    123       </Item3>
     126      </Item4>
    124127    </RequiredPkgs>
    125128    <UsageOptions>
  • trunk/Packages/CevoComponents/DrawDlg.pas

    r460 r468  
    44
    55uses
    6   Classes, SysUtils, Forms, LCLIntf, LCLType, {$IFDEF UNIX}LMessages,{$ENDIF}
     6  {$IFDEF DPI}Dpi.Forms, Dpi.Common,{$ELSE}
     7  Forms,{$ENDIF}
     8  Classes, SysUtils, LCLIntf, LCLType, {$IFDEF UNIX}LMessages,{$ENDIF}
    79  Messages, Graphics, Controls, ButtonBase, ButtonA, ButtonB, Area, ScreenTools
    810  {$IFDEF LCLGTK2}, Gtk2Globals{$ENDIF};
  • trunk/Packages/CevoComponents/EOTButton.pas

    r447 r468  
    44
    55uses
    6   ButtonBase, Classes, SysUtils, Graphics, LCLIntf, LCLType;
     6  {$IFDEF DPI}Dpi.Graphics,{$ELSE}Graphics,{$ENDIF}
     7  ButtonBase, Classes, SysUtils, LCLIntf, LCLType;
    78
    89const
     
    5354  inherited;
    5455  Buffer := TBitmap.Create;
    55   Buffer.PixelFormat := pf24bit;
     56  Buffer.PixelFormat := TPixelFormat.pf24bit;
    5657  Buffer.SetSize(48, 48);
    5758  Buffer.Canvas.FillRect(0, 0, Buffer.Width, Buffer.Height);
    5859  Back := TBitmap.Create;
    59   Back.PixelFormat := pf24bit;
     60  Back.PixelFormat := TPixelFormat.pf24bit;
    6061  Back.SetSize(48, 48);
    6162  Back.Canvas.FillRect(0, 0, Back.Width, Back.Height);
  • trunk/Packages/CevoComponents/GraphicSet.pas

    r464 r468  
    44
    55uses
    6   Classes, SysUtils, Graphics, Generics.Collections, LCLType, DOM,
     6  {$IFDEF DPI}Dpi.Graphics,{$ELSE}
     7  Graphics,{$ENDIF}
     8  Classes, SysUtils, Generics.Collections, LCLType, DOM,
    79  XMLRead, XMLWrite, XML;
    810
     
    228230begin
    229231  Data := TBitmap.Create;
    230   Data.PixelFormat := pf24bit;
     232  Data.PixelFormat := TPixelFormat.pf24bit;
    231233  Mask := TBitmap.Create;
    232   Mask.PixelFormat := pf24bit;
     234  Mask.PixelFormat := TPixelFormat.pf24bit;
    233235  Items := TGraphicSetItems.Create;
    234236  Items.GraphicSet := Self;
  • trunk/Packages/CevoComponents/ScreenTools.pas

    r456 r468  
    77  Windows,
    88  {$ENDIF}
    9   StringTables, LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Math,
    10   Forms, Menus, GraphType, GraphicSet, LazFileUtils, Texture;
     9  StringTables, LCLIntf, LCLType, SysUtils, Classes, Math,
     10  GraphType, GraphicSet, LazFileUtils, Texture,
     11  {$IFDEF DPI}Dpi.Forms, Dpi.Menus, Dpi.Graphics, Dpi.Controls, Dpi.Common{$ELSE}
     12  Forms, Menus, Graphics, Controls{$ENDIF};
    1113
    1214type
     
    9698procedure Texturize(Dest, Texture: TBitmap; TransparentColor: Cardinal);
    9799procedure DarkenImage(Bitmap: TBitmap; Change: Integer);
     100{$IFNDEF DPI}
    98101function ScaleToNative(Value: Integer): Integer;
    99102function ScaleFromNative(Value: Integer): Integer;
     103{$ENDIF}
    100104procedure UnshareBitmap(Bitmap: TBitmap);
    101105procedure Gtk2Fix;
     
    199203
    200204uses
    201   Directories, Sound, PixelPointer;
     205  {$IFDEF DPI}Dpi.PixelPointer,{$ELSE}PixelPointer,{$ENDIF}
     206  Directories, Sound;
    202207
    203208var
     
    419424        Jpeg.LoadFromFile(FileName);
    420425        if not (gfNoGamma in Options) then
    421           Bmp.PixelFormat := pf24bit;
     426          Bmp.PixelFormat := TPixelFormat.pf24bit;
    422427        Bmp.SetSize(Jpeg.Width, Jpeg.Height);
    423428        Bmp.Canvas.Draw(0, 0, Jpeg);
     
    434439        Png.LoadFromFile(FileName);
    435440        if not (gfNoGamma in Options) then
    436           Bmp.PixelFormat := pf24bit;
     441          Bmp.PixelFormat := TPixelFormat.pf24bit;
    437442        Bmp.SetSize(Png.Width, Png.Height);
    438443        if (Png.RawImage.Description.Format = ricfGray) then
    439444        begin
    440445          // LCL doesn't support 8-bit colors properly. Use 24-bit instead.
    441           Bmp.PixelFormat := pf24bit;
     446          Bmp.PixelFormat := TPixelFormat.pf24bit;
    442447          CopyGray8BitTo24bitBitmap(Bmp, Png);
    443448        end
     
    454459        Bmp.LoadFromFile(FileName);
    455460        if not (gfNoGamma in Options) then
    456           Bmp.PixelFormat := pf24bit;
     461          Bmp.PixelFormat := TPixelFormat.pf24bit;
    457462        Result := True;
    458463      except
     
    634639  Height := ScaleToNative(Height);
    635640  //Assert(Src.PixelFormat = pf8bit);
    636   Assert(dst.PixelFormat = pf24bit);
     641  Assert(dst.PixelFormat = TPixelFormat.pf24bit);
    637642  if xDst < 0 then begin
    638643    Width := Width + xDst;
     
    821826  Height := ScaleToNative(Height);
    822827  bmp.BeginUpdate;
    823   Assert(bmp.PixelFormat = pf24bit);
     828  Assert(bmp.PixelFormat = TPixelFormat.pf24bit);
    824829  Height := Y + Height;
    825830  PixelPtr := TPixelPointer.Create(Bmp, X, Y);
     
    15241529    Brush.Color := $000000;
    15251530    FillRect(Rect(X + Pos + abs(Growth), Y, X + Max, Y + 7));
    1526     Brush.Style := bsClear;
     1531    Brush.Style := TBrushStyle.bsClear;
    15271532  end;
    15281533end;
     
    16271632end;
    16281633
     1634{$IFNDEF DPI}
    16291635function ScaleToNative(Value: Integer): Integer;
    16301636begin
     
    16361642  Result := Value;
    16371643end;
     1644{$ENDIF}
    16381645
    16391646procedure UnshareBitmap(Bitmap: TBitmap);
     
    16911698                  Size := Size * 10 + Byte(S[I]) - 48;
    16921699                'B', 'b':
    1693                   UniFont[section].Style := UniFont[section].Style + [fsBold];
     1700                  UniFont[section].Style := UniFont[section].Style + [TFontStyle.fsBold];
    16941701                'I', 'i':
    1695                   UniFont[section].Style := UniFont[section].Style + [fsItalic];
     1702                  UniFont[section].Style := UniFont[section].Style + [TFontStyle.fsItalic];
    16961703              end;
    1697             UniFont[section].Size := Round(Size * 72 / UniFont[section].PixelsPerInch);
     1704            UniFont[section].Size := Round(Size * ScaleToNative(72) / UniFont[section].PixelsPerInch);
    16981705          end;
    16991706        end;
     
    17831790
    17841791  Colors := TBitmap.Create;
    1785   Colors.PixelFormat := pf24bit;
     1792  Colors.PixelFormat := TPixelFormat.pf24bit;
    17861793  Paper := TBitmap.Create;
    1787   Paper.PixelFormat := pf24bit;
     1794  Paper.PixelFormat := TPixelFormat.pf24bit;
    17881795  BigImp := TBitmap.Create;
    1789   BigImp.PixelFormat := pf24bit;
     1796  BigImp.PixelFormat := TPixelFormat.pf24bit;
    17901797  MainTexture := TTexture.Create;
    17911798  ClickFrameColor := HGrSystem.Data.Canvas.Pixels[187, 175];
     
    17961803
    17971804  LogoBuffer := TBitmap.Create;
    1798   LogoBuffer.PixelFormat := pf24bit;
     1805  LogoBuffer.PixelFormat := TPixelFormat.pf24bit;
    17991806  LogoBuffer.SetSize(BigBook.Width, BigBook.Height);
    18001807end;
  • trunk/Packages/CevoComponents/Texture.pas

    r456 r468  
    44
    55uses
    6   Classes, SysUtils, Graphics;
     6  {$IFDEF DPI}Dpi.Graphics,{$ELSE}Graphics,{$ENDIF}
     7  Classes, SysUtils;
    78
    89type
  • trunk/Settings.pas

    r456 r468  
    44
    55uses
    6   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    7   LCLProc, ScreenTools, Messg, ButtonA, Directories, DrawDlg, ButtonC,
    8   KeyBindings, Languages;
     6  Classes, SysUtils, FileUtil, Dialogs, LCLProc, ScreenTools, Messg, ButtonA,
     7  Directories, DrawDlg, ButtonC, KeyBindings, Languages, System.UITypes,
     8  {$IFDEF DPI}Dpi.Forms, Dpi.Controls, Dpi.Graphics, Dpi.StdCtrls{$ELSE}
     9  Forms, Controls, Graphics, StdCtrls{$ENDIF};
    910
    1011type
     
    8283
    8384  Canvas.Font.Assign(UniFont[ftNormal]);
    84   Canvas.Brush.Style := bsClear;
     85  Canvas.Brush.Style := TBrushStyle.bsClear;
    8586
    8687  ButtonOk.Caption := Phrases.Lookup('BTN_OK');
  • trunk/Start.pas

    r462 r468  
    66uses
    77  GameServer, Messg, ButtonBase, ButtonA, ButtonC, ButtonB, Area, Types,
    8   LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, StdCtrls,
    9   Menus, Registry, DrawDlg, Generics.Collections, Protocol, MiniMap, Brain,
    10   Translator;
     8  LCLIntf, LCLType, SysUtils, Classes, System.UITypes,
     9  Registry, DrawDlg, Generics.Collections, Protocol, MiniMap, Brain, Translator,
     10  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.StdCtrls, Dpi.Menus{$ELSE}
     11  Graphics, Controls, Forms, StdCtrls, Menus{$ENDIF};
    1112
    1213type
     
    255256
    256257  Canvas.Font.Assign(UniFont[ftNormal]);
    257   Canvas.Brush.Style := bsClear;
     258  Canvas.Brush.Style := TBrushStyle.bsClear;
    258259
    259260  QuitBtn.Hint := Phrases.Lookup('STARTCONTROLS', 0);
     
    303304
    304305  EmptyPicture := TBitmap.Create;
    305   EmptyPicture.PixelFormat := pf24bit;
     306  EmptyPicture.PixelFormat := TPixelFormat.pf24bit;
    306307  EmptyPicture.SetSize(64, 64);
    307308  EmptyPicture.Canvas.FillRect(0, 0, EmptyPicture.Width, EmptyPicture.Height);
    308309  LogoBuffer := TBitmap.Create;
    309   LogoBuffer.PixelFormat := pf24bit;
     310  LogoBuffer.PixelFormat := TPixelFormat.pf24bit;
    310311  LogoBuffer.SetSize(wBuffer, 56);
    311312  LogoBuffer.Canvas.FillRect(0, 0, LogoBuffer.Width, LogoBuffer.Height);
     
    531532begin
    532533  Canvas.Font.Assign(UniFont[ftCaption]);
    533   Canvas.Font.Style := Canvas.Font.Style + [fsUnderline];
     534  Canvas.Font.Style := Canvas.Font.Style + [TFontStyle.fsUnderline];
    534535  RisedTextOut(Canvas, xAction, Y - 3, Phrases2.Lookup(HeaderItem));
    535536  Canvas.Font.Assign(UniFont[ftNormal]);
     
    566567    FillRect(Rect(0, 1, ClientWidth, 3));
    567568    FillRect(Rect(TabOffset + 4 * TabSize + 2, 0, ClientWidth, TabHeight));
    568     Brush.Style := bsClear;
     569    Brush.Style := TBrushStyle.bsClear;
    569570  end;
    570571  if Page in [pgStartRandom, pgStartMap] then
     
    745746              FillRect(Rect(xBrain[I] - 5, yBrain[I] + 25, xBrain[I] - 2,
    746747                yBrain[I] + 27));
    747               Brush.Style := bsClear;
     748              Brush.Style := TBrushStyle.bsClear;
    748749            end;
    749750            if PlayerSlots[I].OfferMultiple then
     
    911912begin
    912913  {$IFDEF UNIX}
    913   ShowInTaskBar := stAlways;
     914  ShowInTaskBar := TShowInTaskbar.stAlways;
    914915  {$ENDIF}
    915916  MainTexture.Age := -1;
Note: See TracChangeset for help on using the changeset viewer.