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 

What´s wrong with the images?

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



Joined: 16 Dec 2005
Posts: 5

PostPosted: Tue Dec 20, 2005 8:43 pm    Post subject: What´s wrong with the images? Reply with quote

while true do
screen.waitVblankStart()
--Si pulsamos el boton X se acaba
pad=Controls.read()
if pad:start() then
break
end
if pad:triangle() then
screen:clear()
screen:blit(0, 0,Image.load("imagen/juego01.jpg"))
screen.flip()
end
if pad:l() then
screen:clear()
screen:blit(0, 0,Image.load("imagen/juego02.jpg"))
screen.flip()
end
if pad:r() then
screen:clear()
screen:blit(0, 0,Image.load("imagen/juego03.jpg"))
screen.flip()
end
if pad:circle() then
screen:clear()
screen:blit(0, 0,Image.load("imagen/juego04.jpg"))
screen.flip()
end
end

The program only changes the image when a button is pressed. Why the lua player crashes with "too many open files" error? Need I close the image loaded?
Back to top
View user's profile Send private message
KawaGeo



Joined: 27 Aug 2005
Posts: 191
Location: Calif Mountains

PostPosted: Wed Dec 21, 2005 1:44 am    Post subject: Reply with quote

Load them outside of the do loop.
_________________
Geo Massar
Retired Engineer
Back to top
View user's profile Send private message Send e-mail
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