Changeset 239 for trunk/UGame.pas
- Timestamp:
- Sep 21, 2018, 1:08:17 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UGame.pas
r238 r239 127 127 SWrongFileFormat = 'Wrong file format'; 128 128 SNewGameFile = 'New game.xtg'; 129 SUnsupportedMapType = 'Unsupported map type'; 129 130 130 131 procedure InitStrings; … … 249 250 mtVoronoi: Map := TVoronoiMap.Create; 250 251 mtIsometric: Map := TIsometricMap.Create; 251 else Map := TMap.Create;252 else raise Exception.Create(SUnsupportedMapType); 252 253 end; 253 254 Map.Game := Self; … … 503 504 RootNode := Doc.DocumentElement; 504 505 with RootNode do begin 506 MapType := TMapType(ReadInteger(RootNode, 'MapType', Integer(mtNone))); 505 507 SymetricMap := ReadBoolean(RootNode, 'SymetricMap', False); 506 508 CyclicMap := ReadBoolean(RootNode, 'CyclicMap', False); … … 555 557 AppendChild(RootNode); 556 558 with RootNode do begin 559 WriteInteger(RootNode, 'MapType', Integer(MapType)); 557 560 WriteBoolean(RootNode, 'SymetricMap', SymetricMap); 558 561 WriteBoolean(RootNode, 'CyclicMap', CyclicMap);
Note:
See TracChangeset
for help on using the changeset viewer.