QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

LUA Pixel(x, y) Function

This is a discussion on LUA Pixel(x, y) Function within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Help! I am trying to make a FADE function that fades from one picture to another. function fade(oldimage, newimage) for ...

Reply
 
LinkBack Thread Tools
Old 10-26-2005, 03:44 PM   #1
 
joreofiorio35's Avatar
 
Join Date: Oct 2005
Location: Indiana
Posts: 46
Trader Feedback: 0
Default LUA Pixel(x, y) Function

Help! I am trying to make a FADE function that fades from one picture to another.

Quote:
function fade(oldimage, newimage)
for fde=1, 255 do
for they=1, 272 do
for thex=1, 480 do
imgpixel=oldimageixel(t hex, they)
imgprgb=imgpixel:colors()
oimgpixel=newimageixel( thex, they)
oimgprgb=oimgpixel:colors ()

if imgprgb.r > oimgprgb.r then imgprgb.r=imgprgb.r-1 end
if imgprgb.r < oimgprgb.r then imgprgb.r=imgprgb.r+1 end
if imgprgb.g > oimgprgb.g then imgprgb.g=imgprgb.g-1 end
if imgprgb.g < oimgprgb.g then imgprgb.g=imgprgb.g+1 end
if imgprgb.b > oimgprgb.b then imgprgb.b=imgprgb.b-1 end
if imgprgb.b < oimgprgb.b then imgprgb.b=imgprgb.b+1 end

newpixcolor=Color.new(img prgb.r, imgprgb.g, imgprgb.b)
oldimageixel(thex, they, newpixcolor)
end
end
screen.flip()

end
end
Apparently, there are 2 pixel functions, one that is just a function that sets pixels, with 3 arguments, and one that just gets the color of a pixel, with two arguments.

NOW. When I call this function, it says "An argument was incorrect". I AM using the right number of arguments, and doing everything right (I think). Any help here Please?

Thanks,
Josh
joreofiorio35 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
function , lua , pixelx

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 08:24 PM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us