forked from mirror/openmw-tes3mp
Fixed namespaces, added OEngine:: to everything
This commit is contained in:
parent
b9b306cd4c
commit
5333b8e230
17 changed files with 36 additions and 29 deletions
|
@ -1,8 +1,11 @@
|
|||
#include <MyGUI.h>
|
||||
#include <OIS/OIS.h>
|
||||
|
||||
#include "events.hpp"
|
||||
|
||||
using namespace MyGUI;
|
||||
using namespace OIS;
|
||||
using namespace OEngine::GUI;
|
||||
|
||||
void EventInjector::event(Type type, int index, const void *p)
|
||||
{
|
||||
|
|
|
@ -8,6 +8,7 @@ namespace MyGUI
|
|||
class Gui;
|
||||
}
|
||||
|
||||
namespace OEngine {
|
||||
namespace GUI
|
||||
{
|
||||
/** Event handler that injects OIS events into MyGUI
|
||||
|
@ -22,5 +23,5 @@ namespace GUI
|
|||
EventInjector(MyGUI::Gui *g) : gui(g), enabled(true) {}
|
||||
void event(Type type, int index, const void *p);
|
||||
};
|
||||
}
|
||||
}}
|
||||
#endif
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <assert.h>
|
||||
#include <MyGUI.h>
|
||||
|
||||
namespace OEngine {
|
||||
namespace GUI
|
||||
{
|
||||
/** The Layout class is an utility class used to load MyGUI layouts
|
||||
|
@ -114,5 +115,5 @@ namespace GUI
|
|||
std::string mLayoutName;
|
||||
MyGUI::VectorWidgetPtr mListWindowRoot;
|
||||
};
|
||||
}
|
||||
}}
|
||||
#endif
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include "manager.hpp"
|
||||
|
||||
using namespace GUI;
|
||||
using namespace OEngine::GUI;
|
||||
|
||||
void MyGUIManager::setup(Ogre::RenderWindow *wnd, Ogre::SceneManager *mgr, bool logging)
|
||||
{
|
||||
|
|
|
@ -13,6 +13,7 @@ namespace Ogre
|
|||
class SceneManager;
|
||||
}
|
||||
|
||||
namespace OEngine {
|
||||
namespace GUI
|
||||
{
|
||||
class MyGUIManager
|
||||
|
@ -29,5 +30,5 @@ namespace GUI
|
|||
void setup(Ogre::RenderWindow *wnd, Ogre::SceneManager *mgr, bool logging=false);
|
||||
void shutdown();
|
||||
};
|
||||
}
|
||||
}}
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <map>
|
||||
#include <assert.h>
|
||||
|
||||
namespace OEngine {
|
||||
namespace Input {
|
||||
|
||||
/**
|
||||
|
@ -70,6 +71,5 @@ struct DispatchMap
|
|||
return out;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}}
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "func_binder.hpp"
|
||||
#include <mangle/input/event.hpp>
|
||||
|
||||
namespace OEngine {
|
||||
namespace Input {
|
||||
|
||||
struct Dispatcher : Mangle::Input::Event
|
||||
|
@ -44,6 +45,5 @@ struct Dispatcher : Mangle::Input::Event
|
|||
funcs.call(*it, p);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}}
|
||||
#endif
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include <boost/function.hpp>
|
||||
#include <assert.h>
|
||||
|
||||
namespace OEngine {
|
||||
namespace Input {
|
||||
|
||||
/**
|
||||
|
@ -99,6 +100,5 @@ public:
|
|||
return bindings[index].name;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}}
|
||||
#endif
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "dispatch_map.hpp"
|
||||
#include <mangle/input/driver.hpp>
|
||||
|
||||
namespace OEngine {
|
||||
namespace Input {
|
||||
|
||||
/** The poller is used to check (poll) for keys rather than waiting
|
||||
|
@ -41,6 +42,5 @@ struct Poller
|
|||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}}
|
||||
#endif
|
||||
|
|
|
@ -3,7 +3,7 @@ using namespace std;
|
|||
|
||||
#include "../dispatch_map.hpp"
|
||||
|
||||
using namespace Input;
|
||||
using namespace OEngine::Input;
|
||||
|
||||
typedef DispatchMap::OutList OutList;
|
||||
typedef OutList::const_iterator Cit;
|
||||
|
|
|
@ -17,7 +17,7 @@ void f2(int i, const void *p)
|
|||
cout << " F2 i=" << i << endl;
|
||||
}
|
||||
|
||||
using namespace Input;
|
||||
using namespace OEngine::Input;
|
||||
|
||||
int main()
|
||||
{
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
using namespace std;
|
||||
using namespace Mangle::Input;
|
||||
using namespace Input;
|
||||
using namespace OEngine::Input;
|
||||
|
||||
enum Actions
|
||||
{
|
||||
|
@ -34,17 +34,17 @@ int main(int argc, char** argv)
|
|||
SDL_Init(SDL_INIT_VIDEO);
|
||||
SDL_SetVideoMode(640, 480, 0, SDL_SWSURFACE);
|
||||
SDLDriver input;
|
||||
Dispatcher disp(A_LAST);
|
||||
Dispatcher *disp = new Dispatcher(A_LAST);
|
||||
Poller poll(input);
|
||||
|
||||
input.setEvent(&disp);
|
||||
input.setEvent(EventPtr(disp));
|
||||
|
||||
disp.funcs.bind(A_Quit, &doExit);
|
||||
disp.funcs.bind(A_Left, &goLeft);
|
||||
disp->funcs.bind(A_Quit, &doExit);
|
||||
disp->funcs.bind(A_Left, &goLeft);
|
||||
|
||||
disp.bind(A_Quit, SDLK_q);
|
||||
disp.bind(A_Left, SDLK_a);
|
||||
disp.bind(A_Left, SDLK_LEFT);
|
||||
disp->bind(A_Quit, SDLK_q);
|
||||
disp->bind(A_Left, SDLK_a);
|
||||
disp->bind(A_Left, SDLK_LEFT);
|
||||
|
||||
poll.bind(A_Right, SDLK_d);
|
||||
poll.bind(A_Right, SDLK_RIGHT);
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <OgreFrameListener.h>
|
||||
#include <OgreRenderWindow.h>
|
||||
|
||||
namespace OEngine {
|
||||
namespace Render
|
||||
{
|
||||
struct ExitListener : Ogre::FrameListener
|
||||
|
@ -28,6 +29,5 @@ namespace Render
|
|||
return !exit;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}}
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
using namespace OIS;
|
||||
using namespace Ogre;
|
||||
using namespace OEngine::Render;
|
||||
|
||||
void MouseLookEvent::event(Type type, int index, const void *p)
|
||||
{
|
||||
|
|
|
@ -23,6 +23,7 @@ namespace Ogre
|
|||
class Camera;
|
||||
}
|
||||
|
||||
namespace OEngine {
|
||||
namespace Render
|
||||
{
|
||||
class MouseLookEvent : public Mangle::Input::Event
|
||||
|
@ -49,6 +50,5 @@ namespace Render
|
|||
|
||||
void event(Type type, int index, const void *p);
|
||||
};
|
||||
}
|
||||
|
||||
}}
|
||||
#endif
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <assert.h>
|
||||
|
||||
using namespace Ogre;
|
||||
using namespace Render;
|
||||
using namespace OEngine::Render;
|
||||
|
||||
void OgreRenderer::cleanup()
|
||||
{
|
||||
|
|
|
@ -16,6 +16,7 @@ namespace Ogre
|
|||
class Viewport;
|
||||
}
|
||||
|
||||
namespace OEngine {
|
||||
namespace Render
|
||||
{
|
||||
class OgreRenderer
|
||||
|
@ -71,6 +72,5 @@ namespace Render
|
|||
/// Viewport
|
||||
Ogre::Viewport *getViewport() { return mView; }
|
||||
};
|
||||
}
|
||||
|
||||
}}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue