2012-04-23 10:57:16 +02:00
|
|
|
#include "environment.hpp"
|
|
|
|
|
|
|
|
#include <cassert>
|
2017-08-30 21:26:30 +00:00
|
|
|
|
2020-12-29 21:45:59 +01:00
|
|
|
#include <components/resource/resourcesystem.hpp>
|
|
|
|
|
2012-07-03 12:30:50 +02:00
|
|
|
#include "world.hpp"
|
2012-08-08 15:18:55 +02:00
|
|
|
#include "scriptmanager.hpp"
|
2012-08-09 10:35:53 +02:00
|
|
|
#include "dialoguemanager.hpp"
|
2012-08-09 12:56:03 +02:00
|
|
|
#include "journal.hpp"
|
2012-08-09 14:33:21 +02:00
|
|
|
#include "soundmanager.hpp"
|
2012-08-11 17:30:55 +02:00
|
|
|
#include "mechanicsmanager.hpp"
|
2012-08-11 17:53:39 +02:00
|
|
|
#include "inputmanager.hpp"
|
2012-08-12 18:11:09 +02:00
|
|
|
#include "windowmanager.hpp"
|
2013-11-16 10:31:46 +01:00
|
|
|
#include "statemanager.hpp"
|
2020-12-18 23:21:10 +01:00
|
|
|
#include "luamanager.hpp"
|
2012-07-03 12:30:50 +02:00
|
|
|
|
2020-11-13 11:39:47 +04:00
|
|
|
MWBase::Environment *MWBase::Environment::sThis = nullptr;
|
2012-04-23 10:57:16 +02:00
|
|
|
|
|
|
|
MWBase::Environment::Environment()
|
|
|
|
{
|
2022-05-06 17:46:50 +02:00
|
|
|
assert(sThis == nullptr);
|
2012-04-23 10:57:16 +02:00
|
|
|
sThis = this;
|
|
|
|
}
|
|
|
|
|
|
|
|
MWBase::Environment::~Environment()
|
|
|
|
{
|
2020-11-13 11:39:47 +04:00
|
|
|
sThis = nullptr;
|
2012-04-23 10:57:16 +02:00
|
|
|
}
|
|
|
|
|
2020-05-22 00:11:23 +02:00
|
|
|
void MWBase::Environment::reportStats(unsigned int frameNumber, osg::Stats& stats) const
|
|
|
|
{
|
|
|
|
mMechanicsManager->reportStats(frameNumber, stats);
|
|
|
|
mWorld->reportStats(frameNumber, stats);
|
|
|
|
}
|