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 

Windows luaplayer /n newline issue?

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



Joined: 09 Feb 2006
Posts: 3

PostPosted: Thu Feb 09, 2006 5:48 am    Post subject: Windows luaplayer /n newline issue? Reply with quote

When I use this code:

Code:
green = Color.new(0, 255, 0)
screen:print(0,0, "Hello World\nby Entity", green)
screen.flip()
while true do
   screen.waitVblankStart()
end


I end up with Hello World[weirdcharacter]by Entity. Is this an issue in Winluaplayer, or does it affect the PSP version as well?

I have a 2.6 PSP, so I can't test it myself.
Back to top
View user's profile Send private message
LuMo



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Thu Feb 09, 2006 7:49 am    Post subject: Reply with quote

possibly cause \n is not implemented in the windows version?

greets
lumo
_________________
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Back to top
View user's profile Send private message Visit poster's website
fullerlee



Joined: 03 Nov 2005
Posts: 54

PostPosted: Thu Feb 09, 2006 8:02 am    Post subject: Reply with quote

I generally only test on windows luaplayer, so I'm not sure about on PSP.

I don't use any newlines, if I have multiple lines, I increment the y pos by 8 (the height of the bitmap font) and do multiple prints.

Code:

screen:print(0,0, "Hello World", green)
screen:print(0,8, "by Entity", green)


Lee
Back to top
View user's profile Send private message
SeparateEntity



Joined: 09 Feb 2006
Posts: 3

PostPosted: Thu Feb 09, 2006 10:28 am    Post subject: Reply with quote

I'm working on a simple brainf*** editor/interpreter. I'll need to split the BF code (the main string) to multiple lines. It would be much easier if it could support \n without having to code an inefficient and lengthy workaround.
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