forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Lua Player version 0.20

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Sun Jun 04, 2006 4:22 am    Post subject: Lua Player version 0.20 Reply with quote

On http://www.luaplayer.org you can get the new version 0.20. It is updated to Lua 5.1, there are some bugfixes and a new function for loading images from memory. I'll try to add pspgl the next week.

The changelog:

v0.20
==========

  • updated for gcc 4.1 and Lua 5.1. Some things you need to change for 5.1:

    • change table iteration code: "for i, value in someTable do" to "for i, value in ipairs(someTable) do" (but use "pairs" for tables like "t={foo=bar, foobar=99}" and "ipairs" for tables like "t={foo, bar}")
    • it's pure Lua 5.1: no binary operators and double as number type (e.g. now you can use one number for storing IP addresses)

  • Sound.load doesn't crash any more on invalid filenames
  • fixed problems with daylight saving time
  • Font:getTextSize fixed. Test case:
    Code:

        proportional = Font.createProportional()
        proportional:setPixelSizes(0,8)
        test = proportional:getTextSize('some text')
        assert(test.width == 39)
        assert(test.height == 6)

  • blit operation from screen to image works now, e.g.:
    Code:

         screen:print(10, 10, "hello", Color.new(255,255,255))
         image = Image.createEmpty(480, 272)
         image:blit(0, 0, screen, 480, 272, 480, 272, true)

    and now you have an "image" with the text "hello"
  • TTF font plotting to images now sets the alpha value to opaque, so you can write e.g. something like this for buffering texts in images:
    Code:

         image = Image.createEmpty(400, 200)
         proportional = Font.createProportional()
         proportional:setPixelSizes(0, 16)
         image:fontPrint(proportional, 0, 20, 'Hello', Color.new(0, 255, 0))
         screen:blit(0, 0, image)
         screen:blit(3, 3, image)

  • new function Image.loadFromMemory for loading images from memory:
    Code:

         jpegFile = io.open("test.jpg", "rb")
         data = jpegFile:read("*a")
         jpegFile:close()
         image = Image.loadFromMemory(data)

    PNG and JPEG is supported and autodetected
  • image-to-image blitting now uses alpha full blending [Callum Bethune]
  • System.rename(oldName, newName) for renaming files and directories
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> General Discussion All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group