Added lua.cpp and lua.h for basic lua functionality. Nothing works as of yet.
Fixed makefile and compiles proper now
Added console command to execute lua script
Hooked lua function properly
Added helper function to register lua library functions easily
Added lua function to write to console
Added lua function to execute console commands
Console::execute pushes the executed line instead of when entered is pressed.
This allows for console commands executed by Lua to be recorded.
lua_State in LUA console command is now persistent
Renamed test lib to game lib
Console commands are now owned by the console. The console is responsible for managing and deleting the console commands.
The purpose of this is to allow Lua to hook custom console commands.
It is now possible to hook lua functions to the console. Arguments to the function will be sent to the Lua function.
Created workaround so that the lua console command gets deleted last, preventing segfaults when the game is closing
The console no longer accepts duplicate commands
Added try-catch for executing commands so if an exception is thrown during exception, it prevented future scripts from being executed
Textures can be loaded from lua via game.loadTexture.
Further testing required to make sure it works properly.
Added Texture metatable to free memory
Added lua function for texture to return the size of the image
Renamed lua::Texture to lua::Image and added sf::Sprite to it.
Implemented the majority of sf::Sprite's sf::Transformable functions to Lua.
It is now possible to display images from Lua to the screen. Pretty hacky solution.