diff -Nru xtactics-1.4.0/debian/bzr-builder.manifest xtactics-1.4.0/debian/bzr-builder.manifest --- xtactics-1.4.0/debian/bzr-builder.manifest 2020-05-12 00:01:42.000000000 +0000 +++ xtactics-1.4.0/debian/bzr-builder.manifest 2020-09-05 20:16:51.000000000 +0000 @@ -1,3 +1,3 @@ -# bzr-builder format 0.3 deb-version {debupstream}-0~287 -lp:xtactics revid:svn-v4:473e92d2-f4b8-43ff-b2dd-7e42df4daf22:trunk:305 +# bzr-builder format 0.3 deb-version {debupstream}-0~288 +lp:xtactics revid:svn-v4:473e92d2-f4b8-43ff-b2dd-7e42df4daf22:trunk:306 nest packaging lp:~chronoscz/xtactics/debian-packaging debian revid:svn-v4:473e92d2-f4b8-43ff-b2dd-7e42df4daf22:trunk/Install/deb/debian:264 diff -Nru xtactics-1.4.0/debian/changelog xtactics-1.4.0/debian/changelog --- xtactics-1.4.0/debian/changelog 2020-05-12 00:01:42.000000000 +0000 +++ xtactics-1.4.0/debian/changelog 2020-09-05 20:16:51.000000000 +0000 @@ -1,8 +1,8 @@ -xtactics (1.4.0-0~287~ubuntu18.04.1) bionic; urgency=low +xtactics (1.4.0-0~288~ubuntu18.04.1) bionic; urgency=low * Auto build. - -- Jiří Hajda Tue, 12 May 2020 00:01:42 +0000 + -- Jiří Hajda Sat, 05 Sep 2020 20:16:51 +0000 xtactics (1.4.0-1) precise; urgency=low diff -Nru xtactics-1.4.0/Packages/Common/URegistry.pas xtactics-1.4.0/Packages/Common/URegistry.pas --- xtactics-1.4.0/Packages/Common/URegistry.pas 2020-05-12 00:01:41.000000000 +0000 +++ xtactics-1.4.0/Packages/Common/URegistry.pas 2020-09-05 20:16:50.000000000 +0000 @@ -1,6 +1,6 @@ unit URegistry; -{$MODE Delphi} +{$MODE delphi} interface @@ -16,9 +16,9 @@ TRegistryContext = record RootKey: HKEY; Key: string; + class function Create(RootKey: TRegistryRoot; Key: string): TRegistryContext; static; overload; + class function Create(RootKey: HKEY; Key: string): TRegistryContext; static; overload; class operator Equal(A, B: TRegistryContext): Boolean; - function Create(RootKey: TRegistryRoot; Key: string): TRegistryContext; overload; - function Create(RootKey: HKEY; Key: string): TRegistryContext; overload; end; { TRegistryEx } @@ -28,10 +28,13 @@ function GetCurrentContext: TRegistryContext; procedure SetCurrentContext(AValue: TRegistryContext); public + function ReadChar(const Name: string): Char; + procedure WriteChar(const Name: string; Value: Char); function ReadBoolWithDefault(const Name: string; DefaultValue: Boolean): Boolean; function ReadIntegerWithDefault(const Name: string; DefaultValue: Integer): Integer; function ReadStringWithDefault(const Name: string; DefaultValue: string): string; + function ReadCharWithDefault(const Name: string; DefaultValue: Char): Char; function ReadFloatWithDefault(const Name: string; DefaultValue: Double): Double; function DeleteKeyRecursive(const Key: string): Boolean; @@ -54,13 +57,13 @@ Result := (A.Key = B.Key) and (A.RootKey = B.RootKey); end; -function TRegistryContext.Create(RootKey: TRegistryRoot; Key: string): TRegistryContext; +class function TRegistryContext.Create(RootKey: TRegistryRoot; Key: string): TRegistryContext; begin Result.RootKey := RegistryRootHKEY[RootKey]; Result.Key := Key; end; -function TRegistryContext.Create(RootKey: HKEY; Key: string): TRegistryContext; +class function TRegistryContext.Create(RootKey: HKEY; Key: string): TRegistryContext; begin Result.RootKey := RootKey; Result.Key := Key; @@ -88,6 +91,16 @@ end; end; +function TRegistryEx.ReadCharWithDefault(const Name: string; DefaultValue: Char + ): Char; +begin + if ValueExists(Name) then Result := ReadChar(Name) + else begin + WriteChar(Name, DefaultValue); + Result := DefaultValue; + end; +end; + function TRegistryEx.ReadFloatWithDefault(const Name: string; DefaultValue: Double): Double; begin @@ -119,7 +132,7 @@ function TRegistryEx.OpenKey(const Key: string; CanCreate: Boolean): Boolean; begin {$IFDEF Linux} - CloseKey; + //CloseKey; {$ENDIF} Result := inherited OpenKey(Key, CanCreate); end; @@ -136,6 +149,20 @@ OpenKey(AValue.Key, True); end; +function TRegistryEx.ReadChar(const Name: string): Char; +var + S: string; +begin + S := ReadString(Name); + if Length(S) > 0 then Result := S[1] + else Result := #0; +end; + +procedure TRegistryEx.WriteChar(const Name: string; Value: Char); +begin + WriteString(Name, Value); +end; + function TRegistryEx.ReadBoolWithDefault(const Name: string; DefaultValue: Boolean): Boolean; begin diff -Nru "/tmp/tmprniTdy/j3ab3aJr6T/xtactics-1.4.0/Read me.txt" "/tmp/tmprniTdy/4488FMttcC/xtactics-1.4.0/Read me.txt" --- "/tmp/tmprniTdy/j3ab3aJr6T/xtactics-1.4.0/Read me.txt" 2020-05-12 00:01:41.000000000 +0000 +++ "/tmp/tmprniTdy/4488FMttcC/xtactics-1.4.0/Read me.txt" 2020-09-05 20:16:50.000000000 +0000 @@ -1 +1 @@ -Developed using Lazarus 2.0.0 (http://www.lazarus-ide.org/) +Developed using Lazarus 2.0.10 (http://www.lazarus-ide.org/) diff -Nru "/tmp/tmprniTdy/j3ab3aJr6T/xtactics-1.4.0/Release notes.txt" "/tmp/tmprniTdy/4488FMttcC/xtactics-1.4.0/Release notes.txt" --- "/tmp/tmprniTdy/j3ab3aJr6T/xtactics-1.4.0/Release notes.txt" 2020-05-12 00:01:41.000000000 +0000 +++ "/tmp/tmprniTdy/4488FMttcC/xtactics-1.4.0/Release notes.txt" 2020-09-05 20:16:50.000000000 +0000 @@ -42,14 +42,14 @@ * Added: Remember players configuration for new game. * Added: Map can have rounded shape. * Added: New Unit moves window available from Tools menu. -* Modified: Improved code for symetric map generation. +* Modified: Improved code for symmetric map generation. * Modified: Store player settings for new game separately to current game players. * Modified: Implemented better algorithm for initialization of players start cell to maintain minimal distance between players. * Modified: Do not create settings form on application start but just if form is opened. * Modified: Improved attack to neutral units if computer have more units available when necessary. * Fixed: Show error message if not all players were placed to the map. -* Fixed: Build cell bridges correctly if symetric map is selected. -* Fixed: Avoid possible negative cell power if player unit was previously unsucessfully attacked and weaken by enemy. +* Fixed: Build cell bridges correctly if symmetric map is selected. +* Fixed: Avoid possible negative cell power if player unit was previously unsuccessfully attacked and weaken by enemy. * Fixed: Same game structures were not correctly initialized during load from file. * Fixed: Show other players cells with normal power and cells of current player with power lowered by unit moves. * Fixed: Problems with freeing memory of unit moves. @@ -91,7 +91,7 @@ * Added: New game option "Fog of war" which cause map to be covered to black and only explored cells will be visible. * Added: Auto save game to file option in settings. * Added: New game option "Map shape" which can use image in file as base for map generation. Black color is used as void. -* Added: Support for symetric map usable for two players game. +* Added: Support for symmetric map usable for two players game. * Added: Confirmation dialog for ending game. * Added: Support for switching large icons in toolbar. * Added: About form with information about application. diff -Nru xtactics-1.4.0/UGeometry.pas xtactics-1.4.0/UGeometry.pas --- xtactics-1.4.0/UGeometry.pas 2020-05-12 00:01:41.000000000 +0000 +++ xtactics-1.4.0/UGeometry.pas 2020-09-05 20:16:50.000000000 +0000 @@ -25,8 +25,8 @@ class operator Multiply(const A, B: TGPoint): TGPoint; //class operator Divide(const A, B: TGPoint): TGPoint; //class operator Modulus(A: TGPoint; B: TGPoint): TGPoint; - function Min(const A, B: TGPoint): TGPoint; - function Max(const A, B: TGPoint): TGPoint; + class function Min(const A, B: TGPoint): TGPoint; static; + class function Max(const A, B: TGPoint): TGPoint; static; procedure Rotate(Base: TGPoint; Angle: Double); end; @@ -499,13 +499,13 @@ Result := (A.X <= B.X) and (A.Y <= B.Y); end; -function TGPoint.Min(const A, B: TGPoint): TGPoint; +class function TGPoint.Min(const A, B: TGPoint): TGPoint; begin if A.X < B.X then Result.X := A.X else Result.X := B.X; if A.Y < B.Y then Result.Y := A.Y else Result.Y := B.Y; end; -function TGPoint.Max(const A, B: TGPoint): TGPoint; +class function TGPoint.Max(const A, B: TGPoint): TGPoint; begin if A.X > B.X then Result.X := A.X else Result.X := B.X; if A.Y > B.Y then Result.Y := A.Y else Result.Y := B.Y;