1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-20 08:53:52 +00:00

added journal class

This commit is contained in:
Marc Zinnschlag 2011-04-04 11:16:56 +02:00
parent dc4e6216c3
commit 190f77f6c9
5 changed files with 39 additions and 1 deletions

View file

@ -70,9 +70,11 @@ source_group(apps\\openmw\\mwgui FILES ${GAMEGUI_HEADER} ${GAMEGUI})
set(GAMEDIALOGUE_HEADER
mwdialogue/dialoguemanager.hpp
mwdialogue/journal.hpp
)
set(GAMEDIALOGUE
mwdialogue/dialoguemanager.cpp
mwdialogue/journal.cpp
)
source_group(apps\\openmw\\mwdialogue FILES ${GAMEDIALOGUE_HEADER} ${GAMEDIALOGUE})

View file

@ -36,6 +36,7 @@
#include "mwclass/classes.hpp"
#include "mwdialogue/dialoguemanager.hpp"
#include "mwdialogue/journal.hpp"
#include "mwmechanics/mechanicsmanager.hpp"
@ -228,6 +229,7 @@ OMW::Engine::~Engine()
delete mEnvironment.mGlobalScripts;
delete mEnvironment.mMechanicsManager;
delete mEnvironment.mDialogueManager;
delete mEnvironment.mJournal;
delete mScriptManager;
delete mScriptContext;
delete mPhysicEngine;
@ -396,6 +398,7 @@ void OMW::Engine::go()
mEnvironment.mMechanicsManager = new MWMechanics::MechanicsManager (mEnvironment);
// Create dialog system
mEnvironment.mJournal = new MWDialogue::Journal (mEnvironment);
mEnvironment.mDialogueManager = new MWDialogue::DialogueManager (mEnvironment);
// load cell

View file

@ -0,0 +1,10 @@
#include "journal.hpp"
namespace MWDialogue
{
MWDialogue::Journal::Journal (MWWorld::Environment& environment)
: mEnvironment (environment)
{}
}

View file

@ -0,0 +1,21 @@
#ifndef GAME_MMDIALOG_JOURNAL_H
#define GAME_MWDIALOG_JOURNAL_H
namespace MWWorld
{
struct Environment;
}
namespace MWDialogue
{
class Journal
{
MWWorld::Environment& mEnvironment;
public:
Journal (MWWorld::Environment& environment);
};
}
#endif

View file

@ -24,6 +24,7 @@ namespace MWMechanics
namespace MWDialogue
{
class DialogueManager;
class Journal;
}
namespace MWInput
@ -41,7 +42,7 @@ namespace MWWorld
public:
Environment()
: mWorld (0), mSoundManager (0), mGlobalScripts (0), mWindowManager (0),
mMechanicsManager (0), mDialogueManager (0), mFrameDuration (0),
mMechanicsManager (0), mDialogueManager (0), mJournal (0), mFrameDuration (0),
mInputManager (0)
{}
@ -51,6 +52,7 @@ namespace MWWorld
MWGui::WindowManager *mWindowManager;
MWMechanics::MechanicsManager *mMechanicsManager;
MWDialogue::DialogueManager *mDialogueManager;
MWDialogue::Journal *mJournal;
float mFrameDuration;
// For setting GUI mode