Changeset 377 for trunk/Game.pas
- Timestamp:
- Jan 3, 2025, 11:20:28 PM (4 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Game.pas
r360 r377 86 86 StoredRandSeed: Cardinal; 87 87 GeneratePlayers: Boolean; 88 procedure PostConfig;89 88 procedure Assign(Source: TGame); 90 89 function AttackProbability(AttackCount, DefendCount: Integer): Double; … … 297 296 Cell: TCell; 298 297 begin 298 // Load map image 299 if (Map.Shape = msImage) then begin 300 if LoadedImageFileName <> MapImageFileName then begin 301 LoadedImageFileName := MapImageFileName; 302 if FileExists(MapImageFileName) then begin 303 Map.Image.Picture.LoadFromFile(MapImageFileName) 304 end else begin 305 LoadedImageFileName := ''; 306 Map.Image.Picture.Clear; 307 end; 308 end; 309 end; 310 299 311 // Randomize map terrain 300 312 for Cell in Map.Cells do … … 376 388 end; 377 389 378 procedure TGame.PostConfig;379 begin380 if (Map.Shape = msImage) and FileExists(MapImageFileName) and381 (LoadedImageFileName <> MapImageFileName) then begin382 LoadedImageFileName := MapImageFileName;383 Map.Image.Picture.LoadFromFile(MapImageFileName);384 end;385 end;386 387 390 procedure TGame.SelectPlayerStartCell(Player: TPlayer); 388 391 var … … 502 505 Map.Assign(Source.Map); 503 506 MapImageFileName := Source.MapImageFileName; 507 LoadedImageFileName := Source.LoadedImageFileName; 504 508 VoidEnabled := Source.VoidEnabled; 505 509 VoidPercentage := Source.VoidPercentage;
Note:
See TracChangeset
for help on using the changeset viewer.