| Index: nacltoons/bindings/tolua_preload.lua
|
| diff --git a/nacltoons/bindings/tolua_preload.lua b/nacltoons/bindings/tolua_preload.lua
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3cc2019e193de304edd0ae5dca2f8023a16f46eb
|
| --- /dev/null
|
| +++ b/nacltoons/bindings/tolua_preload.lua
|
| @@ -0,0 +1,24 @@
|
| +--- Helper script for generating bindings with tolua++
|
| +-- This file is based on the file of the same name which ships
|
| +-- as part of cocos2dx.
|
| +-- example usage:
|
| +-- tolua++ -L tolua_preload.lua -o LuaCocos2d.cpp Cocos2d.pkg
|
| +
|
| +_is_functions = _is_functions or {}
|
| +_to_functions = _to_functions or {}
|
| +_push_functions = _push_functions or {}
|
| +
|
| +local CCObjectTypes = {
|
| + "CCPhysicsSprite",
|
| +}
|
| +
|
| +-- register CCObject types
|
| +for i = 1, #CCObjectTypes do
|
| + _push_functions[CCObjectTypes[i]] = "toluafix_pushusertype_ccobject"
|
| +end
|
| +
|
| +-- register LUA_FUNCTION, LUA_TABLE, LUA_HANDLE type
|
| +_to_functions["LUA_FUNCTION"] = "toluafix_ref_function"
|
| +_is_functions["LUA_FUNCTION"] = "toluafix_isfunction"
|
| +_to_functions["LUA_TABLE"] = "toluafix_totable"
|
| +_is_functions["LUA_TABLE"] = "toluafix_istable"
|
|
|