OSDN Git Service

Add GameWorld::xmlSaveAir() and GameWorld::xmlSaveSpace().
authorDeskull <desull@users.sourceforge.jp>
Fri, 20 Jun 2014 13:31:04 +0000 (22:31 +0900)
committerDeskull <desull@users.sourceforge.jp>
Fri, 20 Jun 2014 13:31:04 +0000 (22:31 +0900)
Deeangband/GameWorld.cpp
Deeangband/GameWorld.h

index 97226e4..3914bbc 100644 (file)
@@ -34,6 +34,16 @@ namespace Deeangband
        {
        }
 
+       bool GameWorld::xmlSaveAir(void)
+       {
+               std::ofstream ofs("lib-Vanilla\\Air.xml");
+               assert(ofs);
+               boost::archive::xml_oarchive oa(ofs);
+               oa << boost::serialization::make_nvp("Air", this->airList);
+               ofs.close();
+               return true;
+       }
+
        bool GameWorld::xmlSaveAbility(void)
        {
                std::ofstream ofs("lib-Vanilla\\Ability.xml");
@@ -184,6 +194,16 @@ namespace Deeangband
                return true;
        }
 
+       bool GameWorld::xmlSaveSpace(void)
+       {
+               std::ofstream ofs("lib-Vanilla\\Space.xml");
+               assert(ofs);
+               boost::archive::xml_oarchive oa(ofs);
+               oa << boost::serialization::make_nvp("Space", this->spaceList);
+               ofs.close();
+               return true;
+       }
+
        bool GameWorld::xmlSaveSkill(void)
        {
                std::ofstream ofs("lib-Vanilla\\Skill.xml");
index 5f7fefa..8aa881b 100644 (file)
@@ -86,6 +86,12 @@ namespace Deeangband
 
                friend class boost::serialization::access;
 
+               /*!
+               * @brief \91å\8bC\92n\8c`\8fî\95ñ\82Ì\83Z\81[\83u
+               * @return \95Û\91\82É\90¬\8c÷\82·\82ê\82ÎTRUE\82ð\95Ô\82·
+               * @todo \95Û\91\8f\88\97\9d\82Ì\83G\83\89\81[\94»\92è
+               */
+               bool GameWorld::xmlSaveAir(void);
 
                /*!
                * @brief \94­\93®\8bZ\94\\82Ì\83Z\81[\83u
@@ -200,6 +206,13 @@ namespace Deeangband
                bool GameWorld::xmlSaveSkill(void);
 
                /*!
+               * @brief \8bó\8aÔ\92n\8c`\8fî\95ñ\82Ì\83Z\81[\83u
+               * @return \95Û\91\82É\90¬\8c÷\82·\82ê\82ÎTRUE\82ð\95Ô\82·
+               * @todo \95Û\91\8f\88\97\9d\82Ì\83G\83\89\81[\94»\92è
+               */
+               bool GameWorld::xmlSaveSpace(void);
+
+               /*!
                * @brief \83N\83\8a\81[\83`\83\83\81[\8eí\95Ê\8fî\95ñ\82Ì\83Z\81[\83u
                * @return \95Û\91\82É\90¬\8c÷\82·\82ê\82ÎTRUE\82ð\95Ô\82·
                * @todo \95Û\91\8f\88\97\9d\82Ì\83G\83\89\81[\94»\92è