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 

screen:print

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



Joined: 29 Sep 2005
Posts: 59

PostPosted: Fri Sep 30, 2005 6:49 pm    Post subject: screen:print Reply with quote

k, this one stumped me, i have tryed doing this for about an hour now and can't seem to get it to work... i am making a game and i want to make it so when the cross button is pressed, it deletes a current screen:print on the screen, and replaces it with another screen:print. i have already tryed this:
Code:
if pad:cross() then
   screen.flip()
   screen.waitVblankStart()
   screen:print(x, y, "this text here", color)
end

but that doesn't work... if i could get some help with this that would be great (i'm so very sorry for posting so many questions but this is the easiest way to get help :))
Back to top
View user's profile Send private message AIM Address
chaos



Joined: 10 Apr 2005
Posts: 135

PostPosted: Fri Sep 30, 2005 6:54 pm    Post subject: Reply with quote

well, first everthing is backwards.

here is the order you want to do things...

step 1: draw things to the framebuffer (like screen:print)
step 2: wait for vertical sync (waits for screen to be ready)
step 3: then flip the buffer (this step actually shows what you've drawn in step 1)

additionally, make sure "color" is actually a color.
_________________
Chaosmachine Studios: High Quality Homebrew.
Back to top
View user's profile Send private message
LuMo



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Fri Sep 30, 2005 7:31 pm    Post subject: Reply with quote

Code:
if pad:cross() then
   screen:clear() --otherwise you overdraw it
   screen:print(x, y, "this text here", color) --put the text out
   screen.flip() --update the screen
end

thats it
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
Koba



Joined: 29 Sep 2005
Posts: 59

PostPosted: Fri Sep 30, 2005 7:39 pm    Post subject: Reply with quote

thanks a bunch guys, you rock!
Back to top
View user's profile Send private message AIM Address
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