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 

LuaPlayer Bug

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
Teggles



Joined: 16 Jan 2006
Posts: 27

PostPosted: Wed May 03, 2006 5:13 pm    Post subject: LuaPlayer Bug Reply with quote

LuaPlayer cannot put fonts into a seperate image. Try this example to test. You must have arial.ttf in the current folder.

Code:

arial = Font.load("arial.ttf")
arial:setPixelSizes(0, 13)
local party = Image.createEmpty(480, 272)

while (true) do
screen:clear()
party:clear()
party:fontPrint(arial, 0, 0, "Raargh", Color.new(255, 255, 255))
party:print(0, 20, "Plain Text", Color.new(255, 255, 255))
screen:blit(0, 0, party)
screen.flip()
end


The plain text will display but the font will not. This is not a code problem, it will work if party is changed to screen.
Back to top
View user's profile Send private message
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Wed May 03, 2006 5:56 pm    Post subject: Re: LuaPlayer Bug Reply with quote

Try this: party:clear(Color.new(0, 0, 0, 255))

The bug was, that TTF font plotting to images doesn't set the alpha value to opaque, which was the reason that it is invisible when plotting, if not plotted on an image, where tha alpha value is already set to opaque. I've added this to the TODO list at http://wiki.ps2dev.org/psp:lua_player:todos
Maybe now that http://www.luaplayer.org has some Google Ads, I'll get some money to spend more time for Lua Player to fix these bugs for the next release :-)
Back to top
View user's profile Send private message
Teggles



Joined: 16 Jan 2006
Posts: 27

PostPosted: Wed May 03, 2006 7:27 pm    Post subject: Reply with quote

Thank you for that, however using that will mean everything blitted before "party" will be cleared. Changing it to 0 will show no text, and other values will make the menu/text lighter. I can't get it right. How can I fix this?
Back to top
View user's profile Send private message
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Wed May 03, 2006 8:18 pm    Post subject: Reply with quote

Teggles wrote:
I can't get it right. How can I fix this?


You could iterate through each pixel and change the color to transparent, if black, or you could wait until weekend when I have some time to release a new Lua Player version with the bug fixed :-)
Back to top
View user's profile Send private message
Danny769



Joined: 01 Feb 2006
Posts: 55

PostPosted: Thu May 04, 2006 12:25 pm    Post subject: Reply with quote

Shine wrote:
Teggles wrote:
I can't get it right. How can I fix this?


You could iterate through each pixel and change the color to transparent, if black, or you could wait until weekend when I have some time to release a new Lua Player version with the bug fixed :-)


Can you fix the extra memory usage issue as well please
Back to top
View user's profile Send private message
Teggles



Joined: 16 Jan 2006
Posts: 27

PostPosted: Thu May 04, 2006 2:14 pm    Post subject: Reply with quote

Danny769 wrote:
Shine wrote:
Teggles wrote:
I can't get it right. How can I fix this?


You could iterate through each pixel and change the color to transparent, if black, or you could wait until weekend when I have some time to release a new Lua Player version with the bug fixed :-)


Can you fix the extra memory usage issue as well please


That's a non-priority, GameShark. It's near pointless. I'd prefer actual important bugs get fixed like getting the width of fonts - it doesn't work AT ALL. Memory usage isn't a worry at all as our complex battle and isometric engines can run fine - these are probably the most complicated things ever done on LuaPlayer. I don't see why he should bother.

On another note, you did nothing for us. We don't steal any code at all. I completely rewrote the menu. Why? Because you had no idea how to code. It was absolutely awful. The battle engine and isometric engine are designed completely by myself, so I'll be killing anyone who claims they did work for it.
Back to top
View user's profile Send private message
Heroux



Joined: 26 Apr 2006
Posts: 6

PostPosted: Sun May 14, 2006 4:52 am    Post subject: Reply with quote

*ouch*

Bug Fix Request.

When blitting an image of large proportions (e.g. 512x512) to an area outside of the screen, after a certain point the image disappears completely before it should have left the screen. This seems like it is due to some kind of parameter (e.g. if blit -480x-272 or 960x544 then do not draw it) could this parameter be increased to +/- 512? Due to that fact that images up to 512 are supposed to be supported this would only make sense. I could really use it for scrolling purposes otherwise scrolling an image of large proportions seems pointless and does not work. And the bug Teggles brought up should be fixed as well. Thanks.
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 -> PSP Lua Player Development 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