1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-30 15:15:31 +00:00

added journal script interface

This commit is contained in:
Marc Zinnschlag 2011-04-04 11:23:15 +02:00
parent 190f77f6c9
commit b40117449a
2 changed files with 28 additions and 1 deletions

View file

@ -1,10 +1,26 @@
#include "journal.hpp"
#include <iostream>
namespace MWDialogue
{
MWDialogue::Journal::Journal (MWWorld::Environment& environment)
Journal::Journal (MWWorld::Environment& environment)
: mEnvironment (environment)
{}
void Journal::addEntry (const std::string& id, int index)
{
std::cout << "journal: " << id << " at " << index << std::endl;
}
void Journal::setJournalIndex (const std::string& id, int index)
{
std::cout << "journal (no entry): " << id << " at " << index << std::endl;
}
int Journal::getJournalIndex (const std::string& id) const
{
return 0;
}
}

View file

@ -1,6 +1,8 @@
#ifndef GAME_MMDIALOG_JOURNAL_H
#define GAME_MWDIALOG_JOURNAL_H
#include <string>
namespace MWWorld
{
struct Environment;
@ -15,6 +17,15 @@ namespace MWDialogue
public:
Journal (MWWorld::Environment& environment);
void addEntry (const std::string& id, int index);
///< Add a journal entry.
void setJournalIndex (const std::string& id, int index);
///< Set the journal index without adding an entry.
int getJournalIndex (const std::string& id) const;
///< Get the journal index.
};
}