mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-15 03:11:34 +00:00
Various fixes to get openmw to compile and run properly
This commit is contained in:
parent
0de4bb9d6c
commit
4a3f6b0ff1
7 changed files with 24 additions and 14 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -18,3 +18,4 @@ Doxygen
|
||||||
resources
|
resources
|
||||||
mwcompiler
|
mwcompiler
|
||||||
mwinterpreter
|
mwinterpreter
|
||||||
|
clientconsole
|
||||||
|
|
3
apps/clientconsole/CMakeLists.txt
Executable file → Normal file
3
apps/clientconsole/CMakeLists.txt
Executable file → Normal file
|
@ -1,2 +1,5 @@
|
||||||
project(clientconsole)
|
project(clientconsole)
|
||||||
|
find_package(Boost REQUIRED COMPONENTS system)
|
||||||
|
link_directories(${Boost_LIBRARY_DIRS})
|
||||||
add_executable(clientconsole client.cpp)
|
add_executable(clientconsole client.cpp)
|
||||||
|
target_link_libraries(clientconsole ${Boost_LIBRARIES})
|
||||||
|
|
|
@ -2,9 +2,13 @@
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/asio.hpp>
|
#include <boost/asio.hpp>
|
||||||
|
|
||||||
|
#include <libs/mangle/tools/str_exception.hpp>
|
||||||
|
|
||||||
using boost::asio::ip::tcp;
|
using boost::asio::ip::tcp;
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
#pragma warning( disable : 4966 )
|
#pragma warning( disable : 4966 )
|
||||||
|
#endif
|
||||||
|
|
||||||
class Client
|
class Client
|
||||||
{
|
{
|
||||||
|
@ -85,7 +89,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw std::exception("Unexpected header!");
|
throw str_exception("Unexpected header!");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
|
|
||||||
#include "world.hpp"
|
#include "world.hpp"
|
||||||
|
|
||||||
|
#include "mwrender/sky.hpp"
|
||||||
|
|
||||||
class ProcessCommandsHook : public Ogre::FrameListener
|
class ProcessCommandsHook : public Ogre::FrameListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -25,7 +27,7 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
OMW::Engine::Engine()
|
OMW::Engine::Engine() : mWorld(NULL)
|
||||||
{
|
{
|
||||||
mspCommandServer.reset(
|
mspCommandServer.reset(
|
||||||
new OMW::CommandServer::Server(&mCommandQueue, kCommandServerPort));
|
new OMW::CommandServer::Server(&mCommandQueue, kCommandServerPort));
|
||||||
|
@ -87,8 +89,6 @@ void OMW::Engine::addMaster (const std::string& master)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
// Enables sky rendering
|
// Enables sky rendering
|
||||||
//
|
//
|
||||||
void OMW::Engine::enableSky (bool bEnable)
|
void OMW::Engine::enableSky (bool bEnable)
|
||||||
|
@ -111,7 +111,6 @@ void OMW::Engine::processCommands()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
>>>>>>> 450542b4b9a7cf6987c192abbf7e2cc44da286d2
|
|
||||||
// Initialise and enter main loop.
|
// Initialise and enter main loop.
|
||||||
|
|
||||||
void OMW::Engine::go()
|
void OMW::Engine::go()
|
||||||
|
@ -157,12 +156,11 @@ void OMW::Engine::go()
|
||||||
// Start the main rendering loop
|
// Start the main rendering loop
|
||||||
mOgre.start();
|
mOgre.start();
|
||||||
|
|
||||||
<<<<<<< HEAD
|
// TODO/FIXME: This hangs
|
||||||
=======
|
//mspCommandServer->stop();
|
||||||
mspCommandServer->stop();
|
// TODO/FIXME: This crashes
|
||||||
delete mpSkyManager;
|
//delete mpSkyManager;
|
||||||
|
|
||||||
>>>>>>> 450542b4b9a7cf6987c192abbf7e2cc44da286d2
|
|
||||||
std::cout << "\nThat's all for now!\n";
|
std::cout << "\nThat's all for now!\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef COMMANDSERVER_COMMAND_HPP
|
#ifndef COMMANDSERVER_COMMAND_HPP
|
||||||
#define COMMANDSERVER_COMMAND_HPP
|
#define COMMANDSERVER_COMMAND_HPP
|
||||||
|
|
||||||
|
#include <boost/function.hpp>
|
||||||
|
|
||||||
namespace OMW
|
namespace OMW
|
||||||
{
|
{
|
||||||
///
|
///
|
||||||
|
@ -16,4 +18,4 @@ namespace OMW
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif COMMANDSERVER_COMMAND_HPP
|
#endif //COMMANDSERVER_COMMAND_HPP
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
using boost::asio::ip::tcp;
|
using boost::asio::ip::tcp;
|
||||||
|
|
||||||
|
#include <libs/mangle/tools/str_exception.hpp>
|
||||||
|
|
||||||
//
|
//
|
||||||
// Namespace for containing implementation details that the
|
// Namespace for containing implementation details that the
|
||||||
// rest of OpenMW doesn't need to worry about
|
// rest of OpenMW doesn't need to worry about
|
||||||
|
@ -103,7 +105,7 @@ namespace OMW { namespace CommandServer { namespace Detail {
|
||||||
bDone = true;
|
bDone = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw std::exception("Unexpected header!");
|
throw str_exception("Unexpected header!");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
bDone = true;
|
bDone = true;
|
||||||
|
@ -119,8 +121,8 @@ namespace OMW { namespace CommandServer {
|
||||||
|
|
||||||
Server::Server (Deque* pCommandQueue, const int port)
|
Server::Server (Deque* pCommandQueue, const int port)
|
||||||
: mAcceptor (mIOService, tcp::endpoint(tcp::v4(), port))
|
: mAcceptor (mIOService, tcp::endpoint(tcp::v4(), port))
|
||||||
, mpCommandQueue (pCommandQueue)
|
|
||||||
, mbStopping (false)
|
, mbStopping (false)
|
||||||
|
, mpCommandQueue (pCommandQueue)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ OISManager::OISManager(Render::OgreRenderer &rend)
|
||||||
|
|
||||||
// Non-exclusive mouse and keyboard input in debug mode. Debug mode
|
// Non-exclusive mouse and keyboard input in debug mode. Debug mode
|
||||||
// isn't implemented yet though.
|
// isn't implemented yet though.
|
||||||
if(false)
|
if(true)
|
||||||
{
|
{
|
||||||
#if defined OIS_WIN32_PLATFORM
|
#if defined OIS_WIN32_PLATFORM
|
||||||
pl.insert(std::make_pair(std::string("w32_mouse"),
|
pl.insert(std::make_pair(std::string("w32_mouse"),
|
||||||
|
|
Loading…
Reference in a new issue