OSDN Git Service

Refactor by definition SPECIAL_TAG_UNKNOWN.
authorDeskull <deskull@users.sourceforge.jp>
Wed, 12 Mar 2014 13:50:04 +0000 (22:50 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Wed, 12 Mar 2014 13:50:04 +0000 (22:50 +0900)
Deeangband/Deeangband.h
Deeangband/GameWorld.cpp
Deeangband/Square.cpp

index e052b74..1908b64 100644 (file)
@@ -12,6 +12,8 @@
 #define CREATURE_MAX_DIVINE_LEVEL 30 //!< \90_\8ai\8dÅ\91å\92l
 #define CREATURE_MAX_LEVEL CREATURE_MAX_MORTAL_LEVEL+CREATURE_MAX_DIVINE_LEVEL //!< \90_\8ai\8d\9e\82Ý\8dÅ\91å\83\8c\83x\83\8b
 
+#define SPECIAL_TAG_UNKNOWN "XXX_UNKNOWN"
+
 /*!
  * \83Q\81[\83\80\83R\83}\83\93\83h\92è\8b`
  */
index fcfc829..635d3d1 100644 (file)
@@ -15,26 +15,26 @@ GameWorld::GameWorld(GameSurface *gSurface)
        Dice::Initialize();
 
        gameSurface = gSurface;
-       authorityList.emplace("UNKNOWN", make_shared<Authority>(0, "UNKNOWN", this));
-       creatureTraitList.emplace("UNKNOWN", make_shared<CreatureTrait>(0, "UNKNOWN", this));
-       effectList.emplace("UNKNOWN", make_shared<Effect>(0, "UNKNOWN", this));
-       fixedArtifactList.emplace("UNKNOWN", make_shared<FixedArtifact>(0, "UNKNOWN", this));
-       featureList.emplace("UNKNOWN", make_shared<Feature>(0, "UNKNOWN", this));
-       itemBaseList.emplace("UNKNOWN", make_shared<ItemBase>(0, "UNKNOWN", this));
-       itemEgoList.emplace("UNKNOWN", make_shared<ItemEgo>(0, "UNKNOWN", this));
-       itemTraitList.emplace("UNKNOWN", make_shared<ItemTrait>(0, "UNKNOWN", this));
-       karmaList.emplace("UNKNOWN", make_shared<Karma>(0, "UNKNOWN", this));
-       skillList.emplace("UNKNOWN", make_shared<Skill>(0, "UNKNOWN", this));
-       speciesList.emplace("UNKNOWN", make_shared<Species>(0, "UNKNOWN", this));
-       trapBaseList.emplace("UNKNOWN", make_shared<TrapBase>(0, "UNKNOWN", this));
-       buildingList.emplace("UNKNOWN", make_shared<Building>(0, "UNKNOWN", this));
-       campList.emplace("UNKNOWN", make_shared<Camp>(0, "UNKNOWN", this));
-       dungeonList.emplace("UNKNOWN", make_shared<Dungeon>(0, "UNKNOWN", this));
-
-       trapList.emplace(0, make_shared<Trap>(0, "UNKNOWN", this));
-       itemList.emplace(0, make_shared<Item>(0, "UNKNOWN", this));
-       floorList.emplace(0, make_shared<Floor>(0, "UNKNOWN", this));
-       creatureList.emplace(0, make_shared<Creature>(0, "UNKNOWN", this));
+       authorityList.emplace(SPECIAL_TAG_UNKNOWN, make_shared<Authority>(0, SPECIAL_TAG_UNKNOWN, this));
+       creatureTraitList.emplace(SPECIAL_TAG_UNKNOWN, make_shared<CreatureTrait>(0, SPECIAL_TAG_UNKNOWN, this));
+       effectList.emplace(SPECIAL_TAG_UNKNOWN, make_shared<Effect>(0, SPECIAL_TAG_UNKNOWN, this));
+       fixedArtifactList.emplace(SPECIAL_TAG_UNKNOWN, make_shared<FixedArtifact>(0, SPECIAL_TAG_UNKNOWN, this));
+       featureList.emplace(SPECIAL_TAG_UNKNOWN, make_shared<Feature>(0, SPECIAL_TAG_UNKNOWN, this));
+       itemBaseList.emplace(SPECIAL_TAG_UNKNOWN, make_shared<ItemBase>(0, SPECIAL_TAG_UNKNOWN, this));
+       itemEgoList.emplace(SPECIAL_TAG_UNKNOWN, make_shared<ItemEgo>(0, SPECIAL_TAG_UNKNOWN, this));
+       itemTraitList.emplace(SPECIAL_TAG_UNKNOWN, make_shared<ItemTrait>(0, SPECIAL_TAG_UNKNOWN, this));
+       karmaList.emplace(SPECIAL_TAG_UNKNOWN, make_shared<Karma>(0, SPECIAL_TAG_UNKNOWN, this));
+       skillList.emplace(SPECIAL_TAG_UNKNOWN, make_shared<Skill>(0, SPECIAL_TAG_UNKNOWN, this));
+       speciesList.emplace(SPECIAL_TAG_UNKNOWN, make_shared<Species>(0, SPECIAL_TAG_UNKNOWN, this));
+       trapBaseList.emplace(SPECIAL_TAG_UNKNOWN, make_shared<TrapBase>(0, SPECIAL_TAG_UNKNOWN, this));
+       buildingList.emplace(SPECIAL_TAG_UNKNOWN, make_shared<Building>(0, SPECIAL_TAG_UNKNOWN, this));
+       campList.emplace(SPECIAL_TAG_UNKNOWN, make_shared<Camp>(0, SPECIAL_TAG_UNKNOWN, this));
+       dungeonList.emplace(SPECIAL_TAG_UNKNOWN, make_shared<Dungeon>(0, SPECIAL_TAG_UNKNOWN, this));
+
+       trapList.emplace(0, make_shared<Trap>(0, SPECIAL_TAG_UNKNOWN, this));
+       itemList.emplace(0, make_shared<Item>(0, SPECIAL_TAG_UNKNOWN, this));
+       floorList.emplace(0, make_shared<Floor>(0, SPECIAL_TAG_UNKNOWN, this));
+       creatureList.emplace(0, make_shared<Creature>(0, SPECIAL_TAG_UNKNOWN, this));
 
        gSurface->SetFloor(&(*floorList[0]));
 }
index b523399..0713f3e 100644 (file)
@@ -22,7 +22,7 @@ Square::Square()
 void Square::SetDammyData()
 {
        this->floorPtr = NULL;
-       this->featureTag = "UNKNOWN";
+       this->featureTag = SPECIAL_TAG_UNKNOWN;
        this->hitPoint = this->maxPoint = 100;
        this->floorPtr = floorPtr;
 }