2012-08-11 10:02:51 +00:00
|
|
|
#ifndef GAME_MWDIALOGUE_JOURNALENTRY_H
|
|
|
|
#define GAME_MWDIALOGUE_JOURNALENTRY_H
|
2011-04-19 08:54:11 +00:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
2013-12-03 13:28:46 +00:00
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
struct JournalEntry;
|
|
|
|
}
|
|
|
|
|
2014-06-10 13:42:50 +00:00
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
class Ptr;
|
|
|
|
}
|
|
|
|
|
2011-04-19 08:54:11 +00:00
|
|
|
namespace MWDialogue
|
|
|
|
{
|
2013-12-01 13:44:27 +00:00
|
|
|
/// \brief Basic quest/dialogue/topic entry
|
|
|
|
struct Entry
|
2011-04-19 08:54:11 +00:00
|
|
|
{
|
|
|
|
std::string mInfoId;
|
2013-11-30 10:57:33 +00:00
|
|
|
std::string mText;
|
2014-01-25 22:53:50 +00:00
|
|
|
std::string mActorName; // optional
|
2011-04-19 08:54:11 +00:00
|
|
|
|
2013-12-01 13:44:27 +00:00
|
|
|
Entry();
|
|
|
|
|
2014-06-10 13:42:50 +00:00
|
|
|
/// actor is optional
|
|
|
|
Entry (const std::string& topic, const std::string& infoId, const MWWorld::Ptr& actor);
|
2013-12-01 13:44:27 +00:00
|
|
|
|
2013-12-03 13:28:46 +00:00
|
|
|
Entry (const ESM::JournalEntry& record);
|
|
|
|
|
2013-12-01 13:44:27 +00:00
|
|
|
std::string getText() const;
|
2013-12-03 13:28:46 +00:00
|
|
|
|
|
|
|
void write (ESM::JournalEntry& entry) const;
|
2013-12-01 13:44:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/// \brief A dialogue entry
|
|
|
|
///
|
|
|
|
/// Same as entry, but store TopicID
|
|
|
|
struct JournalEntry : public Entry
|
|
|
|
{
|
|
|
|
std::string mTopic;
|
|
|
|
|
2011-04-19 08:54:11 +00:00
|
|
|
JournalEntry();
|
|
|
|
|
2014-06-10 13:42:50 +00:00
|
|
|
JournalEntry (const std::string& topic, const std::string& infoId, const MWWorld::Ptr& actor);
|
2011-04-19 08:54:11 +00:00
|
|
|
|
2013-12-03 13:28:46 +00:00
|
|
|
JournalEntry (const ESM::JournalEntry& record);
|
|
|
|
|
|
|
|
void write (ESM::JournalEntry& entry) const;
|
|
|
|
|
2012-07-03 10:30:50 +00:00
|
|
|
static JournalEntry makeFromQuest (const std::string& topic, int index);
|
2011-04-22 09:16:39 +00:00
|
|
|
|
2012-07-03 10:30:50 +00:00
|
|
|
static std::string idFromIndex (const std::string& topic, int index);
|
2011-04-19 08:54:11 +00:00
|
|
|
};
|
|
|
|
|
2013-04-25 08:27:43 +00:00
|
|
|
/// \brief A quest entry with a timestamp.
|
2011-04-22 09:16:39 +00:00
|
|
|
struct StampedJournalEntry : public JournalEntry
|
|
|
|
{
|
|
|
|
int mDay;
|
|
|
|
int mMonth;
|
|
|
|
int mDayOfMonth;
|
|
|
|
|
|
|
|
StampedJournalEntry();
|
|
|
|
|
|
|
|
StampedJournalEntry (const std::string& topic, const std::string& infoId,
|
|
|
|
int day, int month, int dayOfMonth);
|
|
|
|
|
2013-12-03 13:28:46 +00:00
|
|
|
StampedJournalEntry (const ESM::JournalEntry& record);
|
|
|
|
|
|
|
|
void write (ESM::JournalEntry& entry) const;
|
|
|
|
|
2012-07-03 10:30:50 +00:00
|
|
|
static StampedJournalEntry makeFromQuest (const std::string& topic, int index);
|
2011-04-22 09:16:39 +00:00
|
|
|
};
|
2011-04-19 08:54:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|