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 

Function help !

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



Joined: 24 Aug 2007
Posts: 88

PostPosted: Wed Aug 29, 2007 3:50 am    Post subject: Function help ! Reply with quote

Hi ,

I need help with a function :
Can somebody change this LUA code into C++ code?
Thanks, credit goes to translator.



Code:
green = Color.new(0,255,0)
blue = Color.new(0,0,255)
red = Color.new(255,0 ,0)


timer = Timer.new(0)
timer:stop()

function Blick()
timer:start()
if timer:time() >= 0 and timer:time() < 200 then
screen:clear(red)
end
if timer:time() >= 200 and timer:time() < 400 then
screen:clear(green)
end
if timer:time() >= 400 and timer:time() < 600 then
screen:clear(blue)
end
if timer:time() >= 600 then
timer:stop()
timer:reset(0)
end
end
Back to top
View user's profile Send private message
|Coolj|



Joined: 27 Aug 2007
Posts: 3

PostPosted: Wed Aug 29, 2007 3:59 am    Post subject: Reply with quote

Look at the psp-programming thread XD
Back to top
View user's profile Send private message
Question_dev



Joined: 24 Aug 2007
Posts: 88

PostPosted: Wed Aug 29, 2007 4:02 am    Post subject: Reply with quote

i have take a look, but cant find it :(
Back to top
View user's profile Send private message
flatmush



Joined: 07 Aug 2007
Posts: 28
Location: Here

PostPosted: Wed Aug 29, 2007 4:20 am    Post subject: Reply with quote

He's already asked here http://www.psp-programming.com/forums/index.php?topic=2728.0

He's just being lazy and making requests which iirc is against the forum rules.
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Question_dev



Joined: 24 Aug 2007
Posts: 88

PostPosted: Wed Aug 29, 2007 4:28 am    Post subject: Reply with quote

ok, ok....

I will make it self, but how did i code a timer like in the lua script? in c++
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 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