GAME_COMMAND commandID;
PLAY_EXIT_CODE code = PLAY_EXIT_NONE;
ACTION_IT actionIt;
+ HaveGameTime *currentHaveGameTimeObject;
gameSurface->Draw(gameWorld->GetPlayerCreature());
while(code == PLAY_EXIT_NONE)
{
+ currentHaveGameTimeObject = this->gameWorld->GetNextActionObject();
+ currentHaveGameTimeObject->TurnProcess();
this->gameSurface->UpdateTimeStatus(this->gameWorld->GetGameTime());
//actionIt = this->toNextProcess();
commandID = gameSurface->GetCommand(gameWorld->GetPlayerCreature());
return deadNum;
}
-
- ACTION_IT GameEngine::toNextProcess(void)
- {
- return this->gameWorld->GetActionList()->begin()++;
- }
-
}
GameSurface *gameSurface; //!< GameSurface\82Ì\8eQ\8fÆ\83|\83C\83\93\83^
GameLogger *gameLogger; //!< GameLogger\82Ì\8eQ\8fÆ\83|\83C\83\93\83^
- /*!
- * @brief \8e\9f\82Ì\8f\88\97\9d\91Î\8fÛ\82ð\8eæ\93¾\82µ\81A\82»\82ê\82Ü\82Å\82Ì\83Q\81[\83\80\8e\9e\8aÔ\89Á\8eZ\82ð\8ds\82¤\81B
- * @return \8e\9f\82Ì\8f\88\97\9d\91Î\8fÛ
- */
- ACTION_IT GameEngine::toNextProcess(void);
-
public:
GameEngine::GameEngine();
GameEngine::~GameEngine();
if(gameTimeStatusTexture) SDL_DestroyTexture(gameTimeStatusTexture);
surface = SDL_CreateRGBSurface(0, 200, 50, 32, 0, 0, 0, 0);
SDL_FillRect(surface, &rect, SDL_MapRGBA(windowSurface->format, 0, 0, 0, 120));
- sprintf_s(statusBuf, STATUS_BUFSIZE, "\83^\81[\83\93:%d", currentTime);
+ sprintf_s(statusBuf, STATUS_BUFSIZE, "\83Q\81[\83\80\8e\9e\8aÔ:%d", currentTime);
statusSurface = TTF_RenderUTF8_Blended(font, toUTF8(statusBuf).c_str(), color);
SDL_BlitSurface(statusSurface, &StatusViewRect, surface, &StatusViewPosition);
gameTimeStatusTexture = SDL_CreateTextureFromSurface(renderer, surface);
#include "Effect.h"
#include "Floor.h"
+#include "HaveGameTime.h"
+
#include "FixedArtifact.h"
#include "GameMessage.h"
#include "ItemBase.h"
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++;
return this->playerIt;
}
- ACTION_LIST* GameWorld::GetActionList(void)
- {
- return &(this->actionList);
- }
-
Creature *GameWorld::GetCreatureFromPosition(ID fieldID, Coordinates *positionPtr)
{
CREATURE_IT creatureIt;
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
class TrapBase;
class Coordinates;
+ class HaveGameTime;
#include "EngineTypedef.h"
ID trapID; //!<\8bó\82«\83g\83\89\83b\83vID
std::vector<boost::shared_ptr<HaveGameTime>> actionList; /*!<\8ds\93®\8f\87\83\8a\83X\83g*/
+ std::vector<Creature *> actionList2; /*!<\8ds\93®\8f\87\83\8a\83X\83g*/
+ std::vector<HaveGameTime*> actionList3; /*!<\8ds\93®\8f\87\83\8a\83X\83g*/
CREATURE_IT playerIt; //!< \83v\83\8c\83C\83\84\81[\83N\83\8a\81[\83`\83\83\81[\8eQ\8fÆ\83|\83C\83\93\83^
GAME_TIME gameTime; //!<\83Q\81[\83\80\8e\9e\8aÔ
std::map<TAG, boost::shared_ptr<Species>> *GameWorld::GetSpeciesList(void);
+ /*!
+ * @brief \8e\9e\8aÔ\8co\89ß\8f\88\97\9d\82ð\8ds\82¢\81A\8e\9f\82Ì\83A\83N\83V\83\87\83\93\83I\83u\83W\83F\83N\83g\82ð\95Ô\82·\81B
+ * @return \8ds\93®\8f\87\83\8a\83X\83g
+ */
+ HaveGameTime *GameWorld::GetNextActionObject(void);
+
+
};
}
\ No newline at end of file
/*!
* @file HaveGameTime.cpp
-* @brief \83Q\81[\83\80\83^\81[\83\93\95Û\8e\9d\92\8a\8fÛ\83N\83\89\83X\82ð\92è\8b`\82·\82é
+* @brief \83Q\81[\83\80\83^\83C\83\80\95Û\8e\9d\92\8a\8fÛ\83N\83\89\83X\82ð\92è\8b`\82·\82é
* @date 2014/06/11
* @author Deskull
* 2014 Sikabane Works.