Changeset 306
- Timestamp:
- Sep 5, 2020, 8:10:03 PM (4 years ago)
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/1.2.0/Release notes.txt
r160 r306 5 5 * Added: Map can have rounded shape. 6 6 * Added: New Unit moves window available from Tools menu. 7 * Modified: Improved code for sym etric map generation.7 * Modified: Improved code for symmetric map generation. 8 8 * Modified: Store player settings for new game separately to current game players. 9 9 * Modified: Implemented better algorithm for initialization of players start cell to maintain minimal distance between players. … … 11 11 * Modified: Improved attack to neutral units if computer have more units available when necessary. 12 12 * Fixed: Show error message if not all players were placed to the map. 13 * Fixed: Build cell bridges correctly if sym etric map is selected.14 * Fixed: Avoid possible negative cell power if player unit was previously unsuc essfully attacked and weaken by enemy.13 * Fixed: Build cell bridges correctly if symmetric map is selected. 14 * Fixed: Avoid possible negative cell power if player unit was previously unsuccessfully attacked and weaken by enemy. 15 15 * Fixed: Same game structures were not correctly initialized during load from file. 16 16 * Fixed: Show other players cells with normal power and cells of current player with power lowered by unit moves. … … 53 53 * Added: Auto save game to file option in settings. 54 54 * Added: New game option "Map shape" which can use image in file as base for map generation. Black color is used as void. 55 * Added: Support for sym etric map usable for two players game.55 * Added: Support for symmetric map usable for two players game. 56 56 * Added: Confirmation dialog for ending game. 57 57 * Added: Support for switching large icons in toolbar. -
trunk/Packages/Common/URegistry.pas
r192 r306 1 1 unit URegistry; 2 2 3 {$MODE Delphi}3 {$MODE delphi} 4 4 5 5 interface … … 17 17 RootKey: HKEY; 18 18 Key: string; 19 class function Create(RootKey: TRegistryRoot; Key: string): TRegistryContext; static; overload; 20 class function Create(RootKey: HKEY; Key: string): TRegistryContext; static; overload; 19 21 class operator Equal(A, B: TRegistryContext): Boolean; 20 function Create(RootKey: TRegistryRoot; Key: string): TRegistryContext; overload;21 function Create(RootKey: HKEY; Key: string): TRegistryContext; overload;22 22 end; 23 23 … … 29 29 procedure SetCurrentContext(AValue: TRegistryContext); 30 30 public 31 function ReadChar(const Name: string): Char; 32 procedure WriteChar(const Name: string; Value: Char); 31 33 function ReadBoolWithDefault(const Name: string; 32 34 DefaultValue: Boolean): Boolean; 33 35 function ReadIntegerWithDefault(const Name: string; DefaultValue: Integer): Integer; 34 36 function ReadStringWithDefault(const Name: string; DefaultValue: string): string; 37 function ReadCharWithDefault(const Name: string; DefaultValue: Char): Char; 35 38 function ReadFloatWithDefault(const Name: string; 36 39 DefaultValue: Double): Double; … … 55 58 end; 56 59 57 function TRegistryContext.Create(RootKey: TRegistryRoot; Key: string): TRegistryContext;60 class function TRegistryContext.Create(RootKey: TRegistryRoot; Key: string): TRegistryContext; 58 61 begin 59 62 Result.RootKey := RegistryRootHKEY[RootKey]; … … 61 64 end; 62 65 63 function TRegistryContext.Create(RootKey: HKEY; Key: string): TRegistryContext;66 class function TRegistryContext.Create(RootKey: HKEY; Key: string): TRegistryContext; 64 67 begin 65 68 Result.RootKey := RootKey; … … 85 88 else begin 86 89 WriteString(Name, DefaultValue); 90 Result := DefaultValue; 91 end; 92 end; 93 94 function TRegistryEx.ReadCharWithDefault(const Name: string; DefaultValue: Char 95 ): Char; 96 begin 97 if ValueExists(Name) then Result := ReadChar(Name) 98 else begin 99 WriteChar(Name, DefaultValue); 87 100 Result := DefaultValue; 88 101 end; … … 120 133 begin 121 134 {$IFDEF Linux} 122 CloseKey;135 //CloseKey; 123 136 {$ENDIF} 124 137 Result := inherited OpenKey(Key, CanCreate); … … 137 150 end; 138 151 152 function TRegistryEx.ReadChar(const Name: string): Char; 153 var 154 S: string; 155 begin 156 S := ReadString(Name); 157 if Length(S) > 0 then Result := S[1] 158 else Result := #0; 159 end; 160 161 procedure TRegistryEx.WriteChar(const Name: string; Value: Char); 162 begin 163 WriteString(Name, Value); 164 end; 165 139 166 function TRegistryEx.ReadBoolWithDefault(const Name: string; 140 167 DefaultValue: Boolean): Boolean; -
trunk/Read me.txt
r286 r306 1 Developed using Lazarus 2.0. 0 (http://www.lazarus-ide.org/)1 Developed using Lazarus 2.0.10 (http://www.lazarus-ide.org/) -
trunk/Release notes.txt
r253 r306 43 43 * Added: Map can have rounded shape. 44 44 * Added: New Unit moves window available from Tools menu. 45 * Modified: Improved code for sym etric map generation.45 * Modified: Improved code for symmetric map generation. 46 46 * Modified: Store player settings for new game separately to current game players. 47 47 * Modified: Implemented better algorithm for initialization of players start cell to maintain minimal distance between players. … … 49 49 * Modified: Improved attack to neutral units if computer have more units available when necessary. 50 50 * Fixed: Show error message if not all players were placed to the map. 51 * Fixed: Build cell bridges correctly if sym etric map is selected.52 * Fixed: Avoid possible negative cell power if player unit was previously unsuc essfully attacked and weaken by enemy.51 * Fixed: Build cell bridges correctly if symmetric map is selected. 52 * Fixed: Avoid possible negative cell power if player unit was previously unsuccessfully attacked and weaken by enemy. 53 53 * Fixed: Same game structures were not correctly initialized during load from file. 54 54 * Fixed: Show other players cells with normal power and cells of current player with power lowered by unit moves. … … 92 92 * Added: Auto save game to file option in settings. 93 93 * Added: New game option "Map shape" which can use image in file as base for map generation. Black color is used as void. 94 * Added: Support for sym etric map usable for two players game.94 * Added: Support for symmetric map usable for two players game. 95 95 * Added: Confirmation dialog for ending game. 96 96 * Added: Support for switching large icons in toolbar. -
trunk/UGeometry.pas
r258 r306 26 26 //class operator Divide(const A, B: TGPoint<T>): TGPoint<T>; 27 27 //class operator Modulus(A: TGPoint<T>; B: TGPoint<T>): TGPoint<T>; 28 function Min(const A, B: TGPoint<T>): TGPoint<T>;29 function Max(const A, B: TGPoint<T>): TGPoint<T>;28 class function Min(const A, B: TGPoint<T>): TGPoint<T>; static; 29 class function Max(const A, B: TGPoint<T>): TGPoint<T>; static; 30 30 procedure Rotate(Base: TGPoint<T>; Angle: Double); 31 31 end; … … 500 500 end; 501 501 502 function TGPoint<T>.Min(const A, B: TGPoint<T>): TGPoint<T>;502 class function TGPoint<T>.Min(const A, B: TGPoint<T>): TGPoint<T>; 503 503 begin 504 504 if A.X < B.X then Result.X := A.X else Result.X := B.X; … … 506 506 end; 507 507 508 function TGPoint<T>.Max(const A, B: TGPoint<T>): TGPoint<T>;508 class function TGPoint<T>.Max(const A, B: TGPoint<T>): TGPoint<T>; 509 509 begin 510 510 if A.X > B.X then Result.X := A.X else Result.X := B.X;
Note:
See TracChangeset
for help on using the changeset viewer.