62 rindas
1.2 KiB

  1. //
  2. // Lol Engine
  3. //
  4. // Copyright: (c) 2010-2013 Sam Hocevar <sam@hocevar.net>
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the Do What The Fuck You Want To
  7. // Public License, Version 2, as published by Sam Hocevar. See
  8. // http://www.wtfpl.net/ for more details.
  9. //
  10. #include <lol/engine-internal.h>
  11. #include <cstring>
  12. #include <cstdlib>
  13. #include <ctype.h>
  14. //#include "lua/lua.hpp"
  15. namespace lol
  16. {
  17. /*
  18. * World implementation class
  19. */
  20. class WorldData
  21. {
  22. friend class World;
  23. lua_State *m_lua_state;
  24. };
  25. static WorldData g_world_data;
  26. World g_world;
  27. /*
  28. * Public World class
  29. */
  30. const luaL_Reg test1Lua::m_statics[] = { { "getTest", test1Lua::getTest }, { NULL, NULL } };
  31. const luaL_Reg test1Lua::m_methods[] = { { NULL, NULL } };
  32. const char test1Lua::m_class[] = "test1";
  33. World::World()
  34. : LuaLoader()
  35. {
  36. g_world_data.m_lua_state = GetLuaState();
  37. //------ DEBUG TEST
  38. //m_test1.LoadTo(GetLuaState());
  39. //luaL_loadfile(GetLuaState(), "lua/init.lua");
  40. //LuaVar<int32_t> var(GetLuaState(), 1);
  41. //test1Lua::Library m_test1(GetLuaState());
  42. //------ DEBUG TEST
  43. }
  44. World::~World()
  45. {
  46. }
  47. } /* namespace lol */