Merge branch 'master' of https://github.com/DigitalPulseSoftware/NazaraEngine
Former-commit-id: 3bfc3cf3f6be345b552c5d773cd7a11ccd2e5bc4
This commit is contained in:
commit
c15dd5221d
|
|
@ -37,29 +37,6 @@ namespace Ndk
|
||||||
|
|
||||||
void RegisterClasses(Nz::LuaInstance& instance);
|
void RegisterClasses(Nz::LuaInstance& instance);
|
||||||
|
|
||||||
private:
|
|
||||||
void BindCore();
|
|
||||||
void BindMath();
|
|
||||||
void BindNetwork();
|
|
||||||
void BindSDK();
|
|
||||||
void BindUtility();
|
|
||||||
|
|
||||||
void RegisterCore(Nz::LuaInstance& instance);
|
|
||||||
void RegisterMath(Nz::LuaInstance& instance);
|
|
||||||
void RegisterNetwork(Nz::LuaInstance& instance);
|
|
||||||
void RegisterSDK(Nz::LuaInstance& instance);
|
|
||||||
void RegisterUtility(Nz::LuaInstance& instance);
|
|
||||||
|
|
||||||
#ifndef NDK_SERVER
|
|
||||||
void BindAudio();
|
|
||||||
void BindGraphics();
|
|
||||||
void BindRenderer();
|
|
||||||
|
|
||||||
void RegisterAudio(Nz::LuaInstance& instance);
|
|
||||||
void RegisterGraphics(Nz::LuaInstance& instance);
|
|
||||||
void RegisterRenderer(Nz::LuaInstance& instance);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Core
|
// Core
|
||||||
Nz::LuaClass<Nz::Clock> clockClass;
|
Nz::LuaClass<Nz::Clock> clockClass;
|
||||||
Nz::LuaClass<Nz::Directory> directoryClass;
|
Nz::LuaClass<Nz::Directory> directoryClass;
|
||||||
|
|
@ -83,28 +60,12 @@ namespace Ndk
|
||||||
Nz::LuaClass<Nz::Node> nodeClass;
|
Nz::LuaClass<Nz::Node> nodeClass;
|
||||||
|
|
||||||
// SDK
|
// SDK
|
||||||
using AddComponentFunc = int(*)(Nz::LuaInstance&, EntityHandle&);
|
|
||||||
using GetComponentFunc = int(*)(Nz::LuaInstance&, BaseComponent&);
|
|
||||||
|
|
||||||
struct ComponentBinding
|
|
||||||
{
|
|
||||||
AddComponentFunc adder;
|
|
||||||
ComponentIndex index;
|
|
||||||
GetComponentFunc getter;
|
|
||||||
Nz::String name;
|
|
||||||
};
|
|
||||||
|
|
||||||
ComponentBinding* QueryComponentIndex(Nz::LuaInstance& lua, int argIndex = 1);
|
|
||||||
|
|
||||||
Nz::LuaClass<Application*> application;
|
Nz::LuaClass<Application*> application;
|
||||||
Nz::LuaClass<EntityHandle> entityClass;
|
Nz::LuaClass<EntityHandle> entityClass;
|
||||||
Nz::LuaClass<NodeComponentHandle> nodeComponent;
|
Nz::LuaClass<NodeComponentHandle> nodeComponent;
|
||||||
Nz::LuaClass<VelocityComponentHandle> velocityComponent;
|
Nz::LuaClass<VelocityComponentHandle> velocityComponent;
|
||||||
Nz::LuaClass<WorldHandle> worldClass;
|
Nz::LuaClass<WorldHandle> worldClass;
|
||||||
|
|
||||||
std::vector<ComponentBinding> m_componentBinding;
|
|
||||||
std::unordered_map<Nz::String, ComponentIndex> m_componentBindingByName;
|
|
||||||
|
|
||||||
#ifndef NDK_SERVER
|
#ifndef NDK_SERVER
|
||||||
// Audio
|
// Audio
|
||||||
Nz::LuaClass<Nz::Music> musicClass;
|
Nz::LuaClass<Nz::Music> musicClass;
|
||||||
|
|
@ -120,6 +81,46 @@ namespace Ndk
|
||||||
Nz::LuaClass<ConsoleHandle> consoleClass;
|
Nz::LuaClass<ConsoleHandle> consoleClass;
|
||||||
Nz::LuaClass<GraphicsComponentHandle> graphicsComponent;
|
Nz::LuaClass<GraphicsComponentHandle> graphicsComponent;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
private:
|
||||||
|
void BindCore();
|
||||||
|
void BindMath();
|
||||||
|
void BindNetwork();
|
||||||
|
void BindSDK();
|
||||||
|
void BindUtility();
|
||||||
|
|
||||||
|
void RegisterCore(Nz::LuaInstance& instance);
|
||||||
|
void RegisterMath(Nz::LuaInstance& instance);
|
||||||
|
void RegisterNetwork(Nz::LuaInstance& instance);
|
||||||
|
void RegisterSDK(Nz::LuaInstance& instance);
|
||||||
|
void RegisterUtility(Nz::LuaInstance& instance);
|
||||||
|
|
||||||
|
#ifndef NDK_SERVER
|
||||||
|
void BindAudio();
|
||||||
|
void BindGraphics();
|
||||||
|
void BindRenderer();
|
||||||
|
|
||||||
|
void RegisterAudio(Nz::LuaInstance& instance);
|
||||||
|
void RegisterGraphics(Nz::LuaInstance& instance);
|
||||||
|
void RegisterRenderer(Nz::LuaInstance& instance);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
using AddComponentFunc = int(*)(Nz::LuaInstance&, EntityHandle&);
|
||||||
|
using GetComponentFunc = int(*)(Nz::LuaInstance&, BaseComponent&);
|
||||||
|
|
||||||
|
struct ComponentBinding
|
||||||
|
{
|
||||||
|
AddComponentFunc adder;
|
||||||
|
ComponentIndex index;
|
||||||
|
GetComponentFunc getter;
|
||||||
|
Nz::String name;
|
||||||
|
};
|
||||||
|
|
||||||
|
ComponentBinding* QueryComponentIndex(Nz::LuaInstance& lua, int argIndex = 1);
|
||||||
|
|
||||||
|
std::vector<ComponentBinding> m_componentBinding;
|
||||||
|
std::unordered_map<Nz::String, ComponentIndex> m_componentBindingByName;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue