OSDN Git Service

ゲーム時間経過処理を実装中 / Implementing game time processing.
[deeangband/Deeangband-new.git] / Deeangband / GameWorld.cpp
index 9fcfa7d..30cbe55 100644 (file)
@@ -25,6 +25,8 @@
 #include "Effect.h"
 #include "Floor.h"
 
+#include "HaveGameTime.h"
+
 #include "FixedArtifact.h"
 #include "GameMessage.h"
 #include "ItemBase.h"
@@ -97,11 +99,15 @@ namespace Deeangband
 
        bool GameWorld::GenerateCreature(std::map<TAG, boost::shared_ptr<Species>>::iterator& speciesIt, std::map<ID, boost::shared_ptr<Field>>::iterator& fieldIt, MAP_LENGTH x, MAP_LENGTH y)
        {
-               std::map<ID, boost::shared_ptr<Creature>>::iterator creatureIt; 
+               std::map<ID, boost::shared_ptr<Creature>>::iterator creatureIt;
+               HaveGameTime *test;
                creatureList.emplace(this->creatureID, boost::make_shared<Creature>(speciesIt, fieldIt, x, y));
                creatureIt = creatureList.find(this->creatureID);
                creatureIt->second->PlusWait(100, TRUE);
                creatureIt->second->UpdateFieldLore();
+               actionList2.push_back(creatureIt->second.get());
+               test = creatureIt->second.get();
+               //actionList3.push_back(test);
                do
                {
                        this->creatureID++;
@@ -674,11 +680,6 @@ namespace Deeangband
                return this->playerIt;
        }
 
-       ACTION_LIST* GameWorld::GetActionList(void)
-       {
-               return &(this->actionList);
-       }
-
        Creature *GameWorld::GetCreatureFromPosition(ID fieldID, Coordinates *positionPtr)
        {
                CREATURE_IT creatureIt;
@@ -715,4 +716,16 @@ namespace Deeangband
                return &creatureList;
        }
 
+       ACTION_LIST* GameWorld::GetActionList(void)
+       {
+               return &(this->actionList);
+       }
+
+       HaveGameTime *GameWorld::GetNextActionObject(void)
+       {
+               this->gameTime++;
+               return this->playerIt->second.get();
+       }
+
+
 }
\ No newline at end of file