Lua library
Moderators: Shine, Insert_witty_name
Lua library
I've built a nice installation packet for using Lua in own programs: lua-psp-zip. A sample directory, with a minimal PSPSDK project, is included. It is like libpng and zlib: build it with "make" and install it with "make install" and you can use it for your projects from everywhere.
Perhaps it should be imported into the PSP svn (I don't have write access to it). I've tested it with my Snake and looks like it works. The only difference compared to the original Lua is, that I've written my own Makefile to produce only one lib instead of liblua and liblualib (liblualib.a is only some 94 kB, so I don't think this is a problem).
Perhaps it should be imported into the PSP svn (I don't have write access to it). I've tested it with my Snake and looks like it works. The only difference compared to the original Lua is, that I've written my own Makefile to produce only one lib instead of liblua and liblualib (liblualib.a is only some 94 kB, so I don't think this is a problem).
Not every application might need this, for example for my upcoming Lua Player I use higher level functions, like loadImage, blitImage with alpha channel etc., so this doesn't belong to a general lua-library, but it should be easy to map all sce-functions with tolua.KaL wrote:One thing would be very interesting : to interface sce[...] functions with the your lua interpreter :p
I must be blind too. :) I don't see a doc directory under the PSPDEV directory. Is there something else I need to download?Shine wrote:doc/manual.html looks like a good place to start :-)mikeyleo wrote:Is there a list of these higher level functions? I've looked in the include files of the PSPSDK and don't see them. Sorry if this is a stupid question.
It doesn't belong to the core PSPSDK, you have to do a checkout, like for all other libraries, which are already ported for the PSP, like zlib, libpng, jpeg and SDL:mikeyleo wrote:I must be blind too. :) I don't see a doc directory under the PSPDEV directory. Is there something else I need to download?
svn co svn://svn.pspdev.org/psp/trunk/lua
and then it is in lua/lliblua/doc.
I went to that directory and it had the docs for lua 5.0. I'm looking for a document that lists functions like loadImage and blitImage. Thanks for the help you've been giving me.Shine wrote:It doesn't belong to the core PSPSDK, you have to do a checkout, like for all other libraries, which are already ported for the PSP, like zlib, libpng, jpeg and SDL:mikeyleo wrote:I must be blind too. :) I don't see a doc directory under the PSPDEV directory. Is there something else I need to download?
svn co svn://svn.pspdev.org/psp/trunk/lua
and then it is in lua/lliblua/doc.
lualib is the pure Lua library for using in every PSP program. The function loadImage, blitImage etc. are defined in my upcoming PSP Lua Player and they are not Lua standard, so it doesn't belong to the general Lua library.mikeyleo wrote:I went to that directory and it had the docs for lua 5.0. I'm looking for a document that lists functions like loadImage and blitImage. Thanks for the help you've been giving me.
I don't have documented the Player at this time, you have to look at the source of the prelease of my player or just wait some days, until I find some time to finish a more complete release.
lualib is the pure Lua library for using in every PSP program. The function loadImage, blitImage etc. are defined in my upcoming PSP Lua Player and they are not Lua standard, so it doesn't belong to the general Lua library.
I don't have documented the Player at this time, you have to look at the source of the prelease of my player or just wait some days, until I find some time to finish a more complete release.[/quote]
I understand that these functions aren't part of Lua. The sample scripts I've looked at (your snake script and the steel script) use those functions. I looked at the source of your player, but didn't see them mentioned. I figure that there's documentation for them somewhere, I just can't figure out where.
I don't have documented the Player at this time, you have to look at the source of the prelease of my player or just wait some days, until I find some time to finish a more complete release.[/quote]
I understand that these functions aren't part of Lua. The sample scripts I've looked at (your snake script and the steel script) use those functions. I looked at the source of your player, but didn't see them mentioned. I figure that there's documentation for them somewhere, I just can't figure out where.
-
- Posts: 100
- Joined: Sat Aug 20, 2005 3:25 am
Shine, so with this library I can use LUA scripts in any programs done with PSPSDK and this LUA library, but tolua or tolua++ need to be compiled only for a cygwin/x86 target as the only thing they are doing is helping me pre-process header files so that LUA and my C/C++ files can work together (call LUA scripts from C/C++ code and vice-versa) and as such it would make no sense to me to compile it for PSP using psp-gcc... right ?
-
- Posts: 100
- Joined: Sat Aug 20, 2005 3:25 am