Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2011-07-08 | Lua: Make global variables read-only | Pavel Labath | 1 | -1/+1 | |
This prevents the user from inadvertently overwriting e.g. the session table and then wondering why it does not work. I'm still not sure about this approach, as it's not 100% secure (the script can still use raw access to mess with it) and it adds some overhead to any operation referencing a global variable. | |||||
2011-06-19 | Fix saving of resources. | Pavel Labath | 1 | -29/+66 | |
2011-06-16 | Fix bug in LResources: they were unable to handle resources with numbers in ↵ | Pavel Labath | 1 | -6/+6 | |
names | |||||
2011-06-15 | Lua resources: Add support for saving of boolean values | Pavel Labath | 1 | -6/+15 | |
2011-06-15 | Add support for array lua resources | Pavel Labath | 1 | -31/+46 | |
2011-06-15 | A rough version of resource implementation in lua | Pavel Labath | 1 | -0/+135 | |
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. |