| View previous topic :: View next topic |
| Author |
Message |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Mon Jul 18, 2005 2:44 am Post subject: 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). |
|
| Back to top |
|
 |
KaL
Joined: 03 Apr 2005 Posts: 41
|
Posted: Mon Jul 18, 2005 5:38 am Post subject: |
|
|
| One thing would be very interesting : to interface sce[...] functions with the your lua interpreter :p |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Mon Jul 18, 2005 5:49 am Post subject: |
|
|
| KaL wrote: | | One thing would be very interesting : to interface sce[...] functions with the your lua interpreter :p |
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. |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Thu Jul 21, 2005 3:25 am Post subject: |
|
|
| Now it is in subversion at psp/trunk/lua/liblua. |
|
| Back to top |
|
 |
mikeyleo
Joined: 21 Jul 2005 Posts: 6
|
Posted: Thu Jul 21, 2005 4:44 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Thu Jul 21, 2005 4:48 am Post subject: |
|
|
| 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. |
doc/manual.html looks like a good place to start :-) |
|
| Back to top |
|
 |
mikeyleo
Joined: 21 Jul 2005 Posts: 6
|
Posted: Thu Jul 21, 2005 5:22 am Post subject: |
|
|
| Shine wrote: | | 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. |
doc/manual.html looks like a good place to start :-) |
I must be blind too. :) I don't see a doc directory under the PSPDEV directory. Is there something else I need to download? |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Thu Jul 21, 2005 5:27 am Post subject: |
|
|
| 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? |
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:
svn co svn://svn.pspdev.org/psp/trunk/lua
and then it is in lua/lliblua/doc. |
|
| Back to top |
|
 |
mikeyleo
Joined: 21 Jul 2005 Posts: 6
|
Posted: Thu Jul 21, 2005 6:24 am Post subject: |
|
|
| Shine wrote: | | 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? |
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:
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. |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Thu Jul 21, 2005 6:45 am Post subject: |
|
|
| 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. |
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. |
|
| Back to top |
|
 |
mikeyleo
Joined: 21 Jul 2005 Posts: 6
|
Posted: Thu Jul 21, 2005 6:50 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Thu Jul 21, 2005 6:57 am Post subject: |
|
|
| mikeyleo wrote: | | I figure that there's documentation for them somewhere, I just can't figure out where. |
Please read my last answer again. |
|
| Back to top |
|
 |
mikeyleo
Joined: 21 Jul 2005 Posts: 6
|
Posted: Thu Jul 21, 2005 10:20 pm Post subject: |
|
|
| Shine wrote: | | mikeyleo wrote: | | I figure that there's documentation for them somewhere, I just can't figure out where. |
Please read my last answer again. |
Oh, I know what my problem was, I was looking at an older version of your player's sourcecode. Now I see the functions. Thank you for all your help. |
|
| Back to top |
|
 |
Panajev2001a
Joined: 20 Aug 2005 Posts: 100
|
Posted: Sat Aug 20, 2005 3:34 am Post subject: |
|
|
| 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 ? |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Sat Aug 20, 2005 3:40 am Post subject: |
|
|
| You are right, tolua is executed on your host system, so compiling it with psp-gcc doesn't make sense. |
|
| Back to top |
|
 |
Panajev2001a
Joined: 20 Aug 2005 Posts: 100
|
Posted: Sat Aug 20, 2005 4:01 am Post subject: |
|
|
| Shine wrote: | | You are right, tolua is executed on your host system, so compiling it with psp-gcc doesn't make sense. |
Thank you, I just wanted to make sure all was right in my head hehe ;).
Hopefully around PSP a nice community like PS2 Linux one builds up, so far so good IMHO. |
|
| Back to top |
|
 |
|