Changeset 468
- Timestamp:
- Dec 3, 2023, 11:28:08 AM (12 months ago)
- Location:
- trunk
- Files:
-
- 16 added
- 48 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Back.pas
r422 r468 5 5 6 6 uses 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}; 8 10 9 11 type … … 25 27 var 26 28 Background: TBackground; 29 27 30 28 31 implementation … … 65 68 begin 66 69 if FullScreen then begin 67 WindowState := wsFullScreen;70 WindowState := TWindowState.wsFullScreen; 68 71 if not Assigned(Img) then begin 69 72 FileName := GetGraphicsDir + DirectorySeparator + 'Background.png'; … … 75 78 end; 76 79 end else begin 77 if WindowState <> wsMaximized then begin78 WindowState := wsNormal;79 WindowState := wsFullScreen;80 if WindowState <> TWindowState.wsMaximized then begin 81 WindowState := TWindowState.wsNormal; 82 WindowState := TWindowState.wsFullScreen; 80 83 end; 81 WindowState := wsNormal;84 WindowState := TWindowState.wsNormal; 82 85 BoundsRect := Bounds(StartDlg.Left - 8, StartDlg.Top - 8, 83 86 StartDlg.Width + 16, StartDlg.Height + 16); -
trunk/Brain.pas
r456 r468 4 4 5 5 uses 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}; 8 9 9 10 const -
trunk/Direct.pas
r464 r468 8 8 9 9 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}; 11 12 12 13 const … … 187 188 BrainRandom.Name := Phrases.Lookup('RANDOMAI'); 188 189 Canvas.Font.Assign(UniFont[ftNormal]); 189 Canvas.Brush.Style := bsClear;190 Canvas.Brush.Style := TBrushStyle.bsClear; 190 191 end; 191 192 -
trunk/GameServer.pas
r457 r468 7 7 8 8 uses 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}; 11 11 12 12 const -
trunk/IPQ.pas
r447 r468 11 11 PIntegerArray = ^TIntegerArray; 12 12 13 T heapItem = record13 THeapItem = record 14 14 Item: Integer; 15 15 Value: Integer; 16 16 end; 17 17 18 TItemArray = array [0 .. $40000000 div SizeOf(T heapItem)] of TheapItem;18 TItemArray = array [0 .. $40000000 div SizeOf(THeapItem)] of THeapItem; 19 19 PItemArray = ^TItemArray; 20 20 … … 37 37 end; 38 38 39 39 40 implementation 40 41 … … 43 44 inherited Create; 44 45 fmax := Max; 45 GetMem(bh, fmax * SizeOf(T heapItem));46 GetMem(bh, fmax * SizeOf(THeapItem)); 46 47 GetMem(Ix, fmax * SizeOf(Integer)); 47 48 N := -1; … … 118 119 var 119 120 I, J: Integer; 120 Last: T heapItem;121 Last: THeapItem; 121 122 lbh: PItemArray; 122 123 begin -
trunk/Inp.pas
r447 r468 5 5 6 6 uses 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}; 9 11 10 12 type … … 35 37 begin 36 38 Canvas.Font.Assign(UniFont[ftNormal]); 37 Canvas.Brush.Style := bsClear;39 Canvas.Brush.Style := TBrushStyle.bsClear; 38 40 TitleHeight := Height; 39 41 InitButtons; -
trunk/Integrated.lpi
r461 r468 9 9 <MainUnitHasCreateFormStatements Value="False"/> 10 10 <MainUnitHasTitleStatement Value="False"/> 11 <MainUnitHasScaledStatement Value="False"/> 11 12 <CompatibilityMode Value="True"/> 12 13 </Flags> … … 69 70 <IgnoredMessages idx5024="True"/> 70 71 </CompilerMessages> 71 <CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL"/> 72 <OtherDefines Count="1"> 73 <Define0 Value="DPI"/> 74 </OtherDefines> 72 75 </Other> 73 76 </CompilerOptions> 74 77 </Item2> 75 78 <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"/> 78 81 </SharedMatrixOptions> 79 82 </BuildModes> … … 87 90 </Modes> 88 91 </RunParams> 89 <RequiredPackages Count=" 3">92 <RequiredPackages Count="4"> 90 93 <Item1> 94 <PackageName Value="DpiControls"/> 95 <DefaultFilename Value="Packages\DpiControls\DpiControls.lpk" Prefer="True"/> 96 </Item1> 97 <Item2> 91 98 <PackageName Value="Common"/> 92 99 <DefaultFilename Value="Packages\Common\Common.lpk" Prefer="True"/> 93 </Item 1>94 <Item 2>100 </Item2> 101 <Item3> 95 102 <PackageName Value="CevoComponents"/> 96 103 <DefaultFilename Value="Packages\CevoComponents\CevoComponents.lpk" Prefer="True"/> 97 </Item 2>98 <Item 3>104 </Item3> 105 <Item4> 99 106 <PackageName Value="LCL"/> 100 </Item 3>107 </Item4> 101 108 </RequiredPackages> 102 109 <Units Count="47"> … … 395 402 <Debugging> 396 403 <DebugInfoType Value="dsDwarf2Set"/> 397 <UseHeaptrc Value="True"/>398 404 <UseExternalDbgSyms Value="True"/> 399 405 </Debugging> … … 409 415 </CompilerMessages> 410 416 <CustomOptions Value="-dDEBUG"/> 417 <OtherDefines Count="2"> 418 <Define0 Value="DEBUG"/> 419 <Define1 Value="DPI"/> 420 </OtherDefines> 411 421 </Other> 412 422 </CompilerOptions> -
trunk/Integrated.lpr
r426 r468 6 6 cthreads, clocale, 7 7 {$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, 9 10 Back, Log, LocalPlayer, ClientTools, Tribes, IsoEngine, Term, CityScreen, Nego, 10 11 NoTerm, ScreenTools, Directories; … … 27 28 Application.Initialize; 28 29 Application.Title := 'C-evo'; 29 Application.TaskBarBehavior := tbMultiButton;30 Application.TaskBarBehavior := TTaskBarBehavior.tbMultiButton; 30 31 Directories.UnitInit; 31 32 ScreenTools.UnitInit; -
trunk/LocalPlayer/Battle.pas
r460 r468 5 5 6 6 uses 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}; 9 11 10 12 type … … 236 238 Brush.Color := 0; 237 239 FillRect(Rect(0, 0, ClientWidth, ClientHeight)); 238 Brush.Style := bsClear;240 Brush.Style := TBrushStyle.bsClear; 239 241 PaintBackground(self, 3 + Border, 3 + Border, 240 242 ClientWidth - (6 + 2 * Border), ClientHeight - (6 + 2 * Border)); -
trunk/LocalPlayer/CityScreen.pas
r464 r468 7 7 {$IFDEF UNIX}LMessages,{$ENDIF} 8 8 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}; 11 13 12 14 const … … 224 226 225 227 Back := TBitmap.Create; 226 Back.PixelFormat := pf24bit;228 Back.PixelFormat := TPixelFormat.pf24bit; 227 229 Back.SetSize(Width, Height); 228 230 Back.Canvas.FillRect(0, 0, Back.Width, Back.Height); 229 231 Template := TBitmap.Create; 230 Template.PixelFormat := pf24bit;232 Template.PixelFormat := TPixelFormat.pf24bit; 231 233 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'City.png', 232 234 [gfNoGamma]); 233 235 CityMapTemplate := TBitmap.Create; 234 CityMapTemplate.PixelFormat := pf24bit;236 CityMapTemplate.PixelFormat := TPixelFormat.pf24bit; 235 237 LoadGraphicFile(CityMapTemplate, GetGraphicsDir + DirectorySeparator + 'BigCityMap.png', 236 238 [gfNoGamma]); 237 239 SmallCityMapTemplate := TBitmap.Create; 238 SmallCityMapTemplate.PixelFormat := pf24bit;240 SmallCityMapTemplate.PixelFormat := TPixelFormat.pf24bit; 239 241 LoadGraphicFile(SmallCityMapTemplate, GetGraphicsDir + DirectorySeparator + 'SmallCityMap.png', 240 242 [gfNoGamma]); 241 243 SmallCityMap := TBitmap.Create; 242 SmallCityMap.PixelFormat := pf24bit;244 SmallCityMap.PixelFormat := TPixelFormat.pf24bit; 243 245 SmallCityMap.SetSize(98, 74); 244 246 SmallCityMap.Canvas.FillRect(0, 0, SmallCityMap.Width, SmallCityMap.Height); 245 247 ZoomCityMap := TBitmap.Create; 246 ZoomCityMap.PixelFormat := pf24bit;248 ZoomCityMap.PixelFormat := TPixelFormat.pf24bit; 247 249 ZoomCityMap.SetSize(228, 124); 248 250 ZoomCityMap.Canvas.FillRect(0, 0, ZoomCityMap.Width, ZoomCityMap.Height); … … 362 364 end; 363 365 end; 364 Brush.style := bsClear;366 Brush.style := TBrushStyle.bsClear; 365 367 end; 366 368 end; … … 537 539 Brush.Color := $FFFFFF; 538 540 FillRect(Rect(8, 7, 36, 32)); 539 Brush.style := bsClear;541 Brush.style := TBrushStyle.bsClear; 540 542 Font.Color := $000000; 541 543 S := IntToStr(C.Size); … … 810 812 Offscreen.Canvas.Brush.Color := MainTexture.ColorMark; 811 813 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; 813 815 end; 814 816 Sprite(Offscreen, HGrSystem, X - 16, Y - 5, 10, 10, 88, 115); … … 985 987 FillRect(Rect(xView + 9, yView + 5, xView + 1 + 72 - 8, 986 988 yView + 5 + 40)); 987 Brush. style :=bsClear;989 Brush.Style := TBrushStyle.bsClear; 988 990 end; 989 991 end … … 1624 1626 FillRect(Rect(xView + 9, yView + 5, xView + 1 + 72 - 8, 1625 1627 yView + 5 + 40)); 1626 Brush. style :=bsClear;1628 Brush.Style := TBrushStyle.bsClear; 1627 1629 end 1628 1630 else if BlinkTime = 6 then -
trunk/LocalPlayer/CityType.pas
r460 r468 6 6 uses 7 7 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}; 9 10 10 11 type -
trunk/LocalPlayer/Diagram.pas
r460 r468 5 5 6 6 uses 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} 9 Graphics, Controls, Forms, Menus{$ENDIF}; 9 10 10 11 type … … 60 61 Canvas.Brush.Color := $000000; 61 62 Canvas.FillRect(Rect(Left, Top, Left + Width, Top + 200)); 62 Canvas.Brush.Style := bsClear;63 Canvas.Brush.Style := TBrushStyle.bsClear; 63 64 ScreenTools.Frame(Canvas, Left - 1, Top - 1, Left + Width, Top + 200, 64 65 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); … … 202 203 Brush.Color := $000000; 203 204 FillRect(Rect(0, 0, InnerWidth, InnerHeight)); 204 Brush.Style := bsClear;205 Brush.Style := TBrushStyle.bsClear; 205 206 Pen.Color := $606060; 206 207 MoveTo(Border, InnerHeight - Border); -
trunk/LocalPlayer/Diplomacy.pas
r447 r468 8 8 function DipCommandToString(pSender, pTarget, Treaty, OppCommand, 9 9 Command: Integer; const OppOffer, Offer: TOffer): string; 10 10 11 11 12 implementation -
trunk/LocalPlayer/Draft.pas
r460 r468 6 6 uses 7 7 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}; 9 11 10 12 type … … 83 85 84 86 Back := TBitmap.Create; 85 Back.PixelFormat := pf24bit;87 Back.PixelFormat := TPixelFormat.pf24bit; 86 88 Back.SetSize(Width, Height); 87 89 Back.Canvas.FillRect(0, 0, Back.Width, Back.Height); 88 90 Template := TBitmap.Create; 89 Template.PixelFormat := pf24bit;91 Template.PixelFormat := TPixelFormat.pf24bit; 90 92 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'MiliRes.png', 91 93 [gfNoGamma]); … … 156 158 FrameRect(Rect(xTotal2 - 3 - dx, Y + 2, 157 159 xTotal2 + 11 - dx, Y + 16)); 158 Brush.Style := bsClear;160 Brush.Style := TBrushStyle.bsClear; 159 161 Sprite(Offscreen, HGrSystem, xTotal2 - 1 - dx, Y + 4, 10, 10, 160 162 66 + I mod 11 * 11, 137 + I div 11 * 11); … … 167 169 FillRect(Rect(xTotal2 - 3 - dx, Y + 2, 168 170 xTotal2 + W - 1 - dx, Y + 16)); 169 Brush.Style := bsClear;171 Brush.Style := TBrushStyle.bsClear; 170 172 Textout(xTotal2 - 3 - dx + 1, Y, S); 171 173 end; … … 508 510 I, D: Integer; 509 511 begin 510 if Button = mbLeft then512 if Button = TMouseButton.mbLeft then 511 513 begin 512 514 for D := 0 to nDomains - 1 do -
trunk/LocalPlayer/Enhance.pas
r460 r468 6 6 uses 7 7 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 9 12 10 13 type -
trunk/LocalPlayer/Help.pas
r460 r468 5 5 6 6 uses 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}; 10 11 11 12 const … … 151 152 152 153 uses 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; 155 156 156 157 {$R *.lfm} … … 293 294 CaptionFont := Font.Create; 294 295 CaptionFont.Assign(UniFont[ftNormal]); 295 CaptionFont.Style := CaptionFont.Style + [ fsItalic,fsBold];296 CaptionFont.Style := CaptionFont.Style + [TFontStyle.fsItalic, TFontStyle.fsBold]; 296 297 InitButtons; 297 298 … … 302 303 ExtPic := TBitmap.Create; 303 304 TerrIcon := TBitmap.Create; 304 TerrIcon.PixelFormat := pf24bit;305 TerrIcon.PixelFormat := TPixelFormat.pf24bit; 305 306 TerrIcon.SetSize(xSizeBig, ySizeBig); 306 307 TerrIcon.Canvas.FillRect(0, 0, TerrIcon.Width, TerrIcon.Height); … … 699 700 FrameRect(Rect(ofs, 1 + 23 + I * 24, ofs + 14, 700 701 15 + 23 + I * 24)); 701 Brush.Style := bsClear;702 Brush.Style := TBrushStyle.bsClear; 702 703 Sprite(OffScreen, HGrSystem, ofs + 2, 3 + 23 + I * 24, 10, 10, 703 704 66 + HelpLineInfo.Picpix mod 11 * 11, -
trunk/LocalPlayer/IsoEngine.pas
r456 r468 6 6 uses 7 7 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}; 9 11 10 12 const … … 215 217 begin 216 218 LandPatch := TBitmap.Create; 217 LandPatch.PixelFormat := pf24bit;219 LandPatch.PixelFormat := TPixelFormat.pf24bit; 218 220 OceanPatch := TBitmap.Create; 219 OceanPatch.PixelFormat := pf24bit;221 OceanPatch.PixelFormat := TPixelFormat.pf24bit; 220 222 Borders := TBitmap.Create; 221 Borders.PixelFormat := pf24bit;223 Borders.PixelFormat := TPixelFormat.pf24bit; 222 224 HGrTerrain := nil; 223 225 HGrCities := nil; … … 251 253 Mask24 := TBitmap.Create; 252 254 Mask24.Assign(HGrTerrain.Mask); 253 Mask24.PixelFormat := pf24bit;255 Mask24.PixelFormat := TPixelFormat.pf24bit; 254 256 Mask24.BeginUpdate; 255 257 for ySrc := 0 to TerrainIconLines - 1 do begin … … 344 346 OceanPatch.Canvas.FillRect(0, 0, OceanPatch.Width, OceanPatch.Height); 345 347 LandMore := TBitmap.Create; 346 LandMore.PixelFormat := pf24bit;348 LandMore.PixelFormat := TPixelFormat.pf24bit; 347 349 LandMore.Canvas.Brush.Color := 0; 348 350 LandMore.SetSize(xxt * 18, yyt * 9); 349 351 LandMore.Canvas.FillRect(0, 0, LandMore.Width, LandMore.Height); 350 352 OceanMore := TBitmap.Create; 351 OceanMore.PixelFormat := pf24bit;353 OceanMore.PixelFormat := TPixelFormat.pf24bit; 352 354 OceanMore.Canvas.Brush.Color := 0; 353 355 OceanMore.SetSize(xxt * 8, yyt * 4); 354 356 OceanMore.Canvas.FillRect(0, 0, OceanMore.Width, OceanMore.Height); 355 357 DitherMask := TBitmap.Create; 356 DitherMask.PixelFormat := pf24bit;358 DitherMask.PixelFormat := TPixelFormat.pf24bit; 357 359 DitherMask.SetSize(xxt * 2, yyt * 2); 358 360 DitherMask.Canvas.FillRect(0, 0, DitherMask.Width, DitherMask.Height); … … 584 586 FOutput.Canvas.Brush.Color := Color; 585 587 FOutput.Canvas.FillRect(Rect(X, Y, X + Width, Y + Height)); 586 FOutput.Canvas.Brush.Style := bsClear;588 FOutput.Canvas.Brush.Style := TBrushStyle.bsClear; 587 589 end; 588 590 … … 1080 1082 xs := X + xxt - (W + 1) div 2; 1081 1083 if IsCapital then 1082 FOutput.Canvas.Font.Style := FOutput.Canvas.Font.Style + [ fsUnderline];1084 FOutput.Canvas.Font.Style := FOutput.Canvas.Font.Style + [TFontStyle.fsUnderline]; 1083 1085 Textout(xs + 1, Y - 9, $000000, S); 1084 1086 Textout(xs, Y - 10, $FFFFFF, S); 1085 1087 if IsCapital then 1086 FOutput.Canvas.Font.Style := FOutput.Canvas.Font.Style - [ fsUnderline];1088 FOutput.Canvas.Font.Style := FOutput.Canvas.Font.Style - [TFontStyle.fsUnderline]; 1087 1089 end; 1088 1090 end; … … 1509 1511 Brush.Color := $000000; 1510 1512 FillRect(Rect(FLeft, RealTop, FRight, RealBottom)); 1511 Brush.Style := bsClear;1513 Brush.Style := TBrushStyle.bsClear; 1512 1514 end; 1513 1515 -
trunk/LocalPlayer/KeyBindings.pas
r456 r468 5 5 uses 6 6 Classes, SysUtils, Generics.Collections, Generics.Defaults, LCLProc, LCLType, 7 Menus, Registry; 7 Registry, 8 {$IFDEF DPI}Dpi.Menus{$ELSE}Menus{$ENDIF}; 8 9 9 10 type -
trunk/LocalPlayer/LocalPlayer.pas
r460 r468 7 7 procedure SetAIName(P: Integer; Name: string); 8 8 9 9 10 implementation 10 11 11 12 uses 12 Term, CityScreen, Nego, BaseWin, Forms; 13 Term, CityScreen, Nego, BaseWin, 14 {$IFDEF DPI}Dpi.Forms{$ELSE}Forms{$ENDIF}; 13 15 14 16 var -
trunk/LocalPlayer/MessgEx.pas
r460 r468 6 6 uses 7 7 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}; 10 11 11 12 type … … 61 62 62 63 uses 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; 65 66 66 67 {$R *.lfm} -
trunk/LocalPlayer/NatStat.pas
r460 r468 6 6 uses 7 7 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}; 9 11 10 12 type … … 86 88 87 89 Back := TBitmap.Create; 88 Back.PixelFormat := pf24bit;90 Back.PixelFormat := TPixelFormat.pf24bit; 89 91 Back.SetSize(Width, Height); 90 92 Back.Canvas.FillRect(0, 0, Back.Width, Back.Height); 91 93 Template := TBitmap.Create; 92 Template.PixelFormat := pf24bit;94 Template.PixelFormat := TPixelFormat.pf24bit; 93 95 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'Nation.png', 94 96 [gfNoGamma]); … … 359 361 FillRect(Rect(xReport + PaperShade, yReport + hReport, 360 362 xReport + wReport + PaperShade, yReport + hReport + PaperShade)); 361 Brush.Style := bsClear;363 Brush.Style := TBrushStyle.bsClear; 362 364 end; 363 365 -
trunk/LocalPlayer/Nego.pas
r460 r468 5 5 6 6 uses 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}; 9 11 10 12 const … … 432 434 else 433 435 FillRect(Rect(X, Y, X + 64, Y + 48)); 434 Brush.Style := bsClear;436 Brush.Style := TBrushStyle.bsClear; 435 437 ScreenTools.Frame(Offscreen.Canvas, X - 1, Y - 1, X + 64, Y + 48, $000000, $000000); 436 438 end … … 572 574 FillRect(Rect(xText1 + PaperShade, yText1 + hText, 573 575 xText1 + wText + PaperShade, yText1 + hText + PaperShade)); 574 Brush.Style := bsClear;576 Brush.Style := TBrushStyle.bsClear; 575 577 end; 576 578 -
trunk/LocalPlayer/PVSB.pas
r447 r468 6 6 uses 7 7 {$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}; 10 11 11 12 type … … 183 184 Inc(Count); 184 185 ScrollBar := TScrollBar.Create(Parent); 185 ScrollBar.Kind := sbVertical;186 ScrollBar.Kind := TScrollBarKind.sbVertical; 186 187 ScrollBar.Name := 'PVSB' + IntToStr(Count); 187 ScrollBar.Align := alRight;188 ScrollBar.Align := TAlign.alRight; 188 189 ScrollBar.OnChange := ScrollBarChanged; 189 190 ScrollBar.Parent := Parent; -
trunk/LocalPlayer/Rates.pas
r460 r468 5 5 6 6 uses 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}; 9 11 10 12 type … … 124 126 Brush.Color := $000000; 125 127 FillRect(Rect(X, Y, X + Max - current, Y + 7)); 126 Brush.Style := bsClear;128 Brush.Style := TBrushStyle.bsClear; 127 129 end; 128 130 -
trunk/LocalPlayer/Select.pas
r460 r468 5 5 6 6 uses 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}; 10 11 11 12 const … … 118 119 Layer2Btn.Hint := Phrases.Lookup('BTN_CLASSES'); 119 120 ScienceNationDotBuffer := TBitmap.Create; 120 ScienceNationDotBuffer.PixelFormat := pf24bit;121 ScienceNationDotBuffer.PixelFormat := TPixelFormat.pf24bit; 121 122 ScienceNationDotBuffer.SetSize(17, 17); 122 123 ScienceNationDotBuffer.Canvas.FillRect(0, 0, ScienceNationDotBuffer.Width, ScienceNationDotBuffer.Height); … … 276 277 Brush.Color := $FFFFFF; 277 278 FillRect(rect(X - 4 - 12, Y, X - 4 + 12, Y + 20)); 278 Brush. style :=bsClear;279 Brush.Style := TBrushStyle.bsClear; 279 280 Font.Color := $000000; 280 281 S := IntToStr(MyCity[lix].Size); … … 749 750 FillRect(rect(104 - 33 + 14 + TechNameSpace + 24 * I + 1 * 2, 0, 750 751 104 - 33 + 17 + TechNameSpace + 24 * I + 8 * 2, InnerHeight)); 751 Brush. style :=bsClear;752 Brush.Style := TBrushStyle.bsClear; 752 753 end 753 754 else -
trunk/LocalPlayer/TechTree.pas
r460 r468 5 5 6 6 uses 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}; 9 10 10 11 type … … 132 133 if Image = nil then begin 133 134 Image := TBitmap.Create; 134 Image.PixelFormat := pf24bit;135 Image.PixelFormat := TPixelFormat.pf24bit; 135 136 LoadGraphicFile(Image, HomeDir + 'Help' + DirectorySeparator + 'AdvTree.png', 136 137 [gfNoGamma]); … … 140 141 Font.Assign(UniFont[ftSmall]); 141 142 Font.Color := clBlack; 142 Brush.Style := bsClear;143 Brush.Style := TBrushStyle.bsClear; 143 144 for X := 0 to (Image.Width - xStart) div xPitch do 144 145 for Y := 0 to (Image.Height - yStart) div yPitch do … … 186 187 Shift: TShiftState; X, Y: Integer); 187 188 begin 188 if Button = mbLeft then189 if Button = TMouseButton.mbLeft then 189 190 begin 190 191 Dragging := True; -
trunk/LocalPlayer/Term.pas
r462 r468 12 12 {$ENDIF} 13 13 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, 16 16 GraphicSet, MiniMap, IsoEngine, Wonders, TechTree, Enhance, Nego, CityType, 17 17 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}; 19 22 20 23 const … … 642 645 643 646 uses 644 Directories, Log, PixelPointer,Sound, Registry, Global, KeyBindings, CmdList;647 Directories, Log, Sound, Registry, Global, KeyBindings, CmdList; 645 648 646 649 {$R *.lfm} … … 1809 1812 HGrStdUnits := LoadGraphicSet('StdUnits.png'); 1810 1813 SmallImp := TBitmap.Create; 1811 SmallImp.PixelFormat := pf24bit;1814 SmallImp.PixelFormat := TPixelFormat.pf24bit; 1812 1815 InitSmallImp; 1813 1816 SoundPreloadDone := []; … … 1869 1872 Brush.Color := $000000; 1870 1873 FillRect(Rect(0, 0, Panel.width, Panel.height)); 1871 Brush.Style := bsClear;1874 Brush.Style := TBrushStyle.bsClear; 1872 1875 end; 1873 1876 with TopBar.Canvas do … … 1875 1878 Brush.Color := $000000; 1876 1879 FillRect(Rect(0, 0, TopBar.width, TopBar.height)); 1877 Brush.Style := bsClear;1880 Brush.Style := TBrushStyle.bsClear; 1878 1881 end; 1879 1882 Invalidate; … … 2885 2888 Brush.Color := $000000; 2886 2889 FillRect(Rect(0, 0, Panel.width, Panel.height)); 2887 Brush.Style := bsClear;2890 Brush.Style := TBrushStyle.bsClear; 2888 2891 end; 2889 2892 with TopBar.Canvas do … … 2891 2894 Brush.Color := $000000; 2892 2895 FillRect(Rect(0, 0, TopBar.width, TopBar.height)); 2893 Brush.Style := bsClear;2896 Brush.Style := TBrushStyle.bsClear; 2894 2897 end; 2895 2898 FormResize(nil); // place mini map correctly according to its size … … 3634 3637 MiniMap := TMiniMap.Create; 3635 3638 Panel := TBitmap.Create; 3636 Panel.PixelFormat := pf24bit;3639 Panel.PixelFormat := TPixelFormat.pf24bit; 3637 3640 Panel.Canvas.Font.Assign(UniFont[ftSmall]); 3638 Panel.Canvas.Brush.Style := bsClear;3641 Panel.Canvas.Brush.Style := TBrushStyle.bsClear; 3639 3642 TopBar := TBitmap.Create; 3640 TopBar.PixelFormat := pf24bit;3643 TopBar.PixelFormat := TPixelFormat.pf24bit; 3641 3644 TopBar.Canvas.Font.Assign(UniFont[ftNormal]); 3642 TopBar.Canvas.Brush.Style := bsClear;3645 TopBar.Canvas.Brush.Style := TBrushStyle.bsClear; 3643 3646 Buffer := TBitmap.Create; 3644 Buffer.PixelFormat := pf24bit;3647 Buffer.PixelFormat := TPixelFormat.pf24bit; 3645 3648 if 2 * lxmax > 3 * xSizeBig then Buffer.width := 2 * lxmax 3646 3649 else Buffer.width := 3 * xSizeBig; … … 4806 4809 Brush.Color := $000000; 4807 4810 FillRect(Rect(0, 0, MapWidth, MapHeight)); 4808 Brush.Style := bsClear;4811 Brush.Style := TBrushStyle.bsClear; 4809 4812 OffscreenUser := self; 4810 4813 Exit; … … 4991 4994 xRightPanel + 2, PanelHeight, ClientWidth div 2); 4992 4995 4993 Brush.Style := bsClear;4996 Brush.Style := TBrushStyle.bsClear; 4994 4997 Pen.Color := $000000; 4995 4998 MoveTo(0, 0); … … 5216 5219 else if TroopLoc >= 0 then 5217 5220 begin 5218 Brush.Style := bsClear;5221 Brush.Style := TBrushStyle.bsClear; 5219 5222 if UnFocus >= 0 then 5220 5223 with MyUn^[UnFocus] do … … 5709 5712 begin 5710 5713 if Idle and (Me >= 0) and (GameMode <> cMovie) then 5711 if ( fsModal in Screen.ActiveForm.FormState) or5714 if (TFormStateType.fsModal in Screen.ActiveForm.FormState) or 5712 5715 (Screen.ActiveForm is TBufferedDrawDlg) and 5713 5716 (TBufferedDrawDlg(Screen.ActiveForm).WindowMode <> wmPersistent) then … … 5865 5868 if (MouseLoc < 0) or (MouseLoc >= G.lx * G.ly) then 5866 5869 Exit; 5867 if (Button = mbLeft) and not(ssShift in Shift) then5870 if (Button = TMouseButton.mbLeft) and not(ssShift in Shift) then 5868 5871 begin 5869 5872 DoCenter := True; … … 5992 5995 end; 5993 5996 end 5994 else if (ClientMode <> cEditMap) and (Button = mbRight) and5997 else if (ClientMode <> cEditMap) and (Button = TMouseButton.mbRight) and 5995 5998 not(ssShift in Shift) then 5996 5999 begin … … 6075 6078 end; 6076 6079 end 6077 else if (Button = mbMiddle) and (UnFocus >= 0) and6080 else if (Button = TMouseButton.mbMiddle) and (UnFocus >= 0) and 6078 6081 (MyModel[MyUn[UnFocus].mix].Kind in [mkSettler, mkSlaves]) then 6079 6082 begin … … 6088 6091 mEnhance.Click; 6089 6092 end 6090 else if (Button = mbLeft) and (ssShift in Shift) and6093 else if (Button = TMouseButton.mbLeft) and (ssShift in Shift) and 6091 6094 (MyMap[MouseLoc] and fTerrain <> fUNKNOWN) then 6092 6095 HelpOnTerrain(MouseLoc, wmPersistent) 6093 else if (ClientMode <= cContinue) and (Button = mbRight) and6096 else if (ClientMode <= cContinue) and (Button = TMouseButton.mbRight) and 6094 6097 (ssShift in Shift) and (UnFocus >= 0) and 6095 6098 (MyMap[MouseLoc] and (fUnit or fOwned) = fUnit) then … … 6867 6870 Exit; 6868 6871 6869 if Button = mbLeft then6872 if Button = TMouseButton.mbLeft then 6870 6873 begin 6871 6874 if (X >= xMini + 2) and (Y >= yMini + 2) and (X < xMini + 2 + 2 * G.lx) and … … 7160 7163 procedure TMainScreen.SetFullScreen(Active: Boolean); 7161 7164 begin 7162 if Active and (CurrentWindowState <> wsFullScreen) then begin7165 if Active and (CurrentWindowState <> TWindowState.wsFullScreen) then begin 7163 7166 PrevWindowState := WindowState; 7164 CurrentWindowState := wsFullScreen;7167 CurrentWindowState := TWindowState.wsFullScreen; 7165 7168 WindowState := CurrentWindowState; 7166 7169 {$IFDEF WINDOWS} … … 7169 7172 BorderIcons := []; 7170 7173 end else 7171 if not Active and (CurrentWindowState = wsFullScreen) then begin7172 if PrevWindowState = wsMaximized then begin7173 CurrentWindowState := wsMaximized;7174 if not Active and (CurrentWindowState = TWindowState.wsFullScreen) then begin 7175 if PrevWindowState = TWindowState.wsMaximized then begin 7176 CurrentWindowState := TWindowState.wsMaximized; 7174 7177 WindowState := CurrentWindowState; 7175 7178 end else begin 7176 CurrentWindowState := wsNormal;7179 CurrentWindowState := TWindowState.wsNormal; 7177 7180 WindowState := CurrentWindowState; 7178 WindowState := wsFullScreen;7181 WindowState := TWindowState.wsFullScreen; 7179 7182 WindowState := CurrentWindowState; 7180 7183 end; … … 7182 7185 BorderStyle := bsSizeable; 7183 7186 {$ENDIF} 7184 BorderIcons := [biSystemMenu, biMinimize, biMaximize]; 7187 BorderIcons := [TBorderIcon.biSystemMenu, TBorderIcon.biMinimize, 7188 TBorderIcon.biMaximize]; 7185 7189 end; 7186 7190 end; … … 7954 7958 MouseLoc := LocationOfScreenPixel(X, Y); 7955 7959 if MouseLoc <> BrushLoc then 7956 MapBoxMouseDown(nil, mbLeft, Shift, X, Y);7960 MapBoxMouseDown(nil, TMouseButton.mbLeft, Shift, X, Y); 7957 7961 end 7958 7962 (* else if Idle and (UnFocus>=0) then … … 8067 8071 TopBarHeight + MapHeight - overlap)); 8068 8072 end; 8069 Brush.Style := bsClear;8073 Brush.Style := TBrushStyle.bsClear; 8070 8074 end; 8071 8075 BitBltCanvas(Canvas, MapOffset, TopBarHeight, MapWidth, MapHeight - overlap, -
trunk/LocalPlayer/Tribes.pas
r464 r468 5 5 6 6 uses 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 9 11 10 12 type -
trunk/LocalPlayer/UnitStat.pas
r460 r468 6 6 uses 7 7 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}; 9 11 10 12 type … … 79 81 80 82 Back := TBitmap.Create; 81 Back.PixelFormat := pf24bit;83 Back.PixelFormat := TPixelFormat.pf24bit; 82 84 Back.SetSize(5 * wCommon, hMax); 83 85 Back.Canvas.FillRect(0, 0, Back.Width, Back.Height); 84 86 Template := TBitmap.Create; 85 Template.PixelFormat := pf24bit;87 Template.PixelFormat := TPixelFormat.pf24bit; 86 88 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'Unit.png', 87 89 [gfNoGamma]); … … 343 345 Brush.Color := $FFFFFF; 344 346 FillRect(Rect(X - 3 + dx, Y + 2, X + W - 1 + dx, Y + 16)); 345 Brush.Style := bsClear;347 Brush.Style := TBrushStyle.bsClear; 346 348 Textout(X - 3 + dx + 1, Y, S); 347 349 Inc(dx, W + 1); … … 349 351 Brush.Color := $C0C0C0; 350 352 FrameRect(Rect(X - 3 + dx, Y + 2, X + 11 + dx, Y + 16)); 351 Brush.Style := bsClear;353 Brush.Style := TBrushStyle.bsClear; 352 354 Sprite(dst, HGrSystem, X - 1 + dx, Y + 4, 10, 10, 353 355 66 + I mod 11 * 11, 137 + I div 11 * 11); … … 512 514 Offscreen.Canvas.FillRect(Rect(xView, yView, xView + 64, 513 515 yView + 16)); 514 Brush.Style := bsClear;516 Brush.Style := TBrushStyle.bsClear; 515 517 end; 516 518 -
trunk/LocalPlayer/Wonders.pas
r460 r468 5 5 6 6 uses 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}; 9 10 10 11 type … … 35 36 36 37 uses 37 Term, ClientTools, Help, Tribes, PixelPointer; 38 {$IFDEF DPI}Dpi.PixelPointer,{$ELSE}PixelPointer,{$ENDIF} 39 Term, ClientTools, Help, Tribes; 38 40 39 41 {$R *.lfm} … … 67 69 begin 68 70 Canvas.Font.Assign(UniFont[ftNormal]); 69 Canvas.Brush.Style := bsClear;71 Canvas.Brush.Style := TBrushStyle.bsClear; 70 72 InitButtons; 71 73 end; -
trunk/Log.pas
r447 r468 5 5 6 6 uses 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}; 9 10 10 11 type … … 130 131 Shift: TShiftState; X, Y: Integer); 131 132 begin 132 if Button = mbRight then133 if Button = TMouseButton.mbRight then 133 134 LogPopup.Popup(Left + X, Top + Y); 134 135 end; -
trunk/Messg.pas
r447 r468 6 6 uses 7 7 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}; 9 11 10 12 const -
trunk/MiniMap.pas
r456 r468 5 5 6 6 uses 7 Classes, SysUtils, Graphics, Protocol, ClientTools; 7 Classes, SysUtils, Protocol, ClientTools, 8 {$IFDEF DPI}Dpi.Graphics, Dpi.Common{$ELSE}Graphics{$ENDIF}; 8 9 9 10 type … … 37 38 38 39 uses 39 ScreenTools, PixelPointer, Global, GameServer, IsoEngine, Tribes; 40 {$IFDEF DPI}Dpi.PixelPointer,{$ELSE}PixelPointer,{$ENDIF} 41 ScreenTools, Global, GameServer, IsoEngine, Tribes; 40 42 41 43 const … … 169 171 Size := WorldSize; 170 172 171 Bitmap.PixelFormat := pf24bit;173 Bitmap.PixelFormat := TPixelFormat.pf24bit; 172 174 Bitmap.SetSize(Size.X * 2, Size.Y); 173 175 Bitmap.BeginUpdate; … … 199 201 OwnColor := HGrSystem.Data.Canvas.Pixels[95, 67]; 200 202 EnemyColor := HGrSystem.Data.Canvas.Pixels[96, 67]; 201 Bitmap.PixelFormat := pf24bit;203 Bitmap.PixelFormat := TPixelFormat.pf24bit; 202 204 Bitmap.SetSize(Size.X * 2, Size.Y); 203 205 if Mode = mmPicture then begin … … 261 263 FillRect(Rect(0, 0, Bitmap.Width, Bitmap.Height)); 262 264 end; 263 Bitmap.PixelFormat := pf24bit;265 Bitmap.PixelFormat := TPixelFormat.pf24bit; 264 266 Bitmap.SetSize(Size.X * 2, Size.Y); 265 267 Bitmap.BeginUpdate; -
trunk/NoTerm.pas
r447 r468 5 5 6 6 uses 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}; 9 11 10 12 type … … 88 90 Top := 8; 89 91 Caption := Phrases.Lookup('AIT'); 90 Canvas.Brush.Style := bsClear;92 Canvas.Brush.Style := TBrushStyle.bsClear; 91 93 Canvas.Font.Assign(UniFont[ftSmall]); 92 94 TitleHeight := 36; … … 168 170 State := TBitmap.Create; 169 171 State.SetSize(192, 20); 170 State.Canvas.Brush.Style := bsClear;172 State.Canvas.Brush.Style := TBrushStyle.bsClear; 171 173 State.Canvas.Font.Assign(UniFont[ftSmall]); 172 174 NewStat; -
trunk/Packages/CevoComponents/Area.pas
r184 r468 4 4 5 5 uses 6 Classes, Graphics, Controls; 6 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls,{$ELSE} 7 Graphics, Controls,{$ENDIF} 8 Classes; 7 9 8 10 type -
trunk/Packages/CevoComponents/BaseWin.pas
r464 r468 4 4 5 5 uses 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; 8 9 9 10 type … … 133 134 begin 134 135 if Key = VK_ESCAPE then begin 135 if fsModal in FormState then136 if TFormStateType.fsModal in FormState then 136 137 ModalResult := mrCancel; 137 138 end else 138 139 if Key = VK_RETURN then begin 139 if fsModal in FormState then140 if TFormStateType.fsModal in FormState then 140 141 ModalResult := mrOK; 141 142 end else … … 245 246 TexOverride := False; 246 247 ModalIndication := True; 247 Canvas.Brush.Style := bsClear;248 Canvas.Brush.Style := TBrushStyle.bsClear; 248 249 InnerWidth := Width - 2 * SideFrame; 249 250 InnerHeight := Height - TitleHeight - NarrowFrame; … … 479 480 Exit; 480 481 Offscreen := TBitmap.Create; 481 Offscreen.PixelFormat := pf24bit;482 Offscreen.PixelFormat := TPixelFormat.pf24bit; 482 483 if Screen.Height - yUnused < 480 then 483 484 Offscreen.SetSize(Screen.Width, 480) … … 485 486 Offscreen.SetSize(Screen.Width, Screen.Height - yUnused); 486 487 Offscreen.Canvas.FillRect(0, 0, Offscreen.Width, OffScreen.Height); 487 Offscreen.Canvas.Brush.Style := bsClear;488 Offscreen.Canvas.Brush.Style := TBrushStyle.bsClear; 488 489 end; 489 490 -
trunk/Packages/CevoComponents/ButtonA.pas
r431 r468 4 4 5 5 uses 6 ButtonBase, Classes, Graphics, LCLIntf, LCLType, ScreenTools, Types; 6 {$IFDEF DPI}Dpi.Graphics,{$ELSE}Graphics,{$ENDIF} 7 ButtonBase, Classes, LCLIntf, LCLType, ScreenTools, Types; 7 8 8 9 type … … 48 49 BitBltCanvas(Canvas, 0, 0, 100, 25, Graphic.Canvas, 195, 49 50 243 + 26 * Byte(Down)); 50 Canvas.Brush.Style := bsClear;51 Canvas.Brush.Style := TBrushStyle.bsClear; 51 52 TextSize := TextExtent(FCaption); 52 53 TextOut(50 - (TextSize.Width + 1) div 2, -
trunk/Packages/CevoComponents/ButtonB.pas
r462 r468 4 4 5 5 uses 6 ButtonBase, Classes, Graphics, LCLIntf, LCLType; 6 {$IFDEF DPI}Dpi.Graphics,{$ELSE}Graphics,{$ENDIF} 7 ButtonBase, Classes, LCLIntf, LCLType; 7 8 8 9 type -
trunk/Packages/CevoComponents/ButtonBase.pas
r464 r468 4 4 5 5 uses 6 Classes, Graphics, Controls; 6 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls,{$ELSE} 7 Graphics, Controls,{$ENDIF} 8 Classes; 7 9 8 10 type … … 84 86 DownChangedProc(self); 85 87 end; 86 if (Button = mbLeft) and (@ClickProc <> nil) then88 if (Button = TMouseButton.mbLeft) and (@ClickProc <> nil) then 87 89 ClickProc(self); 88 90 end -
trunk/Packages/CevoComponents/ButtonN.pas
r447 r468 4 4 5 5 uses 6 Classes, Graphics, Controls, LCLIntf, LCLType, ScreenTools; 6 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls,{$ELSE}Graphics, Controls,{$ENDIF} 7 Classes, LCLIntf, LCLType, ScreenTools; 7 8 8 9 type … … 85 86 X, Y: Integer); 86 87 begin 87 if FPossible and (Button = mbLeft) and (@ChangeProc <> nil) then88 if FPossible and (Button = TMouseButton.mbLeft) and (@ChangeProc <> nil) then 88 89 ChangeProc(Self); 89 90 end; -
trunk/Packages/CevoComponents/CevoComponents.lpk
r456 r468 112 112 </Files> 113 113 <CompatibilityMode Value="True"/> 114 <RequiredPkgs Count=" 3">114 <RequiredPkgs Count="4"> 115 115 <Item1> 116 <PackageName Value=" Common"/>116 <PackageName Value="DpiControls"/> 117 117 </Item1> 118 118 <Item2> 119 <PackageName Value=" LCL"/>119 <PackageName Value="Common"/> 120 120 </Item2> 121 121 <Item3> 122 <PackageName Value="LCL"/> 123 </Item3> 124 <Item4> 122 125 <PackageName Value="FCL"/> 123 </Item 3>126 </Item4> 124 127 </RequiredPkgs> 125 128 <UsageOptions> -
trunk/Packages/CevoComponents/DrawDlg.pas
r460 r468 4 4 5 5 uses 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} 7 9 Messages, Graphics, Controls, ButtonBase, ButtonA, ButtonB, Area, ScreenTools 8 10 {$IFDEF LCLGTK2}, Gtk2Globals{$ENDIF}; -
trunk/Packages/CevoComponents/EOTButton.pas
r447 r468 4 4 5 5 uses 6 ButtonBase, Classes, SysUtils, Graphics, LCLIntf, LCLType; 6 {$IFDEF DPI}Dpi.Graphics,{$ELSE}Graphics,{$ENDIF} 7 ButtonBase, Classes, SysUtils, LCLIntf, LCLType; 7 8 8 9 const … … 53 54 inherited; 54 55 Buffer := TBitmap.Create; 55 Buffer.PixelFormat := pf24bit;56 Buffer.PixelFormat := TPixelFormat.pf24bit; 56 57 Buffer.SetSize(48, 48); 57 58 Buffer.Canvas.FillRect(0, 0, Buffer.Width, Buffer.Height); 58 59 Back := TBitmap.Create; 59 Back.PixelFormat := pf24bit;60 Back.PixelFormat := TPixelFormat.pf24bit; 60 61 Back.SetSize(48, 48); 61 62 Back.Canvas.FillRect(0, 0, Back.Width, Back.Height); -
trunk/Packages/CevoComponents/GraphicSet.pas
r464 r468 4 4 5 5 uses 6 Classes, SysUtils, Graphics, Generics.Collections, LCLType, DOM, 6 {$IFDEF DPI}Dpi.Graphics,{$ELSE} 7 Graphics,{$ENDIF} 8 Classes, SysUtils, Generics.Collections, LCLType, DOM, 7 9 XMLRead, XMLWrite, XML; 8 10 … … 228 230 begin 229 231 Data := TBitmap.Create; 230 Data.PixelFormat := pf24bit;232 Data.PixelFormat := TPixelFormat.pf24bit; 231 233 Mask := TBitmap.Create; 232 Mask.PixelFormat := pf24bit;234 Mask.PixelFormat := TPixelFormat.pf24bit; 233 235 Items := TGraphicSetItems.Create; 234 236 Items.GraphicSet := Self; -
trunk/Packages/CevoComponents/ScreenTools.pas
r456 r468 7 7 Windows, 8 8 {$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}; 11 13 12 14 type … … 96 98 procedure Texturize(Dest, Texture: TBitmap; TransparentColor: Cardinal); 97 99 procedure DarkenImage(Bitmap: TBitmap; Change: Integer); 100 {$IFNDEF DPI} 98 101 function ScaleToNative(Value: Integer): Integer; 99 102 function ScaleFromNative(Value: Integer): Integer; 103 {$ENDIF} 100 104 procedure UnshareBitmap(Bitmap: TBitmap); 101 105 procedure Gtk2Fix; … … 199 203 200 204 uses 201 Directories, Sound, PixelPointer; 205 {$IFDEF DPI}Dpi.PixelPointer,{$ELSE}PixelPointer,{$ENDIF} 206 Directories, Sound; 202 207 203 208 var … … 419 424 Jpeg.LoadFromFile(FileName); 420 425 if not (gfNoGamma in Options) then 421 Bmp.PixelFormat := pf24bit;426 Bmp.PixelFormat := TPixelFormat.pf24bit; 422 427 Bmp.SetSize(Jpeg.Width, Jpeg.Height); 423 428 Bmp.Canvas.Draw(0, 0, Jpeg); … … 434 439 Png.LoadFromFile(FileName); 435 440 if not (gfNoGamma in Options) then 436 Bmp.PixelFormat := pf24bit;441 Bmp.PixelFormat := TPixelFormat.pf24bit; 437 442 Bmp.SetSize(Png.Width, Png.Height); 438 443 if (Png.RawImage.Description.Format = ricfGray) then 439 444 begin 440 445 // LCL doesn't support 8-bit colors properly. Use 24-bit instead. 441 Bmp.PixelFormat := pf24bit;446 Bmp.PixelFormat := TPixelFormat.pf24bit; 442 447 CopyGray8BitTo24bitBitmap(Bmp, Png); 443 448 end … … 454 459 Bmp.LoadFromFile(FileName); 455 460 if not (gfNoGamma in Options) then 456 Bmp.PixelFormat := pf24bit;461 Bmp.PixelFormat := TPixelFormat.pf24bit; 457 462 Result := True; 458 463 except … … 634 639 Height := ScaleToNative(Height); 635 640 //Assert(Src.PixelFormat = pf8bit); 636 Assert(dst.PixelFormat = pf24bit);641 Assert(dst.PixelFormat = TPixelFormat.pf24bit); 637 642 if xDst < 0 then begin 638 643 Width := Width + xDst; … … 821 826 Height := ScaleToNative(Height); 822 827 bmp.BeginUpdate; 823 Assert(bmp.PixelFormat = pf24bit);828 Assert(bmp.PixelFormat = TPixelFormat.pf24bit); 824 829 Height := Y + Height; 825 830 PixelPtr := TPixelPointer.Create(Bmp, X, Y); … … 1524 1529 Brush.Color := $000000; 1525 1530 FillRect(Rect(X + Pos + abs(Growth), Y, X + Max, Y + 7)); 1526 Brush.Style := bsClear;1531 Brush.Style := TBrushStyle.bsClear; 1527 1532 end; 1528 1533 end; … … 1627 1632 end; 1628 1633 1634 {$IFNDEF DPI} 1629 1635 function ScaleToNative(Value: Integer): Integer; 1630 1636 begin … … 1636 1642 Result := Value; 1637 1643 end; 1644 {$ENDIF} 1638 1645 1639 1646 procedure UnshareBitmap(Bitmap: TBitmap); … … 1691 1698 Size := Size * 10 + Byte(S[I]) - 48; 1692 1699 'B', 'b': 1693 UniFont[section].Style := UniFont[section].Style + [ fsBold];1700 UniFont[section].Style := UniFont[section].Style + [TFontStyle.fsBold]; 1694 1701 'I', 'i': 1695 UniFont[section].Style := UniFont[section].Style + [ fsItalic];1702 UniFont[section].Style := UniFont[section].Style + [TFontStyle.fsItalic]; 1696 1703 end; 1697 UniFont[section].Size := Round(Size * 72/ UniFont[section].PixelsPerInch);1704 UniFont[section].Size := Round(Size * ScaleToNative(72) / UniFont[section].PixelsPerInch); 1698 1705 end; 1699 1706 end; … … 1783 1790 1784 1791 Colors := TBitmap.Create; 1785 Colors.PixelFormat := pf24bit;1792 Colors.PixelFormat := TPixelFormat.pf24bit; 1786 1793 Paper := TBitmap.Create; 1787 Paper.PixelFormat := pf24bit;1794 Paper.PixelFormat := TPixelFormat.pf24bit; 1788 1795 BigImp := TBitmap.Create; 1789 BigImp.PixelFormat := pf24bit;1796 BigImp.PixelFormat := TPixelFormat.pf24bit; 1790 1797 MainTexture := TTexture.Create; 1791 1798 ClickFrameColor := HGrSystem.Data.Canvas.Pixels[187, 175]; … … 1796 1803 1797 1804 LogoBuffer := TBitmap.Create; 1798 LogoBuffer.PixelFormat := pf24bit;1805 LogoBuffer.PixelFormat := TPixelFormat.pf24bit; 1799 1806 LogoBuffer.SetSize(BigBook.Width, BigBook.Height); 1800 1807 end; -
trunk/Packages/CevoComponents/Texture.pas
r456 r468 4 4 5 5 uses 6 Classes, SysUtils, Graphics; 6 {$IFDEF DPI}Dpi.Graphics,{$ELSE}Graphics,{$ENDIF} 7 Classes, SysUtils; 7 8 8 9 type -
trunk/Settings.pas
r456 r468 4 4 5 5 uses 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}; 9 10 10 11 type … … 82 83 83 84 Canvas.Font.Assign(UniFont[ftNormal]); 84 Canvas.Brush.Style := bsClear;85 Canvas.Brush.Style := TBrushStyle.bsClear; 85 86 86 87 ButtonOk.Caption := Phrases.Lookup('BTN_OK'); -
trunk/Start.pas
r462 r468 6 6 uses 7 7 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}; 11 12 12 13 type … … 255 256 256 257 Canvas.Font.Assign(UniFont[ftNormal]); 257 Canvas.Brush.Style := bsClear;258 Canvas.Brush.Style := TBrushStyle.bsClear; 258 259 259 260 QuitBtn.Hint := Phrases.Lookup('STARTCONTROLS', 0); … … 303 304 304 305 EmptyPicture := TBitmap.Create; 305 EmptyPicture.PixelFormat := pf24bit;306 EmptyPicture.PixelFormat := TPixelFormat.pf24bit; 306 307 EmptyPicture.SetSize(64, 64); 307 308 EmptyPicture.Canvas.FillRect(0, 0, EmptyPicture.Width, EmptyPicture.Height); 308 309 LogoBuffer := TBitmap.Create; 309 LogoBuffer.PixelFormat := pf24bit;310 LogoBuffer.PixelFormat := TPixelFormat.pf24bit; 310 311 LogoBuffer.SetSize(wBuffer, 56); 311 312 LogoBuffer.Canvas.FillRect(0, 0, LogoBuffer.Width, LogoBuffer.Height); … … 531 532 begin 532 533 Canvas.Font.Assign(UniFont[ftCaption]); 533 Canvas.Font.Style := Canvas.Font.Style + [ fsUnderline];534 Canvas.Font.Style := Canvas.Font.Style + [TFontStyle.fsUnderline]; 534 535 RisedTextOut(Canvas, xAction, Y - 3, Phrases2.Lookup(HeaderItem)); 535 536 Canvas.Font.Assign(UniFont[ftNormal]); … … 566 567 FillRect(Rect(0, 1, ClientWidth, 3)); 567 568 FillRect(Rect(TabOffset + 4 * TabSize + 2, 0, ClientWidth, TabHeight)); 568 Brush.Style := bsClear;569 Brush.Style := TBrushStyle.bsClear; 569 570 end; 570 571 if Page in [pgStartRandom, pgStartMap] then … … 745 746 FillRect(Rect(xBrain[I] - 5, yBrain[I] + 25, xBrain[I] - 2, 746 747 yBrain[I] + 27)); 747 Brush.Style := bsClear;748 Brush.Style := TBrushStyle.bsClear; 748 749 end; 749 750 if PlayerSlots[I].OfferMultiple then … … 911 912 begin 912 913 {$IFDEF UNIX} 913 ShowInTaskBar := stAlways;914 ShowInTaskBar := TShowInTaskbar.stAlways; 914 915 {$ENDIF} 915 916 MainTexture.Age := -1;
Note:
See TracChangeset
for help on using the changeset viewer.