|
#1
|
|||
|
|||
|
Love compatibility framework for zen x-fi2 lua
by Delirius current version 1.1.1 How to use: 1) copy dir "loveCompatibility" and file "conf.lua" to your app dir. 2) To include and initialize love compatibility, at the beginning of main.lua add: require "loveCompatibility.load"; main = function() And at the end of main.lua add: end; if(love) then love.run = main; else main(); end; As seen in example main bundled with this release. 3) change settings in "conf.lua" what you should change: - t.console - t.title - t.author - t.screen.width - t.screen.height (fullscreen doesn't work) Buttons: home button is mapped to escape. power button is mapped to f1. File operations: In love framework you can't write to application source folder. Every write operation is done into application data folder (on winsows7 it is "C:\Users\User\AppData\Roaming"). More information can be found in "http://love2d.org/wiki/love.filesystem". loveCompatibility copies all read and written files from source folder and all new files to data folder. Files can be deleted only in data folder, so if you have copy of file in your source folder, you can never get rid of it. Image resources bins: As with zen you can use images packed into resource bins. For packing and unpacking use ThievingSix's X-Fi2 Resource Compiler/Decompiler. When resource bin is used to load image, its contents are unpacked to data directory into _ResBin_ directory. Btw. Zen resource bins aren't compressed. Implementation: working functions "http://en.wikipedia.org/wiki/User:Thieving6/X-FI_2_Lua" Usable tables: - string - package - image - os - button - touch - control - screen - color - text (need original font) - io - coroutine (maybe) - math - table - coroutine - debug - audio - wav + most misc functions Missing tables: - accelerometer (i have no idea, how to implement it) Functions which doesn't work properly: - screen.backlight (obviously) - screen.orientation (to be done) - image.setbg (who knows what it does anyway?) - image.fill (never used it anyway) - os.rename (does someone use it anyway?) - io.popen (zen x-fi2 lua doesn't have this function working) - io.popen (zen x-fi2 lua doesn't have this function working) - io.tmpfile - io.output - io.input - io.stdin - io.stdout - io.stderr - print (on love works differently) History: 1.1.1 - fix: touch messages 1.1.0 - made compatible with Love2d 0.8.0 - compatibility with Love2d 0.7.2 is lost - fix: text color works 1.0.1 - fix: loading image 1.0 - wav table - audio table - image.setresource 0.8 initial public release To run example in Love2d simply change extension from zip to love. Added second Zip with new updated version for compatibility with Lova2d 0.8.0 Last edited by delirius; 08-21-2012 at 03:39 AM. Reason: update 1.1.1 |
|
|
|||
|
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 09:45 AM.













Threaded Mode