Fading In and out

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
mdjenkins86
Posts: 8
Joined: Fri Nov 11, 2005 12:49 am
Location: Philly

Fading In and out

Post by mdjenkins86 »

Is it possible to adjust the contrast of the screen? To the effect of fading a screen/image in or out.
User avatar
JoshDB
Posts: 87
Joined: Wed Oct 05, 2005 3:54 am

Post by JoshDB »

You should use an image that contains a full 480x272 black square, and underneath have a 100% to 0% aplha gradient. Then just lower it or raise it as needed.
mdjenkins86
Posts: 8
Joined: Fri Nov 11, 2005 12:49 am
Location: Philly

Post by mdjenkins86 »

okay I think I got you. A png, black square 480x272 (screen}...blit that over an image with varing aplha gradients...is that it?
mdjenkins86
Posts: 8
Joined: Fri Nov 11, 2005 12:49 am
Location: Philly

Post by mdjenkins86 »

Thanks Josh it works great.
justatest
Posts: 10
Joined: Mon Dec 19, 2005 5:56 pm

Post by justatest »

can u post the sample code of 'aplha gradients'? i dont get the syntax usage .
LuMo
Posts: 410
Joined: Sun Aug 21, 2005 2:45 am
Location: Austria
Contact:

Post by LuMo »

justatest wrote:can u post the sample code of 'aplha gradients'? i dont get the syntax usage .
in an 8888 image (32bit)
all values are 0..255
psp's color format is 0xAABBGGRR
so you have to change value 0xAABBGGRR
to achieve blending, the stepsize depends on how fast you want to blend...

greets
lumo
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Post Reply