Changeset 106
- Timestamp:
- Jan 17, 2015, 8:22:44 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UGame.pas
r105 r106 2637 2637 2638 2638 procedure TGame.LoadConfig(Config: TXmlConfig; Path: string); 2639 var 2640 Value: Integer; 2639 2641 begin 2640 2642 with Config do begin … … 2647 2649 Map.Size := Point(GetValue(Path + '/MapSizeX', 10), 2648 2650 GetValue(Path + '/MapSizeY', 10)); 2649 Map.Shape := TMapShape(GetValue(Path + '/MapShape', 0)); 2651 Value := GetValue(Path + '/MapShape', 0); 2652 if (Value >= Integer(Low(TMapShape))) and (Value <= Integer(High(TMapShape))) then 2653 Map.Shape := TMapShape(Value) else Map.Shape := Low(TMapShape); 2650 2654 CityEnabled := GetValue(Path + '/CityEnabled', False); 2651 2655 CityPercentage := GetValue(Path + '/CityPercentage', 10); 2652 2656 BridgeEnabled := GetValue(Path + '/BridgeEnabled', True); 2653 GrowAmount := TGrowAmount(GetValue(Path + '/GrowAmount', Integer(gaBySquareRoot))); 2654 GrowCells := TGrowCells(GetValue(Path + '/GrowCells', Integer(gcPlayerAll))); 2655 WinObjective := TWinObjective(GetValue(Path + '/WinObjective', Integer(woDefeatAllOponents))); 2657 Value := GetValue(Path + '/GrowAmount', Integer(gaBySquareRoot)); 2658 if (Value >= Integer(Low(TGrowAmount))) and (Value <= Integer(High(TGrowAmount))) then 2659 GrowAmount := TGrowAmount(Value) else GrowAmount := Low(TGrowAmount); 2660 Value := GetValue(Path + '/GrowCells', Integer(gcPlayerAll)); 2661 if (Value >= Integer(Low(TGrowCells))) and (Value <= Integer(High(TGrowCells))) then 2662 GrowCells := TGrowCells(Value) else GrowCells := Low(TGrowCells); 2663 Value := GetValue(Path + '/WinObjective', Integer(woDefeatAllOponents)); 2664 if (Value >= Integer(Low(TWinObjective))) and (Value <= Integer(High(TWinObjective))) then 2665 WinObjective := TWinObjective(Value) else WinObjective := Low(TWinObjective); 2656 2666 end; 2657 2667 end; -
trunk/xtactics.lpi
r105 r106 151 151 <HasResources Value="True"/> 152 152 <ResourceBaseClass Value="Form"/> 153 <UnitName Value="UFormNew"/> 153 154 </Unit7> 154 155 <Unit8>
Note:
See TracChangeset
for help on using the changeset viewer.