Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Lua bindings and library (Revolutionary-Games#511)
* Updated setup script * Removed lua and luabind. Replaced with luajit and sol. Didn't change the code to use it yet * Added luajit to cmake * Moved individual script_bindings files' contents to script_initializer * Changed luabind forward declarations to sol forward declarations * Now ignoring a bunch of warnings so that sol.hpp can be included * Started fixing things to use sol, again this time not moving binding methods to a single file * System wrapper for lua. First few bindings done * More bindings * Collision filter fixed. .collisions now returns a table and works a bit differently * More wrapper updates * Tried to made wrappers more ready to use default values * Moving component stuff to use the new lua wrapper * Fixed some more wrappers * Hooked up engine to new lua stuff. More basic wrappers * Possibly not-optimal Component bindings * Created new compound registry bindings * Working on final script bindings Only some Ogre classes haven't been updated yet * Finished the largest file with new bindings, perhaps could be split * Thrive main library now compiles. tests still need fixing * Updated ogre tests, everything now compiles * Played around a bit with error reporting from lua * Fixed the first few classes for the new bindings * Added SystemWrapper bindings * Added system class creation helper * Fixing lua scripts for new things * Engine now more carefully casts things to Systems * Added a new Bullet physics wrapper * Started adding Lua replacements of C++ GameState and Engine * Lua fixes * Added luabindings for Game * Removed stuff that is now in lua from the C++ side * Started moving stuff from C++ to Lua and creating wrappers for C++ code to use Fixing lua scripts and creating wrappers for C++ to use * Renamed GameState to GameStateData * Moved stuff from engine.cpp to lua engine Also fixed compiling entity.cpp * Updated to new GameStateData * C++ now compiles. Lua files are still a mess * Finished reimplementing the removed c++ stuff in lua Switched lua classes to use "create" method as a constructor so now "init" can be used like before * First Lua systems can now be created without errors There are still bunch of lua scripts that need fixing * Updated sol library * Exposed ComponentWrapper to Lua * Fixed engine binding things as sol::var when they should have been sol::property * Fixed Component registering from Lua * Rewrote microbe ai classes for new sol bindings * Added notes about changed things Fixed species_system.lua. There was an improperly formatted function call in this file, I added an explanation to the notes on how to fix this * Lua stacktraces now don't include the top most entry the entry was always [C]:-1 so it wasn't very helpful * Fixed Component::TYPE_ID access from Lua * Removed some old systems code * Fixed indentation * Updated examples * Updated more Lua files to use new classes * Added missing call to .new on EntityFilter * Added missing call to ScriptEntityFilter bindings * The engine now stops loading Lua scripts after the first failed file * Exposed correct constructor for PowerupSystem * More fixes to Lua files * Added cmake argument LUA_CHECKS which enables more lua debug checks Also the linuxrelease refuses to build if LUA_CHECKS is on * Updated Entity documentation * Exposed EntityManager to Lua * Updated systems to have a proper init method and added base classes to some systems * Added some lua class checks and some notes about usage * Rewrote some more Lua scripts to use new classes * Some random formatting change * Added get method for current GameState to Engine * Fixed C++ systems that relied on broken Entity constructors * Added table call constructors for some Ogre types * Changed the lua error functions slightly * Fixed some lua bindings being wrong * Still fixing lua scripts * Removed old system that doesn't even work with Ogre 2.0 * Added missing Touchable bases to RigidBodyComponent * shutdown is now called even if an error occurs * cleanup * Replaced entity addComponent luabindings * C++ components now expose a factory to lua. Also updated entity to accept the factory constructed c++ stuff * Renamed factory functions to be just 'new' * Lua fixed class calls * Added an unwrap function to lua * Collision shapes now properly use factories to create shared_ptrs * Components now share a macro for binding common things. + Added the component "castFrom" function * Fixed Microbe not casting accessed Components to their subclasses * All setup code now runs. But the game crashes just after entering the main loop * Fixed moving temporary prevents copy elision * Fixed engine shutdown causing a crash CEGUIWIndow is now a factory, because probably CEGUI will delete the window with its parent GameStateData owning the SceneManager checks is ogre still valid before destructing * Formatting change. Main loop now starts * Fixed reading thrive version when the file was one folder up * Fixed startup message thrive version * Exposed rootGuiWindow again * Added processRemovals to EntityManager Lua bindings * Exposed paused Engine property to Lua * Thrive now starts and shows the menu correctly! * Made FPS counter actually accurate * Made Game time utilities take things by reference * Added frame time counting to FPS counter * Added a convenience getComponent lua function * Switched fixes to use the new convenience getComponent * Made Components use cheaper casts when accessed from Lua * Various lua binding fixes and lua updates to use new classes * setup now attempts to set LUAJIT_ENABLE_LUA52COMPAT on in luajit makefile * Fixed microbe spawn function not correctly attempting to spawn a cell Also removed slightly confusing call constructor that isn't actually used all that often * Microbe editor can now be entered * Added a workaround for crash after loading save * Fixed container bindings to accept "get" without default value * Exposed EntityManager methods required for saving/loading * Restored intro video * Systems no longer have an enabled property, GameState already manages which ones to run Fixed saving and loading * Changed to use the new class syntax * Everything now mostly work There's just 3 cells just after splitting and all the compounds drain out of cells immediately (and there's a workaround to a crash in restoring sounds after loading game) * Fixed bug venting everything Current bugs: 3 cells spawn after dividing when tutorial is completed and after that (but not when tutorial is skipped) If tutorial is complete and the game is started again from the main menu and the tutorial is skipped the game crashes. Also other way around works: if you first play normally and then play the tutorial the game crashes when exiting the editor. * Fixed including sol directly * Removed unneeded lua link creation * Fixed packaging script and included librtmp in releases * Updated SOL CEGUIWindow is now a basic usertype, which can be used as an example if others need to be converted * Updated CEGUI version * Added a few more libraries Narotiza mentioned being missing * Windows support for luajit * Fixed setup system not being configured to pull updates * Updated sol to fix compile errors * Updated CEGUI version also some cleanup on CEGUIVideoPlayer * Added option to profile Lua memory usage * Split some really long lines * Lua now automatically sets the version number in the GUI * Removed Cg program manager from CMakeLists and added a better error for missing Ogre plugins * Removed more references to CgProgramManager plugin * Added a cscope indexing script * Added a commented out debugging line * Fixed Lua errors caused by the earlier merge also removed some process speed things from bio_process_registry.cpp * Workaround for compile errors due to disagreement regarding cegui version
- Loading branch information