2010-08-06 17:16:44 +00:00
|
|
|
#ifndef GAME_MMDIALOG_DIALOGUEMANAGER_H
|
|
|
|
#define GAME_MWDIALOG_DIALOGUEMANAGER_H
|
2010-08-06 16:01:34 +00:00
|
|
|
|
2010-08-08 11:21:03 +00:00
|
|
|
#include <components/esm/loadinfo.hpp>
|
2010-08-06 16:01:34 +00:00
|
|
|
|
2010-08-08 11:21:03 +00:00
|
|
|
#include "../mwworld/ptr.hpp"
|
2012-02-09 18:27:15 +00:00
|
|
|
#include <map>
|
2010-08-08 09:34:03 +00:00
|
|
|
|
2010-08-06 16:01:34 +00:00
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
class Environment;
|
|
|
|
}
|
|
|
|
|
2010-08-06 17:16:44 +00:00
|
|
|
namespace MWDialogue
|
2010-08-06 16:01:34 +00:00
|
|
|
{
|
2010-08-06 17:16:44 +00:00
|
|
|
class DialogueManager
|
2010-08-06 16:01:34 +00:00
|
|
|
{
|
|
|
|
MWWorld::Environment& mEnvironment;
|
|
|
|
|
2010-08-08 11:21:03 +00:00
|
|
|
bool isMatching (const MWWorld::Ptr& actor, const ESM::DialInfo::SelectStruct& select) const;
|
|
|
|
|
2010-08-08 09:34:03 +00:00
|
|
|
bool isMatching (const MWWorld::Ptr& actor, const ESM::DialInfo& info) const;
|
|
|
|
|
2012-02-15 12:23:59 +00:00
|
|
|
void parseText(std::string text);
|
|
|
|
|
2012-02-09 18:27:15 +00:00
|
|
|
std::map<std::string,bool> knownTopics;// Those are the topics the player knows.
|
2012-02-10 21:01:31 +00:00
|
|
|
std::map<std::string,std::string> actorKnownTopics;
|
2012-02-09 18:27:15 +00:00
|
|
|
|
2010-08-06 16:01:34 +00:00
|
|
|
public:
|
|
|
|
|
2010-08-06 17:16:44 +00:00
|
|
|
DialogueManager (MWWorld::Environment& environment);
|
2010-08-06 16:01:34 +00:00
|
|
|
|
2010-08-06 17:16:44 +00:00
|
|
|
void startDialogue (const MWWorld::Ptr& actor);
|
2010-08-06 16:01:34 +00:00
|
|
|
|
2012-02-10 15:09:43 +00:00
|
|
|
void addTopic(std::string topic);
|
|
|
|
|
2012-02-05 11:25:23 +00:00
|
|
|
//calbacks for the GUI
|
|
|
|
void keywordSelected(std::string keyword);
|
|
|
|
void goodbyeSelected();
|
|
|
|
void questionAnswered(std::string answere);
|
|
|
|
|
2010-08-06 16:01:34 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|