OSDN Git Service

Add Race.xml.
authorDeskull <desull@users.sourceforge.jp>
Sun, 1 Jun 2014 14:38:00 +0000 (23:38 +0900)
committerDeskull <desull@users.sourceforge.jp>
Sun, 1 Jun 2014 14:38:00 +0000 (23:38 +0900)
Deeangband/GameWorld.cpp
Deeangband/GameWorld.h
lib-Vanilla/Race.xml [new file with mode: 0644]
lib-Vanilla/Skill.xml

index 599761a..9ef73bf 100644 (file)
@@ -20,7 +20,7 @@ namespace Deeangband
                dungeonList.emplace("VANILLA_WOMB", boost::make_shared<Dungeon>(0, SPECIAL_TAG_UNKNOWN, this));
                floorList.emplace(0, boost::make_shared<Floor>(0, SPECIAL_TAG_UNKNOWN, this, &(*dungeonList["VANILLA_WOMB"]), 1));
                creatureList.emplace(0, boost::make_shared<Creature>(0, SPECIAL_TAG_UNKNOWN, this));
-               //raceList.emplace(0, boost::make_shared<Race>(0, SPECIAL_TAG_UNKNOWN, this));
+               raceList.emplace("VANILLA_HUMAN", boost::make_shared<Race>(0, SPECIAL_TAG_UNKNOWN, this));
 
                playerPtr = &(*creatureList[0]);
        }
@@ -149,12 +149,22 @@ namespace Deeangband
                return true;
        }
 
+       bool GameWorld::xmlSaveRace(void)
+       {
+               std::ofstream ofs("lib-Vanilla\\Race.xml");
+               assert(ofs);
+               boost::archive::xml_oarchive oa(ofs);
+               oa << boost::serialization::make_nvp("Races", this->skillList);
+               ofs.close();
+               return true;
+       }
+
        bool GameWorld::xmlSaveSkill(void)
        {
                std::ofstream ofs("lib-Vanilla\\Skill.xml");
                assert(ofs);
                boost::archive::xml_oarchive oa(ofs);
-               oa << boost::serialization::make_nvp("Skils", this->skillList);
+               oa << boost::serialization::make_nvp("Skills", this->skillList);
                ofs.close();
                return true;
        }
@@ -193,6 +203,7 @@ namespace Deeangband
                this->xmlSaveItemTrait();
                this->xmlSaveKarma();
                this->xmlSaveQuest();
+               this->xmlSaveRace();
                this->xmlSaveSkill();
                this->xmlSaveSpecie();
                this->xmlSaveTrapBase();
index 92a666f..154ab9d 100644 (file)
@@ -162,6 +162,13 @@ namespace Deeangband
                bool GameWorld::xmlSaveQuest(void);
 
                /*!
+               * @brief \83N\83G\83X\83g\8fî\95ñ\82Ì\83Z\81[\83u
+               * @return \8f\91\82«\8d\9e\82Ý\82É\90¬\8c÷\82·\82ê\82ÎTRUE\82ð\95Ô\82·
+               * @todo \8f\91\82«\8d\9e\82Ý\8f\88\97\9d\82Ì\83G\83\89\81[\94»\92è
+               */
+               bool GameWorld::xmlSaveRace(void);
+
+               /*!
                * @brief \83X\83L\83\8b\8fî\95ñ\82Ì\83\8d\81[\83h
                * @return \93Ç\82Ý\8d\9e\82Ý\82É\90¬\8c÷\82·\82ê\82ÎTRUE\82ð\95Ô\82·
                * @todo \93Ç\82Ý\8d\9e\82Ý\8f\88\97\9d\82Ì\83G\83\89\81[\94»\92è
diff --git a/lib-Vanilla/Race.xml b/lib-Vanilla/Race.xml
new file mode 100644 (file)
index 0000000..e0d1c0d
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<!DOCTYPE boost_serialization>
+<boost_serialization signature="serialization::archive" version="10">
+<Races class_id="0" tracking_level="0" version="0">
+       <count>1</count>
+       <item_version>0</item_version>
+       <item class_id="1" tracking_level="0" version="0">
+               <first>XXX_UNKNOWN</first>
+               <second class_id="2" tracking_level="0" version="1">
+                       <px class_id="3" tracking_level="1" version="0" object_id="_0">
+                               <name>\83_\83~\81[</name>
+                               <details>()</details>
+                       </px>
+               </second>
+       </item>
+</Races>
index 28c64fa..b8d4f48 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
 <!DOCTYPE boost_serialization>
 <boost_serialization signature="serialization::archive" version="10">
-<Skils class_id="0" tracking_level="0" version="0">
+<Skills class_id="0" tracking_level="0" version="0">
        <count>1</count>
        <item_version>0</item_version>
        <item class_id="1" tracking_level="0" version="0">
@@ -13,4 +13,4 @@
                        </px>
                </second>
        </item>
-</Skils>
+</Skills>