- Timestamp:
- Nov 16, 2017, 12:43:42 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormNew.lfm
r151 r155 192 192 object ComboBoxGridType: TComboBox 193 193 Left = 146 194 Height = 36194 Height = 40 195 195 Top = 104 196 196 Width = 208 … … 206 206 object ComboBoxMapShape: TComboBox 207 207 Left = 146 208 Height = 36208 Height = 40 209 209 Top = 144 210 210 Width = 208 -
trunk/Forms/UFormNew.pas
r152 r155 338 338 SpinEditVoidPercent.Value := Game.VoidPercentage; 339 339 SpinEditVoidPercent.Enabled := Game.VoidEnabled; 340 Players.Assign(Game.Players );340 Players.Assign(Game.PlayersSetting); 341 341 CheckBoxCity.Checked := Game.CityEnabled; 342 342 SpinEditCityPercent.Value := Game.CityPercentage; … … 358 358 procedure TFormNew.Save(Game: TGame); 359 359 begin 360 Game.Players.Assign(Players); 361 Game.Players.NewPlayerId := Players.NewPlayerId; 360 Game.PlayersSetting.Assign(Players); 362 361 Game.SymetricMap := CheckBoxSymetricMap.Checked; 363 362 Game.VoidEnabled := CheckBoxVoid.Checked; -
trunk/UCore.pas
r148 r155 460 460 FInitialized := True; 461 461 462 // Update translated default player names 463 TPlayer(Game.PlayersSetting[0]).Name := SPlayer + ' 1'; 464 TPlayer(Game.PlayersSetting[1]).Name := SPlayer + ' 2'; 465 462 466 LoadConfig; 463 467 Game.LoadConfig(XMLConfig1, 'Game'); 464 468 465 // Update translated default player names466 TPlayer(Game.Players[0]).Name := SPlayer + ' 1';467 TPlayer(Game.Players[1]).Name := SPlayer + ' 2';468 469 469 CommandLineParams; 470 470 ScaleDPI; -
trunk/UGame.pas
r154 r155 444 444 procedure CalculatePlayersDistance; 445 445 procedure PropagatePlayerDistance(List: TCells); 446 procedure InitDefaultPlayers ;446 procedure InitDefaultPlayersSetting; 447 447 public 448 448 Players: TPlayers; 449 PlayersSetting: TPlayers; 449 450 Clients: TClients; 450 451 Map: TMap; … … 3084 3085 end; 3085 3086 3086 procedure TGame.InitDefaultPlayers ;3087 begin 3088 Players .Clear;3089 Players .New(SPlayer + ' 1', clBlue, pmHuman);3090 Players .New(SPlayer + ' 2', clRed, pmComputer);3087 procedure TGame.InitDefaultPlayersSetting; 3088 begin 3089 PlayersSetting.Clear; 3090 PlayersSetting.New(SPlayer + ' 1', clBlue, pmHuman); 3091 PlayersSetting.New(SPlayer + ' 2', clRed, pmComputer); 3091 3092 end; 3092 3093 … … 3109 3110 SetValue(DOMString(Path + '/GrowCells'), Integer(GrowCells)); 3110 3111 SetValue(DOMString(Path + '/WinObjective'), Integer(WinObjective)); 3111 Players .SaveConfig(Config, Path + '/Players');3112 PlayersSetting.SaveConfig(Config, Path + '/Players'); 3112 3113 end; 3113 3114 end; … … 3141 3142 if (Value >= Integer(Low(TWinObjective))) and (Value <= Integer(High(TWinObjective))) then 3142 3143 WinObjective := TWinObjective(Value) else WinObjective := Low(TWinObjective); 3143 Players .LoadConfig(Config, Path + '/Players');3144 PlayersSetting.LoadConfig(Config, Path + '/Players'); 3144 3145 end; 3145 3146 end; … … 3367 3368 Players := TPlayers.Create; 3368 3369 Players.Game := Self; 3370 PlayersSetting := TPlayers.Create; 3371 PlayersSetting.Game := Self; 3369 3372 Clients := TClients.Create; 3370 3373 Clients.Game := Self; … … 3372 3375 MapImageFileName := 'Images/Maps/WorldMap.png'; 3373 3376 Randomize; 3377 InitDefaultPlayersSetting; 3374 3378 3375 3379 VoidEnabled := True; … … 3384 3388 begin 3385 3389 FreeAndNil(Clients); 3390 FreeAndNil(PlayersSetting); 3386 3391 FreeAndNil(Players); 3387 3392 FreeAndNil(Map); … … 3430 3435 end; 3431 3436 3432 InitDefaultPlayers;3437 Players.Assign(PlayersSetting); 3433 3438 for Player in Players do Player.StartCell := nil; 3434 3439 I := 0;
Note:
See TracChangeset
for help on using the changeset viewer.