OSDN Git Service

Implement reference from dungeon data on generating floor.
authorDeskull <deskull@users.sourceforge.jp>
Sun, 18 May 2014 11:53:15 +0000 (20:53 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Sun, 18 May 2014 11:53:15 +0000 (20:53 +0900)
Deeangband/Dungeon.cpp
Deeangband/Dungeon.h
Deeangband/Floor.cpp
Deeangband/GameWorld.cpp
lib-Vanilla/Feature.xml

index 0630d5d..66d6712 100644 (file)
@@ -52,4 +52,9 @@ namespace Deeangband
                return this->outerWallFeature;
        }
 
+       TAG Dungeon::GetFloorFeatureTag(void)
+       {
+               return this->floorFeature;
+       }
+
 }
\ No newline at end of file
index f7b3549..8056271 100644 (file)
@@ -150,6 +150,12 @@ namespace Deeangband
                Feature *Dungeon::GetInnerWallFeaturePtr(void);
 
                /*!
+               * @brief \83_\83\93\83W\83\87\83\93\82Ì\8aî\96{\8f°\92n\8c`\82ð\95Ô\82·
+               * @return \83_\83\93\83W\83\87\83\93\82Ì\8aî\96{\8f°\92n\8c`\8eQ\8fÆ\83^\83O
+               */
+               TAG Dungeon::GetFloorFeatureTag(void);
+
+               /*!
                * @brief \83_\83\93\83W\83\87\83\93\82ð\8f\8a\97L\82·\82é\90w\89c\82ð\95Ô\82·
                * @return \83_\83\93\83W\83\87\83\93\82Ì\8f\8a\97L\90w\89cID
                */
index 70da51d..4aceaff 100644 (file)
@@ -24,7 +24,6 @@ namespace Deeangband
                        for(x = 0; x < width; x++)
                        {
                                squares[y].push_back(boost::shared_ptr<Square>(new Square()));
-                               squares[y][x]->SetFeatureTag("VANILLA_PERMANET_WALL");
                        }
                }
 
@@ -43,7 +42,8 @@ namespace Deeangband
                        for(x = 0; x < width; x++)
                        {
                                squares[y].push_back(boost::shared_ptr<Square>(new Square()));
-                               squares[y][x]->SetFeatureTag("VANILLA_PERMANET_WALL");
+                               if(Dice::Cast(1, 2) == 2) squares[y][x]->SetFeatureTag(dungeonPtr->GetInnerWallFeatureTag());
+                               else squares[y][x]->SetFeatureTag(dungeonPtr->GetFloorFeatureTag());
                        }
                }
 
index 3b9a5cc..132a9cd 100644 (file)
@@ -17,7 +17,7 @@ namespace Deeangband
        {
                Dice::Initialize();
                XMLLoad();
-               floorList.emplace(0, boost::make_shared<Floor>(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));
 
                playerPtr = &(*creatureList[0]);
index 18dc2cb..596ebf3 100644 (file)
@@ -5,7 +5,7 @@
        <count>3</count>
        <item_version>0</item_version>
        <item class_id="1" tracking_level="0" version="0">
-               <first>VANILLA_PERMANET_FLOOR</first>
+               <first>VANILLA_PERMANENT_FLOOR</first>
                <second class_id="2" tracking_level="0" version="1">
                        <px class_id="3" tracking_level="1" version="10" object_id="_0">
                                <name>\89i\8bv\8f°</name>
@@ -27,7 +27,7 @@
                </second>
        </item>
        <item>
-               <first>VANILLA_PERMANET_WALL</first>
+               <first>VANILLA_PERMANENT_WALL</first>
                <second>
                        <px class_id_reference="3" object_id="_1">
                                <name>\89i\8bv\95Ç</name>