axmol/tools/tolua++/README

24 lines
908 B
Plaintext

1. Generating the lua<-->C bindings with tolua++
Build scripts for windows (build.bat) and unix (build.sh) are provided
to generate the relevant files after modifying the .pkg files. These
scripts basically run the following command:
tolua++.exe -L basic.lua -o LuaCocos2d.cpp Cocos2d.pkg
This will generate the bindings file and patch it with come cocos2dx
specific modifications.
On POSIX systems you can also just run "make" to build the bindings
if/when you change .pkg files.
2. Writing .pkg files
1) enum keeps the same
2) remove CC_DLL for the class defines, pay attention to multi inherites
3) remove inline keyword for declaration and implementation
4) remove public protect and private
5) remove the decalration of class member variable
6) keep static keyword
7) remove memeber functions that declared as private or protected