Browse Source

Remove dependency on Lua when LuaJIT is enabled.

Change build option name from ENABLE_LUA_JIT to ENABLE_LUAJIT.
Change tolua++ lua scripts to be compatible with both LuaJIT and Lua. Replace toluabind.c with the corresponding bytecode.
Yao Wei Tjong 姚伟忠 12 years ago
parent
commit
b5836237e9

+ 1 - 1
Docs/GettingStarted.dox

@@ -127,7 +127,7 @@ A number of build options can be defined explicitly when invoking the above cmak
 |---------------------------------------------|---------------------|
 |-DENABLE_64BIT=1                             |to enable 64bit build|
 |-DENABLE_LUA=1                               |to enable additional Lua scripting support|
-|-DENABLE_LUA_JIT=1                           |to enable Lua Just-in-time compilation, implied ENABLE_LUA (check its CMakeLists.txt for more options)|
+|-DENABLE_LUAJIT=1                            |to enable Lua Just-in-time compilation, implied ENABLE_LUA (check its CMakeLists.txt for more options)|
 |-DENABLE_SAFE_LUA=1                          |to enable Lua C++ wrapper safety checks|
 |-DENABLE_SAMPLES=1                           |to build the C++ sample applications|
 |-DENABLE_TOOLS=1                             |to build the tools (only useful for Raspberry Pi build because this option is already enabled by default for other Desktop platforms)|

+ 1 - 1
Readme.txt

@@ -369,7 +369,7 @@ cmake_xxxx batch files or shell scripts.
 |----------------------|-------------------------------------------------------|
 |-DENABLE_64BIT=1      |to enable 64bit build                                  |
 |-DENABLE_LUA=1        |to enable additional Lua scripting support             |
-|-DENABLE_LUA_JIT=1    |to enable Lua Just-in-time compilation, implied        |
+|-DENABLE_LUAJIT=1     |to enable Lua Just-in-time compilation, implied        |
 |                      | ENABLE_LUA (check its CMakeLists.txt for more options)|
 |-DENABLE_SAFE_LUA=1   |to enable Lua C++ wrapper safety checks                |
 |-DENABLE_SAMPLES=1    |to build the C++ sample applications                   |

+ 2 - 2
Source/CMake/Modules/Urho3D-CMake-magic.cmake

@@ -378,7 +378,7 @@ macro (setup_macosx_linker_flags LINKER_FLAGS)
     # Framework list to link against 
     set (FLAGS "-framework AudioUnit -framework Carbon -framework Cocoa -framework CoreAudio -framework ForceFeedback -framework IOKit -framework OpenGL -framework CoreServices")
     # LuaJIT specific - extra linker flags for linking against LuaJIT in 64-bit Mac OS X desktop build
-    if (ENABLE_LUA_JIT AND ENABLE_64BIT)
+    if (ENABLE_LUAJIT AND ENABLE_64BIT)
         if (URHO3D_BUILD_TYPE STREQUAL SHARED)
             set (FLAGS "${FLAGS} -image_base 7fff04c4a000")
         else ()
@@ -505,7 +505,7 @@ macro (define_dependency_libs TARGET)
     endif ()
 
     # ThirdParty/LuaJIT external dependency
-    if (ENABLE_LUA_JIT AND ${TARGET} MATCHES LuaJIT|Main)
+    if (ENABLE_LUAJIT AND ${TARGET} MATCHES LuaJIT|Main)
         if (NOT WIN32)
             set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} dl m)
             if (NOT APPLE)

+ 4 - 6
Source/CMakeLists.txt

@@ -61,8 +61,9 @@ if (URHO3D_BUILD_TYPE STREQUAL SHARED)
 endif ()
 
 # Add definition for Lua JIT
-if (ENABLE_LUA_JIT)
-    add_definitions (-DENABLE_LUA_JIT)
+if (ENABLE_LUAJIT)
+    add_definitions (-DENABLE_LUAJIT)
+    set (JIT "JIT")
     # Implied ENABLE_LUA
     set (ENABLE_LUA 1)
 endif ()
@@ -99,11 +100,8 @@ add_subdirectory (ThirdParty/JO)
 # Alternative Lua bindings target
 if (ENABLE_LUA)
     add_definitions (-DENABLE_LUA)
-    add_subdirectory (ThirdParty/Lua)
+    add_subdirectory (ThirdParty/Lua${JIT})
     add_subdirectory (ThirdParty/tolua++/src/lib)
-    if (ENABLE_LUA_JIT)
-        add_subdirectory (ThirdParty/LuaJIT)
-    endif ()
     add_subdirectory (Extras/LuaScript)
 endif ()
 

+ 1 - 1
Source/Engine/Core/ProcessUtils.cpp

@@ -104,7 +104,7 @@ void GetCPUData(struct cpu_id_t* data)
 
 void InitFPU()
 {
-    #if !defined(ENABLE_LUA_JIT) && !defined(ANDROID) && !defined(IOS) && !defined(RASPI) && !defined(__x86_64__) && !defined(_M_AMD64)
+    #if !defined(ENABLE_LUAJIT) && !defined(ANDROID) && !defined(IOS) && !defined(RASPI) && !defined(__x86_64__) && !defined(_M_AMD64)
     // Make sure FPU is in round-to-nearest, single precision mode
     // This ensures Direct3D and OpenGL behave similarly, and all threads behave similarly
     #ifdef _MSC_VER

+ 1 - 1
Source/Engine/Graphics/Direct3D9/D3D9Graphics.cpp

@@ -2220,7 +2220,7 @@ bool Graphics::CreateInterface()
 
 bool Graphics::CreateDevice(unsigned adapter, unsigned deviceType)
 {
-#ifdef ENABLE_LUA_JIT
+#ifdef ENABLE_LUAJIT
     DWORD behaviorFlags = D3DCREATE_FPU_PRESERVE;
 #else
     DWORD behaviorFlags = 0;

+ 2 - 7
Source/Extras/LuaScript/CMakeLists.txt

@@ -49,13 +49,8 @@ file (GLOB H_FILES *.h)
 set (SOURCE_FILES ${CPP_FILES} ${H_FILES} ${GEN_CPP_FILES})
 
 # Define dependency libs
-set (LIBS ../../Engine/Audio ../../Engine/Container ../../Engine/Core ../../Engine/Engine ../../Engine/Graphics ../../Engine/Input ../../Engine/IO ../../Engine/Math ../../Engine/Navigation ../../Engine/Network
-    ../../Engine/Physics ../../Engine/Resource ../../Engine/Scene ../../Engine/UI)
-if (ENABLE_LUA_JIT)
-    set (LIBS ${LIBS} ../../ThirdParty/LuaJIT/src)
-else ()
-    set (LIBS ${LIBS} ../../ThirdParty/Lua/src)
-endif ()
+set (LIBS ../../Engine/Audio ../../Engine/Container ../../Engine/Core ../../Engine/Engine ../../Engine/Graphics ../../Engine/Input ../../Engine/IO ../../ThirdParty/Lua${JIT}/src 
+    ../../Engine/Math ../../Engine/Navigation ../../Engine/Network ../../Engine/Physics ../../Engine/Resource ../../Engine/Scene ../../Engine/UI)
 set (LINK_LIBS_ONLY tolua++_static)
 set (INCLUDE_DIRS_ONLY . ../../ThirdParty/Bullet/src ../../ThirdParty/kNet/include ../../ThirdParty/tolua++/include)
 

+ 2 - 2
Source/ThirdParty/tolua++/src/bin/CMakeLists.txt

@@ -7,12 +7,12 @@ file (GLOB H_FILES *.h)
 set (SOURCE_FILES ${CPP_FILES} ${H_FILES})
 
 # Define dependency libs
-set (LIBS ../../../../ThirdParty/Lua/src)
+set (LIBS ../../../../ThirdParty/Lua${JIT}/src)
 set (LINK_LIBS_ONLY tolua++_static)
-set (INCLUDE_DIRS_ONLY ../../include)
 if (NOT MSVC)
     set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} m)
 endif ()
+set (INCLUDE_DIRS_ONLY ../../include)
 
 # Setup target
 setup_executable ()

+ 16 - 12
Source/ThirdParty/tolua++/src/bin/lua/basic.lua

@@ -10,10 +10,13 @@
 -- the author has no obligation to provide maintenance, support, updates,
 -- enhancements, or modifications.
 
+-- Modified by Yao Wei Tjong for Urho3D
+
 
 -- Basic C types and their corresponding Lua types
 -- All occurrences of "char*" will be replaced by "_cstring",
 -- and all occurrences of "void*" will be replaced by "_userdata"
+
 _basic = {
  ['void'] = '',
  ['char'] = 'number',
@@ -249,21 +252,22 @@ function concat (t,f,l,jstr)
  return s
 end
 
+-- Urho3D: replace deprecated arg usage
 -- concatenate all parameters, following output rules
 function concatparam (line, ...)
  local i=1
- while i<=arg.n do
+ while i<=select("#",...) do
   if _cont and not strfind(_cont,'[%(,"]') and
-     strfind(arg[i],"^[%a_~]") then
+     strfind(select(i,...),"^[%a_~]") then
 	    line = line .. ' '
   end
-  line = line .. arg[i]
-  if arg[i] ~= '' then
-   _cont = strsub(arg[i],-1,-1)
+  line = line .. select(i,...)
+  if select(i,...) ~= '' then
+   _cont = strsub(select(i,...),-1,-1)
   end
   i = i+1
  end
- if strfind(arg[arg.n],"[%/%)%;%{%}]$") then
+ if strfind(select(select("#",...),...),"[%/%)%;%{%}]$") then
   _cont=nil line = line .. '\n'
  end
 	return line
@@ -272,18 +276,18 @@ end
 -- output line
 function output (...)
  local i=1
- while i<=arg.n do
+ while i<=select("#",...) do
   if _cont and not strfind(_cont,'[%(,"]') and
-     strfind(arg[i],"^[%a_~]") then
+     strfind(select(i,...),"^[%a_~]") then
 	    write(' ')
   end
-  write(arg[i])
-  if arg[i] ~= '' then
-   _cont = strsub(arg[i],-1,-1)
+  write((select(i,...)))
+  if select(i,...) ~= '' then
+   _cont = strsub(select(i,...),-1,-1)
   end
   i = i+1
  end
- if strfind(arg[arg.n],"[%/%)%;%{%}]$") then
+ if strfind(select(select("#",...),...),"[%/%)%;%{%}]$") then
   _cont=nil write('\n')
  end
 end

+ 5 - 0
Source/ThirdParty/tolua++/src/bin/lua/compat.lua

@@ -1,3 +1,5 @@
+-- Modified by Yao Wei Tjong for Urho3D
+
 -------------------------------------------------------------------
 -- Real globals
 -- _ALERT
@@ -175,8 +177,10 @@ function appendto (name)
   return f, err, cod
 end
 
+-- Urho3D: replace deprecated arg usage
 function read (...)
   local f = _INPUT
+  local arg = {...} -- quick and dirty fix for LuaJIT without 5.1 compatibility mode for varargs
   if rawtype(arg[1]) == 'userdata' then
     f = tab.remove(arg, 1)
   end
@@ -185,6 +189,7 @@ end
 
 function write (...)
   local f = _OUTPUT
+  local arg = {...} -- quick and dirty fix for LuaJIT without 5.1 compatibility mode for varargs
   if rawtype(arg[1]) == 'userdata' then
     f = tab.remove(arg, 1)
   end

+ 4 - 1
Source/ThirdParty/tolua++/src/bin/lua/declaration.lua

@@ -9,6 +9,8 @@
 -- the author has no obligation to provide maintenance, support, updates,
 -- enhancements, or modifications.
 
+-- Modified by Yao Wei Tjong for Urho3D
+
 
 -- Declaration class
 -- Represents variable, function, or argument declaration.
@@ -521,8 +523,9 @@ function Declaration (s,kind,is_parameter)
   }
  end
 
+ -- Urho3D: comply with stricter escape sequence 
  -- check the form: mod type* name
- local s1 = gsub(s,"(%b\[\])",function (n) return gsub(n,'%*','\1') end)
+ local s1 = gsub(s,"(%b\\[\\])",function (n) return gsub(n,'%*','\1') end)
  t = split_c_tokens(s1,'%*')
  if t.n == 2 then
   t[2] = gsub(t[2],'\1','%*') -- restore * in dimension expression

+ 4 - 1
Source/ThirdParty/tolua++/src/bin/lua/feature.lua

@@ -9,6 +9,8 @@
 -- the author has no obligation to provide maintenance, support, updates,
 -- enhancements, or modifications.
 
+-- Modified by Yao Wei Tjong for Urho3D
+
 
 -- Feature class
 -- Represents the base class of all mapped feature.
@@ -128,11 +130,12 @@ function classFeature:cfuncname (n)
   n = self.parent:cfuncname(n)
  end
 
+ -- Urho3D: comply with stricter escape sequence 
  local fname = self.lname
  if not fname or fname == '' then
  	fname = self.name
  end
-  n = string.gsub(n..'_'.. (fname), "[<>:, \.%*&]", "_")
+  n = string.gsub(n..'_'.. (fname), "[<>:, \\.%*&]", "_")
 
   return n
 end

+ 222 - 209
Source/ThirdParty/tolua++/src/bin/toluabind.c

@@ -1,6 +1,6 @@
 /*
 ** Lua binding: tolua
-** Generated automatically by tolua++-1.0.93 on Thu Sep 19 03:08:45 2013.
+** Generated automatically by tolua++-1.0.93 on Fri Oct 11 01:25:57 2013.
 */
 
 #ifndef __cplusplus
@@ -267,22 +267,26 @@ TOLUA_API int tolua_tolua_open (lua_State* tolua_S)
   114,114, 44, 32, 99,111,100, 10,101,110,100, 10,102,117,110,
    99,116,105,111,110, 32,114,101, 97,100, 32, 40, 46, 46, 46,
    41, 10,108,111, 99, 97,108, 32,102, 32, 61, 32, 95, 73, 78,
-   80, 85, 84, 10,105,102, 32,114, 97,119,116,121,112,101, 40,
-   97,114,103, 91, 49, 93, 41, 32, 61, 61, 32, 39,117,115,101,
-  114,100, 97,116, 97, 39, 32,116,104,101,110, 10,102, 32, 61,
-   32,116, 97, 98, 46,114,101,109,111,118,101, 40, 97,114,103,
-   44, 32, 49, 41, 10,101,110,100, 10,114,101,116,117,114,110,
-   32,102, 58,114,101, 97,100, 40,117,110,112, 97, 99,107, 40,
-   97,114,103, 41, 41, 10,101,110,100, 10,102,117,110, 99,116,
-  105,111,110, 32,119,114,105,116,101, 32, 40, 46, 46, 46, 41,
-   10,108,111, 99, 97,108, 32,102, 32, 61, 32, 95, 79, 85, 84,
-   80, 85, 84, 10,105,102, 32,114, 97,119,116,121,112,101, 40,
-   97,114,103, 91, 49, 93, 41, 32, 61, 61, 32, 39,117,115,101,
-  114,100, 97,116, 97, 39, 32,116,104,101,110, 10,102, 32, 61,
-   32,116, 97, 98, 46,114,101,109,111,118,101, 40, 97,114,103,
-   44, 32, 49, 41, 10,101,110,100, 10,114,101,116,117,114,110,
-   32,102, 58,119,114,105,116,101, 40,117,110,112, 97, 99,107,
-   40, 97,114,103, 41, 41, 10,101,110,100, 45, 45,32
+   80, 85, 84, 10,108,111, 99, 97,108, 32, 97,114,103, 32, 61,
+   32,123, 46, 46, 46,125, 10,105,102, 32,114, 97,119,116,121,
+  112,101, 40, 97,114,103, 91, 49, 93, 41, 32, 61, 61, 32, 39,
+  117,115,101,114,100, 97,116, 97, 39, 32,116,104,101,110, 10,
+  102, 32, 61, 32,116, 97, 98, 46,114,101,109,111,118,101, 40,
+   97,114,103, 44, 32, 49, 41, 10,101,110,100, 10,114,101,116,
+  117,114,110, 32,102, 58,114,101, 97,100, 40,117,110,112, 97,
+   99,107, 40, 97,114,103, 41, 41, 10,101,110,100, 10,102,117,
+  110, 99,116,105,111,110, 32,119,114,105,116,101, 32, 40, 46,
+   46, 46, 41, 10,108,111, 99, 97,108, 32,102, 32, 61, 32, 95,
+   79, 85, 84, 80, 85, 84, 10,108,111, 99, 97,108, 32, 97,114,
+  103, 32, 61, 32,123, 46, 46, 46,125, 10,105,102, 32,114, 97,
+  119,116,121,112,101, 40, 97,114,103, 91, 49, 93, 41, 32, 61,
+   61, 32, 39,117,115,101,114,100, 97,116, 97, 39, 32,116,104,
+  101,110, 10,102, 32, 61, 32,116, 97, 98, 46,114,101,109,111,
+  118,101, 40, 97,114,103, 44, 32, 49, 41, 10,101,110,100, 10,
+  114,101,116,117,114,110, 32,102, 58,119,114,105,116,101, 40,
+  117,110,112, 97, 99,107, 40, 97,114,103, 41, 41, 10,101,110,
+  100, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+  32
   };
   tolua_dobuffer(tolua_S,(char*)B,sizeof(B),"tolua embedded: lua/compat.lua");
   lua_settop(tolua_S, top);
@@ -529,149 +533,157 @@ TOLUA_API int tolua_tolua_open (lua_State* tolua_S)
   102,117,110, 99,116,105,111,110, 32, 99,111,110, 99, 97,116,
   112, 97,114, 97,109, 32, 40,108,105,110,101, 44, 32, 46, 46,
    46, 41, 10,108,111, 99, 97,108, 32,105, 61, 49, 10,119,104,
-  105,108,101, 32,105, 60, 61, 97,114,103, 46,110, 32,100,111,
-   10,105,102, 32, 95, 99,111,110,116, 32, 97,110,100, 32,110,
-  111,116, 32,115,116,114,102,105,110,100, 40, 95, 99,111,110,
-  116, 44, 39, 91, 37, 40, 44, 34, 93, 39, 41, 32, 97,110,100,
-   10,115,116,114,102,105,110,100, 40, 97,114,103, 91,105, 93,
-   44, 34, 94, 91, 37, 97, 95,126, 93, 34, 41, 32,116,104,101,
-  110, 10,108,105,110,101, 32, 61, 32,108,105,110,101, 32, 46,
-   46, 32, 39, 32, 39, 10,101,110,100, 10,108,105,110,101, 32,
-   61, 32,108,105,110,101, 32, 46, 46, 32, 97,114,103, 91,105,
-   93, 10,105,102, 32, 97,114,103, 91,105, 93, 32,126, 61, 32,
-   39, 39, 32,116,104,101,110, 10, 95, 99,111,110,116, 32, 61,
-   32,115,116,114,115,117, 98, 40, 97,114,103, 91,105, 93, 44,
-   45, 49, 44, 45, 49, 41, 10,101,110,100, 10,105, 32, 61, 32,
-  105, 43, 49, 10,101,110,100, 10,105,102, 32,115,116,114,102,
-  105,110,100, 40, 97,114,103, 91, 97,114,103, 46,110, 93, 44,
-   34, 91, 37, 47, 37, 41, 37, 59, 37,123, 37,125, 93, 36, 34,
-   41, 32,116,104,101,110, 10, 95, 99,111,110,116, 61,110,105,
-  108, 32,108,105,110,101, 32, 61, 32,108,105,110,101, 32, 46,
-   46, 32, 39, 92,110, 39, 10,101,110,100, 10,114,101,116,117,
-  114,110, 32,108,105,110,101, 10,101,110,100, 10,102,117,110,
-   99,116,105,111,110, 32,111,117,116,112,117,116, 32, 40, 46,
-   46, 46, 41, 10,108,111, 99, 97,108, 32,105, 61, 49, 10,119,
-  104,105,108,101, 32,105, 60, 61, 97,114,103, 46,110, 32,100,
-  111, 10,105,102, 32, 95, 99,111,110,116, 32, 97,110,100, 32,
-  110,111,116, 32,115,116,114,102,105,110,100, 40, 95, 99,111,
-  110,116, 44, 39, 91, 37, 40, 44, 34, 93, 39, 41, 32, 97,110,
-  100, 10,115,116,114,102,105,110,100, 40, 97,114,103, 91,105,
-   93, 44, 34, 94, 91, 37, 97, 95,126, 93, 34, 41, 32,116,104,
-  101,110, 10,119,114,105,116,101, 40, 39, 32, 39, 41, 10,101,
-  110,100, 10,119,114,105,116,101, 40, 97,114,103, 91,105, 93,
-   41, 10,105,102, 32, 97,114,103, 91,105, 93, 32,126, 61, 32,
-   39, 39, 32,116,104,101,110, 10, 95, 99,111,110,116, 32, 61,
-   32,115,116,114,115,117, 98, 40, 97,114,103, 91,105, 93, 44,
-   45, 49, 44, 45, 49, 41, 10,101,110,100, 10,105, 32, 61, 32,
-  105, 43, 49, 10,101,110,100, 10,105,102, 32,115,116,114,102,
-  105,110,100, 40, 97,114,103, 91, 97,114,103, 46,110, 93, 44,
-   34, 91, 37, 47, 37, 41, 37, 59, 37,123, 37,125, 93, 36, 34,
-   41, 32,116,104,101,110, 10, 95, 99,111,110,116, 61,110,105,
-  108, 32,119,114,105,116,101, 40, 39, 92,110, 39, 41, 10,101,
-  110,100, 10,101,110,100, 10,102,117,110, 99,116,105,111,110,
-   32,103,101,116, 95,112,114,111,112,101,114,116,121, 95,109,
-  101,116,104,111,100,115, 40,112,116,121,112,101, 44, 32,110,
-   97,109,101, 41, 10,105,102, 32,103,101,116, 95,112,114,111,
-  112,101,114,116,121, 95,109,101,116,104,111,100,115, 95,104,
-  111,111,107, 32, 97,110,100, 32,103,101,116, 95,112,114,111,
+  105,108,101, 32,105, 60, 61,115,101,108,101, 99,116, 40, 34,
+   35, 34, 44, 46, 46, 46, 41, 32,100,111, 10,105,102, 32, 95,
+   99,111,110,116, 32, 97,110,100, 32,110,111,116, 32,115,116,
+  114,102,105,110,100, 40, 95, 99,111,110,116, 44, 39, 91, 37,
+   40, 44, 34, 93, 39, 41, 32, 97,110,100, 10,115,116,114,102,
+  105,110,100, 40,115,101,108,101, 99,116, 40,105, 44, 46, 46,
+   46, 41, 44, 34, 94, 91, 37, 97, 95,126, 93, 34, 41, 32,116,
+  104,101,110, 10,108,105,110,101, 32, 61, 32,108,105,110,101,
+   32, 46, 46, 32, 39, 32, 39, 10,101,110,100, 10,108,105,110,
+  101, 32, 61, 32,108,105,110,101, 32, 46, 46, 32,115,101,108,
+  101, 99,116, 40,105, 44, 46, 46, 46, 41, 10,105,102, 32,115,
+  101,108,101, 99,116, 40,105, 44, 46, 46, 46, 41, 32,126, 61,
+   32, 39, 39, 32,116,104,101,110, 10, 95, 99,111,110,116, 32,
+   61, 32,115,116,114,115,117, 98, 40,115,101,108,101, 99,116,
+   40,105, 44, 46, 46, 46, 41, 44, 45, 49, 44, 45, 49, 41, 10,
+  101,110,100, 10,105, 32, 61, 32,105, 43, 49, 10,101,110,100,
+   10,105,102, 32,115,116,114,102,105,110,100, 40,115,101,108,
+  101, 99,116, 40,115,101,108,101, 99,116, 40, 34, 35, 34, 44,
+   46, 46, 46, 41, 44, 46, 46, 46, 41, 44, 34, 91, 37, 47, 37,
+   41, 37, 59, 37,123, 37,125, 93, 36, 34, 41, 32,116,104,101,
+  110, 10, 95, 99,111,110,116, 61,110,105,108, 32,108,105,110,
+  101, 32, 61, 32,108,105,110,101, 32, 46, 46, 32, 39, 92,110,
+   39, 10,101,110,100, 10,114,101,116,117,114,110, 32,108,105,
+  110,101, 10,101,110,100, 10,102,117,110, 99,116,105,111,110,
+   32,111,117,116,112,117,116, 32, 40, 46, 46, 46, 41, 10,108,
+  111, 99, 97,108, 32,105, 61, 49, 10,119,104,105,108,101, 32,
+  105, 60, 61,115,101,108,101, 99,116, 40, 34, 35, 34, 44, 46,
+   46, 46, 41, 32,100,111, 10,105,102, 32, 95, 99,111,110,116,
+   32, 97,110,100, 32,110,111,116, 32,115,116,114,102,105,110,
+  100, 40, 95, 99,111,110,116, 44, 39, 91, 37, 40, 44, 34, 93,
+   39, 41, 32, 97,110,100, 10,115,116,114,102,105,110,100, 40,
+  115,101,108,101, 99,116, 40,105, 44, 46, 46, 46, 41, 44, 34,
+   94, 91, 37, 97, 95,126, 93, 34, 41, 32,116,104,101,110, 10,
+  119,114,105,116,101, 40, 39, 32, 39, 41, 10,101,110,100, 10,
+  119,114,105,116,101, 40, 40,115,101,108,101, 99,116, 40,105,
+   44, 46, 46, 46, 41, 41, 41, 10,105,102, 32,115,101,108,101,
+   99,116, 40,105, 44, 46, 46, 46, 41, 32,126, 61, 32, 39, 39,
+   32,116,104,101,110, 10, 95, 99,111,110,116, 32, 61, 32,115,
+  116,114,115,117, 98, 40,115,101,108,101, 99,116, 40,105, 44,
+   46, 46, 46, 41, 44, 45, 49, 44, 45, 49, 41, 10,101,110,100,
+   10,105, 32, 61, 32,105, 43, 49, 10,101,110,100, 10,105,102,
+   32,115,116,114,102,105,110,100, 40,115,101,108,101, 99,116,
+   40,115,101,108,101, 99,116, 40, 34, 35, 34, 44, 46, 46, 46,
+   41, 44, 46, 46, 46, 41, 44, 34, 91, 37, 47, 37, 41, 37, 59,
+   37,123, 37,125, 93, 36, 34, 41, 32,116,104,101,110, 10, 95,
+   99,111,110,116, 61,110,105,108, 32,119,114,105,116,101, 40,
+   39, 92,110, 39, 41, 10,101,110,100, 10,101,110,100, 10,102,
+  117,110, 99,116,105,111,110, 32,103,101,116, 95,112,114,111,
+  112,101,114,116,121, 95,109,101,116,104,111,100,115, 40,112,
+  116,121,112,101, 44, 32,110, 97,109,101, 41, 10,105,102, 32,
+  103,101,116, 95,112,114,111,112,101,114,116,121, 95,109,101,
+  116,104,111,100,115, 95,104,111,111,107, 32, 97,110,100, 32,
+  103,101,116, 95,112,114,111,112,101,114,116,121, 95,109,101,
+  116,104,111,100,115, 95,104,111,111,107, 40,112,116,121,112,
+  101, 44,110, 97,109,101, 41, 32,116,104,101,110, 10,114,101,
+  116,117,114,110, 32,103,101,116, 95,112,114,111,112,101,114,
+  116,121, 95,109,101,116,104,111,100,115, 95,104,111,111,107,
+   40,112,116,121,112,101, 44, 32,110, 97,109,101, 41, 10,101,
+  110,100, 10,105,102, 32,112,116,121,112,101, 32, 61, 61, 32,
+   34,100,101,102, 97,117,108,116, 34, 32,116,104,101,110, 10,
+  114,101,116,117,114,110, 32, 34,103,101,116, 95, 34, 46, 46,
+  110, 97,109,101, 44, 32, 34,115,101,116, 95, 34, 46, 46,110,
+   97,109,101, 10,101,110,100, 10,105,102, 32,112,116,121,112,
+  101, 32, 61, 61, 32, 34,113,116, 34, 32,116,104,101,110, 10,
+  114,101,116,117,114,110, 32,110, 97,109,101, 44, 32, 34,115,
+  101,116, 34, 46, 46,115,116,114,105,110,103, 46,117,112,112,
+  101,114, 40,115,116,114,105,110,103, 46,115,117, 98, 40,110,
+   97,109,101, 44, 32, 49, 44, 32, 49, 41, 41, 46, 46,115,116,
+  114,105,110,103, 46,115,117, 98, 40,110, 97,109,101, 44, 32,
+   50, 44, 32, 45, 49, 41, 10,101,110,100, 10,105,102, 32,112,
+  116,121,112,101, 32, 61, 61, 32, 34,111,118,101,114,108,111,
+   97,100, 34, 32,116,104,101,110, 10,114,101,116,117,114,110,
+   32,110, 97,109,101, 44,110, 97,109,101, 10,101,110,100, 10,
+  114,101,116,117,114,110, 32,110,105,108, 10,101,110,100, 10,
+  102,117,110, 99,116,105,111,110, 32,112,114,101,112,114,111,
+   99,101,115,115, 95,104,111,111,107, 40,112, 41, 10,101,110,
+  100, 10,102,117,110, 99,116,105,111,110, 32,105,110, 99,108,
+  117,100,101, 95,102,105,108,101, 95,104,111,111,107, 40,116,
+   44, 32,102,105,108,101,110, 97,109,101, 44, 32, 46, 46, 46,
+   41, 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32,
+  112,114,101,112, 97,114,115,101, 95,104,111,111,107, 40,112,
+   97, 99,107, 97,103,101, 41, 10,101,110,100, 10,102,117,110,
+   99,116,105,111,110, 32,112,114,101, 95,111,117,116,112,117,
+  116, 95,104,111,111,107, 40,112, 97, 99,107, 97,103,101, 41,
+   10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32,112,
+  111,115,116, 95,111,117,116,112,117,116, 95,104,111,111,107,
+   40,112, 97, 99,107, 97,103,101, 41, 10,101,110,100, 10,102,
+  117,110, 99,116,105,111,110, 32,103,101,116, 95,112,114,111,
   112,101,114,116,121, 95,109,101,116,104,111,100,115, 95,104,
-  111,111,107, 40,112,116,121,112,101, 44,110, 97,109,101, 41,
-   32,116,104,101,110, 10,114,101,116,117,114,110, 32,103,101,
-  116, 95,112,114,111,112,101,114,116,121, 95,109,101,116,104,
-  111,100,115, 95,104,111,111,107, 40,112,116,121,112,101, 44,
-   32,110, 97,109,101, 41, 10,101,110,100, 10,105,102, 32,112,
-  116,121,112,101, 32, 61, 61, 32, 34,100,101,102, 97,117,108,
-  116, 34, 32,116,104,101,110, 10,114,101,116,117,114,110, 32,
-   34,103,101,116, 95, 34, 46, 46,110, 97,109,101, 44, 32, 34,
-  115,101,116, 95, 34, 46, 46,110, 97,109,101, 10,101,110,100,
-   10,105,102, 32,112,116,121,112,101, 32, 61, 61, 32, 34,113,
-  116, 34, 32,116,104,101,110, 10,114,101,116,117,114,110, 32,
-  110, 97,109,101, 44, 32, 34,115,101,116, 34, 46, 46,115,116,
-  114,105,110,103, 46,117,112,112,101,114, 40,115,116,114,105,
-  110,103, 46,115,117, 98, 40,110, 97,109,101, 44, 32, 49, 44,
-   32, 49, 41, 41, 46, 46,115,116,114,105,110,103, 46,115,117,
-   98, 40,110, 97,109,101, 44, 32, 50, 44, 32, 45, 49, 41, 10,
-  101,110,100, 10,105,102, 32,112,116,121,112,101, 32, 61, 61,
-   32, 34,111,118,101,114,108,111, 97,100, 34, 32,116,104,101,
-  110, 10,114,101,116,117,114,110, 32,110, 97,109,101, 44,110,
-   97,109,101, 10,101,110,100, 10,114,101,116,117,114,110, 32,
+  111,111,107, 40,112,114,111,112,101,114,116,121, 95,116,121,
+  112,101, 44, 32,110, 97,109,101, 41, 10,101,110,100, 10,102,
+  117,110, 99,116,105,111,110, 32,112, 97,114,115,101,114, 95,
+  104,111,111,107, 40,115, 41, 10,114,101,116,117,114,110, 32,
   110,105,108, 10,101,110,100, 10,102,117,110, 99,116,105,111,
-  110, 32,112,114,101,112,114,111, 99,101,115,115, 95,104,111,
-  111,107, 40,112, 41, 10,101,110,100, 10,102,117,110, 99,116,
-  105,111,110, 32,105,110, 99,108,117,100,101, 95,102,105,108,
-  101, 95,104,111,111,107, 40,116, 44, 32,102,105,108,101,110,
-   97,109,101, 44, 32, 46, 46, 46, 41, 10,101,110,100, 10,102,
-  117,110, 99,116,105,111,110, 32,112,114,101,112, 97,114,115,
-  101, 95,104,111,111,107, 40,112, 97, 99,107, 97,103,101, 41,
-   10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32,112,
-  114,101, 95,111,117,116,112,117,116, 95,104,111,111,107, 40,
-  112, 97, 99,107, 97,103,101, 41, 10,101,110,100, 10,102,117,
-  110, 99,116,105,111,110, 32,112,111,115,116, 95,111,117,116,
-  112,117,116, 95,104,111,111,107, 40,112, 97, 99,107, 97,103,
-  101, 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,110,
-   32,103,101,116, 95,112,114,111,112,101,114,116,121, 95,109,
-  101,116,104,111,100,115, 95,104,111,111,107, 40,112,114,111,
-  112,101,114,116,121, 95,116,121,112,101, 44, 32,110, 97,109,
-  101, 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,110,
-   32,112, 97,114,115,101,114, 95,104,111,111,107, 40,115, 41,
-   10,114,101,116,117,114,110, 32,110,105,108, 10,101,110,100,
-   10,102,117,110, 99,116,105,111,110, 32,112,114,101, 95, 99,
-   97,108,108, 95,104,111,111,107, 40,102, 41, 10,101,110,100,
-   10,102,117,110, 99,116,105,111,110, 32,112,111,115,116, 95,
-   99, 97,108,108, 95,104,111,111,107, 40,102, 41, 10,101,110,
-  100, 10,102,117,110, 99,116,105,111,110, 32,112,114,101, 95,
-  114,101,103,105,115,116,101,114, 95,104,111,111,107, 40,112,
-   97, 99,107, 97,103,101, 41, 10,101,110,100, 10,102,117,110,
-   99,116,105,111,110, 32,111,117,116,112,117,116, 95,101,114,
-  114,111,114, 95,104,111,111,107, 40, 46, 46, 46, 41, 10,114,
-  101,116,117,114,110, 32,115,116,114,105,110,103, 46,102,111,
-  114,109, 97,116, 40, 46, 46, 46, 41, 10,101,110,100, 10, 95,
-  112,117,115,104, 95,102,117,110, 99,116,105,111,110,115, 32,
-   61, 32,123,125, 10, 95,105,115, 95,102,117,110, 99,116,105,
-  111,110,115, 32, 61, 32,123,125, 10, 95,116,111, 95,102,117,
-  110, 99,116,105,111,110,115, 32, 61, 32,123,125, 10, 95, 98,
-   97,115,101, 95,112,117,115,104, 95,102,117,110, 99,116,105,
-  111,110,115, 32, 61, 32,123,125, 10, 95, 98, 97,115,101, 95,
-  105,115, 95,102,117,110, 99,116,105,111,110,115, 32, 61, 32,
-  123,125, 10, 95, 98, 97,115,101, 95,116,111, 95,102,117,110,
-   99,116,105,111,110,115, 32, 61, 32,123,125, 10,108,111, 99,
-   97,108, 32,102,117,110, 99,116,105,111,110, 32,115,101, 97,
-  114, 99,104, 95, 98, 97,115,101, 40,116, 44, 32,102,117,110,
-   99,115, 41, 10,108,111, 99, 97,108, 32, 99,108, 97,115,115,
-   32, 61, 32, 95,103,108,111, 98, 97,108, 95, 99,108, 97,115,
-  115,101,115, 91,116, 93, 10,119,104,105,108,101, 32, 99,108,
-   97,115,115, 32,100,111, 10,105,102, 32,102,117,110, 99,115,
-   91, 99,108, 97,115,115, 46,116,121,112,101, 93, 32,116,104,
-  101,110, 10,114,101,116,117,114,110, 32,102,117,110, 99,115,
-   91, 99,108, 97,115,115, 46,116,121,112,101, 93, 10,101,110,
-  100, 10, 99,108, 97,115,115, 32, 61, 32, 95,103,108,111, 98,
-   97,108, 95, 99,108, 97,115,115,101,115, 91, 99,108, 97,115,
-  115, 46, 98,116,121,112,101, 93, 10,101,110,100, 10,114,101,
-  116,117,114,110, 32,110,105,108, 10,101,110,100, 10,102,117,
-  110, 99,116,105,111,110, 32,103,101,116, 95,112,117,115,104,
-   95,102,117,110, 99,116,105,111,110, 40,116, 41, 10,114,101,
-  116,117,114,110, 32, 95,112,117,115,104, 95,102,117,110, 99,
-  116,105,111,110,115, 91,116, 93, 32,111,114, 32,115,101, 97,
-  114, 99,104, 95, 98, 97,115,101, 40,116, 44, 32, 95, 98, 97,
-  115,101, 95,112,117,115,104, 95,102,117,110, 99,116,105,111,
-  110,115, 41, 32,111,114, 32, 34,116,111,108,117, 97, 95,112,
-  117,115,104,117,115,101,114,116,121,112,101, 34, 10,101,110,
-  100, 10,102,117,110, 99,116,105,111,110, 32,103,101,116, 95,
-  116,111, 95,102,117,110, 99,116,105,111,110, 40,116, 41, 10,
-  114,101,116,117,114,110, 32, 95,116,111, 95,102,117,110, 99,
-  116,105,111,110,115, 91,116, 93, 32,111,114, 32,115,101, 97,
-  114, 99,104, 95, 98, 97,115,101, 40,116, 44, 32, 95, 98, 97,
-  115,101, 95,116,111, 95,102,117,110, 99,116,105,111,110,115,
-   41, 32,111,114, 32, 34,116,111,108,117, 97, 95,116,111,117,
-  115,101,114,116,121,112,101, 34, 10,101,110,100, 10,102,117,
-  110, 99,116,105,111,110, 32,103,101,116, 95,105,115, 95,102,
-  117,110, 99,116,105,111,110, 40,116, 41, 10,114,101,116,117,
-  114,110, 32, 95,105,115, 95,102,117,110, 99,116,105,111,110,
-  115, 91,116, 93, 32,111,114, 32,115,101, 97,114, 99,104, 95,
-   98, 97,115,101, 40,116, 44, 32, 95, 98, 97,115,101, 95,105,
-  115, 95,102,117,110, 99,116,105,111,110,115, 41, 32,111,114,
-   32, 34,116,111,108,117, 97, 95,105,115,117,115,101,114,116,
-  121,112,101, 34, 10,101,110,100, 45, 45, 45,32
+  110, 32,112,114,101, 95, 99, 97,108,108, 95,104,111,111,107,
+   40,102, 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,
+  110, 32,112,111,115,116, 95, 99, 97,108,108, 95,104,111,111,
+  107, 40,102, 41, 10,101,110,100, 10,102,117,110, 99,116,105,
+  111,110, 32,112,114,101, 95,114,101,103,105,115,116,101,114,
+   95,104,111,111,107, 40,112, 97, 99,107, 97,103,101, 41, 10,
+  101,110,100, 10,102,117,110, 99,116,105,111,110, 32,111,117,
+  116,112,117,116, 95,101,114,114,111,114, 95,104,111,111,107,
+   40, 46, 46, 46, 41, 10,114,101,116,117,114,110, 32,115,116,
+  114,105,110,103, 46,102,111,114,109, 97,116, 40, 46, 46, 46,
+   41, 10,101,110,100, 10, 95,112,117,115,104, 95,102,117,110,
+   99,116,105,111,110,115, 32, 61, 32,123,125, 10, 95,105,115,
+   95,102,117,110, 99,116,105,111,110,115, 32, 61, 32,123,125,
+   10, 95,116,111, 95,102,117,110, 99,116,105,111,110,115, 32,
+   61, 32,123,125, 10, 95, 98, 97,115,101, 95,112,117,115,104,
+   95,102,117,110, 99,116,105,111,110,115, 32, 61, 32,123,125,
+   10, 95, 98, 97,115,101, 95,105,115, 95,102,117,110, 99,116,
+  105,111,110,115, 32, 61, 32,123,125, 10, 95, 98, 97,115,101,
+   95,116,111, 95,102,117,110, 99,116,105,111,110,115, 32, 61,
+   32,123,125, 10,108,111, 99, 97,108, 32,102,117,110, 99,116,
+  105,111,110, 32,115,101, 97,114, 99,104, 95, 98, 97,115,101,
+   40,116, 44, 32,102,117,110, 99,115, 41, 10,108,111, 99, 97,
+  108, 32, 99,108, 97,115,115, 32, 61, 32, 95,103,108,111, 98,
+   97,108, 95, 99,108, 97,115,115,101,115, 91,116, 93, 10,119,
+  104,105,108,101, 32, 99,108, 97,115,115, 32,100,111, 10,105,
+  102, 32,102,117,110, 99,115, 91, 99,108, 97,115,115, 46,116,
+  121,112,101, 93, 32,116,104,101,110, 10,114,101,116,117,114,
+  110, 32,102,117,110, 99,115, 91, 99,108, 97,115,115, 46,116,
+  121,112,101, 93, 10,101,110,100, 10, 99,108, 97,115,115, 32,
+   61, 32, 95,103,108,111, 98, 97,108, 95, 99,108, 97,115,115,
+  101,115, 91, 99,108, 97,115,115, 46, 98,116,121,112,101, 93,
+   10,101,110,100, 10,114,101,116,117,114,110, 32,110,105,108,
+   10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32,103,
+  101,116, 95,112,117,115,104, 95,102,117,110, 99,116,105,111,
+  110, 40,116, 41, 10,114,101,116,117,114,110, 32, 95,112,117,
+  115,104, 95,102,117,110, 99,116,105,111,110,115, 91,116, 93,
+   32,111,114, 32,115,101, 97,114, 99,104, 95, 98, 97,115,101,
+   40,116, 44, 32, 95, 98, 97,115,101, 95,112,117,115,104, 95,
+  102,117,110, 99,116,105,111,110,115, 41, 32,111,114, 32, 34,
+  116,111,108,117, 97, 95,112,117,115,104,117,115,101,114,116,
+  121,112,101, 34, 10,101,110,100, 10,102,117,110, 99,116,105,
+  111,110, 32,103,101,116, 95,116,111, 95,102,117,110, 99,116,
+  105,111,110, 40,116, 41, 10,114,101,116,117,114,110, 32, 95,
+  116,111, 95,102,117,110, 99,116,105,111,110,115, 91,116, 93,
+   32,111,114, 32,115,101, 97,114, 99,104, 95, 98, 97,115,101,
+   40,116, 44, 32, 95, 98, 97,115,101, 95,116,111, 95,102,117,
+  110, 99,116,105,111,110,115, 41, 32,111,114, 32, 34,116,111,
+  108,117, 97, 95,116,111,117,115,101,114,116,121,112,101, 34,
+   10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32,103,
+  101,116, 95,105,115, 95,102,117,110, 99,116,105,111,110, 40,
+  116, 41, 10,114,101,116,117,114,110, 32, 95,105,115, 95,102,
+  117,110, 99,116,105,111,110,115, 91,116, 93, 32,111,114, 32,
+  115,101, 97,114, 99,104, 95, 98, 97,115,101, 40,116, 44, 32,
+   95, 98, 97,115,101, 95,105,115, 95,102,117,110, 99,116,105,
+  111,110,115, 41, 32,111,114, 32, 34,116,111,108,117, 97, 95,
+  105,115,117,115,101,114,116,121,112,101, 34, 10,101,110,100,
+   45, 45, 45,32
   };
   tolua_dobuffer(tolua_S,(char*)B,sizeof(B),"tolua embedded: lua/basic.lua");
   lua_settop(tolua_S, top);
@@ -813,8 +825,8 @@ TOLUA_API int tolua_tolua_open (lua_State* tolua_S)
   110,100, 10,110, 32, 61, 32,115,116,114,105,110,103, 46,103,
   115,117, 98, 40,110, 46, 46, 39, 95, 39, 46, 46, 32, 40,102,
   110, 97,109,101, 41, 44, 32, 34, 91, 60, 62, 58, 44, 32, 92,
-   46, 37, 42, 38, 93, 34, 44, 32, 34, 95, 34, 41, 10,114,101,
-  116,117,114,110, 32,110, 10,101,110,100, 45, 45, 45, 45, 45,
+   92, 46, 37, 42, 38, 93, 34, 44, 32, 34, 95, 34, 41, 10,114,
+  101,116,117,114,110, 32,110, 10,101,110,100, 45, 45, 45, 45,
    45, 45, 45, 45, 45, 45,32
   };
   tolua_dobuffer(tolua_S,(char*)B,sizeof(B),"tolua embedded: lua/feature.lua");
@@ -3435,59 +3447,60 @@ TOLUA_API int tolua_tolua_open (lua_State* tolua_S)
   115, 95,112, 97,114, 97,109,101,116,101,114, 44, 10,107,105,
   110,100, 32, 61, 32,107,105,110,100, 10,125, 10,101,110,100,
    10,108,111, 99, 97,108, 32,115, 49, 32, 61, 32,103,115,117,
-   98, 40,115, 44, 34, 40, 37, 98, 92, 91, 92, 93, 41, 34, 44,
-  102,117,110, 99,116,105,111,110, 32, 40,110, 41, 32,114,101,
-  116,117,114,110, 32,103,115,117, 98, 40,110, 44, 39, 37, 42,
-   39, 44, 39, 92, 49, 39, 41, 32,101,110,100, 41, 10,116, 32,
-   61, 32,115,112,108,105,116, 95, 99, 95,116,111,107,101,110,
-  115, 40,115, 49, 44, 39, 37, 42, 39, 41, 10,105,102, 32,116,
-   46,110, 32, 61, 61, 32, 50, 32,116,104,101,110, 10,116, 91,
-   50, 93, 32, 61, 32,103,115,117, 98, 40,116, 91, 50, 93, 44,
-   39, 92, 49, 39, 44, 39, 37, 42, 39, 41, 10,108,111, 99, 97,
-  108, 32,109, 32, 61, 32,115,112,108,105,116, 95, 99, 95,116,
-  111,107,101,110,115, 40,116, 91, 49, 93, 44, 39, 37,115, 43,
-   39, 41, 10,114,101,116,117,114,110, 32, 95, 68,101, 99,108,
-   97,114, 97,116,105,111,110,123, 10,110, 97,109,101, 32, 61,
-   32,116, 91, 50, 93, 46, 46,116,109,112,100,101,102, 44, 10,
-  112,116,114, 32, 61, 32, 39, 42, 39, 44, 10,116,121,112,101,
-   32, 61, 32,109, 91,109, 46,110, 93, 44, 10,109,111,100, 32,
-   61, 32, 99,111,110, 99, 97,116, 40,109, 44, 49, 44,109, 46,
-  110, 45, 49, 41, 32, 44, 10,105,115, 95,112, 97,114, 97,109,
-  101,116,101,114, 32, 61, 32,105,115, 95,112, 97,114, 97,109,
-  101,116,101,114, 44, 10,107,105,110,100, 32, 61, 32,107,105,
-  110,100, 10,125, 10,101,110,100, 10,105,102, 32,107,105,110,
-  100, 32, 61, 61, 32, 39,118, 97,114, 39, 32,116,104,101,110,
-   10,116, 32, 61, 32,115,112,108,105,116, 95, 99, 95,116,111,
-  107,101,110,115, 40,115, 44, 39, 37,115, 43, 39, 41, 10,108,
-  111, 99, 97,108, 32,118, 10,105,102, 32,102,105,110,100,116,
-  121,112,101, 40,116, 91,116, 46,110, 93, 41, 32,116,104,101,
-  110, 32,118, 32, 61, 32, 99,114,101, 97,116,101, 95,118, 97,
-  114,110, 97,109,101, 40, 41, 32,101,108,115,101, 32,118, 32,
-   61, 32,116, 91,116, 46,110, 93, 59, 32,116, 46,110, 32, 61,
-   32,116, 46,110, 45, 49, 32,101,110,100, 10,114,101,116,117,
-  114,110, 32, 95, 68,101, 99,108, 97,114, 97,116,105,111,110,
-  123, 10,110, 97,109,101, 32, 61, 32,118, 46, 46,116,109,112,
-  100,101,102, 44, 10,116,121,112,101, 32, 61, 32,116, 91,116,
-   46,110, 93, 44, 10,109,111,100, 32, 61, 32, 99,111,110, 99,
-   97,116, 40,116, 44, 49, 44,116, 46,110, 45, 49, 41, 44, 10,
-  105,115, 95,112, 97,114, 97,109,101,116,101,114, 32, 61, 32,
-  105,115, 95,112, 97,114, 97,109,101,116,101,114, 44, 10,107,
-  105,110,100, 32, 61, 32,107,105,110,100, 10,125, 10,101,108,
-  115,101, 10,116, 32, 61, 32,115,112,108,105,116, 95, 99, 95,
+   98, 40,115, 44, 34, 40, 37, 98, 92, 92, 91, 92, 92, 93, 41,
+   34, 44,102,117,110, 99,116,105,111,110, 32, 40,110, 41, 32,
+  114,101,116,117,114,110, 32,103,115,117, 98, 40,110, 44, 39,
+   37, 42, 39, 44, 39, 92, 49, 39, 41, 32,101,110,100, 41, 10,
+  116, 32, 61, 32,115,112,108,105,116, 95, 99, 95,116,111,107,
+  101,110,115, 40,115, 49, 44, 39, 37, 42, 39, 41, 10,105,102,
+   32,116, 46,110, 32, 61, 61, 32, 50, 32,116,104,101,110, 10,
+  116, 91, 50, 93, 32, 61, 32,103,115,117, 98, 40,116, 91, 50,
+   93, 44, 39, 92, 49, 39, 44, 39, 37, 42, 39, 41, 10,108,111,
+   99, 97,108, 32,109, 32, 61, 32,115,112,108,105,116, 95, 99,
+   95,116,111,107,101,110,115, 40,116, 91, 49, 93, 44, 39, 37,
+  115, 43, 39, 41, 10,114,101,116,117,114,110, 32, 95, 68,101,
+   99,108, 97,114, 97,116,105,111,110,123, 10,110, 97,109,101,
+   32, 61, 32,116, 91, 50, 93, 46, 46,116,109,112,100,101,102,
+   44, 10,112,116,114, 32, 61, 32, 39, 42, 39, 44, 10,116,121,
+  112,101, 32, 61, 32,109, 91,109, 46,110, 93, 44, 10,109,111,
+  100, 32, 61, 32, 99,111,110, 99, 97,116, 40,109, 44, 49, 44,
+  109, 46,110, 45, 49, 41, 32, 44, 10,105,115, 95,112, 97,114,
+   97,109,101,116,101,114, 32, 61, 32,105,115, 95,112, 97,114,
+   97,109,101,116,101,114, 44, 10,107,105,110,100, 32, 61, 32,
+  107,105,110,100, 10,125, 10,101,110,100, 10,105,102, 32,107,
+  105,110,100, 32, 61, 61, 32, 39,118, 97,114, 39, 32,116,104,
+  101,110, 10,116, 32, 61, 32,115,112,108,105,116, 95, 99, 95,
   116,111,107,101,110,115, 40,115, 44, 39, 37,115, 43, 39, 41,
-   10,108,111, 99, 97,108, 32,118, 32, 61, 32,116, 91,116, 46,
-  110, 93, 10,108,111, 99, 97,108, 32,116,112, 44,109,100, 10,
-  105,102, 32,116, 46,110, 62, 49, 32,116,104,101,110, 10,116,
-  112, 32, 61, 32,116, 91,116, 46,110, 45, 49, 93, 10,109,100,
-   32, 61, 32, 99,111,110, 99, 97,116, 40,116, 44, 49, 44,116,
-   46,110, 45, 50, 41, 10,101,110,100, 10,114,101,116,117,114,
-  110, 32, 95, 68,101, 99,108, 97,114, 97,116,105,111,110,123,
-   10,110, 97,109,101, 32, 61, 32,118, 44, 10,116,121,112,101,
-   32, 61, 32,116,112, 44, 10,109,111,100, 32, 61, 32,109,100,
+   10,108,111, 99, 97,108, 32,118, 10,105,102, 32,102,105,110,
+  100,116,121,112,101, 40,116, 91,116, 46,110, 93, 41, 32,116,
+  104,101,110, 32,118, 32, 61, 32, 99,114,101, 97,116,101, 95,
+  118, 97,114,110, 97,109,101, 40, 41, 32,101,108,115,101, 32,
+  118, 32, 61, 32,116, 91,116, 46,110, 93, 59, 32,116, 46,110,
+   32, 61, 32,116, 46,110, 45, 49, 32,101,110,100, 10,114,101,
+  116,117,114,110, 32, 95, 68,101, 99,108, 97,114, 97,116,105,
+  111,110,123, 10,110, 97,109,101, 32, 61, 32,118, 46, 46,116,
+  109,112,100,101,102, 44, 10,116,121,112,101, 32, 61, 32,116,
+   91,116, 46,110, 93, 44, 10,109,111,100, 32, 61, 32, 99,111,
+  110, 99, 97,116, 40,116, 44, 49, 44,116, 46,110, 45, 49, 41,
    44, 10,105,115, 95,112, 97,114, 97,109,101,116,101,114, 32,
    61, 32,105,115, 95,112, 97,114, 97,109,101,116,101,114, 44,
    10,107,105,110,100, 32, 61, 32,107,105,110,100, 10,125, 10,
-  101,110,100, 10,101,110,100, 45, 45,32
+  101,108,115,101, 10,116, 32, 61, 32,115,112,108,105,116, 95,
+   99, 95,116,111,107,101,110,115, 40,115, 44, 39, 37,115, 43,
+   39, 41, 10,108,111, 99, 97,108, 32,118, 32, 61, 32,116, 91,
+  116, 46,110, 93, 10,108,111, 99, 97,108, 32,116,112, 44,109,
+  100, 10,105,102, 32,116, 46,110, 62, 49, 32,116,104,101,110,
+   10,116,112, 32, 61, 32,116, 91,116, 46,110, 45, 49, 93, 10,
+  109,100, 32, 61, 32, 99,111,110, 99, 97,116, 40,116, 44, 49,
+   44,116, 46,110, 45, 50, 41, 10,101,110,100, 10,114,101,116,
+  117,114,110, 32, 95, 68,101, 99,108, 97,114, 97,116,105,111,
+  110,123, 10,110, 97,109,101, 32, 61, 32,118, 44, 10,116,121,
+  112,101, 32, 61, 32,116,112, 44, 10,109,111,100, 32, 61, 32,
+  109,100, 44, 10,105,115, 95,112, 97,114, 97,109,101,116,101,
+  114, 32, 61, 32,105,115, 95,112, 97,114, 97,109,101,116,101,
+  114, 44, 10,107,105,110,100, 32, 61, 32,107,105,110,100, 10,
+  125, 10,101,110,100, 10,101,110,100, 45, 45, 45, 45, 45, 45,
+   45, 45, 45, 45, 45, 45, 45, 45, 45, 45,32
   };
   tolua_dobuffer(tolua_S,(char*)B,sizeof(B),"tolua embedded: lua/declaration.lua");
   lua_settop(tolua_S, top);

+ 1 - 1
Source/ThirdParty/tolua++/src/bin/toluabind.h

@@ -1,6 +1,6 @@
 /*
 ** Lua binding: tolua
-** Generated automatically by tolua++-1.0.93 on Thu Sep 19 03:08:46 2013.
+** Generated automatically by tolua++-1.0.93 on Fri Oct 11 01:25:57 2013.
 */
 
 /* Exported function */

+ 1 - 1
Source/ThirdParty/tolua++/src/lib/CMakeLists.txt

@@ -7,7 +7,7 @@ file (GLOB H_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h)
 set (SOURCE_FILES ${CPP_FILES} ${H_FILES})
 
 # Define dependency libs
-set (INCLUDE_DIRS_ONLY ../../include ../../../Lua/src)
+set (INCLUDE_DIRS_ONLY ../../include ../../../Lua${JIT}/src)
 
 # Setup target
 setup_library ()