OLD | NEW |
(Empty) | |
| 1 --- Helper script for generating bindings with tolua++ |
| 2 -- This file is based on the file of the same name which ships |
| 3 -- as part of cocos2dx. |
| 4 -- example usage: |
| 5 -- tolua++ -L tolua_preload.lua -o LuaCocos2d.cpp Cocos2d.pkg |
| 6 |
| 7 _is_functions = _is_functions or {} |
| 8 _to_functions = _to_functions or {} |
| 9 _push_functions = _push_functions or {} |
| 10 |
| 11 local CCObjectTypes = { |
| 12 "CCPhysicsSprite", |
| 13 } |
| 14 |
| 15 -- register CCObject types |
| 16 for i = 1, #CCObjectTypes do |
| 17 _push_functions[CCObjectTypes[i]] = "toluafix_pushusertype_ccobject" |
| 18 end |
| 19 |
| 20 -- register LUA_FUNCTION, LUA_TABLE, LUA_HANDLE type |
| 21 _to_functions["LUA_FUNCTION"] = "toluafix_ref_function" |
| 22 _is_functions["LUA_FUNCTION"] = "toluafix_isfunction" |
| 23 _to_functions["LUA_TABLE"] = "toluafix_totable" |
| 24 _is_functions["LUA_TABLE"] = "toluafix_istable" |
OLD | NEW |