OSDN Git Service

Add GameWorld::xmlLoadAbility().
authorDeskull <desull@users.sourceforge.jp>
Tue, 10 Jun 2014 11:23:33 +0000 (20:23 +0900)
committerDeskull <desull@users.sourceforge.jp>
Tue, 10 Jun 2014 11:23:33 +0000 (20:23 +0900)
Deeangband/GameWorld.cpp
Deeangband/GameWorld.h

index 5bb1902..e352025 100644 (file)
@@ -17,7 +17,6 @@ namespace Deeangband
        {
                Dice::Initialize();
                XMLLoad();
-               abilityList.emplace("DAMMY", boost::make_shared<Ability>());
                floorList.emplace(0, boost::make_shared<Floor>(dungeonList.find("VANILLA_WOMB"), 1));
                creatureList.emplace(0, boost::make_shared<Creature>(speciesList.find("VANILLA_STIGMATIC")));
 
@@ -242,6 +241,15 @@ namespace Deeangband
                return true;
        }
 
+       bool GameWorld::xmlLoadAbility()
+       {
+               std::ifstream ifs("lib-Vanilla\\Ability.xml");
+               assert(ifs);
+               boost::archive::xml_iarchive ia(ifs);
+               ia >> BOOST_SERIALIZATION_NVP(abilityList);
+               return true;
+       }
+
        bool GameWorld::xmlLoadAuthority()
        {
                std::ifstream ifs("lib-Vanilla\\Authority.xml");
index e558c5a..a9b5220 100644 (file)
@@ -216,6 +216,7 @@ namespace Deeangband
                */
                bool GameWorld::xmlSaveTrapBase(void);
 
+               bool GameWorld::xmlLoadAbility(void);
                bool GameWorld::xmlLoadAuthority(void);
                bool GameWorld::xmlLoadBuilding(void);
                bool GameWorld::xmlLoadCamp(void);