Functions Called by Main Program
Greetings,
I was browsing through the Lua code recently released in the engine test and took specific note of the OnProcessMove function in the Player file which seems to handle user input. I searched all the other Lua files and found that it is not called by anything. My only guess is that it is called somewhere in the main exe. I assume that certain functions are called by the main exe and thus are the "start" points for all Lua code.
Am I right in this assumption?
I was browsing through the Lua code recently released in the engine test and took specific note of the OnProcessMove function in the Player file which seems to handle user input. I searched all the other Lua files and found that it is not called by anything. My only guess is that it is called somewhere in the main exe. I assume that certain functions are called by the main exe and thus are the "start" points for all Lua code.
Am I right in this assumption?
Comments
I was browsing through the Lua code recently released in the engine test and took specific note of the OnProcessMove function in the Player file which seems to handle user input. I searched all the other Lua files and found that it is not called by anything. My only guess is that it is called somewhere in the main exe. I assume that certain functions are called by the main exe and thus are the "start" points for all Lua code.
Am I right in this assumption?<!--QuoteEnd--></div><!--QuoteEEnd-->
lua can be loaded as a C library, so the actual heavy lifting on the low level is done in C++, and several key functions are likely bound from inside the actual C-layer of the engine
By bound do you mean utilized by the actual c++ code?
And is it possible to determine which functions are actually utilized by the C++ code without looking at the source code?
And is it possible to determine which functions are actually utilized by the C++ code without looking at the source code?<!--QuoteEnd--></div><!--QuoteEEnd-->
Easiest is top open all the lua files in a program like Notepad++ then search across all files for a specific function name E.g. OnProcessMove
If you can't find the function being called anywhere else its either not in use or called by the C++ code. Should be obvious which is the case based on what the function does.
I don't know of any way to generate a full list or anything like that.
If someone from UWE could comment on their stance I'd be most interested to hear it!
I think they will protect some behaviour, so don't expect anything you make now to work in any other version of the game