Changeset 239 for trunk


Ignore:
Timestamp:
Sep 21, 2018, 1:08:17 PM (6 years ago)
Author:
chronos
Message:
  • Fixed: Store map type in saved game files.
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Languages/xtactics.cs.po

    r238 r239  
    10041004msgstr "Divák"
    10051005
     1006#: ugame.sunsupportedmaptype
     1007msgid "Unsupported map type"
     1008msgstr "Nepodporovaný typ mapy"
     1009
    10061010#: ugame.swrongfileformat
    10071011msgid "Wrong file format"
     
    10481052msgid "64-bit UInt read overflow."
    10491053msgstr "Přetečení při čtení 64-bit UInt"
    1050 
  • trunk/Languages/xtactics.po

    r238 r239  
    983983msgstr ""
    984984
     985#: ugame.sunsupportedmaptype
     986msgid "Unsupported map type"
     987msgstr ""
     988
    985989#: ugame.swrongfileformat
    986990msgid "Wrong file format"
  • trunk/UGame.pas

    r238 r239  
    127127  SWrongFileFormat = 'Wrong file format';
    128128  SNewGameFile = 'New game.xtg';
     129  SUnsupportedMapType = 'Unsupported map type';
    129130
    130131procedure InitStrings;
     
    249250    mtVoronoi: Map := TVoronoiMap.Create;
    250251    mtIsometric: Map := TIsometricMap.Create;
    251     else Map := TMap.Create;
     252    else raise Exception.Create(SUnsupportedMapType);
    252253  end;
    253254  Map.Game := Self;
     
    503504    RootNode := Doc.DocumentElement;
    504505    with RootNode do begin
     506      MapType := TMapType(ReadInteger(RootNode, 'MapType', Integer(mtNone)));
    505507      SymetricMap := ReadBoolean(RootNode, 'SymetricMap', False);
    506508      CyclicMap := ReadBoolean(RootNode, 'CyclicMap', False);
     
    555557    AppendChild(RootNode);
    556558    with RootNode do begin
     559      WriteInteger(RootNode, 'MapType', Integer(MapType));
    557560      WriteBoolean(RootNode, 'SymetricMap', SymetricMap);
    558561      WriteBoolean(RootNode, 'CyclicMap', CyclicMap);
Note: See TracChangeset for help on using the changeset viewer.