Changeset 70
- Timestamp:
- Sep 28, 2014, 6:04:57 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormNew.lfm
r55 r70 1 1 object FormNew: TFormNew 2 Left = 7062 Left = 440 3 3 Height = 614 4 Top = 4554 Top = 178 5 5 Width = 716 6 6 Caption = 'New game' … … 127 127 object CheckBoxVoid: TCheckBox 128 128 Left = 8 129 Height = 2 7129 Height = 24 130 130 Top = 101 131 Width = 1 98131 Width = 175 132 132 Caption = 'Inaccessible places' 133 133 OnChange = CheckBoxVoidChange … … 136 136 object Label1: TLabel 137 137 Left = 8 138 Height = 2 5138 Height = 22 139 139 Top = 9 140 Width = 104140 Width = 88 141 141 Caption = 'Map width:' 142 142 ParentColor = False … … 144 144 object SpinEditMapSizeX: TSpinEdit 145 145 Left = 128 146 Height = 3 5146 Height = 32 147 147 Top = 4 148 148 Width = 98 … … 154 154 object SpinEditMapSizeY: TSpinEdit 155 155 Left = 128 156 Height = 3 5156 Height = 32 157 157 Top = 55 158 158 Width = 98 … … 164 164 object SpinEditVoidPercent: TSpinEdit 165 165 Left = 216 166 Height = 3 5166 Height = 32 167 167 Top = 97 168 168 Width = 106 … … 173 173 object Label3: TLabel 174 174 Left = 331 175 Height = 2 5175 Height = 22 176 176 Top = 102 177 Width = 1 7177 Width = 15 178 178 Caption = '%' 179 179 ParentColor = False … … 207 207 object Label2: TLabel 208 208 Left = 8 209 Height = 2 5209 Height = 22 210 210 Top = 57 211 Width = 110211 Width = 94 212 212 Caption = 'Map height:' 213 213 ParentColor = False … … 215 215 object CheckBoxCity: TCheckBox 216 216 Left = 8 217 Height = 2 7217 Height = 24 218 218 Top = 141 219 Width = 73219 Width = 68 220 220 Caption = 'Cities' 221 221 OnChange = CheckBoxCityChange … … 224 224 object SpinEditCityPercent: TSpinEdit 225 225 Left = 216 226 Height = 3 5226 Height = 32 227 227 Top = 137 228 228 Width = 106 … … 233 233 object Label4: TLabel 234 234 Left = 331 235 Height = 2 5235 Height = 22 236 236 Top = 142 237 Width = 1 7237 Width = 15 238 238 Caption = '%' 239 239 ParentColor = False … … 253 253 ChildSizing.Layout = cclLeftToRightThenTopToBottom 254 254 ChildSizing.ControlsPerLine = 1 255 ClientHeight = 49255 ClientHeight = 52 256 256 ClientWidth = 301 257 257 Items.Strings = ( … … 275 275 ChildSizing.Layout = cclLeftToRightThenTopToBottom 276 276 ChildSizing.ControlsPerLine = 1 277 ClientHeight = 78277 ClientHeight = 81 278 278 ClientWidth = 308 279 279 Items.Strings = ( … … 286 286 object ComboBoxGridType: TComboBox 287 287 Left = 473 288 Height = 3 3288 Height = 30 289 289 Top = 201 290 290 Width = 208 … … 300 300 object Label5: TLabel 301 301 Left = 336 302 Height = 2 5302 Height = 22 303 303 Top = 201 304 Width = 90304 Width = 79 305 305 Caption = 'Grid type:' 306 306 ParentColor = False … … 308 308 object Label6: TLabel 309 309 Left = 8 310 Height = 2 5310 Height = 22 311 311 Top = 313 312 Width = 1 29312 Width = 114 313 313 Caption = 'Win objective:' 314 314 ParentColor = False … … 316 316 object ComboBoxWinObjective: TComboBox 317 317 Left = 232 318 Height = 3 3318 Height = 30 319 319 Top = 305 320 320 Width = 328 … … 331 331 object Label7: TLabel 332 332 Left = 8 333 Height = 2 5333 Height = 22 334 334 Top = 348 335 Width = 2 45335 Width = 211 336 336 Caption = 'Max random neutral units:' 337 337 ParentColor = False … … 339 339 object SpinEditNeutralUnits: TSpinEdit 340 340 Left = 384 341 Height = 3 5341 Height = 32 342 342 Top = 344 343 343 Width = 98 … … 346 346 TabOrder = 14 347 347 Value = 12 348 end 349 object CheckBoxSymetricMap: TCheckBox 350 Left = 334 351 Height = 24 352 Top = 238 353 Width = 133 354 Caption = 'Symetric map' 355 TabOrder = 15 348 356 end 349 357 end -
trunk/Forms/UFormNew.lrt
r42 r70 20 20 TFORMNEW.LABEL6.CAPTION=Win objective: 21 21 TFORMNEW.LABEL7.CAPTION=Max random neutral units: 22 TFORMNEW.CHECKBOXSYMETRICMAP.CAPTION=Symetric map 22 23 TFORMNEW.APLAYERMODIFY.CAPTION=Modify player 23 24 TFORMNEW.APLAYERADD.CAPTION=Add player -
trunk/Forms/UFormNew.pas
r55 r70 23 23 ButtonPlayerModify: TButton; 24 24 ButtonPlayerRemove: TButton; 25 CheckBoxSymetricMap: TCheckBox; 25 26 CheckBoxCity: TCheckBox; 26 27 CheckBoxVoid: TCheckBox; … … 271 272 NewItem: TListItem; 272 273 begin 274 CheckBoxSymetricMap.Checked := Game.SymetricMap; 273 275 CheckBoxVoid.Checked := Game.VoidEnabled; 274 276 SpinEditVoidPercent.Value := Game.VoidPercentage; … … 306 308 TPlayer(Game.Players[I]).Game := Game; 307 309 end; 310 Game.SymetricMap := CheckBoxSymetricMap.Checked; 308 311 Game.VoidEnabled := CheckBoxVoid.Checked; 309 312 Game.VoidPercentage := SpinEditVoidPercent.Value; -
trunk/Languages/xtactics.cs.po
r68 r70 241 241 msgstr "Města" 242 242 243 #: tformnew.checkboxsymetricmap.caption 244 msgid "Symetric map" 245 msgstr "" 246 243 247 #: tformnew.checkboxvoid.caption 244 248 msgid "Inaccessible places" -
trunk/Languages/xtactics.po
r68 r70 231 231 msgstr "" 232 232 233 #: tformnew.checkboxsymetricmap.caption 234 msgid "Symetric map" 235 msgstr "" 236 233 237 #: tformnew.checkboxvoid.caption 234 238 msgid "Inaccessible places" -
trunk/UGame.pas
r69 r70 190 190 TotalCities: Integer; 191 191 StartUnits: Integer; 192 StartCell: TCell; 192 193 procedure LoadFromNode(Node: TDOMNode); 193 194 procedure SaveToNode(Node: TDOMNode); … … 278 279 VoidEnabled: Boolean; 279 280 VoidPercentage: Integer; 281 SymetricMap: Boolean; 280 282 GrowCells: TGrowCells; 281 283 GrowAmount: TGrowAmount; … … 291 293 FileName: string; 292 294 function AttackProbability(AttackCount, DefendCount, Depth: Integer): Double; 295 procedure LoadConfig(Config: TXmlConfig; Path: string); 293 296 procedure SaveConfig(Config: TXmlConfig; Path: string); 294 procedure LoadConfig(Config: TXmlConfig; Path: string);295 297 procedure LoadFromFile(FileName: string); 296 298 procedure SaveToFile(FileName: string); … … 1400 1402 View := TView.Create; 1401 1403 StartUnits := DefaultPlayerStartUnits; 1404 StartCell := nil; 1402 1405 end; 1403 1406 … … 1417 1420 TotalUnits := Source.TotalUnits; 1418 1421 StartUnits := Source.StartUnits; 1422 StartCell := Source.StartCell; 1419 1423 View.Assign(Source.View); 1420 1424 end; … … 1431 1435 AttackerDiceCount: Integer; 1432 1436 DefenderDiceCount: Integer; 1433 AttackerHighestRoll: Integer;1434 DefenderHighestRoll: Integer;1435 RollResult: Integer;1436 1437 S: string; 1437 1438 I: Integer; … … 1686 1687 with Config do begin 1687 1688 SetValue(Path + '/GridType', Integer(MapType)); 1689 SetValue(Path + '/SymetricMap', SymetricMap); 1688 1690 SetValue(Path + '/VoidEnabled', VoidEnabled); 1689 1691 SetValue(Path + '/VoidPercentage', VoidPercentage); … … 1704 1706 with Config do begin 1705 1707 MapType := TMapType(GetValue(Path + '/GridType', Integer(mtHexagon))); 1708 SymetricMap := GetValue(Path + '/SymetricMap', False); 1706 1709 VoidEnabled := GetValue(Path + '/VoidEnabled', True); 1707 1710 VoidPercentage := GetValue(Path + '/VoidPercentage', 20); … … 1731 1734 RootNode := Doc.DocumentElement; 1732 1735 with RootNode do begin 1736 SymetricMap := ReadBoolean(RootNode, 'SymetricMap', False); 1733 1737 VoidEnabled := ReadBoolean(RootNode, 'VoidEnabled', False); 1734 1738 VoidPercentage := ReadInteger(RootNode, 'VoidPercentage', 0); … … 1773 1777 AppendChild(RootNode); 1774 1778 with RootNode do begin 1779 WriteBoolean(RootNode, 'SymetricMap', SymetricMap); 1775 1780 WriteBoolean(RootNode, 'VoidEnabled', VoidEnabled); 1776 1781 WriteInteger(RootNode, 'VoidPercentage', VoidPercentage); … … 1934 1939 procedure TGame.New; 1935 1940 var 1936 X, Y: Integer;1937 NewCell: TCell;1938 1941 I: Integer; 1939 1942 StartCell: TCell; … … 1956 1959 Player := nil; 1957 1960 end; 1961 1962 if SymetricMap then begin 1963 for C := 0 to Map.Cells.Count div 2 - 1 do begin 1964 TCell(Map.Cells[C]).Terrain := 1965 TCell(Map.Cells[Map.Cells.Count - 1 - C]).Terrain; 1966 TCell(Map.Cells[C]).Power := 1967 TCell(Map.Cells[Map.Cells.Count - 1 - C]).Power; 1968 end; 1969 end; 1970 1958 1971 for I := 0 to Players.Count - 1 do 1959 1972 with TPlayer(Players[I]) do begin … … 1969 1982 raise Exception.Create(SCannotSetPlayerStartCells); 1970 1983 end; 1984 if SymetricMap and (I = 1) then 1985 StartCell := TCell(Map.Cells[Map.Cells.Count - 1 - Map.Cells.IndexOf(TPlayer(Players[0]).StartCell)]); 1986 1971 1987 StartCell.Terrain := ttCity; 1972 1988 StartCell.Player := TPlayer(Players[I]); -
trunk/xtactics.lpi
r68 r70 134 134 <HasResources Value="True"/> 135 135 <ResourceBaseClass Value="Form"/> 136 <UnitName Value="UFormMove"/> 136 137 </Unit6> 137 138 <Unit7> … … 141 142 <HasResources Value="True"/> 142 143 <ResourceBaseClass Value="Form"/> 144 <UnitName Value="UFormNew"/> 143 145 </Unit7> 144 146 <Unit8>
Note:
See TracChangeset
for help on using the changeset viewer.