OSDN Git Service

Implementing serialize() for GameWorld class.
authorDeskull <deskull@users.sourceforge.jp>
Sun, 20 Apr 2014 09:30:27 +0000 (18:30 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Sun, 20 Apr 2014 09:30:27 +0000 (18:30 +0900)
32 files changed:
Deeangband/Authority.h
Deeangband/BaseStatusTable.h
Deeangband/Building.h
Deeangband/Camp.h
Deeangband/Color.h
Deeangband/Coordinates.h
Deeangband/Creature.h
Deeangband/CreatureTemplate.h
Deeangband/CreatureTrait.h
Deeangband/Dice.h
Deeangband/Discipline.h
Deeangband/Door.h
Deeangband/Dungeon.h
Deeangband/Effect.h
Deeangband/Feature.h
Deeangband/FixedArtifact.h
Deeangband/FixedFloor.h
Deeangband/Floor.cpp
Deeangband/Floor.h
Deeangband/GameCampaign.h
Deeangband/GameElement.h
Deeangband/GameWorld.cpp
Deeangband/GameWorld.h
Deeangband/Item.h
Deeangband/ItemTemplate.h
Deeangband/ItemTrait.h
Deeangband/Karma.h
Deeangband/Quest.h
Deeangband/Race.h
Deeangband/Skill.h
Deeangband/StartingClass.h
Deeangband/stdafx.h

index b117a79..efc618c 100644 (file)
@@ -28,7 +28,7 @@ namespace Deeangband
                NAME name; //!< \8c \94\\82Ì\96¼\91O
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index ac814e6..b3a8fe2 100644 (file)
@@ -29,7 +29,7 @@ namespace Deeangband
                friend class boost::serialization::access;
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param version \83f\81[\83^\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index ff843ae..97efc61 100644 (file)
@@ -26,7 +26,7 @@ namespace Deeangband
                NAME buildingName;
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index 74d6f2c..e971315 100644 (file)
@@ -26,7 +26,7 @@ namespace Deeangband
                NAME name;
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index 67acce1..fffad4e 100644 (file)
@@ -33,7 +33,7 @@ namespace Deeangband
                friend class boost::serialization::access;
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index d8f1f43..9f80414 100644 (file)
@@ -29,7 +29,7 @@ namespace Deeangband
                friend class boost::serialization::access;
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
@@ -38,8 +38,8 @@ namespace Deeangband
                {
                        if(version >= 0)
                        {
-                               archive & BOOST_SERIALIZATION_NVP(fx);
-                               archive & BOOST_SERIALIZATION_NVP(fy);
+                               archive & boost::serialization::make_nvp("X", fx);
+                               archive & boost::serialization::make_nvp("Y", fy);
                        }
                }
 
index ff7b4c4..f21360f 100644 (file)
@@ -142,7 +142,7 @@ namespace Deeangband
                friend class boost::serialization::access;
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param version \83f\81[\83^\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
@@ -152,25 +152,25 @@ namespace Deeangband
                        if(version >= 0)
                        {
                                archive & boost::serialization::make_nvp("Name", name);
-                               archive & BOOST_SERIALIZATION_NVP(currentHp);
-                               archive & BOOST_SERIALIZATION_NVP(maxHp);
-                               archive & BOOST_SERIALIZATION_NVP(hpTable);
-                               archive & BOOST_SERIALIZATION_NVP(currentMp);
-                               archive & BOOST_SERIALIZATION_NVP(maxMp);
-                               archive & BOOST_SERIALIZATION_NVP(maxMaxMp);
-                               archive & BOOST_SERIALIZATION_NVP(currentSoul);
-                               archive & BOOST_SERIALIZATION_NVP(maxSoul);
-                               archive & BOOST_SERIALIZATION_NVP(currentStatus);
-                               archive & BOOST_SERIALIZATION_NVP(maxStatus);
-                               archive & BOOST_SERIALIZATION_NVP(maxMaxStatus);
-                               archive & BOOST_SERIALIZATION_NVP(height);
-                               archive & BOOST_SERIALIZATION_NVP(weight);
-                               archive & BOOST_SERIALIZATION_NVP(currentFeed);
-                               archive & BOOST_SERIALIZATION_NVP(maxFeed);
-                               archive & BOOST_SERIALIZATION_NVP(savings);
-                               archive & BOOST_SERIALIZATION_NVP(floorID);
-                               archive & BOOST_SERIALIZATION_NVP(position);
-                               archive & BOOST_SERIALIZATION_NVP(itemList);
+                               archive & boost::serialization::make_nvp("CHP", currentHp);
+                               archive & boost::serialization::make_nvp("MHP", maxHp);
+                               archive & boost::serialization::make_nvp("HPTable", hpTable);
+                               archive & boost::serialization::make_nvp("CMP", currentMp);
+                               archive & boost::serialization::make_nvp("MMP", maxMp);
+                               archive & boost::serialization::make_nvp("MMMP", maxMaxMp);
+                               archive & boost::serialization::make_nvp("CSoul", currentSoul);
+                               archive & boost::serialization::make_nvp("MSoul", maxSoul);
+                               archive & boost::serialization::make_nvp("CStatus", currentStatus);
+                               archive & boost::serialization::make_nvp("MStatus", maxStatus);
+                               archive & boost::serialization::make_nvp("MMStatus", maxMaxStatus);
+                               archive & boost::serialization::make_nvp("Height", height);
+                               archive & boost::serialization::make_nvp("Weight", weight);
+                               archive & boost::serialization::make_nvp("CFeed", currentFeed);
+                               archive & boost::serialization::make_nvp("MFeed", maxFeed);
+                               archive & boost::serialization::make_nvp("Savings", savings);
+                               archive & boost::serialization::make_nvp("FloorID", floorID);
+                               archive & boost::serialization::make_nvp("Position", position);
+                               archive & boost::serialization::make_nvp("ItemList", itemList);
                        }
                }
 
index 208264c..60b78f9 100644 (file)
@@ -28,7 +28,7 @@ namespace Deeangband
                BaseStatusTable statusPlus; /*!<\83X\83e\81[\83^\83X\8fC\90³*/
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index e77be9e..7c3551b 100644 (file)
@@ -26,7 +26,7 @@ namespace Deeangband
                NAME name;
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index 971605b..3ba9657 100644 (file)
@@ -29,7 +29,7 @@ namespace Deeangband
                friend class boost::serialization::access;
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index f1d5053..2380749 100644 (file)
@@ -42,7 +42,7 @@ namespace Deeangband
                friend class boost::serialization::access;
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index 9dd05fe..2eb0f7d 100644 (file)
@@ -27,7 +27,7 @@ private:
        friend class boost::serialization::access;
 
        /*!
-        * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+        * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
         * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
         * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
         * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index ccb0c7f..b12505d 100644 (file)
@@ -54,7 +54,7 @@ namespace Deeangband
                friend class boost::serialization::access;
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index ec9e543..cb60f6d 100644 (file)
@@ -69,7 +69,7 @@ namespace Deeangband
                friend class boost::serialization::access;
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index 660aef6..3646aac 100644 (file)
@@ -30,7 +30,7 @@ namespace Deeangband
                friend class boost::serialization::access;
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index eea28be..f9fb574 100644 (file)
@@ -33,7 +33,7 @@ namespace Deeangband
                friend class boost::serialization::access;
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index 73ba3d7..608731e 100644 (file)
@@ -25,7 +25,7 @@ namespace Deeangband
                friend class boost::serialization::access;
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index cc40ba2..c63ff40 100644 (file)
@@ -23,7 +23,7 @@ namespace Deeangband
                {
                        for(x = 0; x < width; x++)
                        {
-                               squares[y].push_back(std::shared_ptr<Square>(new Square()));                    
+                               squares[y].push_back(boost::shared_ptr<Square>(new Square()));                  
                        }
                }
 
index 754c64f..f3311ac 100644 (file)
@@ -25,15 +25,15 @@ namespace Deeangband
        class Floor : public GameElement
        {
        private:
-               std::vector<std::vector<std::shared_ptr<Square>>> squares;
-               std::vector<std::shared_ptr<Door>> doors;
+               std::vector<std::vector<boost::shared_ptr<Square>>> squares;
+               std::vector<boost::shared_ptr<Door>> doors;
                MAP_LENGTH width; /*!< \83t\83\8d\83A\82Ì\89¡\83T\83C\83Y*/
                MAP_LENGTH height; /*!< \83t\83\8d\83A\82Ì\8fc\83T\83C\83Y*/
 
                friend class boost::serialization::access;
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index fad0d0d..15c0af8 100644 (file)
@@ -34,7 +34,7 @@ namespace Deeangband
                friend class boost::serialization::access;
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index 6127bbf..6120de3 100644 (file)
@@ -40,7 +40,7 @@ namespace Deeangband
                friend class boost::serialization::access;
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index c08fe7a..4528a0a 100644 (file)
@@ -17,35 +17,35 @@ namespace Deeangband
        {
                Dice::Initialize();
 
-               authorityList.emplace(SPECIAL_TAG_UNKNOWN, std::make_shared<Authority>(0, SPECIAL_TAG_UNKNOWN, this));
-               creatureTraitList.emplace(SPECIAL_TAG_UNKNOWN, std::make_shared<CreatureTrait>(0, SPECIAL_TAG_UNKNOWN, this));
-               effectList.emplace(SPECIAL_TAG_UNKNOWN, std::make_shared<Effect>(0, SPECIAL_TAG_UNKNOWN, this));
-               fixedArtifactList.emplace(SPECIAL_TAG_UNKNOWN, std::make_shared<FixedArtifact>(0, SPECIAL_TAG_UNKNOWN, this));
-               featureList.emplace(SPECIAL_TAG_UNKNOWN, std::make_shared<Feature>(0, SPECIAL_TAG_UNKNOWN, this));
-               itemBaseList.emplace(SPECIAL_TAG_UNKNOWN, std::make_shared<ItemBase>(0, SPECIAL_TAG_UNKNOWN, this));
-               itemEgoList.emplace(SPECIAL_TAG_UNKNOWN, std::make_shared<ItemEgo>(0, SPECIAL_TAG_UNKNOWN, this));
-               itemTraitList.emplace(SPECIAL_TAG_UNKNOWN, std::make_shared<ItemTrait>(0, SPECIAL_TAG_UNKNOWN, this));
-               karmaList.emplace(SPECIAL_TAG_UNKNOWN, std::make_shared<Karma>(0, SPECIAL_TAG_UNKNOWN, this));
-               skillList.emplace(SPECIAL_TAG_UNKNOWN, std::make_shared<Skill>(0, SPECIAL_TAG_UNKNOWN, this));
-               speciesList.emplace(SPECIAL_TAG_UNKNOWN, std::make_shared<Species>(0, SPECIAL_TAG_UNKNOWN, this));
-               trapBaseList.emplace(SPECIAL_TAG_UNKNOWN, std::make_shared<TrapBase>(0, SPECIAL_TAG_UNKNOWN, this));
-               buildingList.emplace(SPECIAL_TAG_UNKNOWN, std::make_shared<Building>(0, SPECIAL_TAG_UNKNOWN, this));
-               campList.emplace(SPECIAL_TAG_UNKNOWN, std::make_shared<Camp>(0, SPECIAL_TAG_UNKNOWN, this));
-               dungeonList.emplace(SPECIAL_TAG_UNKNOWN, std::make_shared<Dungeon>(0, SPECIAL_TAG_UNKNOWN, this));
-
-               trapList.emplace(0, std::make_shared<Trap>(0, SPECIAL_TAG_UNKNOWN, this));
-               itemList.emplace(0, std::make_shared<Item>(0, SPECIAL_TAG_UNKNOWN, this));
-               floorList.emplace(0, std::make_shared<Floor>(0, SPECIAL_TAG_UNKNOWN, this));
-               creatureList.emplace(0, std::make_shared<Creature>(0, SPECIAL_TAG_UNKNOWN, this));
-
-               std::shared_ptr<Creature> crePtr(new Creature());
+               authorityList.emplace(SPECIAL_TAG_UNKNOWN, boost::make_shared<Authority>(0, SPECIAL_TAG_UNKNOWN, this));
+               creatureTraitList.emplace(SPECIAL_TAG_UNKNOWN, boost::make_shared<CreatureTrait>(0, SPECIAL_TAG_UNKNOWN, this));
+               effectList.emplace(SPECIAL_TAG_UNKNOWN, boost::make_shared<Effect>(0, SPECIAL_TAG_UNKNOWN, this));
+               fixedArtifactList.emplace(SPECIAL_TAG_UNKNOWN, boost::make_shared<FixedArtifact>(0, SPECIAL_TAG_UNKNOWN, this));
+               featureList.emplace(SPECIAL_TAG_UNKNOWN, boost::make_shared<Feature>(0, SPECIAL_TAG_UNKNOWN, this));
+               itemBaseList.emplace(SPECIAL_TAG_UNKNOWN, boost::make_shared<ItemBase>(0, SPECIAL_TAG_UNKNOWN, this));
+               itemEgoList.emplace(SPECIAL_TAG_UNKNOWN, boost::make_shared<ItemEgo>(0, SPECIAL_TAG_UNKNOWN, this));
+               itemTraitList.emplace(SPECIAL_TAG_UNKNOWN, boost::make_shared<ItemTrait>(0, SPECIAL_TAG_UNKNOWN, this));
+               karmaList.emplace(SPECIAL_TAG_UNKNOWN, boost::make_shared<Karma>(0, SPECIAL_TAG_UNKNOWN, this));
+               skillList.emplace(SPECIAL_TAG_UNKNOWN, boost::make_shared<Skill>(0, SPECIAL_TAG_UNKNOWN, this));
+               speciesList.emplace(SPECIAL_TAG_UNKNOWN, boost::make_shared<Species>(0, SPECIAL_TAG_UNKNOWN, this));
+               trapBaseList.emplace(SPECIAL_TAG_UNKNOWN, boost::make_shared<TrapBase>(0, SPECIAL_TAG_UNKNOWN, this));
+               buildingList.emplace(SPECIAL_TAG_UNKNOWN, boost::make_shared<Building>(0, SPECIAL_TAG_UNKNOWN, this));
+               campList.emplace(SPECIAL_TAG_UNKNOWN, boost::make_shared<Camp>(0, SPECIAL_TAG_UNKNOWN, this));
+               dungeonList.emplace(SPECIAL_TAG_UNKNOWN, boost::make_shared<Dungeon>(0, SPECIAL_TAG_UNKNOWN, this));
+
+               trapList.emplace(0, boost::make_shared<Trap>(0, SPECIAL_TAG_UNKNOWN, this));
+               itemList.emplace(0, boost::make_shared<Item>(0, SPECIAL_TAG_UNKNOWN, this));
+               floorList.emplace(0, boost::make_shared<Floor>(0, SPECIAL_TAG_UNKNOWN, this));
+               creatureList.emplace(0, boost::make_shared<Creature>(0, SPECIAL_TAG_UNKNOWN, this));
+
+               boost::shared_ptr<Creature> crePtr(new Creature());
 
                //std::ifstream ifs("HFOko3.xml");
                //boost::archive::xml_iarchive ia(ifs);
                //ia >> BOOST_SERIALIZATION_NVP(*creatureList[0]);
 
                creatureList[0]->XMLSave("HFOko3.xml");
-
+               XMLSave();
        }
 
        GameWorld::~GameWorld(void)
@@ -57,7 +57,7 @@ namespace Deeangband
                std::ofstream ofs("World.xml");
                assert(ofs);
                boost::archive::xml_oarchive oa(ofs);
-               //oa << BOOST_SERIALIZATION_NVP(*this);
+               oa << boost::serialization::make_nvp("SaveData", *this);
        }
 
        Authority *GameWorld::GetAuthority(TAG tag)
index 4ca85fa..29aa538 100644 (file)
@@ -48,45 +48,50 @@ namespace Deeangband
        private:
 
                //\90Ã\93I\83f\81[\83^\83\8a\83X\83g
-               std::map<TAG, std::shared_ptr<Authority>> authorityList;          /*!<\91S\8c \94\\83\8a\83X\83g*/
-               std::map<TAG, std::shared_ptr<Building>> buildingList;            /*!<\91S\8e{\90Ý\83\8a\83X\83g*/
-               std::map<TAG, std::shared_ptr<Camp>> campList;                    /*!<\91S\90w\89c\83\8a\83X\83g*/
-               std::map<TAG, std::shared_ptr<CreatureTrait>> creatureTraitList;  /*!<\91S\83N\83\8a\81[\83`\83\83\81[\93Á\90«\83\8a\83X\83g*/
-               std::map<TAG, std::shared_ptr<Dungeon>> dungeonList;              /*!<\91S\83_\83\93\83W\83\87\83\93\83\8a\83X\83g*/
-               std::map<TAG, std::shared_ptr<Effect>> effectList;                /*!<\91S\8cø\89Ê\91®\90«\83\8a\83X\83g*/
-               std::map<TAG, std::shared_ptr<Feature>> featureList;              /*!<\91S\92n\8c`\83\8a\83X\83g*/
-               std::map<TAG, std::shared_ptr<FixedArtifact>> fixedArtifactList;  /*!<\91S\8cÅ\92è\83A\81[\83e\83B\83t\83@\83N\83g\83\8a\83X\83g*/
-               std::map<TAG, std::shared_ptr<ItemBase>> itemBaseList;            /*!<\91S\83A\83C\83e\83\80\83x\81[\83X\83\8a\83X\83g*/
-               std::map<TAG, std::shared_ptr<ItemEgo>> itemEgoList;              /*!<\91S\83A\83C\83e\83\80\83G\83S\83\8a\83X\83g*/
-               std::map<TAG, std::shared_ptr<ItemTrait>> itemTraitList;          /*!<\91S\83A\83C\83e\83\80\93Á\90«\83\8a\83X\83g*/
-               std::map<TAG, std::shared_ptr<Karma>> karmaList;                  /*!<\91S\83J\83\8b\83}\83\8a\83X\83g*/
-               std::map<TAG, std::shared_ptr<Quest>> questList;                  /*!<\91S\83N\83G\83X\83g\93Á\90«\83\8a\83X\83g*/
-               std::map<TAG, std::shared_ptr<Skill>> skillList;                  /*!<\91S\83X\83L\83\8b\83\8a\83X\83g*/
-               std::map<TAG, std::shared_ptr<Species>> speciesList;              /*!<\91S\83N\83\8a\81[\83`\83\83\81[\8eí\95Ê\83\8a\83X\83g*/
-               std::map<TAG, std::shared_ptr<TrapBase>> trapBaseList;            /*!<\91S\83g\83\89\83b\83v\83x\81[\83X\8eí\95Ê\83\8a\83X\83g*/
+               std::map<TAG, boost::shared_ptr<Authority>> authorityList;          /*!<\91S\8c \94\\83\8a\83X\83g*/
+               std::map<TAG, boost::shared_ptr<Building>> buildingList;            /*!<\91S\8e{\90Ý\83\8a\83X\83g*/
+               std::map<TAG, boost::shared_ptr<Camp>> campList;                    /*!<\91S\90w\89c\83\8a\83X\83g*/
+               std::map<TAG, boost::shared_ptr<CreatureTrait>> creatureTraitList;  /*!<\91S\83N\83\8a\81[\83`\83\83\81[\93Á\90«\83\8a\83X\83g*/
+               std::map<TAG, boost::shared_ptr<Dungeon>> dungeonList;              /*!<\91S\83_\83\93\83W\83\87\83\93\83\8a\83X\83g*/
+               std::map<TAG, boost::shared_ptr<Effect>> effectList;                /*!<\91S\8cø\89Ê\91®\90«\83\8a\83X\83g*/
+               std::map<TAG, boost::shared_ptr<Feature>> featureList;              /*!<\91S\92n\8c`\83\8a\83X\83g*/
+               std::map<TAG, boost::shared_ptr<FixedArtifact>> fixedArtifactList;  /*!<\91S\8cÅ\92è\83A\81[\83e\83B\83t\83@\83N\83g\83\8a\83X\83g*/
+               std::map<TAG, boost::shared_ptr<ItemBase>> itemBaseList;            /*!<\91S\83A\83C\83e\83\80\83x\81[\83X\83\8a\83X\83g*/
+               std::map<TAG, boost::shared_ptr<ItemEgo>> itemEgoList;              /*!<\91S\83A\83C\83e\83\80\83G\83S\83\8a\83X\83g*/
+               std::map<TAG, boost::shared_ptr<ItemTrait>> itemTraitList;          /*!<\91S\83A\83C\83e\83\80\93Á\90«\83\8a\83X\83g*/
+               std::map<TAG, boost::shared_ptr<Karma>> karmaList;                  /*!<\91S\83J\83\8b\83}\83\8a\83X\83g*/
+               std::map<TAG, boost::shared_ptr<Quest>> questList;                  /*!<\91S\83N\83G\83X\83g\93Á\90«\83\8a\83X\83g*/
+               std::map<TAG, boost::shared_ptr<Skill>> skillList;                  /*!<\91S\83X\83L\83\8b\83\8a\83X\83g*/
+               std::map<TAG, boost::shared_ptr<Species>> speciesList;              /*!<\91S\83N\83\8a\81[\83`\83\83\81[\8eí\95Ê\83\8a\83X\83g*/
+               std::map<TAG, boost::shared_ptr<TrapBase>> trapBaseList;            /*!<\91S\83g\83\89\83b\83v\83x\81[\83X\8eí\95Ê\83\8a\83X\83g*/
 
                //\93®\93I\83f\81[\83^\83\8a\83X\83g
-               std::map<ID, std::shared_ptr<Item>> itemList;                    /*!<\91S\83A\83C\83e\83\80\83\8a\83X\83g*/
-               std::map<ID, std::shared_ptr<Creature>> creatureList;            /*!<\91S\83N\83\8a\81[\83`\83\83\81[\83\8a\83X\83g*/
-               std::map<ID, std::shared_ptr<Floor>> floorList;                  /*!<\91S\83t\83\8d\83A\83\8a\83X\83g*/
-               std::map<ID, std::shared_ptr<Trap>> trapList;                    /*!<\91S\83g\83\89\83b\83v\83\8a\83X\83g*/
+               std::map<ID, boost::shared_ptr<Item>> itemList;                    /*!<\91S\83A\83C\83e\83\80\83\8a\83X\83g*/
+               std::map<ID, boost::shared_ptr<Creature>> creatureList;            /*!<\91S\83N\83\8a\81[\83`\83\83\81[\83\8a\83X\83g*/
+               std::map<ID, boost::shared_ptr<Floor>> floorList;                  /*!<\91S\83t\83\8d\83A\83\8a\83X\83g*/
+               std::map<ID, boost::shared_ptr<Trap>> trapList;                    /*!<\91S\83g\83\89\83b\83v\83\8a\83X\83g*/
 
                GAME_TIME gameTime; //!<\83Q\81[\83\80\8e\9e\8aÔ
 
                friend class boost::serialization::access;
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
                */
-               template<class Archive> void serialize(Archive &archive, const unsigned int fileVersion) 
+               template<class Archive> void serialize(Archive &archive, const unsigned int version) 
                {
-                       archive & BOOST_SERIALIZATION_NVP(creatureList);
-                       archive & BOOST_SERIALIZATION_NVP(itemList);
-                       archive & BOOST_SERIALIZATION_NVP(floorList);
-                       archive & BOOST_SERIALIZATION_NVP(trapList);
+                       if(version >= 0)
+                       {
+                               archive & BOOST_SERIALIZATION_NVP(creatureList);
+                               /*
+                               archive & BOOST_SERIALIZATION_NVP(itemList);
+                               archive & BOOST_SERIALIZATION_NVP(floorList);
+                               archive & BOOST_SERIALIZATION_NVP(trapList);
+                               */
+                       }
                }
 
        public:
index 546c745..caeac24 100644 (file)
@@ -38,7 +38,7 @@ namespace Deeangband
                friend class boost::serialization::access;
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param version \83f\81[\83^\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index 094944f..81421a6 100644 (file)
@@ -36,7 +36,7 @@ namespace Deeangband
                friend class boost::serialization::access;
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param version \83f\81[\83^\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index 4be192a..88ca444 100644 (file)
@@ -26,7 +26,7 @@ private:
        friend class boost::serialization::access;
 
        /*!
-        * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+        * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
         * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
         * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
         * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index e9f0759..4cc2543 100644 (file)
@@ -68,7 +68,7 @@ namespace Deeangband
                Discipline desciplinePlus; //!< \8fC\97{\92l\8fC\90³
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index b9d7dbe..fbf61f8 100644 (file)
@@ -25,7 +25,7 @@ namespace Deeangband
                std::string name; //!< \83N\83G\83X\83g\96¼
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index a7f04de..9f16332 100644 (file)
@@ -55,7 +55,7 @@ namespace Deeangband
                BASE_STATUS halfStatusPlus[CS_MAX]; /*!<\8d¬\8c\8c\83X\83e\81[\83^\83X\8fC\90³*/
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index 7ab2ac3..7f879c0 100644 (file)
@@ -31,7 +31,7 @@ namespace Deeangband
                std::string details;
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index 5483982..acffdb1 100644 (file)
@@ -41,7 +41,7 @@ namespace Deeangband
                BASE_STATUS statusPlus[CS_MAX]; /*!<\83X\83e\81[\83^\83X\8fC\90³*/
 
                /*!
-               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\89»\82ð\90Ý\92è\82·\82é
+               * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
                * @param archive \83A\81[\83J\83C\83u\89»\82·\82é\83N\83\89\83X\82Ì\83A\83h\83\8c\83X
                * @param fileVersion \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                * @return XMLSerialize\83e\83\93\83v\83\8c\81[\83g
index c141340..93c7181 100644 (file)
 #include <ctime>
 #include <cassert>
 #include <fstream>
+#include <boost/fusion/container/map.hpp>
+#include <boost/fusion/include/map.hpp>
+#include <boost/fusion/container/map/map_fwd.hpp>
+#include <boost/fusion/include/map_fwd.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/make_shared.hpp>
 #include <boost/serialization/export.hpp>
 #include <boost/serialization/serialization.hpp>
 #include <boost/serialization/string.hpp>