|
|
@ -11,8 +11,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
#include "world.hpp"
|
|
|
|
#include "world.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
#include "mwrender/sky.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ProcessCommandsHook : public Ogre::FrameListener
|
|
|
|
class ProcessCommandsHook : public Ogre::FrameListener
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
public:
|
|
|
@ -27,12 +25,18 @@ protected:
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OMW::Engine::Engine() : mWorld(NULL)
|
|
|
|
OMW::Engine::Engine() : mWorld(NULL), mDebug (false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
mspCommandServer.reset(
|
|
|
|
mspCommandServer.reset(
|
|
|
|
new OMW::CommandServer::Server(&mCommandQueue, kCommandServerPort));
|
|
|
|
new OMW::CommandServer::Server(&mCommandQueue, kCommandServerPort));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OMW::Engine::~Engine()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// mspCommandServer->stop();
|
|
|
|
|
|
|
|
delete mWorld;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Load all BSA files in data directory.
|
|
|
|
// Load all BSA files in data directory.
|
|
|
|
|
|
|
|
|
|
|
|
void OMW::Engine::loadBSA()
|
|
|
|
void OMW::Engine::loadBSA()
|
|
|
@ -89,13 +93,11 @@ void OMW::Engine::addMaster (const std::string& master)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Enables sky rendering
|
|
|
|
void OMW::Engine::enableDebugMode()
|
|
|
|
//
|
|
|
|
|
|
|
|
void OMW::Engine::enableSky (bool bEnable)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
mEnableSky = bEnable;
|
|
|
|
mDebug = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void OMW::Engine::processCommands()
|
|
|
|
void OMW::Engine::processCommands()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Command cmd;
|
|
|
|
Command cmd;
|
|
|
@ -144,7 +146,7 @@ void OMW::Engine::go()
|
|
|
|
std::cout << "Setting up input system\n";
|
|
|
|
std::cout << "Setting up input system\n";
|
|
|
|
|
|
|
|
|
|
|
|
// Sets up the input system
|
|
|
|
// Sets up the input system
|
|
|
|
MWInput::MWInputManager input(mOgre, mWorld->getPlayerPos());
|
|
|
|
MWInput::MWInputManager input(mOgre, mWorld->getPlayerPos(), mDebug);
|
|
|
|
|
|
|
|
|
|
|
|
// Launch the console server
|
|
|
|
// Launch the console server
|
|
|
|
std::cout << "Starting command server on port " << kCommandServerPort << std::endl;
|
|
|
|
std::cout << "Starting command server on port " << kCommandServerPort << std::endl;
|
|
|
@ -159,10 +161,4 @@ void OMW::Engine::go()
|
|
|
|
std::cout << "\nThat's all for now!\n";
|
|
|
|
std::cout << "\nThat's all for now!\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
OMW::Engine::~Engine()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// mspCommandServer->stop();
|
|
|
|
|
|
|
|
delete mWorld;
|
|
|
|
|
|
|
|
delete mpSkyManager;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|