| --- 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" |