Changeset 233 for trunk/UGame.pas
- Timestamp:
- Sep 19, 2018, 3:20:20 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UGame.pas
r231 r233 7 7 uses 8 8 Classes, SysUtils, ExtCtrls, Graphics, XMLConf, XMLRead, XMLWrite, Forms, 9 DOM, Math, LazFileUtils, UXMLUtils, Dialogs, Types,LCLType, LCLIntf, fgl,9 DOM, Math, LazFileUtils, UXMLUtils, Dialogs, LCLType, LCLIntf, fgl, 10 10 UGeometry, UPlayer, UMap, UMapType; 11 11 … … 77 77 BridgeEnabled: Boolean; 78 78 MaxPower: Integer; 79 procedure PostConfig; 79 80 procedure Assign(Source: TGame); 80 81 function AttackProbability(AttackCount, DefendCount: Integer): Double; … … 273 274 Cell: TCell; 274 275 begin 275 if (Map.Shape = msImage) and FileExists(MapImageFileName) and276 (LoadedImageFileName <> MapImageFileName) then begin277 LoadedImageFileName := MapImageFileName;278 Map.Image.Picture.LoadFromFile(MapImageFileName);279 end;280 281 276 // Randomize map terrain 282 277 for Cell in Map.Cells do … … 290 285 Power := Random(MaxNeutralUnits + 1); 291 286 Player := nil; 287 end; 288 end; 289 290 procedure TGame.PostConfig; 291 begin 292 if (Map.Shape = msImage) and FileExists(MapImageFileName) and 293 (LoadedImageFileName <> MapImageFileName) then begin 294 LoadedImageFileName := MapImageFileName; 295 Map.Image.Picture.LoadFromFile(MapImageFileName); 292 296 end; 293 297 end;
Note:
See TracChangeset
for help on using the changeset viewer.