Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2011-11-01 | use Lua::registerInitFunction to simplify some parts of code | Pavel Labath | 1 | -25/+22 | |
2011-11-01 | Make lua resource manager automatically initialize lua state if needed | Pavel Labath | 1 | -0/+5 | |
2011-11-01 | Add a function for converting from XResources to lua ones | Pavel Labath | 1 | -0/+16 | |
2011-11-01 | Factor out "session." from resource names | Pavel Labath | 1 | -2/+2 | |
this reduces typing and it makes more sense in lua, since there the resources are implemented as hierarchical tables and the topmost table has to be handled a bit specially. | |||||
2011-11-01 | Move more common stuff of (L)ResourceManagers to their base class | Pavel Labath | 1 | -27/+2 | |
2011-11-01 | A rough version of resource implementation in lua | Pavel Labath | 1 | -0/+163 | |
I added a new class, LResourceManager, which should handle loading and saving of resources like the old ResourceManager, only it does that with the help of lua. I moved the common features of the two managers (interface + a few functions) to a common base class ResourceManager_base. I augmented the Resource_base class with two new functions (setFromLua and pushToLua) which are used by the lua RM instead of getString and setFromString. Parts of the new RM are written in lua. To avoid loading scripts from a file at runtime I decided to link compiled lua code straight into the executable. For this purpose I created a small script which converts a binary file into a declaration of a C array of bytes. |