Reading and writing saved games now uses the new tagfile system.
This should avoid any format inconsistencies, like missing newlines and the like. Although a basic save and load works, there may still be some issues with the format. This probably renders older saved games incompatible. The format is mostly the same, but there are a few small changes in the name of making the format more uniform.
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
#include "shop.hpp"
|
||||
#include "quest.hpp"
|
||||
|
||||
class cTagFile;
|
||||
|
||||
namespace legacy{
|
||||
struct scenario_data_type;
|
||||
struct item_storage_shortcut_type;
|
||||
@@ -96,8 +98,8 @@ public:
|
||||
|
||||
void import_legacy(legacy::scenario_data_type& old);
|
||||
void import_legacy(legacy::scen_item_data_type& old);
|
||||
void writeTo(std::ostream& file) const;
|
||||
void readFrom(std::istream& file);
|
||||
void writeTo(cTagFile& file) const;
|
||||
void readFrom(const cTagFile& file);
|
||||
std::string format_scen_version();
|
||||
std::string format_ed_version();
|
||||
|
||||
|
Reference in New Issue
Block a user