Prev Previous Post   Next Post Next
Old 11-27-2011, 03:45 PM
delirius delirius is offline
Join Date: Feb 2010
Posts: 132
Default multiplatform compatibility framework update 1.1.1

Love compatibility framework for zen x-fi2 lua
by Delirius
current version 1.1.1
How to use:

copy dir "loveCompatibility" and file "conf.lua" to your app dir.

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:
if(love) then = main;

As seen in example main bundled with this release.

change settings in "conf.lua"
what you should change:
- t.console
- t.title
- t.screen.width
- t.screen.height
(fullscreen doesn't work)

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 "".
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.

working functions ""

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)


- fix: touch messages

- made compatible with Love2d 0.8.0
- compatibility with Love2d 0.7.2 is lost
- fix: text color works

- fix: loading image

- 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
Attached Images
File Type: png luave.png (6.3 KB, 112 views)
Attached Files
File Type: zip Luave_release (1.0.1).zip (20.3 KB, 52 views)
File Type: zip Luave(1.1.1)_for_love2d(0.8).zip (33.4 KB, 16 views)

Last edited by delirius; 08-21-2012 at 03:39 AM. Reason: update 1.1.1
Reply With Quote

Advertisement [Remove Advertisement]


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 03:29 AM.